diff --git "a/train.csv" "b/train.csv" --- "a/train.csv" +++ "b/train.csv" @@ -6159,324 +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 -"94 ""Refine Model +"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 -public RefineModel(EBT em) -{ -super( em); - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + private JPanel driver Panel = new JPanel (); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,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,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"88 ""Event Model + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner 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 Impact Report () + { + super ("""" Search Result GUI """"); - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + container = get Content Pane (); + set Size ( 800 , 250 ); -public void getIP Server( String serverIP) + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -this. serverIP = serverIP; + + Impact Report im = new Impact Report (); + } - 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 ) + { + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -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 ((((( + // Button Actions - protected void BuildEvent(){} +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else + if ( pair + . get + + + + public void impact Report ( String id ) { -Even + // super ("""" Impact Report """"); -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + container = get Content Pane (); + set Size ( 1020 , 740 ); - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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,Each artifact shall be placed under the control of a subscribermanager,106,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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); - } + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -// 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 + Socket server ; + String line = new String (); -public StringBuffer GenerateEvent() + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () { -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 -"73 ""Constraints -String id; - String name; - double value; - String logic; + Vector v = new Vector (); + Socket server ; + String line = new String (); - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + 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 +"74 ""database - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + * 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 name. -* @return String -*/ - public String getName() { -return name; - } /** -* Returns the value. -* @return double +* 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 double getValue() { -return value; - } + public int get /** -* Sets the id. -* @param id The id to set +* 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 setId(String id) { -this. id = id; - } + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - ** -* 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 +*/ + public void injectVa /** -* Sets the name. -* @param name The name to set -*/ - 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: Delete subscriptions (2.2.3) 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,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 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,The eventserver shall receive event messages when a requirement changes.,127,0 -"79 ""performance model Handler +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 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 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 - performance model Handler(String msg) +public void setCalculatedValues() { -this. strES = msg; - } +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 messageParser() + + public Vector getImpactReport() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value -//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; +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 getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; } - public void saveModel( int id) +public Vector get Values From Data Base () { -// save current model -database. saveCurrentModel( id); - } + 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 insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); + 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 ; }"" -",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 +",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; @@ -6568,714 +6562,485 @@ this. name = name; 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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;/ - /** -* 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 EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +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 -/** -* 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() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -_ activeThreads--; -notify(); - } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"86 ""EB Shape +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. -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public void Dispatch -public EBShape( int xpos, int ypos, Color col) + public String getErrorMessage() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; + return errMsg; } - public void Updaterequirement Info(String rno, String pname, String mname) + public boolean Contains(String ContextString, String SearchString) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - public boolean match( int mx, int my) - { -return true; - } +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 int GetX() +public MergeModel(EBT em) { -return x; +super( em); + MinimumNoRects = 3; } - public int GetY() - { -return y; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - public Color GetC() + +public StringBuffer GenerateEvent() { -return c; - } +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 String GetReqno() +public static void (String args[]) { -return requirement No; - } - - public String GetProject() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -return ProjectName; - } - - - public String GetModule() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"69 ""Notification Event +p -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 = 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 -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +private Hash table requirementDescTable = 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 Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = 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 PerformanceModel performance model= null - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public void parseSpeculateInformation(String str) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"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); +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -/** -* 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 identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +public void pullInformationFromDoors() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - /** -* 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 insertValuesInDataBase() { -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 -"86 ""EB Shape - +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -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 createExecuteString() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public void Updaterequirement Info(String rno, String pname, String mname) +public void parseImpactReport(String str) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +Connection conn = null; - public boolean match( int mx, int my) - { -return true; - } +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - public int GetX() - { -return x; - } +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 int GetY() - { -return y; +public RefineModel(EBT em) +{ +super( em); } - public Color GetC() + // Construct Visual model for Merge Event +public void BuildEvent() { -return c; - } + 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 String GetProject() - { -return ProjectName; +public ObsoleteModel(EBT em) +{ +super( em); } - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"50 ""Driver Description +// 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 -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 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + private long queryID = 0; -this. projectName = projec + public static int count = 0; -public String getChangedAttribute() + public PerformanceModel(String name, long queryID) { -return changedAttribute; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getDescription() + public Vector getConstraints() { -return description; +return constraintVector; } - public String getFromAttribute() + public Vector getDrivers() { -return fromAttribute; +return driverVector; } - public String getModulePath() + public String getName() { -return modulePath; +return name; } - public String getProjectName() + public void setName(String name) { -return projectName; +this. name = name; } - public String getRequirementID() + public void addDriver(DriverDescription driver) { -return requirementID; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public String getToAttribute() + public void removeDriver(DriverDescription driver) { -return toAttribute; +this. driverVector. remove( driver); } - public void setChangedAttribute(String changedAttribute) + public boolean containsDriver(DriverDescription driver) { -this. changedAttribute = changedAttribute; +return this. driverVector. contains( driver); } - public void setDescription(String description) + public void addConstraint(ConstraintsDescription constraint) { -this. description = description; +this. constraintVector. add( constraint); } - public void setFromAttribute(String fromAttribute) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. fromAttribute = fromAttribute; +return this. constraintVector. contains( constraint); } - public void setModulePath(String modulePath) + public void removeConstraint(ConstraintsDescription constraint) { -this. modulePath = modulePath; +this. constraintVector. remove( constraint); } - public void setProjectName(String projectName) + public DriverDescription getDriver(DriverDescription driver) { -this. projectName = projectName; - } +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public void setRequirementID(String requirementID) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. requirementID = requirementID; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public void setToAttribute(String toAttribute) + public long getQueryID() { -this. toAttribute = toAttribute; +return this. queryID; } - public String createKey() + public void setQueryID( long id) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +this. queryID = 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() + public String toString() { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"49 ""Constraints Description + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; +public ObsoleteModel(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); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -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(""""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 -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 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. +* True if this thread is currently processing. */ -private static class Symbol -{ -public chartoken; -public int theLine; +public boolean busy; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. +/** + * The thread pool that this object belongs to. */ +public ThreadPool owner; -public Balance( Reader inStream ) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -errors = 0; -tok = new Tokenizer( inStream ); +owner = o; } /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * Scan for and execute tasks. */ -public int checkBalance( ) +public void run() { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - +Runnable target = null; - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +do { -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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: 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 -"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() +target = owner. getAssignment(); +if ( target!=null) { -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } - - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 + 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) @@ -7300,157 +7065,75 @@ 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 -"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); - +",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 -/** -* 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 RefineModel(EBT em) { -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(); +super( em); } -}"" -",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 -"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; - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - public void createExecuteString() - { +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 -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +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); + } -public void parseImpactReport(String str) - { -Connection conn = null; + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"78 ""Notification Event + 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 = """"""""; @@ -7459,164 +7142,196 @@ 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 manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,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 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + 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 - // database and eventserver information - S +public ModifyModel(EBT em) +{ +super( em); + } - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() + // Construct Visual model for Merge Event +public void BuildEvent() { - public void windowClosing(WindowEvent evt) - { -try + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -public static void main(String args[]) - { -try +public StringBuffer GenerateEvent() { - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) { -try +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 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +"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) { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void getIP Server( String serverIP) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +this. serverIP = serverIP; + } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try +public void drawModel() { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +repaint(); +} - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) + +public void Clicked ( int x, int y) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public void CheckNotifyStatus() { -if (! listModel. isEmpty()) +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + 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 { -new AboutDialog ( this, true). show(); +Even + + +public String getrequirement Text(String r, String p, String m) +{ +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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"85 ""Decompose Model +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public DecomposeModel(EBT em) + 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 +"90 ""Merge Model + + +public MergeModel(EBT em) + { super( em); -MinimumNoRects = 3; + MinimumNoRects = 3; } @@ -7624,22 +7339,262 @@ MinimumNoRects = 3; public void BuildEvent() { ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - +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 Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 +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 + + + 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 +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 + +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)); + + +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 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 + +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 "86 ""EB Shape @@ -7705,147 +7660,124 @@ return ProjectName; { 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 -"85 ""Decompose Model - +",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; -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + // 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""""); - // Construct Visual model for Merge Event -public void BuildEvent() +addWindowListener( new WindowAdapter() { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + -public StringBuffer GenerateEvent() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) { -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 -"53 ""Performance Model + try + { +Notification -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +// 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 static int count = 0; - public PerformanceModel(String name, long queryID) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -return constraintVector; - } +N - public Vector getDrivers() +void DeleteEvent(String SubscriberName, String EventID) { -return driverVector; - } - - public String getName() +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) { -return name; - } +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +void DeleteRelatedEvents() { -if ( driverVector. contains( driver)) +while ( m_Deleterequirement List. size()!=0) { -} -else - this. driverVector. add( driver); - } + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + m_Deleterequirement List. remove(0); - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) +void AddSubscription(String SubscriberName, Requirement requirement ) { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { -this. constraintVector. remove( constraint); - } +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req - 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) +void UpdateDisplayList() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { - cd = (ConstraintsDescription) this + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) - { -this. queryID = id; - } + // 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 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include decomposing one requirement into two or more requirements.,122,0 + + +private 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 @@ -7921,637 +7853,294 @@ Vector driversVector = null; ConstraintsDescription constraint = null; int driverLoop"" -",62,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"77 ""Model Driver +",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; -String msg=""""""""; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -public ModelDriver(String text) + EventServerThread(ServerSocket ss) { -this. msg = text; -init(); - } - - - public void init() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -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 -"90 ""Merge Model - -public MergeModel(EBT em) + while( true) { -super( em); - MinimumNoRects = 3; - } + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - // Construct Visual model for Merge Event -public void BuildEvent() +public String getNextID() + { +try { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public StringBuffer GenerateEvent() +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -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 -"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 - + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -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 String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public String getConstraintFromDataBase(String queryID) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +String ConstString = new String(); +try { -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: 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 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + 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 SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +public ObsoleteModel(EBT em) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +super( em); + } -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +// 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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +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 -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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -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 -"81 ""subscribermanager +public ObsoleteModel(EBT em) +{ +super( em); + } -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +// 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, 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 StringBuffer GenerateEvent() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try +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); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +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. -// 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 StringBuffer GenerateEvent() { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +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 + +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 - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -// 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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: 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 -"77 ""Model Driver -String msg=""""""""; +this. projectName = projec -public ModelDriver(String text) +public String getChangedAttribute() { -this. msg = text; -init(); +return changedAttribute; } - - public void init() + public String getDescription() { -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 -"54 ""eventserver +return description; + } -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 String getFromAttribute() { -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 -"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 fromAttribute; + } - public PerformanceModel(String name, long queryID) + public String getModulePath() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +return modulePath; } - public Vector getConstraints() + public String getProjectName() { -return constraintVector; +return projectName; } - public Vector getDrivers() + public String getRequirementID() { -return driverVector; +return requirementID; } - public String getName() + public String getToAttribute() { -return name; +return toAttribute; } - public void setName(String name) + public void setChangedAttribute(String changedAttribute) { -this. name = name; +this. changedAttribute = changedAttribute; } - public void addDriver(DriverDescription driver) + public void setDescription(String description) { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +this. description = description; } - public void removeDriver(DriverDescription driver) + public void setFromAttribute(String fromAttribute) { -this. driverVector. remove( driver); +this. fromAttribute = fromAttribute; } - public boolean containsDriver(DriverDescription driver) + public void setModulePath(String modulePath) { -return this. driverVector. contains( driver); +this. modulePath = modulePath; } - public void addConstraint(ConstraintsDescription constraint) + public void setProjectName(String projectName) { -this. constraintVector. add( constraint); +this. projectName = projectName; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setRequirementID(String requirementID) { -return this. constraintVector. contains( constraint); +this. requirementID = requirementID; } - public void removeConstraint(ConstraintsDescription constraint) + public void setToAttribute(String toAttribute) { -this. constraintVector. remove( constraint); +this. toAttribute = toAttribute; } - public DriverDescription getDriver(DriverDescription driver) + public String createKey() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - 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 -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)); - - -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 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"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[]) + 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"" -",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 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } - - - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"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 ; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public int hashCode() { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } - - public void set Logic ( String logic ) { - this . logic = logic ; - } - - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } - - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } - - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - - public void set Units ( String units ) { - this . units = units ; - } - - public void set Value ( String units ) { - this . value = units ; - } - - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +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 /** @@ -8620,809 +8209,455 @@ for ( int i=0; i< threads. length; i++) { 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 -"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 +",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 -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -// 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public void ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat - +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - //This method displays the contents of two array list to console -public void DisplayValues() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { - 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 -"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 ""); +setVisible ( false); +dispose (); +} - container = get Content Pane (); - set Size ( 800 , 600 ); +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 - // 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 "" }; +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 - String project Name = this . proj Name Text . 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 static void main ( String [] args ) + public Vector getImpactReport() { - 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"76 ""Evaluator +//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 -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 Hash table requirementDescTable = new Hash table(); -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 Hash table constraintDescTable = new Hash table(); -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ + private Hash table performanceModelTable = new Hash table(); -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + private PerformanceModel performance model= null -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 parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -/** - * 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 void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = 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 void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -/** - * 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 createExecuteString() + { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -/** - * 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 parseImpactReport(String str) + { -/* - * 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 +Connection conn = null; +Statement stmt = 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. +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = 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. - */ +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 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 differentiate between evolutionary and speculative events.,130,0 -"58 ""Subscribed Model +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 +// 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 GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -public String GetSubscriberModule() { return SubscriberModule;} +// 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;/ -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"52 ""Pair + 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 String queryID; - private String queryString; +// 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 Pair(String queryID, String queryString) { +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -this. queryID = queryID; -this. queryString = queryString; +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 getQueryID() { -return this. queryID; - } + public void Dispatch - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String getErrorMessage() + { + return errMsg; } - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"79 ""performance model Handler - }"" -",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 -"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; + } -this. queryID = queryID; -this. queryString = queryString; + 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 getQueryID() { -return this. queryID; - } +//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 getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void setQueryString(String queryString) { -this. queryString = queryString; + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - 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); }"" -",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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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 chartoken; +public int theLine; - /** -* 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 Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - 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 +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: 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,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,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 - + * 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 - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +// 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w - - -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - - -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -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 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: 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 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } - - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } - - - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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); + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener( new WindowAdapter() { @@ -9513,562 +8748,385 @@ try 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"74 ""database +",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""""; -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 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 ; + } + 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 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 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; - /** -* 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) + // 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) { -conn = this. getConnect + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ -/** -* 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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -public void solveStructureEquation() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -public void getTrackVariableName() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -public void setCalculatedValues() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -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 - +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - public Vector getImpactReport() +void DeleteEvent(String SubscriberName, String EventID) { -//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 +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -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() +void DeleteRelatedEvents() { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +while ( m_Deleterequirement List. size()!=0) { - 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 - + Requirement requirement= (Requirement)( m_Deleterequirement List. get(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 -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect + m_Deleterequirement List. remove(0); -/** -* 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) +void AddSubscription(String SubscriberName, Requirement requirement ) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req -public void getTrackVariableName() +void UpdateDisplayList() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -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 + // 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 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 -"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) +private boolean Analyze_CheckSubscription(String str) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - +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 - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + 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(); -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) +//Re-execut +public String generateReport() { - 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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) { + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -return panel; - }"" -",51,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,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 subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } - //@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 -"82 ""Tokenizer + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"61 ""Worker Thread /** - * Constructor. - * @param inStream the stream containing a program. +* True if this thread is currently processing. */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - +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( ) -{ -while( nextChar( ) ) +public void run() { +Runnable target = null; - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +do { -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +target = owner. getAssignment(); +if ( target!=null) { -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - + 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 - /** - * 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 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 ; -/** - * 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 Constraints Description ( + String project Name , + String module Path , + String requirement 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 + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } -/** - * 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 get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } -/** - * 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"73 ""Constraints + public String get Module Path () { + return this . module Path ; + } -String id; - String name; - double value; - String logic; + public String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . 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 get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return 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 ; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } + public void set Units ( String units ) { + this . units = units ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public void set Value ( String units ) { + this . value = units ; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String get Impacted Constraint () { + return this . impacted Constraint ; } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String get Attribute () { + return this . attribute ; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } + public String get Performance Model Name () { + return this . performance Model Name ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - /** -* 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 -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 -"94 ""Refine Model + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -public RefineModel(EBT em) -{ -super( em); - } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 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 -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 + +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 @@ -10240,353 +9298,403 @@ return project_ path; 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: 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,Only registered subscribers shall be allowed to establish traces.,102,0 -"89 ""Event Line - -protected int top, left, right, bottom; +",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 EventLine ( int t, int l, int r, int b) +public Notification_Event() { -top = t; -left = l; -right = r; -bottom = b; + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"90 ""Merge Model +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -public MergeModel(EBT em) + public void ParseEvent(String TextLine) { -super( em); - MinimumNoRects = 3; - } + 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 - // 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 ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve -public StringBuffer GenerateEvent() +public void DisplayValues() { -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 -"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 + 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 +String id; + String name; + double value; + String logic; - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 - - -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 + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -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 id. +* @return int +*/ + public String getId() { +return 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++){ + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() { +return 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 + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + /** +* 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 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 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: 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 -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + public void Updaterequirement Info(String rno, String pname, String mname) { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - super ("""" Search Result GUI """"); - container = get Content Pane (); + public boolean match( int mx, int my) + { +return true; + } - set Size ( 800 , 250 ); - panel = new JPanel (); + public int GetX() + { +return x; + } - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + public int GetY() + { +return y; + } + public Color GetC() +{ +return c; + } - public static void main ( String [] args ) + public String GetReqno() { +return requirement No; + } - Impact Report im = new Impact Report (); - + public String GetProject() + { +return ProjectName; } - public Vector search Date () + 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 +"77 ""Model Driver - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +String msg=""""""""; - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) +public ModelDriver(String text) { +this. msg = text; +init(); + } - pair Vector = new Vector (); - query String Combo . remove All Items (); + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 - query String Combo . add Item ("""" Select Query String """"); +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 - Socket server ; - String line = new String (); + //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. - // Select Actions - public void action Performed ( Action Event e ) - { +//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 - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +//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 action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - if ( pair - . get + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } - public void impact Report ( String id ) + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - // super ("""" Impact Report """"); - - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - public Vector get Constraint From Data Base () - { + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - 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 + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public Vector get Driver From Data Base () - { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"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; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 + /** +* 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 @@ -10688,120 +9796,403 @@ 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 Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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,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,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"64 ""DOORs Thread Pool +",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; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: 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) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +"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; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } 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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: 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 -"86 ""EB Shape +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public EBShape( int xpos, int ypos, Color col) +public String searchDate() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void Updaterequirement Info(String rno, String pname, String mname) +public String searchQueryID(String date) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public boolean match( int mx, int my) + public String getConstraintFromDataBase(String queryID) { -return true; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public int GetX() + public String getDriverFromDataBase(String queryID) { -return x; - } +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 +"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 GetY() +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"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) { -return y; - } + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ - public Color GetC() + +} +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 { -return c; - } - public String GetReqno() + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -return requirement No; - } +// 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 +"63 ""Doors Thread - public String GetProject() +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 ProjectName; + theServer = ss; + count++; + taskNumber = count; } - public String GetModule() + public void run() { -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 -"89 ""Event Line -protected int top, left, right, bottom; + 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -public EventLine ( int t, int l, int r, int b) + 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 { -top = t; -left = l; -right = r; -bottom = b; + + } +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 int GetT() { return top;} +// 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 int GetL() { return left;} -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"Test case: 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 "70 ""Notification Processing // member variables for menu @@ -10908,115 +10299,336 @@ try 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 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +",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 - // database and eventserver information - S +protected int top, left, right, bottom; - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() +public EventLine ( int t, int l, int r, int b) { - public void windowClosing(WindowEvent evt) - { -try +top = t; +left = l; +right = r; +bottom = 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 +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() { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +// 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=""""""""; - private void saveMenuItemActionPerformed (ActionEvent evt) + 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 { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + Class. fo - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + + /** +* 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) { -exitApplication(); - } +conn = this. getConnect - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +/** +* 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) { -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()) +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 +"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) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +public void getIP Server( String serverIP) { -new AboutDialog ( this, true). show(); +this. serverIP = serverIP; } -void UpdateDisplayList() + 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() { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) +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 { - "" -",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 -Test case: Delete subscriptions (2.2.3) 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 +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +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; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 @@ -11088,7 +10700,94 @@ notify(); { _ 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 +",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; + } + + + // 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); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 "69 ""Notification Event public String m_SubscriberName = """"""""; @@ -11132,752 +10831,1132 @@ public void DisplayValues() System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); System. out. println("""" m_EventI"" -",69,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: 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 -"63 ""Doors Thread +",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 +"94 ""Refine Model -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +public RefineModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public void run() - { + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - 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 -"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 + 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +//Re-execut +public String generateReport() { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -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 -"49 ""Constraints Description + 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 -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +protected int top, left, right, bottom; - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - 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 int GetT() { return top;} - } +public int GetL() { return left;} +public int GetR() { return right;} - public String get Description () { - return this . description ; - } +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 get Logic () { - return this . logic ; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public String get Module Path () { - return this . module Path ; - } +public Requirement() +{ +} - public String get Project Name () { - return this . project Name ; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . 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 Value () { - return this . value ; - } +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 set Description ( String description ) { - this . description = description ; - } + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - public void set Logic ( String logic ) { - this . logic = logic ; - } + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +addWindowListener( new WindowAdapter() +{ - 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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } +// 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 String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - public String get Performance Model Name () { - return this . 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 void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + 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 +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 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"73 ""Constraints -String id; - String name; - double value; - String logic; +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + // 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 toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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 +"60 ""Thread Pool - /** -* Returns the id. -* @return int +/** +* The threads in the pool. */ - public String getId() { -return id; - } +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); - /** -* Returns the logic. -* @return 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 */ - public String getLogic() { -return logic; - } + pub /** -* Returns the name. -* @return String +* Get a new work assignment. +* +* @return A new assignment */ - public String getName() { -return name; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + /** -* Returns the value. -* @return double +* Called to block the current thread until +* the thread pool has no more work. */ - public double getValue() { -return value; + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); } +}"" +",60,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"77 ""Model Driver +String msg=""""""""; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; +public ModelDriver(String text) + { +this. msg = text; +init(); } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +public String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"91 ""Modify Model + public String getFromAttribute() + { +return fromAttribute; + } -public ModifyModel(EBT em) -{ -super( em); + public String getModulePath() + { +return modulePath; } + public String getProjectName() + { +return projectName; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + public String getRequirementID() + { +return requirementID; + } + public String getToAttribute() + { +return toAttribute; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } - 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"70 ""Notification Processing + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -// 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() + public void setModulePath(String modulePath) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +this. modulePath = modulePath; + } -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + public void setProjectName(String projectName) { -try +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -public static void main(String args[]) + public void setToAttribute(String toAttribute) { -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. toAttribute = toAttribute; + } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent 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() { -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"""" - private void saveMenuItemActionPerformed (ActionEvent evt) +public int hashCode() { -try +int hashCode = 0; +if ( hashCode == 0) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + 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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + performance model Handler(String msg) { -openEventsMenuItemActionPerformed( evt); +this. strES = msg; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + public void messageParser() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +//Re-execut +public String generateReport() { - int index = SubscriberList. 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; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"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 + 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 String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + 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 +"90 ""Merge Model -public String searchQueryID(String date) +public MergeModel(EBT em) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +super( em); + MinimumNoRects = 3; + } - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + // Construct Visual model for Merge Event +public void BuildEvent() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try +public StringBuffer GenerateEvent() { - 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 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"88 ""Event Model +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 +private String queryID; + private 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); + public Pair(String queryID, String queryString) { - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +this. queryID = queryID; +this. queryString = queryString; + } -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; + public String getQueryID() { +return this. queryID; } + public String getQueryString() { +return this. queryString; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } -public void drawModel() -{ -repaint(); -} + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + }"" +",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 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 void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public Notification_Event() { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -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 Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -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 ((((( + 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 - protected void BuildEvent(){} + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - protected void AddLine( int t, int l, int r, int b) +public void DisplayValues() { -EventLines. addElement( new EventLine( t, l, r, b)); -} - + 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 -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 static void (String args[]) { -Even +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 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: 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 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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +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 Requirement() {// empty constructor +panel = new JPanel(); -} +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 - 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=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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: 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 -"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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try +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 static void main(String args[]) - { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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, @@ -11951,131 +12030,23 @@ 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include merging requirements.,126,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The 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,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,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 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - - - - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get - - - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect - - -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - +",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 - //@param argsNo arguments are used. - public static void main(String args[]) +public static void (String args[]) { ThreadPool pool = new ThreadPool(1); int port = defaultPort; try { ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -12141,373 +12112,217 @@ 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 manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"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 ; - } +",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 - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; - } +private Hash table requirementDescTable = new Hash table(); - public void set Description ( String description ) { - this . description = description ; - } + private Hash table constraintDescTable = new Hash table(); - public void set Logic ( String logic ) { - this . logic = logic ; - } + private Hash table performanceModelTable = new Hash table(); - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + private PerformanceModel performance model= null - 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 parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = 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 String to String () { + public void createExecuteString() + { - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -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 parseImpactReport(String str) + { +Connection conn = 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 +Statement stmt = 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); +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; -/** -* 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 +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; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -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() + while( true) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + try { -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 -"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 +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - // Speculate Gui - public Speculate Gui () +public String getNextID() { - - 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 +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - void send Query TO Server () +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - 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 String searchQueryID(String date) { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public static void main ( String [] args ) + public String getConstraintFromDataBase(String queryID) { - 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 -"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; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + 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 +"85 ""Decompose Model - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - /** -* 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 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 receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; +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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 private static final int EOL = 0; @@ -12632,120 +12447,489 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { +",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 -this. queryID = queryID; -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() +{ +} - public String getQueryID() { -return this. queryID; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = 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 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 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"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 setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"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; }"" -",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 +",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 -private Connection conn; - private ResultSet rs; +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; private Statement stmt; + private ResultSet rs; - //EventParser Constructor - // initializes the Database connection - public EventParser() + + DOORsThread(ServerSocket ss) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + theServer = ss; + count++; + taskNumber = count; + } - public void updateEvent(String str, String ID) + public void run() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + 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 -//Check if a subscription exists - public boolean CheckSubscription(String str) + + //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. -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + +//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 -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +//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() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + /** +* Returns the id. +* @return int +*/ + public String getId() { -// 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 +return id; + } - public void speculate(String str) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -System. out. println(""""Speculate""""); -CallBack +return logic; + } -public void impactReport(String str) + /** +* Returns the name. +* @return String +*/ + public String getName() { -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: 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 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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; @@ -12870,436 +13054,268 @@ 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 -"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); - +",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 - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public void getIP Server( String serverIP) + DOORsThread(ServerSocket ss) { -this. serverIP = serverIP; + theServer = ss; + count++; + taskNumber = count; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"87 ""EBT -public void drawModel() -{ -repaint(); -} +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public void drawModel(EBShape sh) + +public EBT(Frame f) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +WorkArea. showText( sh); } -} -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 boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } -public void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) + public boolean mouseUp( java. awt.Evente, int x, int y) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +return true; + } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - protected void BuildEvent(){} +public void mouseExited( java. awt. event.MouseEvente){} - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +public void mousePressed( java. awt. event.MouseEvente){} -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 mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +public void paint(Graphics g) {} +public void update(Graphics g) {} - public StringBuffer GenerateEvent() + public JSplitPane getSplitPane() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +return splitPane; +} - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +public void valueChanged(ListSelectionEvent e) { -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: 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,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"89 ""Event Line - -protected int top, left, right, bottom; +if ( e. getValueIsAdjusting()) +return; +} +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -public EventLine ( int t, int l, int r, int b) +public void RedrawAll(EBShape sh) { -top = t; -left = l; -right = r; -bottom = b; +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 -public int GetT() { return top;} +private String server IP = """" local host """"; + private JPanel center Panel = null ; -public int GetL() { return left;} + private JPanel driver Panel = new JPanel (); -public int GetR() { return right;} + private JPanel driver Inner Panel = null ; -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 -"53 ""Performance Model + private JPanel impact Panel = null ; + private JPanel impact Inner P -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + public Impact Report () + { - private long queryID = 0; + super ("""" Search Result GUI """"); - public static int count = 0; + container = get Content Pane (); - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + set Size ( 800 , 250 ); - public Vector getConstraints() - { -return constraintVector; - } + panel = new JPanel (); - public Vector getDrivers() - { -return driverVector; - } + panel . set Layout ( null ); - public String getName() - { -return name; - } + this . server IP = + JOption Pane + . show In - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + public static void main ( String [] args ) { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + Impact Report im = new Impact Report (); - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public Vector search Date () { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public DriverDescription getDriver(DriverDescription driver) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -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 + pair Vector = new Vector (); - public long getQueryID() - { -return this. queryID; - } + query String Combo . remove All Items (); - public void setQueryID( long id) - { -this. queryID = id; - } + query String Combo . add Item ("""" Select Query String """"); - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"Test case: 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 -"77 ""Model Driver + Socket server ; + String line = new String (); -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + // Select Actions + public void action Performed ( Action Event e ) + { - 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"53 ""Performance Model + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + // Button Actions - private long queryID = 0; - public static int count = 0; +public void action Performed ( Action Event e ) { - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + if ( submit Button == e . get Source ()) { - public Vector getConstraints() - { -return constraintVector; - } + for ( int i = 0 ; i < pair Vector . size (); i ++) { - public Vector getDrivers() - { -return driverVector; - } + Pair pair = ( Pair ) pair Vector . get ( i ); - public String getName() - { -return name; - } + if ( pair + . get - 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) + public void impact Report ( String id ) { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } + // super ("""" Impact Report """"); - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } + container = get Content Pane (); - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } + set Size ( 1020 , 740 ); - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } + this . query ID = id ; - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) + System . out . println ("""" Impact Report Constructor ..... ID """" + - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + public Vector get Constraint From Data Base () { -return this. queryID; - } - public void setQueryID( long id) - { -this. queryID = id; - } + Vector v = new Vector (); - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"85 ""Decompose Model + Socket server ; + String line = new String (); -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + public Vector get Driver From Data Base () + { -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"64 ""DOORs Thread Pool + Vector v = new Vector (); -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 + 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 // member variables for menu @@ -13406,711 +13422,408 @@ try 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 -"89 ""Event Line +",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 -protected int top, left, right, bottom; + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public EventLine ( int t, int l, int r, int b) +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -top = t; -left = l; -right = r; -bottom = b; +return currentLine; } -public int GetT() { return top;} - -public int GetL() { return left;} +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"84 ""White Board Execution Graph +/** + * 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( ) ) +{ -//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 - + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +/** + * 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 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 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 timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ +/** + * 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 timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +/** + * 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 timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target +/** + * 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 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 void skip -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +/** + * 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 +String msg=""""""""; -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 -"88 ""Event Model +public ModelDriver(String text) + { +this. msg = text; +init(); + } -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 init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public void getIP Server( String serverIP) + performance model Handler(String msg) { -this. serverIP = serverIP; +this. strES = msg; } - - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + 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 drawModel() +//Re-execut +public String generateReport() { -repaint(); -} + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( 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 + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +private Hash table requirementDescTable = new Hash table(); - protected void BuildEvent(){} + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + private PerformanceModel performance model= null -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 parseSpeculateInformation(String str) { -Even +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Delete subscriptions (2.2.3) 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 -"90 ""Merge Model +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -public MergeModel(EBT em) + + public void createExecuteString() { -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) + { -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 -"70 ""Notification Processing +Connection conn = null; -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +Statement stmt = null; - // database and eventserver information - S +Vector constraintsVector = null; +Vector driversVector = null; - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +ConstraintsDescription constraint = null; -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try +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 int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -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 +public TextModel(EBT e) { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -// 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 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(); +} - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try +public void drawModel() { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +repaint(); +} - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"82 ""Tokenizer - // 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()) +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +return currentLine; +} -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +/** + * 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( ) ) { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"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 + /** + * 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; - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: Delete subscriptions (2.2.3) 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 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); - - -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub - - - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - - - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"69 ""Notification Event - -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim - -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - - -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - - - public void ParseEvent(String TextLine) - { - StringTokenizer LineSt; // Tokenizer for the line -int i=0; -LineSt = new StringTokenizer(TextLine, """"|""""); -m_SubscriberName = LineSt. nextToken// Set the other members before calling this function - - - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e - - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); - - -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub - - - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - - - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: 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 -"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 ) +for( ; nextChar( ); result += ch ) @@ -14169,530 +13882,396 @@ 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 -"79 ""performance model Handler +",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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +protected int top, left, right, bottom; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - 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 int GetT() { return top;} +public int GetL() { return left;} -//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 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 -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +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 saveModel( int id) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -// save current model -database. saveCurrentModel( id); - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public String get Description () { + return this . description ; + } - //@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 -"85 ""Decompose Model + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . 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 + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } -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 -"78 ""Notification Event + public void set Logic ( String logic ) { + this . logic = logic ; + } -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 Module Path ( String module Path ) { + this . module Path = module Path ; + } -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -// 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 Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } - 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 Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat - - - - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"70 ""Notification Processing + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + public String get Attribute () { + return this . attribute ; + } - // database and eventserver information - S + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + public String get Performance Model Name () { + return this . performance Model Name ; + } -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { -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 + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -// 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 boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: 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 - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +String id; + String name; + double value; + String logic; - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - // 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(); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } -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 -"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); + /** +* Returns the logic. +* @return String +*/ + 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){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} - - -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"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. +* Sets the id. +* @param id The id to set */ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public void setId(String id) { +this. id = id; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + ** +* Sets the logic. +* @param logic The logic to set */ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); + public void setLogic(String logic) { +this. logic = logic; } -} 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() - { -_ activeThreads++; -_ started = true; -notify(); + public void setName(String name) { +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 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 + +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 ) { -_ activeThreads--; -notify(); + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - /** -* 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 -"87 ""EBT + public String get Description () { + return this . description ; + } + public String get Logic () { + return 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 get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + public String get Value () { + return this . value ; } + public void set Description ( String description ) { + this . description = description ; + } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; + public void set Logic ( String logic ) { + this . logic = logic ; } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public void set Project Name ( String project Name ) { + this . project Name = project Name ; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } -public void mouseExited( java. awt. event.MouseEvente){} + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -public void mousePressed( java. awt. event.MouseEvente){} + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -public void mouseReleased( java. awt. event.MouseEvente){} + public String get Attribute () { + return this . attribute ; + } -public void mouseEntered( java. awt. event.MouseEvente){} + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -public void paint(Graphics g) {} + public String get Performance Model Name () { + return this . performance Model Name ; + } -public void update(Graphics g) {} + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - public JSplitPane getSplitPane() -{ -return splitPane; -} + 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 valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +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 RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,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: Delete subscriptions (2.2.3) 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 /** @@ -14731,460 +14310,480 @@ 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"63 ""Doors Thread +",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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public void run() - { +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - 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 -"62 ""Call Back +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = 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 void insertValuesInDataBase() +public void getIP Server( String serverIP) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - +this. serverIP = serverIP; + } - 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 ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public void parseImpactReport(String str) - { +public void drawModel() +{ +repaint(); +} -Connection conn = null; -Statement stmt = null; +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -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 -"62 ""Call Back +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 Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +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 ((((( - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null + protected void BuildEvent(){} - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -public void identifyPerformanceModels() +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; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - +Even -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public void createExecuteString() - { + 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 -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public void parseImpactReport(String str) - { +public Requirement() {// empty constructor -Connection conn = null; +} -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: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall restore the executable model to its prior state.,119,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 -"77 ""Model Driver -String msg=""""""""; +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 -public ModelDriver(String text) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -this. msg = text; -init(); +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public void init() + public String toString() { -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,A user shall register as a subscriber.,103,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() + /** +* Returns the name. +* @return String +*/ + public String getName() { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +return name; + } - public void updateEvent(String str, String ID) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +return valueFrom; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + public double getValueTo() { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +return valueTo; + } -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +this. id = id; + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -// 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 +this. name = name; + } - public void speculate(String str) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -System. out. println(""""Speculate""""); -CallBack +this. valueFrom = valueFrom; + } -public void impactReport(String str) + public void setValueTo( double value) { -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 -"58 ""Subscribed Model +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 -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +private String queryID; + private String queryString; -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 Pair(String queryID, String queryString) { -public String GetSubscriberReqno() { return SubscriberReqno;} +this. queryID = queryID; +this. queryString = queryString; -public String GetSubscriberModule() { return SubscriberModule;} + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public String getQueryID() { +return this. queryID; + } -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -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 { +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/** - * 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 void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -/** - * 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 match( int mx, int my) + { +return true; + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + public int GetX() + { +return x; + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public int GetY() + { +return y; + } -/** - * 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 Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } -/* - * 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 GetProject() + { +return ProjectName; + } - /** - * 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 GetModule() + { +return ModulePath; + }"" +",86,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: 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 +public ObsoleteModel(EBT em) +{ +super( em); + } -/** - * 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. - */ +// 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 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +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; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 "80 ""Requirement public String m_RequirementID =""""""""; @@ -15215,373 +14814,259 @@ public void ParseRequirement(String TextLine) { 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Delete subscriptions (2.2.3) 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 -"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 +",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 -public String GetSubscriberName() { return SubscriberName;} +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 GetSubscriberReqno() { return SubscriberReqno;} + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -public String GetSubscriberModule() { return SubscriberModule;} +panel = new JPanel(); -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -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 -"63 ""Doors Thread +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 -static private int count = 0; - private int taskNumber; - protected Done done; +public final static int defaultPort = 2347; ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - + // static int numberOfThreads = 3; - public void run() - { - while( true) + //@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"" -",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: 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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 + 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 - public Speculate Gui () - { - super ("" Speculate GUI ""); +private Hash table requirementDescTable = new Hash table(); - container = get Content Pane (); + private Hash table constraintDescTable = new Hash table(); - set Size ( 800 , 600 ); + private Hash table performanceModelTable = new Hash table(); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + private PerformanceModel performance model= null - // Submit Listener + 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 ) { - if ( e . get Source () == submit Button ) { +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - send Query TO Server (); - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - if ( e . get Source () == fetch Button ) { +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - System . out . println ("" Fetch Button Pressed - void send Query TO Server () + public void createExecuteString() { - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +public void parseImpactReport(String str) { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +Connection conn = null; - String [] attribute = { "" Value "", "" Attribute "" }; +Statement stmt = null; - String project Name = this . proj Name Text . get +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - 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 -"56 ""Event Parser +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 Connection conn; - private ResultSet rs; - private Statement stmt; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public void updateEvent(String str, String ID) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +this. projectName = projec -//Check if a subscription exists - public boolean CheckSubscription(String str) +public String getChangedAttribute() { +return changedAttribute; + } -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) + public String getDescription() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - +return description; + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public String getFromAttribute() { -// 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 - +return fromAttribute; + } - public void speculate(String str) + public String getModulePath() { -System. out. println(""""Speculate""""); -CallBack - +return modulePath; + } -public void impactReport(String str) + public String getProjectName() { -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 -"75 ""Driver +return projectName; + } -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + public String getRequirementID() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +return requirementID; } - - public String toString() + public String getToAttribute() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +return toAttribute; } - /** -* Returns the id. -* @return int -*/ - public String getId() + public void setChangedAttribute(String changedAttribute) { -return id; +this. changedAttribute = changedAttribute; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public void setDescription(String description) { -return name; +this. description = description; } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void setFromAttribute(String fromAttribute) { -return valueFrom; +this. fromAttribute = fromAttribute; } - - public double getValueTo() + public void setModulePath(String modulePath) { -return valueTo; +this. modulePath = modulePath; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void setProjectName(String projectName) { -this. id = id; +this. projectName = projectName; } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public void setRequirementID(String requirementID) { -this. name = name; +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public String createKey() { -this. valueFrom = valueFrom; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - - public void setValueTo( double value) + 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() { -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 -"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() +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +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 "91 ""Modify Model public ModifyModel(EBT em) @@ -15612,158 +15097,221 @@ thisEvent. append( new Date(). toString()+ """"|""""); 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 -"94 ""Refine Model +",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 +"88 ""Event Model -public RefineModel(EBT em) + +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) { -super( 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; } - // Construct Visual model for Merge Event -public void BuildEvent() + + public void ClearVectors() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -public StringBuffer GenerateEvent() + +public void drawModel() { -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +repaint(); +} - 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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - 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 + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String getConstraintFromDataBase(String queryID) +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -String ConstString = new String(); -try +Even + + +public String getrequirement Text(String r, String p, String m) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +return new String(""""requirementwill go here""""); + } - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try + public StringBuffer GenerateEvent() { - 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 -"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 new StringBuffer("""" """"); + }// end of GenerateEvent method - 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 + 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 +"private JPanel center Panel = null ; -// finds the subscribers for this requirement - public void IdentifySubscribers() + 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 () { -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 + super ("" Speculate GUI ""); -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + 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 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) + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + 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 -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 +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 "70 ""Notification Processing // member variables for menu @@ -15870,1009 +15418,1100 @@ try 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +",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 +"83 ""Variable -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + //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. -/** - * 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; +//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 - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +//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 - /** - * 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 -"74 ""database +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -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 + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +* Returns the logic. +* @return String +*/ + public String getLogic() { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - +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; + } /** -* 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 +* Returns the value. +* @return double */ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect - + public double getValue() { +return value; + } -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = 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 - - - 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. + /** +* Sets the logic. +* @param logic The logic to set */ -Collection assignments = new ArrayList(3); + public void setLogic(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 + /** +* 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() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + public void setValue( double value) { +this. value = value; + } /** -* Called to block the current thread until -* the thread pool has no more work. +* Returns the speculateValue. +* @return double */ - 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 getSpeculateValue() { +return speculateValue; } -}"" -",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 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"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. +* Sets the speculateValue. +* @param speculateValue The speculateValue to set */ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Returns the type. +* @return String */ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); + public String getType() { +return type; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Sets the type. +* @param type The type to set */ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); + public void setType(String type) { +this. type = type; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Returns the project_ path. +* @return String */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public String getProject_ path() { +return project_ path; } - /** -* Called to reset this object to -* its initial state. + /** +* Sets the project_ path. +* @param project_ path The project_ path to set */ - synchronized public void reset() - { -_ activeThreads = 0; + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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;/ +",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 +"87 ""EBT - 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 JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -// 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 EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - System. o +WorkArea. showText( sh); + } - // 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 boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - public String getErrorMessage() - { - return errMsg; + 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 boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; -for ( int i = 0"" -",57,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"79 ""performance model Handler +public void mouseExited( java. awt. event.MouseEvente){} -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 void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - performance model Handler(String msg) - { -this. strES = msg; - } +public void mouseEntered( java. awt. event.MouseEvente){} - 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 paint(Graphics g) {} +public void update(Graphics g) {} -//Re-execut -public String generateReport() + public JSplitPane getSplitPane() { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - +return splitPane; +} -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public void saveModel( int id) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -// save current model -database. saveCurrentModel( id); - } - +switch(EventList. getSelectedIndex()) - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +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 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 -"52 ""Pair +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 -private String queryID; - private String queryString; +protected int top, left, right, bottom; - public Pair(String queryID, String queryString) { +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -this. queryID = queryID; -this. queryString = queryString; - } +public int GetT() { return top;} - public String getQueryID() { -return this. queryID; - } +public int GetL() { return left;} - public String getQueryString() { -return this. queryString; - } +public int GetR() { return right;} - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +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 - public void setQueryString(String queryString) { -this. queryString = 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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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 - }"" -",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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: 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 -"49 ""Constraints Description +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +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 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 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 String get Description () { - return this . description ; - } +/** + * 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 String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public String get Units () { - return this . units ; - } - public String get Value () { - return this . 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 - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } +/* + * 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 set Module Path ( String module Path ) { - this . module Path = module Path ; - } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } + /** + * 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 set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +/** + * 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 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 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 +"91 ""Modify Model - public String get Attribute () { - return this . attribute ; +public ModifyModel(EBT em) +{ +super( em); } - 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(60,80,1); +CurrentEvent = 4; +} - 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(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - 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) +{ +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; -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 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 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,The eventserver shall receive event messages when a requirement changes.,127,0 -"69 ""Notification Event + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -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() +public String getNextID() + { +try { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public Object clone() throws CloneNotSupportedException +public String searchDate() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void ParseEvent(String TextLine) +public String searchQueryID(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 +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String getConstraintFromDataBase(String queryID) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -if ( m_Eve -public void DisplayValues() + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { - 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 -"74 ""database - + 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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +Socket aSocket; + int ID; + String EventLog; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -System. out. println("""" in get Connection""""); -Connection connect=null; + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; 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) +} +public void sendImpactReportToEventServer(String text) { -conn = this. getConnect - +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** -* 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) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -public void solveStructureEquation() + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +// 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; -public void getTrackVariableName() + //EventParser Constructor + // initializes the Database connection + public EventParser() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void setCalculatedValues() + public void updateEvent(String str, String 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 +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public Vector getImpactReport() +//Check if a subscription exists + public boolean CheckSubscription(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: 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,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,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,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,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // database and eventserver information - S - public Notification_Processing() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -try +// 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 static void main(String args[]) + public void speculate(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 +System. out. println(""""Speculate""""); +CallBack -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void impactReport(String str) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +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 +"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 - private void saveMenuItemActionPerformed (ActionEvent 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 -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +this. id = id; +this. type = type; +this. - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -exitApplication(); - } +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +//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() { -openEventsMenuItemActionPerformed( evt); - } +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + + /** +* Returns the id. +* @return int +*/ + public String getId() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +return id; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +return logic; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the name. +* @return String +*/ + public String getName() { -new AboutDialog ( this, true). show(); +return name; } -void UpdateDisplayList() + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"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 +"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) { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; try { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + + +} +public void sendImpactReportToEventServer(String text) { - "" -",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 -"56 ""Event Parser +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() +// 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""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void updateEvent(String str, String ID) + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +// 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); + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + // 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 + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"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 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +// 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 -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +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 -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + + public String getErrorMessage() { -// 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 + return errMsg; + } - public void speculate(String str) + public boolean Contains(String ContextString, String SearchString) { -System. out. println(""""Speculate""""); -CallBack +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 +"64 ""DOORs Thread Pool -public void impactReport(String str) +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@param argsNo arguments are used. + public static void main(String args[]) { -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 +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 @@ -16996,331 +16635,274 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"93 ""Obsolete Model +",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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; -public ObsoleteModel(EBT em) -{ -super( em); - } + // 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""""); -// Construct Visual model for Merge Event -public void BuildEvent() +addWindowListener( new WindowAdapter() { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve -public StringBuffer GenerateEvent() + 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) { -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 -"49 ""Constraints Description +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -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 ; +// 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 Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { +N - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement 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 - } +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public String get Description () { - return this . description ; - } + m_Deleterequirement List. remove(0); - 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 ; - } +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 get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + // 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 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 ; - } +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 +"private JPanel center Panel = null ; - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement 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 - public void set Units ( String units ) { - this . units = units ; - } + // Speculate Gui - public void set Value ( String units ) { - this . value = units ; - } + public Speculate Gui () + { - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + super ("" Speculate GUI ""); - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + container = get Content Pane (); - public String get Attribute () { - return this . attribute ; - } + set Size ( 800 , 600 ); - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - 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 ; - } + // Submit Listener - public String to String () { + public void action Performed ( Action Event e ) { - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + if ( e . get Source () == submit Button ) { + send Query TO Server (); -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 ( e . get Source () == fetch Button ) { -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 -"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; + System . out . println ("" Fetch Button Pressed - DOORsThread(ServerSocket ss) + void send Query TO Server () { - theServer = ss; - count++; - taskNumber = count; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + Socket socket ; + try { -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -/** - * 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 [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - /** - * 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 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; /** - * 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 -"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 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 /** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +* 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 /** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"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 (); -} +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -// 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 + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + /** +* 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 -// 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"91 ""Modify Model -public ModifyModel(EBT em) -{ +public MergeModel(EBT em) + { super( em); + MinimumNoRects = 3; } @@ -17328,364 +16910,77 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"78 ""Notification Event + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + 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(); -} + performance model Handler(String msg) + { +this. strES = msg; + } -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + public void messageParser() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public void ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +//Re-execut +public String generateReport() { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -// 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 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); + } - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"88 ""Event Model + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); - - - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add - - -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } - - - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - - -public void drawModel() -{ -repaint(); -} - - -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} - - -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} - - -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) -{ - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs - - -public void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - - - protected void BuildEvent(){} - - - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} - - -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even - - -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } - - - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - - - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +",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 String id; @@ -17777,800 +17072,623 @@ this. name = name; public void setValue( double value) { this. value = value; }"" -",73,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"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 -"48 ""Constraint Inner Panel +",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 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 int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public EBShape( int xpos, int ypos, Color col) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +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 ); - - 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 () + public void Updaterequirement Info(String rno, String pname, String mname) { - 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public static int count = 0; - public PerformanceModel(String name, long queryID) + public boolean match( int mx, int my) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +return true; } - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + public int GetX() { -return driverVector; +return x; } - public String getName() - { -return name; - } - public void setName(String name) + public int GetY() { -this. name = name; +return y; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + public Color GetC() { -} -else - this. driverVector. add( driver); +return c; } - public void removeDriver(DriverDescription driver) + public String GetReqno() { -this. driverVector. remove( driver); +return requirement No; } - public boolean containsDriver(DriverDescription driver) + public String GetProject() { -return this. driverVector. contains( driver); +return ProjectName; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public String GetModule() { -return this. constraintVector. contains( constraint); - } +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 +"66 ""Config Dialog - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - 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 +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: 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 -"48 ""Constraint Inner Panel +// 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 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 cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"85 ""Decompose Model -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 -"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 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;/ - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) - { - try + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -public String getNextID() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +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 searchDate() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -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(); +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) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + public void Dispatch - public String getDriverFromDataBase(String queryID) + public String getErrorMessage() { -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); + return errMsg; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + private JPanel driver Inner Panel = null ; - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d + private JPanel impact Panel = null ; + private JPanel impact Inner P - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + public Impact Report () { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() -{ + super ("""" Search Result GUI """"); - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} - + container = get Content Pane (); -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification + set Size ( 800 , 250 ); + panel = new JPanel (); -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In -/ 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 static void main ( String [] args ) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i + Impact Report im = new Impact Report (); -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + } - m_Deleterequirement List. remove(0); + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req + pair Vector = new Vector (); -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - // 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 (); + // Select Actions -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + public void action Performed ( Action Event e ) + { -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} +public void action Performed ( Action Event e ) { -/** - * 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 ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 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: 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 + System . out . println ("""" Impact Report Constructor ..... ID """" + -public MergeModel(EBT em) + public Vector get Constraint From Data Base () { -super( em); - MinimumNoRects = 3; - } + Vector v = new Vector (); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + Socket server ; + String line = new 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 + 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 - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + public Vector get Driver From Data Base () + { -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 -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 -"66 ""Config Dialog + Vector v = new Vector (); -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); + 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 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 -// 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 ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -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 -"67 ""Event Detail Dialog +// 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 -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) + //This method displays the contents of two array list to console +public void DisplayValues() { + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +public RefineModel(EBT em) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -private void okButtonActionPerformed (ActionEvent evt) +public StringBuffer GenerateEvent() { - if ( displayMode == true) +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 + +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) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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(); -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + +//Re-execut +public String generateReport() { -setVisible ( false); -dispose (); -} + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -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 -"69 ""Notification Event + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } -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() + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +super( em); + } -public Object clone() throws CloneNotSupportedException +// 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() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +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 ParseEvent(String TextLine) +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) { - 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: 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 +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +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; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: 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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -18624,308 +17742,201 @@ if( opSym. token == '(' && clSym. token != ')' || * 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: 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 -"69 ""Notification Event +",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 -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 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 -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +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 Object clone() throws CloneNotSupportedException +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public void ParseEvent(String TextLine) + +public Vector get Values From Data Base () { - 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 + 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 ParseLeftAndRightLists(String LeftLine, String RightLine) + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -public void DisplayValues() + +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { - 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 -"89 ""Event Line +public chartoken; +public int theLine; -protected int top, left, right, bottom; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public EventLine ( int t, int l, int r, int b) +public Balance( Reader inStream ) { -top = t; -left = l; -right = r; -bottom = b; +errors = 0; +tok = new Tokenizer( inStream ); } -public int GetT() { return top;} +/** + * 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 GetL() { return left;} -public int GetR() { return right;} + /** + * 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 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 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"87 ""EBT + /** + * 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 +"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(); - - - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } - - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +public Requirement() {// empty constructor - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} -public void update(Graphics g) {} + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public JSplitPane getSplitPane() -{ -return splitPane; -} +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 +"66 ""Config Dialog -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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 closeDialog(WindowEvent 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 comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 - -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 +// 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 ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); +private void cancelButtonActionPerformed (ActionEvent 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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,Event types shall include decomposing one requirement into two or more requirements.,122,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 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"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 +// 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 @@ -19042,617 +18053,590 @@ for ( int i = 0; i < EventShapes. size(); i++) ebs = (EBShape)EventShapes. elementAt( i); g. setC"" ",88,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: 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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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)); -public Requirement() {// empty constructor +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -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 +// 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 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"65 ""About Dialog +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,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,Event types shall include deleting a requirement.,125,0 -"82 ""Tokenizer +// 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; -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + 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; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +//Check if a subscription exists + public boolean CheckSubscription(String str) + { -/** - * 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( ) ) -{ +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +//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 -/** - * 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 speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"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 +* 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 /** - * 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 +* 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 /** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +_ activeThreads++; +_ started = true; +notify(); } - public String toString() + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; +_ activeThreads--; +notify(); } /** -* Returns the name. -* @return String +* Called to reset this object to +* its initial state. */ - public String getName() + synchronized public void reset() { -return name; - } - +_ 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 - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; +public ModifyModel(EBT em) +{ +super( em); } - public double getValueTo() - { -return valueTo; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Delete subscriptions (2.2.3) 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; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -this. valueFrom = valueFrom; - } - - public void setValueTo( double value) + while( true) { -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 -"58 ""Subscribed Model + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -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 String getNextID() + { +try { -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;} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -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: 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 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +public String searchQueryID(String date) { - 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 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + 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 - super ("""" Search Result GUI """"); - - container = get Content Pane (); +public ModifyModel(EBT em) +{ +super( em); + } - set Size ( 800 , 250 ); - panel = new JPanel (); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public static void main ( String [] args ) - { + 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 - Impact Report im = new Impact Report (); +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; } - public Vector search Date () - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - 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(); +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 - pair Vector = new Vector (); - query String Combo . remove All Items (); +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 . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - // Select Actions +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } - 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 void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - // Button Actions +public void drawModel() +{ +repaint(); +} -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - if ( pair - . get +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 impact Report ( String 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 ((((( - // super ("""" Impact Report """"); - - container = get Content Pane (); - set Size ( 1020 , 740 ); + protected void BuildEvent(){} - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public Vector get Constraint From Data Base () +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 + 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 +"82 ""Tokenizer - public Vector get Driver From Data Base () - { - Vector v = new Vector (); +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - 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 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; +/** + * 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 JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { - super ("""" Search Result GUI """"); + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - container = get Content Pane (); - set Size ( 800 , 250 ); +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - panel = new JPanel (); +for( ; nextChar( ); result += ch ) - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + /** + * 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 static void main ( String [] args ) - { - Impact Report im = new Impact Report (); +/** + * 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 Vector search Date () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { +private void skip - pair Vector = new Vector (); - query String Combo . remove All Items (); - - query String Combo . add Item ("""" Select Query String """"); - - Socket server ; - String line = new String (); - - - // Select Actions - - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -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 +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 "63 ""Doors Thread static private int count = 0; @@ -19682,292 +18666,471 @@ static private int count = 0; 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 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +",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 - // 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,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 -"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 id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - 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 logic. +* @param logic The logic to set +*/ + public void setLogic(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 + /** +* 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() - { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - // 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 speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public String getErrorMessage() - { - return errMsg; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -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 -"61 ""Worker Thread -/** -* True if this thread is currently processing. - */ -public boolean busy; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + /** +* 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 -/** - * 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: Delete subscriptions (2.2.3) 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 eventserver shall differentiate between evolutionary and speculative events.,130,0 -"76 ""Evaluator +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -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 GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -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 GetSubscriberModule() { return SubscriberModule;} -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -private static class Token +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -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 { +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +public String GetSubscriberReqno() { return SubscriberReqno;} -/** - * 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 String GetSubscriberModule() { return SubscriberModule;} -/** - * 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 String GetSubscriberKeyword1() { return SubscriberKeyword1;} -/** - * 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 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 String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public Requirement() {// empty constructor - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } - -/** +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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= + + +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. @@ -20010,239 +19173,311 @@ 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: 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 -"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 +",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 +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - /** - * 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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - /** -* 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - /** -* 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 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 -/** -* 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 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 void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + 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 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 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 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 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 Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"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: 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 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,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"53 ""Performance Model +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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public static int count = 0; - public PerformanceModel(String name, long queryID) +public EBShape( int xpos, int ypos, Color col) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public Vector getConstraints() + + public void Updaterequirement Info(String rno, String pname, String mname) { -return constraintVector; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public Vector getDrivers() + + public boolean match( int mx, int my) { -return driverVector; +return true; } - public String getName() + + public int GetX() { -return name; +return x; } - public void setName(String name) + + public int GetY() { -this. name = name; +return y; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + public Color GetC() { -} -else - this. driverVector. add( driver); +return c; } - public void removeDriver(DriverDescription driver) + public String GetReqno() { -this. driverVector. remove( driver); +return requirement No; } - public boolean containsDriver(DriverDescription driver) + public String GetProject() { -return this. driverVector. contains( driver); +return ProjectName; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public String GetModule() { -return this. constraintVector. contains( 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 - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } +/** +* True if this thread is currently processing. + */ +public boolean busy; - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - dd = (DriverDescription) this. driverVector. get( i) +owner = o; +} - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) + +/** + * Scan for and execute tasks. + */ +public void run() { - cd = (ConstraintsDescription) this +Runnable target = null; - public long getQueryID() - { -return this. queryID; - } +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 void setQueryID( long id) - { -this. queryID = id; - } +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 toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 + 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 identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 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; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"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 @@ -20314,904 +19549,1108 @@ notify(); { _ 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 -"69 ""Notification Event +",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 -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 GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -public Notification_Event() + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public Object clone() throws CloneNotSupportedException +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - 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 +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -if ( m_Eve -public void DisplayValues() +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 { - 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: 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 -"50 ""Driver Description +public chartoken; +public int theLine; -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String 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; -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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 String getDescription() + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"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 description; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getFromAttribute() + public Vector getConstraints() { -return fromAttribute; +return constraintVector; } - public String getModulePath() + public Vector getDrivers() { -return modulePath; +return driverVector; } - public String getProjectName() + public String getName() { -return projectName; +return name; } - public String getRequirementID() + public void setName(String name) { -return requirementID; +this. name = name; } - public String getToAttribute() + public void addDriver(DriverDescription driver) { -return toAttribute; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public void setChangedAttribute(String changedAttribute) + public void removeDriver(DriverDescription driver) { -this. changedAttribute = changedAttribute; +this. driverVector. remove( driver); } - public void setDescription(String description) + public boolean containsDriver(DriverDescription driver) { -this. description = description; +return this. driverVector. contains( driver); } - public void setFromAttribute(String fromAttribute) + public void addConstraint(ConstraintsDescription constraint) { -this. fromAttribute = fromAttribute; +this. constraintVector. add( constraint); } - public void setModulePath(String modulePath) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. modulePath = modulePath; +return this. constraintVector. contains( constraint); } - public void setProjectName(String projectName) + public void removeConstraint(ConstraintsDescription constraint) { -this. projectName = projectName; +this. constraintVector. remove( constraint); } - public void setRequirementID(String requirementID) + public DriverDescription getDriver(DriverDescription driver) { -this. requirementID = requirementID; - } +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public void setToAttribute(String toAttribute) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. toAttribute = toAttribute; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public String createKey() + public long getQueryID() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +return this. queryID; } - 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 setQueryID( long id) { +this. queryID = id; + } -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() + public String toString() { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: 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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"private JPanel center Panel = null ; +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 +"49 ""Constraints Description - 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 project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - // Speculate Gui + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public Speculate Gui () + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { - super ("" Speculate GUI ""); + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - 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 String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - // Submit Listener + public String get Module Path () { + return this . module Path ; + } - public void action Performed ( Action Event e ) { + public String get Project Name () { + return this . project Name ; + } - if ( e . get Source () == submit Button ) { + public String get Requirement ID () { + return this . requirement ID ; + } - send Query TO Server (); + public String get Units () { + return this . units ; + } - } + public String get Value () { + return this . value ; + } - if ( e . get Source () == fetch Button ) { + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - System . out . println ("" Fetch Button Pressed + 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 ; + } - void send Query TO Server () - { + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + public void set Units ( String units ) { + this . units = units ; + } - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); + public void set Value ( String units ) { + this . value = units ; + } - Output Stream os = socket . get Output Stream (); - Output Stream + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - public void pull Value From DOORS () - { + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + public String get Attribute () { + return this . attribute ; + } - String [] attribute = { "" Value "", "" Attribute "" }; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - String project Name = this . proj Name Text . get + 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 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 receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: 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 -"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 to String () { + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - 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 +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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +private String queryID; + private String queryString; - // 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 Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - public String getErrorMessage() - { - return errMsg; } + public String getQueryID() { +return this. queryID; + } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + public String getQueryString() { +return this. queryString; + } -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"54 ""eventserver + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -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 setQueryString(String queryString) { +this. queryString = queryString; + } -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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"95 ""Text Model + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -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 + }"" +",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 void showText(EBShape sh) + //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() -{ -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 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 drawModel() -{ -repaint(); -} +//Check if a subscription exists + public boolean CheckSubscription(String str) + { -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: 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 -"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;/ +//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 EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +// 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 -// finds the subscribers for this requirement - public void IdentifySubscribers() + + public void speculate(String str) { -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(""""Speculate""""); +CallBack -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +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 -String sName, sReqno, sModule, sKey1, sKey2; -try +/** +* 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) { - System. o +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 - // 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 + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public String getErrorMessage() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { - return errMsg; +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; - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -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 -"73 ""Constraints -String id; - String name; - double value; - String logic; +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; +public String getChangedAttribute() + { +return changedAttribute; } + public String getDescription() + { +return description; + } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String getFromAttribute() + { +return fromAttribute; } + public String getModulePath() + { +return modulePath; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String getProjectName() + { +return projectName; } + public String getRequirementID() + { +return requirementID; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public String getToAttribute() + { +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public void setDescription(String description) + { +this. description = description; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + 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() + { - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -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 -"94 ""Refine Model +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -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() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -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 -"94 ""Refine Model + 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 RefineModel(EBT em) + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -super( em); - } +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - // Construct Visual model for Merge Event -public void BuildEvent() + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +return currentLine; } -public StringBuffer GenerateEvent() + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"93 ""Obsolete Model +return errors; +} -public ObsoleteModel(EBT em) + +/** + * 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( em); - } -// 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(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +return Character. isJavaIdentifierPart( ch ); +} -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +for( ; nextChar( ); result += ch ) - 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 + + /** + * 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 getNextID() - { -try +/** + * 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( ) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +/** + * 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( ) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +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 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 searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +// constructor +public Notification_Event() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + 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 String getConstraintFromDataBase(String queryID) + public void ParseEvent(String TextLine) { -String ConstString = new String(); -try +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - public String getDriverFromDataBase(String queryID) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -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 -"79 ""performance model Handler +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -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 + + //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 +"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; + } - performance model Handler(String msg) + public String toString() { -this. strES = msg; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public void messageParser() + /** +* Returns the id. +* @return int +*/ + public String getId() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +return 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; + /** +* 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 getValueFrom() + { +return valueFrom; } - public void saveModel( int id) + public double getValueTo() { -// save current model -database. saveCurrentModel( id); +return valueTo; } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; } - 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: 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 -"90 ""Merge Model + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public MergeModel(EBT em) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -super( em); - MinimumNoRects = 3; +this. valueFrom = valueFrom; } - // 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 setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The 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,A subscribermanager shall manage traces for one or more artifacts.,112,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: 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,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"95 ""Text Model + container = get Content Pane (); -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + set Size ( 800 , 250 ); -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 + panel = new JPanel (); + panel . set Layout ( null ); - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + this . server IP = + JOption Pane + . show In -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 static void main ( String [] args ) + { -public void drawModel() -{ -repaint(); -} + Impact Report im = new Impact Report (); + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"61 ""Worker Thread + public Vector search Date () + { -/** -* True if this thread is currently processing. - */ -public boolean busy; + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + Socket server ; + String line = new String (); -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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: 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 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -21277,477 +20716,347 @@ 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 -"61 ""Worker Thread +",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 +"70 ""Notification Processing -/** -* True if this thread is currently processing. - */ -public boolean busy; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +addWindowListener( new WindowAdapter() { -owner = o; -} + public void windowClosing(WindowEvent evt) + { +try -/** - * Scan for and execute tasks. - */ -public void run() +public static void main(String args[]) + { +try { -Runnable target = null; - -do + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { -target = owner. getAssignment(); -if ( target!=null) +try { - target. run(); - owner. done. worker"" -",61,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"74 ""database +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +// 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"""" - 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() + private void saveMenuItemActionPerformed (ActionEvent evt) { -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 + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - /** -* 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) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -conn = this. getConnect - +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 - /** -* 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) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - +openEventsMenuItemActionPerformed( evt); + } -public void solveStructureEquation() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public void getTrackVariableName() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public void setCalculatedValues() +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -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 +new AboutDialog ( this, true). show(); + } - public Vector getImpactReport() +void UpdateDisplayList() { -//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: 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 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } + "" +",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 +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +public Requirement() +{ +} - /** -* Returns the id. -* @return int -*/ - public String getId() +public Object clone() throws CloneNotSupportedException { -return id; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* Returns the name. -* @return String -*/ - public String getName() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -return name; - } - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +public void ParseRequirement(String TextLine) { -return valueFrom; - } + 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 - 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"60 ""Thread Pool +",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 -/** -* 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 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 + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -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 +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - /** -* 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(); +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); } -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 -"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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -/** -* 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 +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 -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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: 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 -"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 String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + 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 searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + + 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 getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - 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 +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 /** @@ -21786,535 +21095,459 @@ 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: Delete subscriptions (2.2.3) 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 -"92 ""New Model +",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 -public NewModel(EBT em) -{ -super( em); - } +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -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 -"private JPanel center Panel = 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 - 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 cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public Speculate Gui () - { +// 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 - super ("" Speculate GUI ""); +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - container = get Content Pane (); + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + 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 ; - // Submit Listener + } - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + public String get Description () { + return this . description ; + } - send Query TO Server (); + public String get Logic () { + return this . logic ; + } - } + public String get Module Path () { + return this . module Path ; + } - if ( e . get Source () == fetch Button ) { + public String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } - System . out . println ("" Fetch Button Pressed + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } - void send Query TO Server () - { + public void set Description ( String description ) { + this . description = description ; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + public void set Logic ( String logic ) { + this . logic = logic ; + } - Socket socket ; - try { + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - socket = new Socket ( ip , Port No ); + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } - Output Stream os = socket . get Output Stream (); - Output Stream + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - public void pull Value From DOORS () - { + public void set Units ( String units ) { + this . units = units ; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + public void set Value ( String units ) { + this . value = units ; + } - String [] attribute = { "" Value "", "" Attribute "" }; + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - String project Name = this . proj Name Text . get + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -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 void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } - 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 Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model 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 + 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 """" -//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 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 - // 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 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 + +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 getErrorMessage() + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - return errMsg; - } +this. id = id; +this. type = type; +this. - public boolean Contains(String ContextString, String SearchString) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -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,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On 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,Event types shall include merging requirements.,126,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 +//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 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 ) +public String toString() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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 get Values From Data Base () + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +return logic; + } - 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 -"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 + /** +* Returns the name. +* @return String +*/ + public String getName() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +return 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 - -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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"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 - + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = 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 + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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 + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -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 value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = 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++){ + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - 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 speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - 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 + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"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: 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 -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public String getDescription() - { -return description; - } +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -return modulePath; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public String getProjectName() - { -return projectName; - } - public String getRequirementID() - { -return requirementID; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +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 - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } +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 setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - 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() +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { - 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 -"94 ""Refine Model +setVisible ( false); +dispose (); +} -public RefineModel(EBT em) -{ -super( em); - } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -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 + +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 @@ -22438,507 +21671,638 @@ 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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,Event types shall include deleting a requirement.,125,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +",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 - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = 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 JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - super ("""" Search Result GUI """"); - container = get Content Pane (); +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } - set Size ( 800 , 250 ); - panel = new JPanel (); + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public void drawModel() +{ +repaint(); +} - public static void main ( String [] args ) - { +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - Impact Report im = new Impact Report (); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - public Vector search Date () - { - - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +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 - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +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 ((((( - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); + 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)); +} - // Select Actions - public void action Performed ( Action Event e ) - { +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 - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -public void action Performed ( Action Event e ) { + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); 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: 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 +"73 ""Constraints - Pair pair = ( Pair ) pair Vector . get ( i ); +String id; + String name; + double value; + String logic; - if ( pair - . get + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - public void impact Report ( String id ) - { + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - set Size ( 1020 , 740 ); - this . query ID = id ; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - public Vector get Constraint 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; + } + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"69 ""Notification Event - public Vector get Driver From Data Base () - { +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 - Vector v = new Vector (); +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - 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 -"62 ""Call Back + 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 requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - private Hash table performanceModelTable = new Hash table(); +if ( m_Eve - private PerformanceModel performance model= 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 void parseSpeculateInformation(String str) +public ModelDriver(String text) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +this. msg = text; +init(); + } -public void identifyPerformanceModels() + public void init() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 +/** +* True if this thread is currently processing. + */ +public boolean busy; -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - public void createExecuteString() - { +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 ; -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + 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 parseImpactReport(String str) + public Speculate Gui () { -Connection conn = null; + super ("" Speculate GUI ""); -Statement stmt = null; + container = get Content Pane (); -Vector constraintsVector = null; -Vector driversVector = null; + set Size ( 800 , 600 ); -ConstraintsDescription constraint = null; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -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 -"88 ""Event Model + // Submit Listener -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 action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + send Query TO Server (); + } -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + if ( e . get Source () == fetch Button ) { - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + System . out . println ("" Fetch Button Pressed -public void drawModel() -{ -repaint(); -} + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -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 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 CheckNotifyStatus() + public static void main ( String [] args ) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + 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; - protected void BuildEvent(){} + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - protected void AddLine( int t, int l, int r, int b) +addWindowListener( new WindowAdapter() { -EventLines. addElement( new EventLine( t, l, r, b)); -} + public void windowClosing(WindowEvent evt) + { +try -protected void AddEventRect( int x, int y, int colorStatus) +public static void main(String args[]) + { +try { -if ( colorStatus == 1) + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -Even +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" -public String getrequirement Text(String r, String p, String m) + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { -return new String(""""requirementwill go here""""); - } + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) + // 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()) { -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"71 ""Requirement + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { -} + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public Object clone() throws CloneNotSupportedException + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +new AboutDialog ( this, true). show(); } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +void UpdateDisplayList() { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { - 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"50 ""Driver Description + "" +",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 projectName = null; - private String modulePath = null; - private String requirementID = null; +private String server IP = """" local host """"; + private JPanel center Panel = null ; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -this. projectName = projec + super ("""" Search Result GUI """"); -public String getChangedAttribute() - { -return changedAttribute; - } + container = get Content Pane (); - public String getDescription() - { -return description; - } + set Size ( 800 , 250 ); - public String getFromAttribute() - { -return fromAttribute; - } + panel = new JPanel (); - public String getModulePath() - { -return modulePath; - } + panel . set Layout ( null ); - public String getProjectName() - { -return projectName; - } + this . server IP = + JOption Pane + . show In - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() + public static void main ( String [] args ) { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + Impact Report im = new Impact Report (); - public void setDescription(String description) - { -this. description = description; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) + public Vector search Date () { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public void setRequirementID(String requirementID) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + pair Vector = new Vector (); - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } + query String Combo . remove All Items (); - public boolean equals(Object o) + 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 ) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + + // 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 () { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + Vector v = new Vector (); + + Socket server ; + String line = new String (); -public int hashCode() + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () { -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 + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -22970,109 +22334,136 @@ 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 -"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 ; - } +",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 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) + //@param argsNo arguments are used. + public static void main(String args[]) { - 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: Delete subscriptions (2.2.3) 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 -"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 () +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 - 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 ) { +/** +* True if this thread is currently processing. + */ +public boolean busy; - if ( e . get Source () == submit Button ) { +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - send Query TO Server (); - } +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - if ( e . get Source () == fetch Button ) { +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - System . out . println ("" Fetch Button Pressed +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. +*/ - void send Query TO Server () + synchronized public void waitDone() { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); +/** +* 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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { +_ activeThreads++; +_ started = true; +notify(); + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - public static void main ( String [] args ) + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { - 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 +_ 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 /** @@ -23142,205 +22533,360 @@ 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 -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 -"56 ""Event Parser +"73 ""Constraints -private Connection conn; - private ResultSet rs; - private Statement stmt; +String id; + String name; + double value; + String logic; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - 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 toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -//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 + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -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: 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"66 ""Config Dialog + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -// 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 NewModel(EBT em) +{ +super( em); + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -// 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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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 { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String toString() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"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;} + +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 +"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 + + /** -* Returns the id. -* @return int +* Get a new work assignment. +* +* @return A new assignment */ - public String getId() + public synchronized Runnable getAssignment() { -return id; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Returns the name. -* @return String +* Called to block the current thread until +* the thread pool has no more work. */ - public String getName() + public void complete() { -return name; +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); } +}"" +",60,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +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 - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) { -return valueFrom; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public double getValueTo() + public void Updaterequirement Info(String rno, String pname, String mname) { -return valueTo; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public boolean match( int mx, int my) { -this. id = id; +return true; } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public int GetX() { -this. name = name; +return x; } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public int GetY() { -this. valueFrom = valueFrom; +return y; } + public Color GetC() +{ +return c; + } - public void setValueTo( double value) + public String GetReqno() { -this. valueTo = valueTo; +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; }"" -",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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: Delete subscriptions (2.2.3) 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +",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 "76 ""Evaluator private static final int EOL = 0; @@ -23465,161 +23011,146 @@ 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 -"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() - { +",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 - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +public RefineModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -public String getNextID() - { -try +public StringBuffer GenerateEvent() { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +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 -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +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 searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try + public EventModel(EBT e) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public String getConstraintFromDataBase(String queryID) +public void getIP Server( String serverIP) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +this. serverIP = serverIP; + } - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try + public void ClearVectors() { - 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"85 ""Decompose Model +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public DecomposeModel(EBT em) +public void drawModel() { -super( em); -MinimumNoRects = 3; - } +repaint(); +} - // Construct Visual model for Merge Event -public void BuildEvent() +public void drawModel(EBShape sh) { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -public StringBuffer GenerateEvent() +private void ClearData() { -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: 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) +for ( int i = 0; i < EventShapes. size(); i++) { -super( em); +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} -// Construct Visual model for Merge Event -public void BuildEvent() +public void Clicked ( int x, int y) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -public StringBuffer GenerateEvent() +public void CheckNotifyStatus() { -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 -"89 ""Event Line +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -protected int top, left, right, bottom; + protected void BuildEvent(){} -public EventLine ( int t, int l, int r, int b) + + protected void AddLine( int t, int l, int r, int b) { -top = t; -left = l; -right = r; -bottom = b; +EventLines. addElement( new EventLine( t, l, r, b)); } -public int GetT() { return top;} +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 int GetL() { return left;} -public int GetR() { return right;} +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + + 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 "61 ""Worker Thread /** @@ -23658,591 +23189,446 @@ 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 -"90 ""Merge Model +",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 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 MergeModel(EBT em) - { -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 - // Construct Visual model for Merge Event -public void BuildEvent() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +private 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 { -private void closeDialog(WindowEvent 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 -// 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 - +/** + * 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 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 -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"89 ""Event Line -protected int top, left, right, bottom; +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } -public int GetT() { return top;} +/** + * 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 GetL() { return left;} -public int GetR() { return right;} +/* + * 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 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"94 ""Refine Model -public RefineModel(EBT em) -{ -super( em); - } + /** + * 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. - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"93 ""Obsolete 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 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 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 ; -public StringBuffer GenerateEvent() + 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 ) { -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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"89 ""Event Line -protected int top, left, right, bottom; + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public String get Description () { + return this . description ; + } -public int GetT() { return top;} + public String get Logic () { + return this . logic ; + } -public int GetL() { return left;} + public String get Module Path () { + return this . module Path ; + } -public int GetR() { return right;} + public String get Project Name () { + return this . project Name ; + } -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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"60 ""Thread Pool + public String get Requirement ID () { + return this . requirement ID ; + } -/** -* 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 get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -/** -* 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 Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* 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 set Module Path ( String module Path ) { + this . module Path = module Path ; + } + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } - /** -* 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 void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } -}"" -",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 -"77 ""Model Driver -String msg=""""""""; + public void set Units ( String units ) { + this . units = units ; + } -public ModelDriver(String text) - { -this. msg = text; -init(); + public void set Value ( String units ) { + this . value = units ; } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - /** -* 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 Attribute () { + return this . attribute ; + } - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } -} 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(); + public String get Performance Model Name () { + return this . performance Model Name ; } -} catch ( InterruptedException e + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: 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 + +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) { -_ activeThreads++; -_ started = true; -notify(); +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } + public Vector getConstraints() + { +return constraintVector; + } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public Vector getDrivers() { -_ activeThreads--; -notify(); +return driverVector; } + public String getName() + { +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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 +this. name = name; + } -public ModifyModel(EBT em) + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -super( em); +} +else + this. driverVector. add( driver); } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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() + public void removeDriver(DriverDescription driver) { -return id; +this. driverVector. remove( driver); } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public boolean containsDriver(DriverDescription driver) { -return logic; +return this. driverVector. contains( driver); } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public void addConstraint(ConstraintsDescription constraint) { -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; +this. constraintVector. add( constraint); } - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + 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) - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + 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: 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 - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +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 project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + 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; - /** -* 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 -"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 +//Check if a subscription exists + public boolean CheckSubscription(String str) + { -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 +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +//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 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(); -} +//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 drawModel() -{ -repaint(); -} + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +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 @@ -24366,191 +23752,341 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Delete 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 -"54 ""eventserver +",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; -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 + /** +* 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 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: 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"47 ""Impact Report + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -private String server IP = """" local host """"; - private JPanel center Panel = null ; +/** +* 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 - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = 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 JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { +_ activeThreads--; +notify(); + } - super ("""" Search Result GUI """"); - - container = get Content Pane (); - set Size ( 800 , 250 ); + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - panel = new JPanel (); +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - panel . set Layout ( null ); +public Requirement() +{ +} - this . server IP = - JOption Pane - . show In +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public static void main ( String [] args ) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - Impact Report im = new Impact Report (); +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 Vector search Date () + //@param argsNo arguments are used. + public static void main(String args[]) { - - 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 ) +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 - pair Vector = new Vector (); - - query String Combo . remove All Items (); +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - query String Combo . add Item ("""" Select Query String """"); + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - Socket server ; - String line = new String (); +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - // Select Actions +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 void action Performed ( Action Event e ) - { + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - 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 ++) { + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { - Pair pair = ( Pair ) pair Vector . get ( i ); + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - if ( pair - . get +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void impact Report ( String id ) +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - // super ("""" Impact Report """"); - - container = get Content Pane (); - set Size ( 1020 , 740 ); +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public Vector get Constraint From Data Base () + public String getDriverFromDataBase(String queryID) { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"53 ""Performance Model - Vector v = new Vector (); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - Socket server ; - String line = new String (); + private long queryID = 0; + public static int count = 0; - try - { - server = new Socket ( server IP , 1701 ); + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } - if ( server . is Connected () ) - { - Buffered + public Vector getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } + public String getName() + { +return name; + } - public Vector get Driver From Data Base () + public void setName(String name) { +this. name = name; + } - Vector v = new Vector (); + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - Socket server ; - String line = new String (); + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - try - { - server = new Socket ( server IP , 1701 ); + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"89 ""Event Line + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -protected int top, left, right, bottom; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public EventLine ( int t, int l, int r, int b) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -top = t; -left = l; -right = r; -bottom = b; -} - + dd = (DriverDescription) this. driverVector. get( i) -public int GetT() { return top;} + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this -public int GetL() { return left;} + public long getQueryID() + { +return this. queryID; + } -public int GetR() { return right;} + public void setQueryID( long id) + { +this. queryID = id; + } -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 + 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 "81 ""subscribermanager Socket aSocket; @@ -24601,9 +24137,201 @@ 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: 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: 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 +",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 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Delete subscriptions (2.2.3) 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 + +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 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 String id = """"""""; // requirement id ex WB10 @@ -24775,589 +24503,616 @@ return project_ path; 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 -"75 ""Driver +",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 -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 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 String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - /** -* Returns the id. -* @return int -*/ - public String getId() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -return id; - } - + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +public Vector get Values From Data Base () { -return valueFrom; - } + 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 getValueTo() + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -return valueTo; - } + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public JPanel get Panel () { -this. id = id; - } + 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 +String msg=""""""""; - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public ModelDriver(String text) { -this. name = name; +this. msg = text; +init(); } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void init() { -this. valueFrom = valueFrom; - } +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; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: Delete subscriptions (2.2.3) 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} /** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +public int checkBalance( ) { -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 +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + * 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 block the current thread until -* the thread pool has no more work. + * 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. */ - 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 -"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 + 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. +*/ - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + synchronized public void waitDone() { -this. id = id; -this. type = type; -this. - +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -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 - +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e -public String toString() +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +_ activeThreads++; +_ started = true; +notify(); + } /** -* Returns the id. -* @return int +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public String getId() + synchronized public void workerEnd() { -return id; +_ activeThreads--; +notify(); } /** -* Returns the logic. -* @return String +* Called to reset this object to +* its initial state. */ - public String getLogic() + synchronized public void reset() { -return logic; - } +_ 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 - /** -* Returns the name. -* @return String -*/ - public String getName() +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) { -return name; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public boolean match( int mx, int my) + { +return true; } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public int GetX() + { +return x; } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public int GetY() + { +return y; } - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public Color GetC() +{ +return c; } + public String GetReqno() + { +return requirement No; + } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + public String GetProject() + { +return ProjectName; } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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 type. -* @return String -*/ - public String getType() { -return type; - } +public Requirement() {// empty constructor - /** -* 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 - /** -* 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"90 ""Merge Model +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 + +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 MergeModel(EBT em) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -super( em); - MinimumNoRects = 3; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - // Construct Visual model for Merge Event -public void BuildEvent() + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -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 attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"82 ""Tokenizer +// 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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + + //This method displays the contents of two array list to console +public void DisplayValues() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + 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 +/** +* 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"74 ""database +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -/** - * Return an identifier read from input stream - * First character is already read into ch + /** + * Construct a connection object. + * @param Returns an object of type Connection */ -private String getRemainingString( ) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -String result = """""""" + ch; + Class. fo + -for( ; nextChar( ); result += ch ) + /** +* 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 /** - * 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 +* 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 /** - * 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 ) { } -} +* 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 -/** - * 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 solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -/** - * 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 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 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 -"61 ""Worker Thread +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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +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 -/** - * 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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,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 + + /** +* 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + /** +* 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 ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" 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 -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + /** +* 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_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +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 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 +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: 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 Socket aSocket; @@ -25408,334 +25163,172 @@ 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"88 ""Event 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 +"62 ""Call Back -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 Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null -public void getIP Server( String serverIP) + public void parseSpeculateInformation(String str) { -this. serverIP = serverIP; - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public void drawModel() -{ -repaint(); -} +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + public void createExecuteString() + { -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; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public void CheckNotifyStatus() +public void parseImpactReport(String str) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +Connection conn = null; - protected void BuildEvent(){} +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +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 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -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 +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() + { - 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 -"65 ""About Dialog + 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 +"89 ""Event Line -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"56 ""Event Parser +protected int top, left, right, bottom; -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public EventLine ( int t, int l, int r, int b) { - 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; +top = t; +left = l; +right = r; +bottom = b; +} -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +public int GetT() { return top;} -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +public int GetL() { return left;} +public int GetR() { return right;} -//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 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""""; -//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 Requirement() {// empty constructor - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -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 -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = 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 - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec - -public String getChangedAttribute() - { -return changedAttribute; - } - - public String getDescription() - { -return description; - } - - public String getFromAttribute() - { -return fromAttribute; - } - - public String getModulePath() - { -return modulePath; - } - - public String getProjectName() - { -return projectName; - } - - public String getRequirementID() - { -return requirementID; - } - - public String getToAttribute() - { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - - public void setDescription(String description) - { -this. description = description; - } - - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +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) { @@ -25767,271 +25360,519 @@ 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 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +",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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - public boolean match( int mx, int my) - { -return true; - } - public int GetX() - { -return x; - } +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 +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 int GetY() - { -return y; - } - public Color GetC() +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - 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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"92 ""New Model -public NewModel(EBT em) +private void okButtonActionPerformed (ActionEvent evt) { -super( em); - } + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - // Construct Visual model for Merge Event -public void BuildEvent() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +setVisible ( false); +dispose (); } -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 -"61 ""Worker Thread +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +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 +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"53 ""Performance Model +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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = 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 long queryID = 0; - public static int count = 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 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() - { -return constraintVector; - } - public Vector getDrivers() - { -return driverVector; - } +//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 getName() - { -return name; - } - public void setName(String name) + +public String toString() { -this. name = name; - } +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public void addDriver(DriverDescription driver) + + /** +* Returns the id. +* @return int +*/ + public String getId() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return id; } - public void removeDriver(DriverDescription driver) + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -this. driverVector. remove( driver); +return logic; } - public boolean containsDriver(DriverDescription driver) + + /** +* Returns the name. +* @return String +*/ + public String getName() { -return this. driverVector. contains( driver); +return name; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - 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; + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; } - public void setQueryID( long id) - { -this. queryID = id; + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"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 + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +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 + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"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 @@ -26041,7 +25882,38 @@ public void ParseRequirement(String TextLine) 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 +",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); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 "78 ""Notification Event public String m_SubscriberName = """"""""; @@ -26092,810 +25964,473 @@ 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 -"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(); -} +",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 Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public void ParseEvent(String TextLine) +public EBShape( int xpos, int ypos, Color col) { - 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 +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public void Updaterequirement Info(String rno, String pname, String mname) { -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 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: 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 -"90 ""Merge Model +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public MergeModel(EBT em) + public boolean match( int mx, int my) { -super( em); - MinimumNoRects = 3; +return true; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"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) + public int GetX() { +return x; + } -this. projectName = projec -public String getChangedAttribute() + public int GetY() { -return changedAttribute; +return y; } - public String getDescription() - { -return description; + public Color GetC() +{ +return c; } - public String getFromAttribute() + public String GetReqno() { -return fromAttribute; +return requirement No; } - public String getModulePath() + public String GetProject() { -return modulePath; +return ProjectName; } - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + public String GetModule() { -return requirementID; - } +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 +"88 ""Event Model - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } +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 setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + 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 setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) +public void getIP Server( String serverIP) { -this. projectName = projectName; +this. serverIP = serverIP; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - 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 drawModel() +{ +repaint(); +} -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"Test case: 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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 ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) +public void Clicked ( int x, int y) { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); 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 + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +public void CheckNotifyStatus() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - /** -* 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(); + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); } -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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"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(); +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + else { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +Even -/** -* 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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"63 ""Doors Thread + 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: 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 +{ +public chartoken; +public int theLine; -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - public void run() - { +/** + * 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; - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + /** + * 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 commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + + /** + * 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 - performance model Handler(String msg) +public MergeModel(EBT em) { -this. strES = msg; +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(); + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -//Re-execut -public String generateReport() +public StringBuffer GenerateEvent() { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +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 +"52 ""Pair + +private String queryID; + private String queryString; -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + } + 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 setQueryID(String queryID) { +this. queryID = queryID ; + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void setQueryString(String queryString) { +this. queryString = queryString; } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + }"" -",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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +",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 - /** -* 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 String projectName = null; + private String modulePath = null; + private String requirementID = null; - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +this. projectName = projec -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() +public String getChangedAttribute() { -_ activeThreads++; -_ started = true; -notify(); +return changedAttribute; } - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String getDescription() { -_ activeThreads--; -notify(); +return description; } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public String getFromAttribute() { -_ 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: 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 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 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - +return fromAttribute; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + public String getModulePath() + { +return modulePath; + } + public String getProjectName() + { +return projectName; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + public String getRequirementID() + { +return requirementID; } + public String getToAttribute() + { +return toAttribute; + } - public boolean mouseDown( java. awt.Evente, int x, int y) + public void setChangedAttribute(String changedAttribute) { - return true; +this. changedAttribute = changedAttribute; } + public void setDescription(String description) + { +this. description = description; + } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public void mouseExited( java. awt. event.MouseEvente){} + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public void mousePressed( java. awt. event.MouseEvente){} + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} + public 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 void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) +public int hashCode() { -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() +int hashCode = 0; +if ( hashCode == 0) { -public void windowClosing(Wind"" -",87,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w - - -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - - -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"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= - + 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 -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 DecomposeModel(EBT em) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +super( em); +MinimumNoRects = 3; + } -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; -} - -/** - * 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. - */ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +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 // member variables for menu @@ -27003,448 +26538,447 @@ try { "" ",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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"49 ""Constraints Description +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 +"54 ""eventserver -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +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 - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +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 Constraints Description ( + public Constraint Inner Panel ( + String performance Model Name , String project Name , String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + 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 String get Description () { - return this . description ; } - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +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 String get Project Name () { - return this . project Name ; - } + if ( server . is Connected () ) + { + Buffered R - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { - public String get Value () { - return this . value ; - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } +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 void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - 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 void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . 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 String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public String get Attribute () { - return this . attribute ; - } +// 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 +"67 ""Event Detail Dialog - public void set Attribute ( String attribute ) { - this . attribute = 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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public String to String () { +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - 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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +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 -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); - - - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) +public static void (String args[]) { - return true; - } +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 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +private Connection conn; + private ResultSet rs; + private Statement stmt; - public void mouseClicked( java. awt. event.MouseEvente) + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { -VisualPanel.Clicked( e. getX(), e. getY()); -} - + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void mouseExited( java. awt. event.MouseEvente){} + 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 mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} +//Check if a subscription exists + public boolean CheckSubscription(String str) + { -public void mouseEntered( java. awt. event.MouseEvente){} +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void paint(Graphics g) {} -public void update(Graphics g) {} +//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 JSplitPane getSplitPane() -{ -return splitPane; -} +//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 valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public void speculate(String str) { -switch(EventList. getSelectedIndex()) +System. out. println(""""Speculate""""); +CallBack -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 -"94 ""Refine Model +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: 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 -"47 ""Impact Report +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 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 ); + 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 . server IP = - JOption Pane - . show In + 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 ) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { - - Impact Report im = new Impact Report (); + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); } - public Vector search Date () +public Vector get Values From Data Base () { - - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); + Vector v = new Vector (); 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 ()) + if ( server . is Connected () ) { - 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 ++) { + Buffered R - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get + 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 void impact Report ( String id ) +public JPanel get Panel () { + return panel ; + }"" +",48,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"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 () - { + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - try - { - server = new Socket ( server IP , 1701 ); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - if ( server . is Connected () ) - { - Buffered + /** +* 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 Vector get Driver From Data Base () - { + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - 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 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 @@ -27520,291 +27054,74 @@ Vector driversVector = null; ConstraintsDescription constraint = null; int driverLoop"" -",62,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"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;/ +",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 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 int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -// finds the subscribers for this requirement - public void IdentifySubscribers() + +public EBShape( int xpos, int ypos, Color col) { -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 +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + public void Updaterequirement Info(String rno, String pname, String mname) { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -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 boolean match( int mx, int my) + { +return true; + } - public String getErrorMessage() + public int GetX() { - return errMsg; +return x; } - public boolean Contains(String ContextString, String SearchString) + public int GetY() { -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 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include merging requirements.,126,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"74 ""database +return y; + } + public Color GetC() +{ +return c; + } -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + public String GetReqno() + { +return requirement No; + } - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + public String GetProject() + { +return ProjectName; + } - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public String GetModule() { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - - - - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get - - - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect - - -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe - - -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - - -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private - - -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ - -private void skip - - -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"66 ""Config Dialog +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 public ConfigDialog(Notification_Processing parent, boolean modal) { super ( parent, modal); @@ -27835,916 +27152,669 @@ 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: 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 -"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 () - { +",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 - super ("""" Search Result GUI """"); +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 - container = get Content Pane (); - set Size ( 800 , 250 ); +private Hash table requirementDescTable = new Hash table(); - panel = new JPanel (); + private Hash table constraintDescTable = new Hash table(); - panel . set Layout ( null ); + private Hash table performanceModelTable = new Hash table(); - this . server IP = - JOption Pane - . show In + private PerformanceModel performance model= null - public static void main ( String [] args ) + public void parseSpeculateInformation(String str) { - - Impact Report im = new Impact Report (); - - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public Vector search Date () +public void identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - 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 pullInformationFromDoors() { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - pair Vector = new Vector (); - - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - Socket server ; - String line = new String (); - // Select Actions + public void createExecuteString() + { - public void action Performed ( Action Event e ) - { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +public void parseImpactReport(String str) + { +Connection conn = null; -public void action Performed ( Action Event e ) { +Statement stmt = null; - if ( submit Button == e . get Source ()) { +Vector constraintsVector = null; +Vector driversVector = null; - for ( int i = 0 ; i < pair Vector . size (); i ++) { +ConstraintsDescription constraint = null; - Pair pair = ( Pair ) pair Vector . get ( i ); +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 - if ( pair - . get +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 void impact Report ( String id ) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; +this. projectName = projec - System . out . println ("""" Impact Report Constructor ..... ID """" + +public String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } - public Vector get Constraint From Data Base () + public String getFromAttribute() { +return fromAttribute; + } - Vector v = new Vector (); + public String getModulePath() + { +return modulePath; + } - Socket server ; - String line = new String (); + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - try - { - server = new Socket ( server IP , 1701 ); + public String getToAttribute() + { +return toAttribute; + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () + public void setModulePath(String modulePath) { +this. modulePath = modulePath; + } - Vector v = new Vector (); + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - Socket server ; - String line = new String (); + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - try - { - server = new Socket ( server IP , 1701 ); + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - 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 -"87 ""EBT + 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() + { -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public EBT(Frame f) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + 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; + /** +* 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()); -} + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -public void mouseExited( java. awt. event.MouseEvente){} + /** +* 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 -public void mousePressed( 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; -public void mouseReleased( java. awt. event.MouseEvente){} + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -public void mouseEntered( java. awt. event.MouseEvente){} +panel = new JPanel(); -public void paint(Graphics g) {} +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public void update(Graphics g) {} +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 - public JSplitPane getSplitPane() +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 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 + 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 +"54 ""eventserver -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 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 +"78 ""Notification Event - //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 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(); +} -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -//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 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 String toString() +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + //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 - /** -* Returns the logic. -* @return String -*/ - public String getLogic() +String msg=""""""""; + +public ModelDriver(String text) { -return logic; +this. msg = text; +init(); } - /** -* Returns the name. -* @return String -*/ - public String getName() + public void init() { -return name; - } +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;/ - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + 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 id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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. - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + public void Dispatch - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public String getErrorMessage() + { + return errMsg; } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +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= - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +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[ ] +{ - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +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 { - /** -* 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 -"60 ""Thread Pool +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} /** -* 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); - + * 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 /** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + * Construct an evaluator object. + * @param s the string containing the expression. */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + /** -* 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 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 - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** -* 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(); + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } -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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +/** + * 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 Requirement() {// empty constructor -} +/* + * 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 { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + /** + * 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 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 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - - - performance model Handler(String msg) - { -this. strES = msg; - } - - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); - - -//Re-execut -public String generateReport() -{ - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - - - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"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 -"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""""); - } +/** + * 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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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: 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 -"63 ""Doors Thread +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 -static private int count = 0; - private int taskNumber; - protected Done done; +public final static int defaultPort = 2347; ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - + // static int numberOfThreads = 3; - public void run() - { - while( true) + //@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"" -",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,Only registered subscribers shall be allowed to establish traces.,102,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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 + 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 private String name = null; @@ -28854,574 +27924,502 @@ return """"performance modelName = """" + """"\ 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 -"87 ""EBT - +",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; -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public EBT(Frame f) +public Balance( Reader inStream ) { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +errors = 0; +tok = new Tokenizer( inStream ); +} - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -WorkArea. showText( sh); - } +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } + /** + * 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 mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } + /** + * 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 void mouseClicked( java. awt. event.MouseEvente) +public ModifyModel(EBT em) { -VisualPanel.Clicked( e. getX(), e. getY()); -} - +super( em); + } -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 void mouseReleased( 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 mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + 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 void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + 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 -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -switch(EventList. getSelectedIndex()) -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) +String sName, sReqno, sModule, sKey1, sKey2; +try { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + System. o -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 -"74 ""database + // 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 -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 String getErrorMessage() + { + return errMsg; + } - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public boolean Contains(String ContextString, String SearchString) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - /** -* 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 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 +private Connection conn; + private ResultSet rs; + private Statement stmt; - /** -* 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) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -conn = this. getConnect - +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -/** -* 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 void updateEvent(String str, String ID) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public void solveStructureEquation() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void getTrackVariableName() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public void setCalculatedValues() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int 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 +// 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 Vector getImpactReport() + public void speculate(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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include adding new requirements.,121,0 -"47 ""Impact Report +System. out. println(""""Speculate""""); +CallBack -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +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 - private JPanel driver Inner Panel = null ; +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + //@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; - super ("""" Search Result GUI """"); +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - container = get Content Pane (); - set Size ( 800 , 250 ); +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - panel = new JPanel (); - panel . set Layout ( null ); +/** + * 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 . server IP = - JOption Pane - . show In + /** + * 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 static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + /** + * 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 +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 Vector search Date () + public String toString() { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +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 (); - query String Combo . add Item ("""" Select Query String """"); + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } - Socket server ; - String line = new String (); + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } - // Select Actions - public void action Performed ( Action Event e ) - { + public double getValueTo() + { +return valueTo; + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } -public void action Performed ( Action Event e ) { + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 +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 impact Report ( String id ) + public String toString() { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } - // super ("""" Impact Report """"); + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } - public Vector get Constraint From Data Base () + public double getValueTo() { +return valueTo; + } - 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 name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } - if ( server . is Connected () ) - { - Buffered + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } - public Vector get Driver From Data Base () + 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 - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -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: 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 -"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 -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 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - - -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); - - - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } - - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} - - -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} - - -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; +Socket aSocket; + int ID; + String EventLog; Connection conn; ResultSet rs; @@ -29467,466 +28465,217 @@ 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 -"71 ""Requirement +",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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -public Requirement() -{ -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -public Object clone() throws CloneNotSupportedException + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement 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 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 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + public String get Description () { + return this . description ; + } - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - performance model Handler(String msg) - { -this. strES = msg; + public String get Project Name () { + return this . project Name ; } - 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 Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -//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 Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public void set Logic ( String logic ) { + this . logic = logic ; } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( 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 void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void set Units ( String units ) { + this . units = units ; } - 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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: 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 -"83 ""Variable + public void set Value ( String units ) { + this . value = units ; + } -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 get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - //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 get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -//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 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 ; + } -//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 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 toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; /** -* Returns the id. -* @return int +* 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 getId() + + synchronized public void waitDone() { -return id; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - /** -* Returns the logic. -* @return String +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public String getLogic() + synchronized public void waitBegin() { -return logic; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - /** -* Returns the name. -* @return String +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public String getName() + synchronized public void workerBegin() { -return name; +_ activeThreads++; +_ started = true; +notify(); } /** -* Returns the value. -* @return double +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public double getValue() { -return value; + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } /** -* Sets the id. -* @param id The id to set +* Called to reset this object to +* its initial state. */ - public void setId(String id) { -this. id = id; - } - - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"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() + synchronized public void reset() { -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; +_ activeThreads = 0; }"" -",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 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +",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. @@ -29980,1211 +28729,904 @@ if (SearchString. length() == 0) return false; for ( int i = 0"" -",57,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +",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 JPanel driver Panel = new JPanel (); +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - private JPanel driver Inner Panel = null ; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { - 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 - +this. projectName = projec - public static void main ( String [] args ) +public String getChangedAttribute() { - - Impact Report im = new Impact Report (); - +return changedAttribute; } - - public Vector search Date () + public String getDescription() { +return description; + } - 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 getFromAttribute() { +return fromAttribute; + } - pair Vector = new Vector (); - - query String Combo . remove All Items (); - - query String Combo . add Item ("""" Select Query String """"); + public String getModulePath() + { +return modulePath; + } - Socket server ; - String line = new String (); + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - // Select Actions + public String getToAttribute() + { +return toAttribute; + } - public void action Performed ( Action Event e ) - { + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + public void setDescription(String description) + { +this. description = description; + } - // Button Actions + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -public void action Performed ( Action Event e ) { + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - if ( submit Button == e . get Source ()) { + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - Pair pair = ( Pair ) pair Vector . get ( i ); + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - if ( pair - . get + 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 void impact Report ( String id ) +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 - // super ("""" Impact Report """"); +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 ( 1020 , 740 ); - this . query ID = id ; +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - System . out . println ("""" Impact Report Constructor ..... ID """" + + } - public Vector get Constraint From Data Base () +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 - + Buffered R - public Vector get Driver From Data Base () + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try + if ( impacted Value ! = null ) { - server = new Socket ( server IP , 1701 ); + double value 1 = Double . parse Double ( value ); + d - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,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 decomposing one requirement into two or more requirements.,122,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 -"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 JPanel get Panel () { -p + return panel ; + }"" +",48,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"64 ""DOORs Thread Pool +String msg=""""""""; -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public ModelDriver(String text) + { +this. msg = text; +init(); + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public void init() { - 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 -"66 ""Config Dialog +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 -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + 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(); + } -// 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 getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + public String getName() + { +return name; + } -// 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 -"65 ""About Dialog + public void setName(String name) + { +this. name = name; + } -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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"84 ""White Board Execution Graph + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 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 long getQueryID() + { +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = 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 + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"79 ""performance model Handler -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ +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 double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + performance model Handler(String msg) + { +this. strES = msg; + } - 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 messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - 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 +//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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: 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 -"62 ""Call Back + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } -private Hash table requirementDescTable = new Hash table(); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - private Hash table constraintDescTable = new Hash table(); + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"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 - private Hash table performanceModelTable = new Hash table(); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - private PerformanceModel performance model= null + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void parseSpeculateInformation(String str) + performance model Handler(String msg) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // - +this. strES = msg; + } -public void identifyPerformanceModels() + public void messageParser() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +//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 insertValuesInDataBase() +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +// save current model +database. saveCurrentModel( id); + } + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - public void createExecuteString() - { + 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 -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +public ModifyModel(EBT em) +{ +super( em); + } -public void parseImpactReport(String str) - { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -Connection conn = null; -Statement stmt = null; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + 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 ; -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 -"77 ""Model Driver + 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 -String msg=""""""""; + // Speculate Gui -public ModelDriver(String text) + public Speculate Gui () { -this. msg = text; -init(); - } + super ("" Speculate GUI ""); - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: 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 -"84 ""White Board Execution Graph + 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 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + // Submit Listener + public void action Performed ( Action Event e ) { - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + if ( e . get Source () == submit Button ) { + send Query TO Server (); -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 + } + if ( e . get Source () == fetch Button ) { -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++ + System . out . println ("" Fetch Button Pressed - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; - 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 + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - 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 + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; -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 -"64 ""DOORs Thread Pool + String project Name = this . proj Name Text . get -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + 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 +"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 - //@param argsNo arguments are used. - public static void main(String args[]) +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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;/ - +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - 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 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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); - } +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 +"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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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; +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 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 +public void ParseRequirement(String TextLine) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + 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""""; -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +public Requirement() {// empty constructor -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +} +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. 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 - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +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 ; - public String getDriverFromDataBase(String queryID) + 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 () { -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 -"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; + 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: 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,Event types shall include merging requirements.,126,0 -"86 ""EB Shape + // Submit Listener -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + send Query TO Server (); + } - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + if ( e . get Source () == fetch Button ) { - public boolean match( int mx, int my) - { -return true; - } + System . out . println ("" Fetch Button Pressed - public int GetX() + void send Query TO Server () { -return x; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - public int GetY() - { -return y; - } + Socket socket ; + try { - public Color GetC() -{ -return c; - } + socket = new Socket ( ip , Port No ); - public String GetReqno() - { -return requirement No; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public String GetProject() + public void pull Value From DOORS () { -return ProjectName; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; - public String GetModule() + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) { -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 -"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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + 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 -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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;} - /** - * 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 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 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"94 ""Refine Model -public RefineModel(EBT em) +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + 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 -"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 () - { +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 - super ("""" Search Result GUI """"); - container = get Content Pane (); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - set Size ( 800 , 250 ); - panel = new JPanel (); +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - public static void main ( String [] args ) + public boolean mouseDown( java. awt.Evente, int x, int y) { - - Impact Report im = new Impact Report (); - + return true; } - public Vector search Date () - { + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +public void mouseExited( java. awt. event.MouseEvente){} - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +public void mousePressed( java. awt. event.MouseEvente){} - Socket server ; - String line = new String (); +public void mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} - // Select Actions +public void paint(Graphics g) {} - public void action Performed ( Action Event e ) - { +public void update(Graphics g) {} - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + public JSplitPane getSplitPane() +{ +return splitPane; +} - // Button Actions +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -public void action Performed ( Action Event e ) { +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - - - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"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)) +public void RedrawAll(EBShape sh) { +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"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 static void main(String s[]) { +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -} -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 +mainframe. addWindowListener( new WindowAdapter() { - - - - // 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 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - - - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +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; @@ -31210,8 +29652,26 @@ public String GetSubscriberModule() { return SubscriberModule;} public String GetSubscriberKeyword1() { return SubscriberKeyword1;} public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 +",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++) + { +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 @@ -31313,256 +29773,2567 @@ 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +",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 +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 String getFromAttribute() + { +return 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 String getModulePath() + { +return modulePath; + } + public String getProjectName() + { +return projectName; + } -public void CheckNotifyStatus() + public String getRequirementID() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +return requirementID; + } + public String getToAttribute() + { +return toAttribute; + } - protected void BuildEvent(){} + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = 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 void setProjectName(String projectName) + { +this. projectName = projectName; } - else + + public void setRequirementID(String requirementID) { -Even +this. requirementID = requirementID; + } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + 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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - protected void paintComponent(Graphics g) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"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 String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); + } + + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +"49 ""Constraints Description + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; + + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +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(); + + 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 +"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 + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"76 ""Evaluator + +private static final int EOL = 0; +private static final int VALUE = 1; +private static final int OPAREN= 2; +private static final int CPAREN= 3; +private static final int EXP = 4; +private static final int MULT= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } + + + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } + + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } + + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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( ) { -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +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( ) { -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 -"66 ""Config Dialog +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +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); + } + + // 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; + }"" +",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 + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 ; + + 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 ) { -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + if ( e . get Source () == submit Button ) { + send Query TO Server (); -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + } + if ( e . get Source () == fetch 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 + System . out . println ("" Fetch Button Pressed -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); + + 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 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +{ +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; } -// 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: 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"60 ""Thread Pool +/** + * 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 threads in the pool. -*/ -protected Thread threads[] = 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 + /** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); + * 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 +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( ); +} + + /** -* 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 + * 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 /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { + * 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 { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + "" +",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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + EventServerThread(ServerSocket ss) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -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: 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 manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"77 ""Model Driver -String msg=""""""""; + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -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: 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 -"65 ""About Dialog +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -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 + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 "65 ""About Dialog public AboutDialog(JFrame parent, boolean modal) { @@ -31572,315 +32343,412 @@ public AboutDialog(JFrame parent, boolean modal) { 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 -"79 ""performance model Handler +",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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - performance model Handler(String msg) + 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 void set Logic ( String logic ) { + this . logic = logic ; + } -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 -"82 ""Tokenizer + 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 ; + } -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -/** - * 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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +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 an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + 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 -for( ; nextChar( ); 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++ + 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 - */ -private void skip +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 +"85 ""Decompose Model -/** - * 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 DecomposeModel(EBT em) { -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 -"89 ""Event Line - -protected int top, left, right, bottom; +super( em); +MinimumNoRects = 3; + } -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(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -public int GetT() { return top;} -public int GetL() { return left;} +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"90 ""Merge Model -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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall be able to delete subscriptions.,107,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"78 ""Notification Event +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -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() + // Construct Visual model for Merge Event +public void BuildEvent() { - 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 + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - public void ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +public StringBuffer GenerateEvent() { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +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 +"74 ""database -// 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 +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 - //This method displays the contents of two array list to console -public void DisplayValues() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { - 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: 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 -"89 ""Event Line + Class. fo -protected int top, left, right, bottom; -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + /** +* 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 int GetT() { return top;} + /** +* 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 int GetL() { return left;} -public int GetR() { return right;} +/** +* 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 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 -"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 -"54 ""eventserver + /** +* 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 static void (String args[]) + +public void solveStructureEquation() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +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() { -p +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 final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 + + 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 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 String strES; // string received from eventserver @@ -31936,252 +32804,173 @@ database. injectVariables( id, variable); // 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: 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 -"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 +",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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + private long queryID = 0; + public static int count = 0; -public String searchQueryID(String date) + public PerformanceModel(String name, long queryID) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } - public String getConstraintFromDataBase(String queryID) + public Vector getConstraints() { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - +return constraintVector; + } - public String getDriverFromDataBase(String queryID) + public Vector getDrivers() { -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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"54 ""eventserver +return driverVector; + } -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 String getName() { -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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); +return name; } + 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; -} - - -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 -"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 void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -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 { +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -/** - * 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 addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -/** - * 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 boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -/** - * 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 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) -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + 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; + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public void setQueryID( long id) + { +this. queryID = id; + } + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"77 ""Model Driver -/** - * 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 msg=""""""""; +public ModelDriver(String text) + { +this. msg = text; +init(); + } -/* - * 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 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: 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 - /** - * 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} -/** - * 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 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 static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,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 subscribermanager shall differentiate between speculative and evolutionary events.,113,0 +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 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 String id = """"""""; // requirement id ex WB10 @@ -32353,710 +33142,573 @@ 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() - { -return constraintVector; - } - - public Vector getDrivers() - { -return driverVector; - } - - public String getName() - { -return name; - } - - public void setName(String name) - { -this. name = name; - } - - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - - -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +",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 -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -/** - * 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - /** - * 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 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 - /** - * 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 user shall be able to delete subscriptions.,107,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event message the eventserver shall record the event in an eventlog.,128,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 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); - } + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + 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 - 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 -"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: 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 ; -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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 ; -/** - * 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 get Description () { + return this . description ; + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public String get Project Name () { + return this . project Name ; + } -for( ; nextChar( ); result += ch ) + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } + public String get Value () { + return this . 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 + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } -/** - * 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 set Module Path ( String module Path ) { + this . module Path = module Path ; + } + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -/** - * 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 set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } -/** - * 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 set Value ( String units ) { + this . value = units ; + } -private void skip + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -/** - * 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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"47 ""Impact Report + public String get Attribute () { + return this . attribute ; + } -private String server IP = """" local host """"; - private JPanel center Panel = null ; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - private JPanel driver Panel = new JPanel (); + public String get Performance Model Name () { + return this . performance Model Name ; + } - private JPanel driver Inner Panel = null ; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public String to String () { - public Impact Report () - { + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - super ("""" Search Result GUI """"); - container = get Content Pane (); +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 - set Size ( 800 , 250 ); - panel = new JPanel (); +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 +"83 ""Variable - panel . set Layout ( 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 - this . server IP = - JOption Pane - . show In + + //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 void main ( String [] args ) +//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 - Impact Report im = new Impact Report (); - } +//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 Vector search Date () + +public String toString() { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - 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; + } - // Select Actions + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - 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 id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - // Button Actions + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void action Performed ( Action Event e ) { + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get + /** +* 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 void impact Report ( String id ) - { - // super ("""" Impact Report """"); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - public Vector get Constraint From Data Base () - { + /** +* 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 - Vector v = new Vector (); +/** +* True if this thread is currently processing. + */ +public boolean busy; - Socket server ; - String line = new String (); +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - try - { - server = new Socket ( server IP , 1701 ); +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - if ( server . is Connected () ) - { - Buffered +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"63 ""Doors Thread - public Vector get Driver From Data Base () - { +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - Vector v = new Vector (); - Socket server ; - String line = new String (); + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } - 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 -"88 ""Event Model + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"80 ""Requirement -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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"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 Requirement() {// empty constructor +} -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + 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=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 void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 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 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 BuildEvent(){} +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + 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 AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even + 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 getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + 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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 +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; @@ -33181,286 +33833,254 @@ 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 -"66 ""Config Dialog +",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 +"90 ""Merge Model -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -// 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 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"60 ""Thread Pool +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -/** -* 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); + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + /** + * Construct a connection object. + * @param Returns an object of type Connection */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -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 + Class. fo + /** -* Get a new work assignment. -* -* @return A new assignment +* 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 synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + public int get /** -* Called to block the current thread until -* the thread pool has no more work. +* 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 complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + public void saveCurrentModel( int graphId) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"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(); -} +conn = this. getConnect -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +/** +* 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 -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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + /** +* 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 - // 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 void solveStructureEquation() { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() -{ +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +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 -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try +public void setCalculatedValues() { -Notification +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 -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try + public Vector getImpactReport() { -Notification_Event nEvt1 = (Notificati +//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 +"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. +*/ -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + synchronized public void waitDone() { -N +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -void DeleteEvent(String SubscriberName, String EventID) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) +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() { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +_ activeThreads++; +_ started = true; +notify(); + } -void DeleteRelatedEvents() + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +_ activeThreads--; +notify(); + } - m_Deleterequirement List. remove(0); + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 + +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -void AddSubscription(String SubscriberName, Requirement requirement ) + //@param argsNo arguments are used. + public static void main(String args[]) { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req - + 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 -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +public RefineModel(EBT em) { - 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 - +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -private boolean Analyze_CheckSubscription(String str) +public StringBuffer GenerateEvent() { -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 +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. @@ -33514,696 +34134,700 @@ if (SearchString. length() == 0) return false; for ( int i = 0"" -",57,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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; +",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 Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -/** - * 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 Impact Report () + { + super ("""" Search Result GUI """"); - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + container = get Content Pane (); + + set Size ( 800 , 250 ); + 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: 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + panel . set Layout ( null ); -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + this . server IP = + JOption Pane + . show In -public Balance( Reader inStream ) + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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 ModifyModel(EBT em) { -errors = 0; -tok = new Tokenizer( inStream ); -} +super( em); + } -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public StringBuffer GenerateEvent() { -if( opSym. token == '(' && clSym. token != ')' || +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - /** - * 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 -"56 ""Event Parser + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -private Connection conn; - private ResultSet rs; - private Statement stmt; +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} - 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 GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -//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 long queryID = 0; + public static int count = 0; -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public PerformanceModel(String name, long queryID) { -// 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 +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + public Vector getConstraints() + { +return constraintVector; + } - public void speculate(String str) + public Vector getDrivers() { -System. out. println(""""Speculate""""); -CallBack +return driverVector; + } + public String getName() + { +return name; + } -public void impactReport(String str) + public void setName(String name) { -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 -"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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +this. name = name; + } - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - EventServerThread(ServerSocket ss) + public void removeDriver(DriverDescription driver) { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) { +return this. driverVector. contains( driver); + } - while( true) + public void addConstraint(ConstraintsDescription constraint) { - try +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public String getNextID() + public DriverDescription getDriver(DriverDescription driver) { -try +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - + dd = (DriverDescription) this. driverVector. get( i) -public String searchDate() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -String dateString = new String(); -Vector dateVector = new Vector(); -try +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public String searchQueryID(String date) + public void setQueryID( long id) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 +Socket aSocket; + int ID; + String EventLog; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public String getDriverFromDataBase(String queryID) + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -String driverString = new String(); + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; 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 -"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 +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -System. out. println("""" in get Connection""""); -Connection connect=null; +System. out. println(""""Inside Run method""""); +String str=""""""""; 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 + // 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. */ - 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 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 -"79 ""performance model Handler +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 -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 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 - performance model Handler(String msg) - { -this. strES = msg; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - 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 drawModel() +{ +repaint(); +} -//Re-execut -public String generateReport() +protected void paintComponent(Graphics g) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + super. paintComponent( g); +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"93 ""Obsolete Model -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; +public ObsoleteModel(EBT em) +{ +super( em); } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( 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 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 -"64 ""DOORs Thread Pool +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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 +"66 ""Config Dialog -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - //@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: Delete subscriptions (2.2.3) 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 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"50 ""Driver Description +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 +// 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -this. projectName = projec +// 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 +"49 ""Constraints Description -public String getChangedAttribute() - { -return changedAttribute; - } +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - public String getDescription() - { -return description; - } + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -return modulePath; - } - public String getProjectName() - { -return projectName; - } + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - public String getRequirementID() - { -return requirementID; } - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; + public String get Description () { + return this . description ; } - public void setDescription(String description) - { -this. description = description; + public String get Logic () { + return this . logic ; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; + public String get Module Path () { + return this . module Path ; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; + public String get Project Name () { + return this . project Name ; } - public void setProjectName(String projectName) - { -this. projectName = projectName; + public String get Requirement ID () { + return this . requirement ID ; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + public String get Units () { + return this . units ; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; + public String get Value () { + return this . value ; } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + public void set Description ( String description ) { + this . description = description ; } - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -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 -"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 void set Logic ( String logic ) { + this . logic = logic ; + } -/** - * 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 set Module Path ( String module Path ) { + this . module Path = module Path ; + } + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -/** - * 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 set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } -/* - * 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 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 ; + } - /** - * 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 to String () { + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -/** - * 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 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 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 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 String id; @@ -34295,116 +34919,368 @@ this. valueFrom = valueFrom; { 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 -"66 ""Config Dialog +",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 -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +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 closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + //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. -// 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 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 -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +//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 -// 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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"62 ""Call Back -private Hash table requirementDescTable = new Hash table(); +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - private PerformanceModel performance model= null + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } - public void parseSpeculateInformation(String str) + /** +* Returns the name. +* @return String +*/ + public String getName() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +return name; + } -public void identifyPerformanceModels() + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"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 + +String msg=""""""""; + +public ModelDriver(String text) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. msg = text; +init(); + } -public void pullInformationFromDoors() + public void init() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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 -public void insertValuesInDataBase() +public MergeModel(EBT em) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 +"63 ""Doors Thread - public void createExecuteString() +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; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public void run() + { -public void parseImpactReport(String str) + 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 +"54 ""eventserver -Connection conn = null; +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 -Statement stmt = null; +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 -Vector constraintsVector = null; -Vector driversVector = null; +Socket aSocket; + int ID; + String EventLog; -ConstraintsDescription constraint = null; + Connection conn; + ResultSet rs; + Statement stmt; -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 + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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; + + + 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 "79 ""performance model Handler String strES; // string received from eventserver @@ -34460,262 +35336,8 @@ database. injectVariables( id, variable); // inject data into model database. executeModel( id, variable); }"" -",79,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -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 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - - -public Requirement() {// empty constructor - -} - -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() - { -return constraintVector; - } - - public Vector getDrivers() - { -return driverVector; - } - - public String getName() - { -return name; - } - - public void setName(String name) - { -this. name = name; - } - - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"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 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - - -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +",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 """"; @@ -34854,289 +35476,266 @@ public void action Performed ( Action Event e ) { 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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"65 ""About Dialog +",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 -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 -"65 ""About Dialog +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -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 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 -"87 ""EBT +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;} -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"89 ""Event Line +protected int top, left, right, bottom; - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) + +public EventLine ( int t, int l, int r, int b) { -WorkArea. showText( sh); - } +top = t; +left = l; +right = r; +bottom = b; +} - public boolean mouseDown( java. awt.Evente, int x, int y) +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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) { - return true; + theServer = ss; + count++; + taskNumber = count; } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } + public void run() + { - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + 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 ; + 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 mouseExited( java. awt. event.MouseEvente){} + // Speculate Gui + public Speculate Gui () + { -public void mousePressed( java. awt. event.MouseEvente){} + super ("" Speculate GUI ""); -public void mouseReleased( java. awt. event.MouseEvente){} + container = get Content Pane (); -public void mouseEntered( java. awt. event.MouseEvente){} + set Size ( 800 , 600 ); -public void paint(Graphics g) {} + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + // Submit Listener + public void action Performed ( Action Event e ) { -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + if ( e . get Source () == submit Button ) { -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () { -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""""); + String ip = this . event Server IP ; + int Port No = 1701 ; -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 -"95 ""Text Model + Socket socket ; + try { -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + socket = new Socket ( ip , Port No ); -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 + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + String [] attribute = { "" Value "", "" Attribute "" }; -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + String project Name = this . proj Name Text . get -public void drawModel() -{ -repaint(); -} + 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 +"52 ""Pair + +private String queryID; + private String queryString; -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 -"90 ""Merge Model + 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 MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; + public void setQueryString(String queryString) { +this. queryString = queryString; } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + }"" +",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 -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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +private Connection conn; + private ResultSet rs; + private Statement stmt; -public Symbol( char tok, int line ) + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + 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; -/** - * 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; +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +//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 - /** - * 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 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } +//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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +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: 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 private String project Name = null ; @@ -35270,10 +35869,73 @@ 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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,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,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,The user shall update related artifacts according to the information contained in the event messages.,138,0 +",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 int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -35339,9 +36001,93 @@ public JPanel get Panel () { return panel ; }"" -",48,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 +",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; @@ -35350,192 +36096,315 @@ private String queryID; public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = 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 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 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 getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - }"" -",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 -"65 ""About Dialog +public void mouseExited( java. awt. event.MouseEvente){} -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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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 void mousePressed( java. awt. event.MouseEvente){} - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +public void mouseReleased( java. awt. event.MouseEvente){} -panel = new JPanel(); +public void mouseEntered( java. awt. event.MouseEvente){} -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void paint(Graphics g) {} -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 -"93 ""Obsolete Model +public void update(Graphics g) {} -public ObsoleteModel(EBT em) + public JSplitPane getSplitPane() { -super( em); - } +return splitPane; +} -// Construct Visual model for Merge Event -public void BuildEvent() +public void valueChanged(ListSelectionEvent e) { - 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 -"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; - } - +if ( e. getValueIsAdjusting()) +return; +} - /** -* Returns the name. -* @return String -*/ - public String getName() +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -return name; - } +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 value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +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 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 getValueTo() - { -return valueTo; - } +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public Object clone() throws CloneNotSupportedException { -this. id = id; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public void ParseEvent(String TextLine) { -this. name = name; - } + 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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. valueFrom = valueFrom; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - 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 +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; @@ -35585,145 +36454,8 @@ 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 -"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 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } - - - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - - - public boolean match( int mx, int my) - { -return true; - } - - - public int GetX() - { -return x; - } - - - public int GetY() - { -return y; - } - - public Color GetC() -{ -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } - - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: 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 +",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; @@ -35815,114 +36547,145 @@ 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: 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: 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 -"81 ""subscribermanager +",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 -Socket aSocket; - int ID; - String EventLog; +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - Connection conn; - ResultSet rs; - Statement stmt; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +panel = new JPanel(); - // 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 -{ +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +return panel; + }"" +",51,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"79 ""performance model Handler -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +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 -// run method will be execute from the main method when u say Thread. start() in main - public void run() + performance model Handler(String msg) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try +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; + } - // 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include adding new requirements.,121,0 -"77 ""Model Driver +// save current model +database. saveCurrentModel( id); + } -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +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 void init() + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -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: 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 -"71 ""Requirement +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +// 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 Requirement() + +//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 Object clone() throws CloneNotSupportedException + // 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() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + return errMsg; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public boolean Contains(String ContextString, String SearchString) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 +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; @@ -36052,308 +36815,474 @@ if ( hashCode == 0) 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 -"71 ""Requirement +",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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +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(); -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public boolean mouseDown( java. awt.Evente, int x, int y) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + return true; + } -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + 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 Requirement() {// empty constructor +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +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=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 -"74 ""database +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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + private JPanel driver Panel = new JPanel (); - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public Impact Report () { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo + super ("""" Search Result GUI """"); + container = get Content Pane (); - /** -* 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 + set Size ( 800 , 250 ); + panel = new JPanel (); - /** -* 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) + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -conn = this. getConnect + Impact Report im = new Impact Report (); -/** -* 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 Vector search Date () { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public void solveStructureEquation() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + pair Vector = new Vector (); + + query String Combo . remove All Items (); -public void getTrackVariableName() + 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 ) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse + // super ("""" Impact Report """"); -public void setCalculatedValues() + 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(""""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 + Vector v = new Vector (); - public Vector getImpactReport() + 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 () { -//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 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + Vector v = new Vector (); - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + 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 + + +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 = """"""""; + } - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public String get Description () { - return this . description ; + public boolean match( int mx, int my) + { +return true; } - public String get Logic () { - return this . logic ; + + public int GetX() + { +return x; } - public String get Module Path () { - return this . module Path ; + + public int GetY() + { +return y; } - public String get Project Name () { - return this . project Name ; + public Color GetC() +{ +return c; } - public String get Requirement ID () { - return this . requirement ID ; + public String GetReqno() + { +return requirement No; } - public String get Units () { - return this . units ; + public String GetProject() + { +return ProjectName; } - public String get Value () { - return this . value ; + + 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 +Test case: Delete subscriptions (2.2.3) 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=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); } - public void set Description ( String description ) { - this . description = description ; + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + } - public void set Logic ( String logic ) { - this . logic = logic ; + 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 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""""; + + + }"" +",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 + - public void set Project Name ( String project Name ) { - this . project Name = project Name ; +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + // 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 Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +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 +"81 ""subscribermanager - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } +Socket aSocket; + int ID; + String EventLog; - public String get Attribute () { - return this . attribute ; - } + Connection conn; + ResultSet rs; + Statement stmt; - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public String get Performance Model Name () { - return this . performance Model Name ; - } + // 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 set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +// 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 equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 + // 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 "67 ""Event Detail Dialog private GridBagLayout grid bag; @@ -36403,272 +37332,129 @@ 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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 - +",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 ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + 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 -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public Speculate Gui () { -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 -"74 ""database + super ("" Speculate GUI ""); -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + container = get Content Pane (); - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + set Size ( 800 , 600 ); + 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 ) { - /** -* 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 + if ( e . get Source () == submit Button ) { + 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 - /** -* 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 + System . out . println ("" Fetch Button Pressed -public void solveStructureEquation() + void send Query TO Server () { -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 ; -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 - + Socket socket ; + try { -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 = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - public Vector getImpactReport() + 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 modifying a requirement.,124,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 + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" 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 + String project Name = this . proj Name Text . get - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public static void main ( String [] args ) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"89 ""Event Line + 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 +"66 ""Config Dialog -protected int top, left, right, bottom; +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -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 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 - -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 +// 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 - //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 void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { 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. 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. @@ -36680,16 +37466,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -36704,563 +37480,510 @@ 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set +/** +* The threads in the pool. */ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); - /** -* Returns the type. -* @return 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 */ - public String getType() { -return type; - } + pub /** -* Sets the type. -* @param type The type to set +* Get a new work assignment. +* +* @return A new assignment */ - public void setType(String type) { -this. type = type; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Returns the project_ path. -* @return String +* Called to block the current thread until +* the thread pool has no more work. */ - public String getProject_ path() { -return project_ path; + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); } +}"" +",60,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"82 ""Tokenizer - /** -* 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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 Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public Balance( Reader inStream ) +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -errors = 0; -tok = new Tokenizer( inStream ); +return currentLine; } /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * Gets error count. + * @return error count. */ -public int checkBalance( ) +public int getErrorCount( ) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +return errors; +} - /** - * Print an error message if clSym does not match opSym. - * Update errors. +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public char getNextOpenClose( ) +{ +while( nextChar( ) ) { -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. + * Return true if ch can be part of a Java identifier */ -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 -"77 ""Model Driver +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -String msg=""""""""; -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; +for( ; nextChar( ); 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: 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 + /** + * 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +/** + * 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( ) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +/** + * 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 -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +/** + * 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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +/** + * 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 +"47 ""Impact Report -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 -"private JPanel center Panel = null ; +private String server IP = """" local host """"; + 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 JPanel driver Panel = new JPanel (); - // Speculate Gui + private JPanel driver Inner Panel = null ; - public Speculate Gui () + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { - super ("" Speculate GUI ""); + super ("""" Search Result 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 + set Size ( 800 , 250 ); - public void action Performed ( Action Event e ) { + panel = new JPanel (); - if ( e . get Source () == submit Button ) { + panel . set Layout ( null ); - send Query TO Server (); + this . server IP = + JOption Pane + . show In - } - if ( e . get Source () == fetch Button ) { + public static void main ( String [] args ) + { + Impact Report im = new Impact Report (); - System . out . println ("" Fetch Button Pressed + } - void send Query TO Server () + public Vector search Date () { - 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 + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public void pull Value From DOORS () + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + pair Vector = new Vector (); - String [] attribute = { "" Value "", "" Attribute "" }; + query String Combo . remove All Items (); - String project Name = this . proj Name Text . get + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + // Select Actions + public void action Performed ( Action Event e ) + { -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -// 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 action Performed ( Action Event e ) { -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + if ( submit Button == e . get Source ()) { -// 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 -"74 ""database + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + if ( pair + . get - 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() + public void impact Report ( String id ) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - + // super ("""" Impact Report """"); - /** -* 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 + container = get Content Pane (); + set Size ( 1020 , 740 ); - /** -* 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 . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... 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) + public Vector get Constraint From Data Base () { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru + Vector v = new Vector (); -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + Socket server ; + String line = new String (); -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 + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -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() + public Vector get Driver From Data Base () { -//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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"86 ""EB Shape + Vector v = new Vector (); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + 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 +private Connection conn; + private ResultSet rs; + private Statement stmt; - public void Updaterequirement Info(String rno, String pname, String mname) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public boolean match( int mx, int my) + public void updateEvent(String str, String ID) { -return true; - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public int GetX() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -return x; - } + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public int GetY() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -return y; - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } +//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 GetProject() + public void speculate(String str) { -return ProjectName; - } +System. out. println(""""Speculate""""); +CallBack - public String GetModule() +public void impactReport(String str) { -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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: Delete subscriptions (2.2.3) 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"94 ""Refine Model +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 -public RefineModel(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() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} -public StringBuffer GenerateEvent() +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -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 -"52 ""Pair - -private String queryID; - private String queryString; - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - } - public String getQueryID() { -return this. queryID; - } +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - }"" -",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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall immediately process speculative events.,116,0 -Test case: 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: 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 +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 "61 ""Worker Thread /** @@ -37299,636 +38022,404 @@ 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 -"89 ""Event Line - -protected int top, left, right, bottom; +",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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -public EventLine ( int t, int l, int r, int b) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -public int GetR() { return right;} +public String GetSubscriberName() { return SubscriberName;} -public int GetB() { return bottom;}"" -",89,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"67 ""Event Detail Dialog +public String GetSubscriberReqno() { return SubscriberReqno;} -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 String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ +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 +public ConfigDialog(Notification_Processing parent, boolean modal) { 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_ + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ +private void closeDialog(WindowEvent evt) { setVisible ( false); dispose (); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"50 ""Driver Description +// 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 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 void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"75 ""Driver -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) +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. projectName = projec -public String getChangedAttribute() + public String toString() { -return changedAttribute; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public String getDescription() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return description; +return id; } - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() + /** +* Returns the name. +* @return String +*/ + public String getName() { -return modulePath; +return name; } - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return requirementID; +return valueFrom; } - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) + public double getValueTo() { -this. changedAttribute = changedAttribute; +return valueTo; } - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -this. fromAttribute = fromAttribute; +this. id = id; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -this. projectName = projectName; +this. name = name; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - 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() - { -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 setValueTo( double value) { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -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) +public RefineModel(EBT em) { - 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 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +super( em); + } -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + // Construct Visual model for Merge Event +public void BuildEvent() { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"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 + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -public String getChangedAttribute() - { -return changedAttribute; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 +"74 ""database - public String getDescription() - { -return description; - } - public String getFromAttribute() - { -return fromAttribute; - } +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - public String getModulePath() - { -return modulePath; - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -return requirementID; - } +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } + /** +* 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 setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String 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) { -this. modulePath = modulePath; - } +conn = this. getConnect - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +/** +* 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 setToAttribute(String toAttribute) + /** +* 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. toAttribute = toAttribute; - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - 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 solveStructureEquation() { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -public int hashCode() +public void getTrackVariableName() { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"79 ""performance model Handler +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -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 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 - performance model Handler(String msg) + public Vector getImpactReport() { -this. strES = msg; - } +//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 +"87 ""EBT - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -//Re-execut -public String generateReport() + +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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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,Each artifact shall be placed under the control of a subscribermanager,106,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - /** -* 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 mouseExited( java. awt. event.MouseEvente){} -/** -* 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 mousePressed( java. awt. event.MouseEvente){} -/** -* 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 mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( 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 paint(Graphics g) {} +public void update(Graphics g) {} - /** -* 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public JSplitPane getSplitPane() +{ +return splitPane; +} - /** -* 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 valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"90 ""Merge Model -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + +public MergeModel(EBT em) { -_ activeThreads++; -_ started = true; -notify(); +super( em); + MinimumNoRects = 3; } - /** -* 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(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +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 m_RequirementID =""""""""; @@ -37959,148 +38450,158 @@ public void ParseRequirement(String TextLine) { LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); m_Project=Line"" -",80,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +",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 String projectName = null; + private String modulePath = null; + private String requirementID = null; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -/** - * 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 DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public String getDescription() + { +return description; + } + public String getFromAttribute() + { +return fromAttribute; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public String getModulePath() + { +return modulePath; + } -for( ; nextChar( ); result += ch ) + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } + public String getToAttribute() + { +return toAttribute; + } - /** - * 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 setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } -/** - * 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 setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -/** - * 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 setProjectName(String projectName) + { +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -/** - * 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 setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -private void skip + 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() + { -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"54 ""eventserver +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + +public int hashCode() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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) { -p +this. msg = text; +init(); + } -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 + + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +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; @@ -38175,811 +38676,514 @@ 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 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } - - public void set Logic ( String logic ) { - this . logic = logic ; - } - - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } - - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } - - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - - public void set Units ( String units ) { - this . units = units ; - } - - public void set Value ( String units ) { - this . value = units ; - } - - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"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; - } +",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 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 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++) +public StringBuffer GenerateEvent() { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"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; - } - +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 - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +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 - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + 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 - /** -* Returns the name. -* @return String -*/ - public String getName() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -return name; - } - + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; } - public double getValueTo() +public Vector get Values From Data Base () { -return valueTo; - } - + Vector v = new Vector (); + 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 R - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. name = name; - } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 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,For speculative events; the eventserver shall construct a composite event message.,132,0 -"53 ""Performance Model +",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 -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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - public Vector getConstraints() +public void getIP Server( String serverIP) { -return constraintVector; +this. serverIP = serverIP; } - public Vector getDrivers() - { -return driverVector; - } - public String getName() - { -return name; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public void setName(String name) - { -this. name = name; - } - 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) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) { - cd = (ConstraintsDescription) this + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) +public void CheckNotifyStatus() { -this. queryID = id; - } +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - 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 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"Test case: 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + protected void BuildEvent(){} -public Requirement() + + protected void AddLine( int t, int l, int r, int b) { +EventLines. addElement( new EventLine( t, l, r, b)); } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + +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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"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() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public Requirement() {// empty 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 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 -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +public NewModel(EBT em) +{ +super( em); } - 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(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -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 -"87 ""EBT +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 +"86 ""EB Shape -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public boolean mouseDown( java. awt.Evente, int x, int y) + public boolean match( int mx, int my) { - return true; +return true; } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public int GetX() + { +return x; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } -public void mouseExited( java. awt. event.MouseEvente){} + public String GetReqno() + { +return requirement No; + } + public String GetProject() + { +return ProjectName; + } -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"88 ""Event Model -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} +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 update(Graphics g) {} - public JSplitPane getSplitPane() + public EventModel(EBT e) { -return splitPane; -} +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -public void valueChanged(ListSelectionEvent e) +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() { -if ( e. getValueIsAdjusting()) -return; +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) -public void RedrawAll(EBShape sh) +public void drawModel() { -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); +repaint(); } -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: 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 -"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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -private static class Precedence +private void ClearData() { -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[ ] +for ( int i = 0; i < EventShapes. size(); i++) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -private static class Token +public void Clicked ( int x, int y) { -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 +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 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 CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + protected void BuildEvent(){} - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); } -/** - * 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 +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 -/* - * 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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - /** - * 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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** - * 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 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 NewModel(EBT em) +{ +super( em); + } -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 -"73 ""Constraints + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -String id; - String name; - double value; - String logic; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"75 ""Driver - Constraints(String id, 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. 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; } @@ -38987,430 +39191,367 @@ 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; - }"" -",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 -"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() + public void setValueFrom( double value) { -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; +this. valueFrom = valueFrom; } - public void saveModel( int id) + public void setValueTo( double value) { -// 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); +this. valueTo = valueTo; }"" -",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 -"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 ; +",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 Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public ModelDriver(String text) { - - 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 ; +this. msg = text; +init(); } - 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 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 - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement 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++) + { +p - public void set Units ( String units ) { - this . units = units ; - } +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 void set Value ( String units ) { - this . value = units ; - } + /** +* 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 Impacted Constraint () { - return this . impacted Constraint ; + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; +/** +* 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 Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; +/** +* 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 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 ; + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"67 ""Event Detail Dialog + /** +* 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 -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +/** +* 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +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 void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"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 +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -// 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) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo - +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 +"58 ""Subscribed Model -// 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 +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;} - //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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"65 ""About Dialog +public String GetSubscriberReqno() { return SubscriberReqno;} -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 -"75 ""Driver +public String GetSubscriberModule() { return SubscriberModule;} -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 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 String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +String msg=""""""""; - /** -* Returns the id. -* @return int -*/ - public String getId() +public ModelDriver(String text) { -return id; +this. msg = text; +init(); } - /** -* Returns the name. -* @return String -*/ - public String getName() + public void init() { -return name; +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 + +public RefineModel(EBT em) +{ +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +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; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) { -return valueFrom; - } + 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 double getValueTo() +public String getNextID() { -return valueTo; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public String searchDate() { -this. id = id; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public String searchQueryID(String date) { -this. name = name; - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public String getConstraintFromDataBase(String queryID) { -this. valueFrom = valueFrom; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void setValueTo( double value) + public String getDriverFromDataBase(String queryID) { -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 +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +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 private static final int EOL = 0; @@ -39535,409 +39676,152 @@ 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: Delete subscriptions (2.2.3) 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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"48 ""Constraint Inner Panel +",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 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 JPanel center Panel = null ; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + private JPanel driver Panel = new JPanel (); - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -public JPanel get Panel () + public Impact Report () { - 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 -"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; + super ("""" Search Result 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 , 250 ); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + panel = new JPanel (); -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 non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe - - -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - - -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private - - -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ - -private void skip + Impact Report im = new Impact Report (); -/** - * 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 -"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 search Date () + { -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + 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 ) + { -/** - * 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; + pair Vector = new Vector (); + query String Combo . remove All Items (); - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); - /** - * 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 -"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 + // Select Actions + public void action Performed ( Action Event e ) + { - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -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 + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -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 + if ( pair + . get -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 void impact Report ( String id ) + { + // super ("""" Impact Report """"); - 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 + container = get Content Pane (); + set Size ( 1020 , 740 ); - 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 + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public Vector get Constraint From Data Base () + { -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 -"66 ""Config Dialog + Vector v = new Vector (); -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + Socket server ; + String line = new String (); -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -// 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 Vector get Driver From Data Base () + { -// 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: 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 -"90 ""Merge Model + Vector v = new Vector (); + + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -public MergeModel(EBT em) - { + 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 + +public ModifyModel(EBT em) +{ super( em); - MinimumNoRects = 3; } @@ -39945,63 +39829,87 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +AddEventRect(60,80,1); +CurrentEvent = 4; +} 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 -"83 ""Variable +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +public static void (String args[]) { -this. id = id; -this. type = type; -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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"51 ""Driver Inner Panel +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; -//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 projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ +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) + { 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. @@ -40013,16 +39921,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -40037,590 +39935,437 @@ 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; - } - - - /** -* 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; + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + 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)); - /** -* 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"74 ""database +// 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 -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 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 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo +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 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 id. +* @return int */ - public int get + public String getId() + { +return 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 +* Returns the name. +* @return String */ - public void saveCurrentModel( int graphId) + public String getName() { -conn = this. getConnect - +return name; + } -/** -* 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() +* Returns the value. +* @return double +*/ + public double getValueFrom() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +return valueFrom; + } -public void setCalculatedValues() + public double getValueTo() { -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 valueTo; + } - public Vector getImpactReport() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall re execute the model using the speculative values.,117,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +this. id = id; + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -this. projectName = projec -public String getChangedAttribute() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -return changedAttribute; +this. valueFrom = valueFrom; } - public String getDescription() - { -return description; - } - public String getFromAttribute() + public void setValueTo( double value) { -return fromAttribute; - } +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 String getModulePath() - { -return modulePath; - } - public String getProjectName() - { -return projectName; - } +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 getRequirementID() - { -return requirementID; - } - public String getToAttribute() - { -return toAttribute; - } + 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 setChangedAttribute(String changedAttribute) +public void getIP Server( String serverIP) { -this. changedAttribute = changedAttribute; +this. serverIP = serverIP; } - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +public void drawModel() +{ +repaint(); +} - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - 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 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 hashCode() +public void CheckNotifyStatus() { -int hashCode = 0; -if ( hashCode == 0) +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { - 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 -"60 ""Thread Pool +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -/** -* 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 BuildEvent(){} -/** -* 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++) + + protected void AddLine( int t, int l, int r, int b) { -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 +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +Even - /** -* 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 String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } -}"" -",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 -"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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public Constraints Description ( - String project Name , - String module Path , - String requirement 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 ; - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement 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 () + { - public String get Description () { - return this . description ; - } + super ("" Speculate GUI ""); - public String get Logic () { - return this . logic ; - } + container = get Content Pane (); - public String get Module Path () { - return this . module Path ; - } + set Size ( 800 , 600 ); - public String get Project Name () { - return this . project Name ; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } + // Submit Listener - public String get Value () { - return this . value ; - } + public void action Performed ( Action Event e ) { - public void set Description ( String description ) { - this . description = description ; - } + if ( e . get Source () == submit Button ) { - public void set Logic ( String logic ) { - this . logic = logic ; - } + send Query TO Server (); - 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 ; - } + if ( e . get Source () == fetch Button ) { - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + System . out . println ("" Fetch Button Pressed - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + void send Query TO Server () + { - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - public String get Attribute () { - return this . attribute ; - } + Socket socket ; + try { - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + socket = new Socket ( ip , Port No ); - public String get Performance Model Name () { - return this . performance Model Name ; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } + public void pull Value From DOORS () + { - public String to String () { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get -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 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 -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 -"58 ""Subscribed 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; -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +panel = new JPanel(); -public String GetSubscriberName() { return SubscriberName;} +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public String GetSubscriberReqno() { return SubscriberReqno;} +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 -public String GetSubscriberModule() { return SubscriberModule;} +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 GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"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; } @@ -40629,7 +40374,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -40638,10 +40384,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -40659,7 +40407,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -40683,620 +40432,727 @@ this. name = name; */ 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 -"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 + /** +* 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; + } - //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 -"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 type. +* @return String +*/ + public String getType() { +return type; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + /** +* 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; + } - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + /** +* 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 -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 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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -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 ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - 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 void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - 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 +// event listener for """"Cancel"""" button +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 +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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; -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 -"86 ""EB Shape + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -public EBShape( int xpos, int ypos, Color col) +public static void main(String args[]) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -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 Updaterequirement Info(String rno, String pname, String mname) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public boolean match( int mx, int my) + + private void saveMenuItemActionPerformed (ActionEvent evt) { -return true; - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public int GetX() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -return x; +exitApplication(); } - public int GetY() + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -return y; +openEventsMenuItemActionPerformed( evt); } - public Color GetC() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { -return c; - } + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public String GetReqno() + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -return requirement No; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public String GetProject() + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -return ProjectName; +new AboutDialog ( this, true). show(); } - public String GetModule() +void UpdateDisplayList() { -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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"63 ""Doors Thread +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 +"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;/ -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + 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 - DOORsThread(ServerSocket ss) +// finds the subscribers for this requirement + public void IdentifySubscribers() { - theServer = ss; - count++; - taskNumber = count; - } +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 run() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"65 ""About Dialog +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"Test case: 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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"54 ""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. -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public void Dispatch + + + public String getErrorMessage() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) { -p +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,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: 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 receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"91 ""Modify Model +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 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 - protected void paintComponent(Graphics g) +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 { -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -Test case: Delete subscriptions (2.2.3) 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 -"53 ""Performance Model + Class. fo -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; - public static int count = 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 +*/ + public int get - public PerformanceModel(String name, long queryID) + + /** +* 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) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +conn = this. getConnect - public Vector getConstraints() + +/** +* 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) { -return constraintVector; - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public Vector getDrivers() + +public void solveStructureEquation() { -return driverVector; - } +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public String getName() + +public void getTrackVariableName() { -return name; +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: 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(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public void setName(String name) + + public boolean mouseDown( java. awt.Evente, int x, int y) { -this. name = name; + return true; } - public void addDriver(DriverDescription driver) + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -if ( driverVector. contains( driver)) +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) { +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +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 +"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++) + public EventModel(EBT e) { - dd = (DriverDescription) this. driverVector. get( i) +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - 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 getIP Server( String serverIP) { -return this. queryID; +this. serverIP = serverIP; } - 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: 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: 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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -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 -"82 ""Tokenizer + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public void drawModel() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +repaint(); +} -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public void drawModel(EBShape sh) { -return currentLine; +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +private void ClearData() { -return errors; +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } } -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) +public void Clicked ( int x, int y) { -while( nextChar( ) ) +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) { + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { -return Character. isJavaIdentifierPart( ch ); -} +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + protected void BuildEvent(){} -for( ; nextChar( ); result += ch ) + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** - * 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 +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 -/** - * 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 String getrequirement Text(String r, String p, String m) { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} +return new String(""""requirementwill go here""""); + } -/** - * 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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + 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: 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 -private void skip +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) { -/** - * 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,Event types shall include deleting a requirement.,125,0 -"61 ""Worker Thread +panel = new JPanel(); -/** -* True if this thread is currently processing. - */ -public boolean busy; +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -owner = o; -} +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +public String GetSubscriberReqno() { return SubscriberReqno;} -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 -"52 ""Pair +public String GetSubscriberModule() { return SubscriberModule;} -private String queryID; - private String queryString; +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 - public Pair(String queryID, String queryString) { +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -this. queryID = queryID; -this. queryString = queryString; +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 getQueryID() { -return this. queryID; - } + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - public String getQueryString() { -return this. queryString; - } +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - public void setQueryString(String queryString) { -this. queryString = queryString; - } +public void drawModel() +{ +repaint(); +} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - }"" -",52,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 +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 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -41362,683 +41218,709 @@ 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 -"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;} +",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 -public int GetR() { return right;} +Socket aSocket; + int ID; + String EventLog; -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: 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 -"94 ""Refine Model + Connection conn; + ResultSet rs; + Statement stmt; -public RefineModel(EBT em) -{ -super( em); - } + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - // Construct Visual model for Merge Event -public void BuildEvent() + // 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); -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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +} +public void sendImpactReportToEventServer(String text) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public String toString() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - /** -* Returns the name. -* @return String -*/ - public String getName() + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -return name; - } +// 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 + +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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public Object clone() throws CloneNotSupportedException { -this. name = name; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void ParseEvent(String TextLine) { -this. valueFrom = valueFrom; - } + 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 setValueTo( double value) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - // Construct Visual model for Merge Event -public void BuildEvent() +public void DisplayValues() { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() + 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 { -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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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: 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 -"92 ""New Model +public chartoken; +public int theLine; -public NewModel(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); -AddArrow(35,97,59,97); -CurrentEvent = 0; +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(""""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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"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 +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) + /** + * 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 +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(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +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 """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ +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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public Pair(String queryID, String queryString) { -public Requirement() -{ -} +this. queryID = queryID; +this. queryString = queryString; -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; } + public String 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 String getQueryString() { +return this. queryString; + } -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 -"94 ""Refine Model + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -public RefineModel(EBT em) -{ -super( em); + public void setQueryString(String queryString) { +this. queryString = queryString; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public StringBuffer GenerateEvent() + + }"" +",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 +"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) { -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 -"51 ""Driver Inner Panel +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -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 GetSubscriberName() { return SubscriberName;} - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +public String GetSubscriberReqno() { return SubscriberReqno;} -panel = new JPanel(); +public String GetSubscriberModule() { return SubscriberModule;} -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"51 ""Driver Inner Panel +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 -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 m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -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 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 EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve -public int GetT() { return top;} +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 -public int GetL() { return left;} +/** +* 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 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. +/** +* 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 */ - private int _ activeThreads = 0; + pub + /** -* 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. +* Get a new work assignment. +* +* @return A new assignment */ - - synchronized public void waitDone() + public synchronized Runnable getAssignment() { try { - while ( _ activeThreads>0 ) { + while ( ! assignments. iterator(). hasNext() ) wait(); - } -} catch ( InterruptedException + Runnable r = (Runnable) assignments. -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Called to block the current thread until +* the thread pool has no more work. */ - synchronized public void waitBegin() + public void complete() { -try { - while ( !_ started ) { -wait(); +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(); } -} catch ( InterruptedException e +}"" +",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 void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} -/** -* 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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - /** -* 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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"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 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 - // Speculate Gui - public Speculate Gui () +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 ((((( - super ("" Speculate GUI ""); - container = get Content Pane (); + protected void BuildEvent(){} - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - // Submit Listener +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 action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - send Query TO Server (); - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - if ( e . get Source () == fetch 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 - System . out . println ("" Fetch Button Pressed +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - void send Query TO Server () +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - 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 - socket = new Socket ( ip , Port No ); +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 +"80 ""Requirement - Output Stream os = socket . get Output Stream (); - Output Stream +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public void pull Value From DOORS () - { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +public Requirement() {// empty constructor - String [] attribute = { "" Value "", "" Attribute "" }; +} - String project Name = this . proj Name Text . get +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"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=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 +"93 ""Obsolete Model -private static class Precedence +public ObsoleteModel(EBT em) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +super( em); + } -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(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"85 ""Decompose Model -private static class Token +public DecomposeModel(EBT 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 { - +super( em); +MinimumNoRects = 3; + } -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 Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -/** - * 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 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 -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -/** - * 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -/* - * 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 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 - /** - * 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 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 -/** - * 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 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 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"61 ""Worker Thread -/** -* True if this thread is currently processing. - */ -public boolean busy; + 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 -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +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 private String server IP = """" local host """"; @@ -42103,397 +41985,226 @@ private String server IP = """" local host """"; // Select Actions - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: 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 -"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 void action Performed ( Action Event e ) + { - public String getQueryString() { -return this. queryString; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + // Button Actions - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - }"" -",52,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"80 ""Requirement + for ( int i = 0 ; i < pair Vector . size (); i ++) { -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -public Requirement() {// empty constructor -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + public void impact Report ( String id ) + { + // super ("""" 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 + container = get Content Pane (); + set Size ( 1020 , 740 ); -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 -"63 ""Doors Thread + this . query ID = id ; -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + System . out . println ("""" Impact Report Constructor ..... ID """" + - DOORsThread(ServerSocket ss) + public Vector get Constraint From Data Base () { - theServer = ss; - count++; - taskNumber = count; - } + Vector v = new Vector (); - public void run() - { + Socket server ; + String line = new String (); - 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 -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: 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 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; + try + { + server = new Socket ( server IP , 1701 ); - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + if ( server . is Connected () ) + { + Buffered - public void updateEvent(String str, String ID) + + public Vector get Driver From Data Base () { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + Vector v = new Vector (); -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + Socket server ; + String line = new String (); -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + 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 +"87 ""EBT -//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 JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -//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 EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } -public void impactReport(String str) + public boolean mouseDown( java. awt.Evente, int x, int y) { -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 -"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 true; + } -private static class Precedence + public boolean mouseUp( java. awt.Evente, int x, int y) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +return true; + } -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] + public void mouseClicked( java. awt. event.MouseEvente) { +VisualPanel.Clicked( e. getX(), e. getY()); +} -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +public void mouseExited( java. awt. event.MouseEvente){} -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 mousePressed( java. awt. event.MouseEvente){} -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +public void mouseReleased( java. awt. event.MouseEvente){} -/** - * 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 mouseEntered( java. awt. event.MouseEvente){} -/** - * 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 paint(Graphics g) {} -/** - * 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 update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Delete subscriptions (2.2.3) 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 -/** - * 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 DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } -/* - * 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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - /** - * 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 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 +public RefineModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -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 +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; @@ -42568,195 +42279,131 @@ 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 -"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 -{ - - +",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 - // 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 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"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 ) +public Tokenizer( Reader inStream ) { errors = 0; -tok = new Tokenizer( inStream ); -} +ch = '\0'; +currentLine = 1; +in = new PushbackReader /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * Gets current line number. + * @return current line number. */ -public int checkBalance( ) +public int getLineNumber( ) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +return currentLine; +} - /** - * Print an error message if clSym does not match opSym. - * Update errors. +/** + * Gets error count. + * @return error count. */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public int getErrorCount( ) { -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 -"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 - +return errors; +} - // Submit Listener - public void action Performed ( Action Event e ) { +/** + * 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( ) ) +{ - if ( e . get Source () == submit Button ) { - send Query TO Server (); - } + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - if ( e . get Source () == fetch Button ) { +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - System . out . println ("" Fetch Button Pressed +for( ; nextChar( ); result += ch ) - void send Query TO Server () - { - String ip = this . event Server IP ; - int Port No = 1701 ; + /** + * 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 socket ; - try { - socket = new Socket ( ip , Port No ); +/** + * 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 ) { } +} - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () - { +/** + * 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 - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - String project Name = this . proj Name Text . get +private void skip - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +/** + * 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 @@ -42828,494 +42475,254 @@ notify(); { _ 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 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } - - public void set Logic ( String logic ) { - this . logic = logic ; - } - - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } - - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } - - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - - public void set Units ( String units ) { - this . units = units ; - } - - public void set Value ( String units ) { - this . value = units ; - } - - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"56 ""Event Parser +",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 -private Connection conn; - private ResultSet rs; - private Statement stmt; +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 - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public Notification_Event() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public void updateEvent(String str, String ID) +public Object clone() throws CloneNotSupportedException { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -//Check if a subscription exists - public boolean CheckSubscription(String str) + public void ParseEvent(String TextLine) { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + 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 -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -//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 +if ( m_Eve +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"54 ""eventserver - public void speculate(String str) +public static void (String args[]) { -System. out. println(""""Speculate""""); -CallBack - - -public void impactReport(String str) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -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 -"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 ) + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { +p - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } - - public void set Logic ( String logic ) { - this . logic = logic ; - } - - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } - - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } - - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - - public void set Units ( String units ) { - this . units = units ; - } - - public void set Value ( String units ) { - this . value = units ; - } - - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +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 -public EBT(Frame f) +// constructor +public Notification_Event() { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + 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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -WorkArea. showText( sh); - } + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - public boolean mouseDown( java. awt.Evente, int x, int y) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - return true; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) + //This method displays the contents of two array list to console +public void DisplayValues() { -VisualPanel.Clicked( e. getX(), e. getY()); -} + 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 +"53 ""Performance Model +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -public void mouseExited( java. awt. event.MouseEvente){} + private long queryID = 0; + public static int count = 0; -public void mousePressed( java. awt. event.MouseEvente){} + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } -public void mouseReleased( java. awt. event.MouseEvente){} + public Vector getConstraints() + { +return constraintVector; + } -public void mouseEntered( java. awt. event.MouseEvente){} + public Vector getDrivers() + { +return driverVector; + } -public void paint(Graphics g) {} + public String getName() + { +return name; + } -public void update(Graphics g) {} + public void setName(String name) + { +this. name = name; + } - public JSplitPane getSplitPane() + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -return splitPane; } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public boolean containsDriver(DriverDescription driver) { -switch(EventList. getSelectedIndex()) +return this. driverVector. contains( driver); + } -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 addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"80 ""Requirement + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + 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 Requirement() {// empty constructor + 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 Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + 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 +"89 ""Event Line - 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 int top, left, right, bottom; -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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"51 ""Driver Inner Panel +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -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 int GetT() { return top;} -panel = new JPanel(); +public int GetL() { return left;} -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public int GetR() { return right;} -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 +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 public String m_RequirementID =""""""""; @@ -43346,29 +42753,12 @@ public void ParseRequirement(String TextLine) { 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 -"89 ""Event Line - -protected int top, left, right, bottom; - - -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +",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 @@ -43441,117 +42831,30 @@ 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 -"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; - } +",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 Color GetC() +public RefineModel(EBT em) { -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; +super( em); } - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"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() + // 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 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() +public StringBuffer GenerateEvent() { - 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 +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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -43605,78 +42908,28 @@ if( opSym. token == '(' && clSym. token != ')' || * 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"63 ""Doors Thread - -static private int count = 0; +",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; + 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) @@ -43685,201 +42938,290 @@ static private int count = 0; { 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 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +PrintWriter output = new P - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +public String getNextID() { - 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 -"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 +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - // Speculate Gui - public Speculate Gui () +public String searchDate() { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - super ("" Speculate GUI ""); - container = get Content Pane (); +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - // Submit Listener + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 void action Performed ( Action Event e ) { - if ( e . get Source () == submit 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 - send Query TO Server (); +// 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 - } - if ( e . get Source () == fetch Button ) { +//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. - System . out . println ("" Fetch Button Pressed + public void Dispatch - void send Query TO Server () + public String getErrorMessage() { + return errMsg; + } - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - socket = new Socket ( ip , Port No ); +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; - Output Stream os = socket . get Output Stream (); - Output Stream + /** +* 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 pull Value From DOORS () + synchronized public void waitDone() { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +/** +* 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 [] attribute = { "" Value "", "" Attribute "" }; - 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() + { +_ 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() { - new Speculate Gui (); - }",46,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: 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 -"52 ""Pair - -private String queryID; - private String queryString; +_ activeThreads--; +notify(); + } - public Pair(String queryID, String queryString) { + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -this. queryID = queryID; -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() +{ +} - public String getQueryID() { -return this. queryID; +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = 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 setQueryString(String queryString) { -this. queryString = queryString; - } +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 - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +protected int top, left, right, bottom; - }"" -",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 -"86 ""EB Shape +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +public int GetT() { return top;} +public int GetL() { return left;} -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +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 - public void Updaterequirement Info(String rno, String pname, String mname) +public static void (String args[]) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - - - public boolean match( int mx, int my) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -return true; - } + 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 - public int GetX() - { -return x; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - public int GetY() - { -return y; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } +// 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 GetProject() - { -return ProjectName; - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public String GetModule() - { -return ModulePath; - }"" -",86,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +// 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 @@ -44003,264 +43345,8 @@ 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 -"83 ""Variable - -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat - - - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) - { -this. id = id; -this. type = type; -this. - - -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) - { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - - -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic - - - -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +",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) @@ -44285,58 +43371,143 @@ StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""""New|0|""""); thisEvent. append( new Date(). toString()+ """"|""""); ebs = (EBShape)EventShapes. elem"" -",92,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: 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 attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: 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 -"90 ""Merge Model +",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; -public MergeModel(EBT em) + + DOORsThread(ServerSocket ss) { -super( em); - MinimumNoRects = 3; + theServer = ss; + count++; + taskNumber = count; } - // 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 run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"78 ""Notification Event -public StringBuffer GenerateEvent() +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() { -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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"64 ""DOORs Thread Pool + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +// 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 - //@param argsNo arguments are used. - public static void main(String args[]) + 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 + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - 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 +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ + + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 "75 ""Driver String id; @@ -44428,645 +43599,606 @@ this. valueFrom = valueFrom; { 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 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 -"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 +",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= -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +private static class Precedence { - System. o +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - // 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 Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - public void Dispatch +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public String getErrorMessage() - { - return errMsg; - } +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 boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -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 -"50 ""Driver Description +/** + * 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 String projectName = null; - private String modulePath = null; - private String requirementID = 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 - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +/** + * 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public String getDescription() - { -return description; - } - public String getFromAttribute() - { -return fromAttribute; - } +/** + * 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 getModulePath() - { -return modulePath; - } - public String getProjectName() - { -return projectName; - } +/* + * 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 getRequirementID() - { -return requirementID; - } - public String getToAttribute() - { -return toAttribute; - } + /** + * 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 setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } +/** + * 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 setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +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; - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - public void setToAttribute(String toAttribute) + EventServerThread(ServerSocket ss) { -this. toAttribute = toAttribute; - } - - public String createKey() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - public boolean equals(Object o) + while( true) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + try { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +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) -{ - 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) +try { -super( em); - } +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -// Construct Visual model for Merge Event -public void BuildEvent() +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -public StringBuffer GenerateEvent() +public String searchQueryID(String date) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"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() +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { - 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 + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void ParseEvent(String TextLine) + public String getConstraintFromDataBase(String queryID) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +String ConstString = new String(); +try { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String getDriverFromDataBase(String queryID) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"89 ""Event Line +protected int top, left, right, bottom; - //This method displays the contents of two array list to console -public void DisplayValues() +public EventLine ( int t, int l, int r, int b) { - 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 -"62 ""Call Back - +top = t; +left = l; +right = r; +bottom = b; +} -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +public int GetT() { return top;} - private Hash table performanceModelTable = new Hash table(); +public int GetL() { return left;} - private PerformanceModel performance model= null +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 parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +public ObsoleteModel(EBT em) +{ +super( em); + } -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +// 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 pullInformationFromDoors() +public StringBuffer GenerateEvent() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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; -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - 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 getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } -public void parseImpactReport(String str) - { + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -Connection conn = null; + public void setQueryString(String queryString) { +this. queryString = queryString; + } -Statement stmt = null; + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + }"" +",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 -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 -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: 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 -"73 ""Constraints -String id; - String name; - double value; - String logic; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public boolean match( int mx, int my) + { +return true; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public int GetX() + { +return x; } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public int GetY() + { +return y; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public Color GetC() +{ +return c; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public String GetReqno() + { +return requirement No; } - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public String GetProject() + { +return ProjectName; } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public String GetModule() + { +return ModulePath; }"" -",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 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +",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 description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +private String queryID; + private String queryString; -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + public Pair(String queryID, String queryString) { -this. projectName = projec +this. queryID = queryID; +this. queryString = queryString; -public String getChangedAttribute() - { -return changedAttribute; } - public String getDescription() - { -return description; + public String getQueryID() { +return this. queryID; } - public String getFromAttribute() - { -return fromAttribute; + public String getQueryString() { +return this. queryString; } - public String getModulePath() - { -return modulePath; + public void setQueryID(String queryID) { +this. queryID = queryID ; } - public String getProjectName() - { -return projectName; + public void setQueryString(String queryString) { +this. queryString = queryString; } - public String getRequirementID() + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"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; + + // database and eventserver information + S + + public Notification_Processing() { -return requirementID; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public String getToAttribute() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -return toAttribute; - } +try - public void setChangedAttribute(String changedAttribute) + +public static void main(String args[]) { -this. changedAttribute = 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 void setDescription(String description) + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -this. description = description; - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public void setFromAttribute(String fromAttribute) + + + private void saveMenuItemActionPerformed (ActionEvent evt) { -this. fromAttribute = fromAttribute; - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public void setModulePath(String modulePath) + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -this. modulePath = modulePath; +exitApplication(); } - public void setProjectName(String projectName) + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. projectName = projectName; +openEventsMenuItemActionPerformed( evt); } - public void setRequirementID(String requirementID) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -this. requirementID = requirementID; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void setToAttribute(String toAttribute) + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -this. toAttribute = toAttribute; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - 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) + +void UpdateDisplayList() { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { + "" +",70,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"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;/ -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + 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 hashCode() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -int hashCode = 0; -if ( hashCode == 0) +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 { - 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: 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"48 ""Constraint Inner Panel + System. o -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 + // 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 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 Dispatch -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + public String getErrorMessage() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - + return errMsg; } -public Vector get Values From Data Base () + public boolean Contains(String ContextString, String SearchString) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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 - if ( server . is Connected () ) - { - Buffered R +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + DOORsThread(ServerSocket ss) { + theServer = ss; + count++; + taskNumber = count; + } - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + public void run() + { -public JPanel get Panel () + while( true) { - 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 + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 public AboutDialog(JFrame parent, boolean modal) { @@ -45076,611 +44208,619 @@ public AboutDialog(JFrame parent, boolean modal) { 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +",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 - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d +protected int top, left, right, bottom; - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() +public EventLine ( int t, int l, int r, int b) { +top = t; +left = l; +right = r; +bottom = b; +} - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +public int GetT() { return top;} +public int GetL() { return left;} -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification +public int GetR() { return right;} +public int GetB() { return bottom;}"" +",89,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: 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 -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +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) { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 { - try - { -N +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -void DeleteEvent(String SubscriberName, String EventID) - { -try +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + +private static class Token { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +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 { - m_Deleterequirement List. remove(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 -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 +/** + * 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 -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - // 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 + /** + * 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 -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 -"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 +/* + * 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() {// empty constructor -public String toString() +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - /** -* Returns the id. -* @return int -*/ - public String getId() + public void updateEvent(String str, String ID) { -return 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() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -return logic; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - /** -* Returns the name. -* @return String -*/ - public String getName() + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -return name; - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +//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 id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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 +"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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } + 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"75 ""Driver - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +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 type. -* @param type The type to set +* Returns the id. +* @return int */ - public void setType(String type) { -this. type = type; + public String getId() + { +return id; } /** -* Returns the project_ path. +* Returns the name. * @return String */ - public String getProject_ path() { -return project_ path; + public String getName() + { +return name; } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set + /** +* Returns the value. +* @return double */ - 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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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 + public double getValueFrom() { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +return valueFrom; + } - public void ParseEvent(String TextLine) + public double getValueTo() { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +return valueTo; + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -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 -"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(); -} +this. id = id; + } -public Object clone() throws CloneNotSupportedException + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +this. name = name; + } - public void ParseEvent(String TextLine) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { - 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. valueFrom = valueFrom; + } - 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 +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 +"87 ""EBT -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - // Construct Visual model for Merge Event -public void BuildEvent() +public EBT(Frame f) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -public StringBuffer GenerateEvent() + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -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 subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,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 +WorkArea. showText( sh); + } - performance model Handler(String msg) + public boolean mouseDown( java. awt.Evente, int x, int y) { -this. strES = msg; + return true; } - 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 boolean mouseUp( java. awt.Evente, int x, int y) { - 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 true; } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } +public void mouseExited( java. awt. event.MouseEvente){} - 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 -"49 ""Constraints Description +public void mousePressed( java. awt. event.MouseEvente){} -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +public void mouseReleased( java. awt. event.MouseEvente){} - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +public void update(Graphics g) {} - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + public JSplitPane getSplitPane() +{ +return splitPane; +} - } +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public String get Description () { - return this . description ; - } +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) - public String get Logic () { - return this . logic ; - } +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 String get Module Path () { - return this . module Path ; - } +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 - public String get Project Name () { - return this . project Name ; - } +String id; + String name; + double value; + String logic; - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public void set Logic ( String logic ) { - this . logic = logic ; - } - 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 logic. +* @return String +*/ + public String getLogic() { +return logic; } - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - 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 """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +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 """"; @@ -45804,1331 +44944,1261 @@ public void action Performed ( Action Event e ) { - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - - - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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 -"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 Vector get Driver From Data Base () + { -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 { + Vector v = new Vector (); + Socket server ; + String line = new String (); -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + try + { + server = new Socket ( server IP , 1701 ); -/** - * 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 ( 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 /** - * 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. - */ -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. + * Scan for and execute tasks. */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP - +public void run() +{ +Runnable target = 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. +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 ObsoleteModel(EBT em) +{ +super( em); + } -/** - * 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. - */ +// 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 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 -"77 ""Model Driver +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 -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - 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 -"62 ""Call Back + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +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 Hash table performanceModelTable = new Hash table(); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - private PerformanceModel performance model= null + private long queryID = 0; + public static int count = 0; - public void parseSpeculateInformation(String str) + public PerformanceModel(String name, long queryID) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + public Vector getConstraints() + { +return constraintVector; + } -public void identifyPerformanceModels() + public Vector getDrivers() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +return driverVector; + } + public String getName() + { +return name; + } -public void pullInformationFromDoors() + public void setName(String name) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } -public void insertValuesInDataBase() + public void removeDriver(DriverDescription driver) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } - public void createExecuteString() + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) { +this. constraintVector. remove( constraint); + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; + public DriverDescription getDriver(DriverDescription driver) + { DriverDescription dd = null; -Vector driverVector +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 void parseImpactReport(String str) + public long getQueryID() { +return this. queryID; + } -Connection conn = null; + public void setQueryID( long id) + { +this. queryID = id; + } -Statement stmt = null; + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: 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 -Vector constraintsVector = null; -Vector driversVector = null; +/** +* True if this thread is currently processing. + */ +public boolean busy; -ConstraintsDescription constraint = null; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -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 -"94 ""Refine Model -public RefineModel(EBT em) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -super( em); - } +owner = o; +} - // Construct Visual model for Merge Event -public void BuildEvent() + +/** + * Scan for and execute tasks. + */ +public void run() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +Runnable target = null; -public StringBuffer GenerateEvent() +do { -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 -"71 ""Requirement +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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -public Requirement() -{ -} + // database and eventserver information + S -public Object clone() throws CloneNotSupportedException + public Notification_Processing() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +public static void main(String args[]) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_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 ParseRequirement(String TextLine) + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { - 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - EventServerThread(ServerSocket ss) + + private void saveMenuItemActionPerformed (ActionEvent evt) { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { +exitApplication(); + } - while( true) + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { - try +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public String getNextID() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -try +if (! listModel. isEmpty()) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public String searchDate() +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +new AboutDialog ( this, true). show(); + } -public String searchQueryID(String date) +void UpdateDisplayList() { -Vector queryVector = new Vector(); -String searchQuery = new String(); +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; try { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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); + } - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + +// Construct Visual model for Merge Event +public void BuildEvent() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve - public String getDriverFromDataBase(String queryID) +public StringBuffer GenerateEvent() { -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 -"87 ""EBT +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 +"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 JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + // Speculate Gui + public Speculate Gui () + { -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + super ("" Speculate GUI ""); + container = get Content Pane (); - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + set Size ( 800 , 600 ); + 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 boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } + public void action Performed ( Action Event e ) { - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + if ( e . get Source () == submit Button ) { + send Query TO Server (); -public void mouseExited( java. awt. event.MouseEvente){} + } + if ( e . get Source () == fetch Button ) { -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + System . out . println ("" Fetch Button Pressed -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + void send Query TO Server () + { -public void update(Graphics g) {} + String ip = this . event Server IP ; + int Port No = 1701 ; - public JSplitPane getSplitPane() -{ -return splitPane; -} + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + Output Stream os = socket . get Output Stream (); + Output Stream -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public void pull Value From DOORS () { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -Test case: Delete subscriptions (2.2.3) 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 receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"Test case: 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 -"53 ""Performance Model + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + String [] attribute = { "" Value "", "" Attribute "" }; - private long queryID = 0; + String project Name = this . proj Name Text . get - public static int count = 0; - public PerformanceModel(String name, long queryID) + public static void main ( String [] args ) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + 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; - public Vector getConstraints() - { -return constraintVector; - } + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - public Vector getDrivers() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -return driverVector; - } + setTitle(""""EventsProcessor""""); - public String getName() - { -return name; - } +addWindowListener( new WindowAdapter() +{ - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ + 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) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -this. constraintVector. add( constraint); - } - - public boolean containsConstraint(ConstraintsDescription constraint) +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -return this. constraintVector. contains( constraint); - } +Notification - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +if (! listModel. isEmpty()) { - dd = (DriverDescription) this. driverVector. get( i) + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +int index = eventList. getSelectedIndex(); +if ( index != -1) { - cd = (ConstraintsDescription) this - - public long getQueryID() + try { -return this. queryID; - } +N - public void setQueryID( long id) +void DeleteEvent(String SubscriberName, String EventID) { -this. queryID = id; - } - - public String toString() +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) { -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 -"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 ; +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +void DeleteRelatedEvents() { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } + m_Deleterequirement List. remove(0); - public String get Description () { - return this . description ; - } - public String get Logic () { - return this . 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 - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } + // 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 get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"82 ""Tokenizer - 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 ; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; - } +/** + * 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 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 ; - } + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - 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 """" +/** + * 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 boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"47 ""Impact Report + /** + * 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 server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +/** + * 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 JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P +/** + * 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 Impact Report () - { - super ("""" Search Result 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 , 250 ); - panel = new JPanel (); +/** + * 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 +"82 ""Tokenizer - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public static void main ( String [] args ) - { +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - Impact Report im = new Impact Report (); - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public Vector search Date () - { +/** + * 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( ) ) +{ - 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 (); + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - Socket server ; - String line = new String (); +for( ; nextChar( ); result += ch ) - // Select Actions - public void action Performed ( Action Event e ) - { + /** + * 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 - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +/** + * 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 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 ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - Pair pair = ( Pair ) pair Vector . get ( i ); +private void skip - if ( pair - . get +/** + * 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 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 - public void impact Report ( String id ) - { +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - // super ("""" Impact Report """"); - container = get Content Pane (); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - set Size ( 1020 , 740 ); - this . query ID = id ; +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - System . out . println ("""" Impact Report Constructor ..... 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( ) ) +{ - public Vector get Constraint From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - try - { - server = new Socket ( server IP , 1701 ); +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - if ( server . is Connected () ) - { - Buffered +for( ; nextChar( ); result += ch ) - public Vector get Driver From Data Base () - { + /** + * 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 - Vector v = new Vector (); - 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 ) { } +} - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. + * 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 static class Symbol -{ -public chartoken; -public int theLine; +private -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} +private void skip /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * 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 int checkBalance( ) +private void processSlash( ) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +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 - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +public TextModel(EBT e) { -if( opSym. token == '(' && clSym. token != ')' || + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement - /** - * 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 -"50 ""Driver Description + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { -this. projectName = projec +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -public String getChangedAttribute() - { -return changedAttribute; - } +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 - public String getDescription() - { -return description; - } +private String queryID; + private String queryString; - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() - { -return modulePath; - } + public Pair(String queryID, String queryString) { - public String getProjectName() - { -return projectName; - } +this. queryID = queryID; +this. queryString = queryString; - public String getRequirementID() - { -return requirementID; } - public String getToAttribute() - { -return toAttribute; + public String getQueryID() { +return this. queryID; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; + public String getQueryString() { +return this. queryString; } - public void setDescription(String description) - { -this. description = description; + public void setQueryID(String queryID) { +this. queryID = queryID ; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; + public void setQueryString(String queryString) { +this. queryString = queryString; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + }"" +",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 - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - public boolean equals(Object o) + //@param argsNo arguments are used. + public static void main(String args[]) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"53 ""Performance Model -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -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 -"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 double getValueTo() + public void addDriver(DriverDescription driver) { -return valueTo; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void removeDriver(DriverDescription driver) { -this. id = id; +this. driverVector. remove( driver); } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public boolean containsDriver(DriverDescription driver) { -this. name = name; +return this. driverVector. contains( driver); } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void addConstraint(ConstraintsDescription constraint) { -this. valueFrom = valueFrom; +this. constraintVector. add( constraint); } - - public void setValueTo( double value) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. valueTo = valueTo; - }"" -",75,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"58 ""Subscribed Model +return this. constraintVector. contains( constraint); + } -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + dd = (DriverDescription) this. driverVector. get( i) -public Requirement() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -} + cd = (ConstraintsDescription) this -public Object clone() throws CloneNotSupportedException + public long getQueryID() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +return this. queryID; } - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public void setQueryID( long id) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +this. queryID = id; + } -public void ParseRequirement(String TextLine) + public String toString() { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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(); +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 +"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){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} - - -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -switch(EventList. getSelectedIndex()) +_ activeThreads--; +notify(); + } -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 + /** +* 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 Socket aSocket; @@ -47179,167 +46249,275 @@ 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"91 ""Modify Model +",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 -public ModifyModel(EBT 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 + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"93 ""Obsolete Model + +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: 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 - 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 -"87 ""EBT + //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 JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +//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 EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + +//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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + +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 boolean mouseDown( java. awt.Evente, int x, int y) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { - return true; +return logic; } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public void mouseExited( java. awt. event.MouseEvente){} + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return 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""""); + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall send the customized message to each impacted executable model.,136,0 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -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 -"77 ""Model Driver -String msg=""""""""; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public ModelDriver(String text) - { -this. msg = text; -init(); + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - 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 + /** +* 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 """"; @@ -47435,538 +46613,109 @@ public void action Performed ( Action Event e ) { // super ("""" Impact Report """"); - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: 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: 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 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} - -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - - -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl - - -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP - - - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. - - -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); - - -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub - - - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - - - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - - -//Check if a subscription exists - public boolean CheckSubscription(String str) - { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - - -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - - -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models - - - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack - - -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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; + container = get Content Pane (); + set Size ( 1020 , 740 ); + this . query ID = id ; - public void createExecuteString() + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + Vector v = new Vector (); + Socket server ; + String line = new String (); -public void parseImpactReport(String str) - { -Connection conn = null; + try + { + server = new Socket ( server IP , 1701 ); -Statement stmt = null; + if ( server . is Connected () ) + { + Buffered -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"64 ""DOORs Thread Pool + public Vector get Driver From Data Base () + { -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + Vector v = new Vector (); + Socket server ; + String line = new String (); - //@param argsNo arguments are used. - public static void main(String args[]) + 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"" -",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 -"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; + for( int i=0; i<4; i++) + { p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"83 ""Variable -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 +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 okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - +this. id = id; +this. type = type; +this. -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +//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 -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 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; +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. @@ -47978,6 +46727,16 @@ return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + /** * Returns the name. * @return String @@ -47992,15 +46751,8 @@ return name; * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -48008,116 +46760,147 @@ 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"51 ""Driver Inner Panel + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -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) { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -return panel; + + /** +* 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; }"" -",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 -"78 ""Notification Event +",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 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"""") ) + +String sName, sReqno, sModule, sKey1, sKey2; +try { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls 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 -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String getErrorMessage() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat + return errMsg; + } + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - //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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +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 private static final int EOL = 0; @@ -48242,7 +47025,32 @@ 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 +",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) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 "86 ""EB Shape @@ -48308,32 +47116,142 @@ return ProjectName; { 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 -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 -"51 ""Driver Inner Panel +",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 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 projectName = null; + private String modulePath = null; + private String requirementID = null; - String projectName, + 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 changeAttribute, -String fromValue, -String toValue) { +String changedAttribute, +String fromAttribute, +String toAttribute) + { -panel = new JPanel(); +this. projectName = projec -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public String getChangedAttribute() + { +return changedAttribute; + } -return panel; - }"" -",51,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 "50 ""Driver Description private String projectName = null; @@ -48463,1153 +47381,1024 @@ if ( hashCode == 0) result = 37 * result + this. projectName. hashCode(); result = 37 * result + this. modulePath. hashCode(); result = 37 "" -",50,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Delete subscriptions (2.2.3) 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 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - - } - - public String getQueryID() { -return this. queryID; - } - - public String getQueryString() { -return this. queryString; - } - - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - - public void setQueryString(String queryString) { -this. queryString = queryString; - } - - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"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() - { +",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 - 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"" -",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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"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() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { +p - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -public String getNextID() - { -try +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +return currentLine; +} -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +return errors; +} - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try +while( nextChar( ) ) { - 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } - // 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(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +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(); -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 -"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; - } - +String result = """""""" + ch; - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +for( ; nextChar( ); result += ch ) - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"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. -*/ + * 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 - 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 + * 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 ) { } +} /** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"private JPanel center Panel = null ; + * 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 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 quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - public Speculate Gui () - { +private void skip - super ("" Speculate GUI ""); - container = get Content Pane (); +/** + * 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 - set Size ( 800 , 600 ); +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 - // Submit Listener + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - public void action Performed ( Action Event e ) { +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - if ( e . get Source () == submit Button ) { +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - send Query TO Server (); +public void drawModel() +{ +repaint(); +} - } - if ( e . get Source () == fetch Button ) { +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 - System . out . println ("" Fetch Button Pressed +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - void send Query TO Server () + //@param argsNo arguments are used. + public static void main(String args[]) { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"65 ""About Dialog - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - 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 receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 - 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; +} - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +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 - String project Name = this . proj Name Text . get +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[]) { - 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: 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 -"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() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + 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 +"61 ""Worker Thread /** -* 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 +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; /** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -_ 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 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + setTitle(""""EventsProcessor""""); - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +addWindowListener( new WindowAdapter() +{ -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -this. projectName = projec -public String getChangedAttribute() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -return changedAttribute; - } - - public String getDescription() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -return description; - } +Notification - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -return modulePath; - } - - public String getProjectName() +if (! listModel. isEmpty()) +{ + int index =0; + try { -return projectName; - } +Notification_Event nEvt1 = (Notificati - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -this. changedAttribute = changedAttribute; - } +N - public void setDescription(String description) +void DeleteEvent(String SubscriberName, String EventID) { -this. description = description; - } - - public void setFromAttribute(String fromAttribute) +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) { -this. fromAttribute = fromAttribute; - } +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) +void DeleteRelatedEvents() { -this. projectName = projectName; - } +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + m_Deleterequirement List. remove(0); - 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) +void AddSubscription(String SubscriberName, Requirement requirement ) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req -public int hashCode() +void UpdateDisplayList() { -int hashCode = 0; -if ( hashCode == 0) +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { - 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 -"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 -"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;/ - + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - 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 + // 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +private boolean Analyze_CheckSubscription(String str) { - 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. +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 - public void Dispatch +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public String getErrorMessage() + //@param argsNo arguments are used. + public static void main(String args[]) { - return errMsg; - } - - - public boolean Contains(String ContextString, String SearchString) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + 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; -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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"77 ""Model Driver +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"58 ""Subscribed 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; -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) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +/** +* 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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -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 -"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 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 +"87 ""EBT - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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(); - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } -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 mouseDown( java. awt.Evente, int x, int y) + { + 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 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 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 mouseExited( java. awt. event.MouseEvente){} - 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 mousePressed( java. awt. event.MouseEvente){} - 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 mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public void paint(Graphics g) {} +public void update(Graphics g) {} -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 -"private JPanel center Panel = null ; + public JSplitPane getSplitPane() +{ +return splitPane; +} - 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 valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public Speculate Gui () +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { +switch(EventList. getSelectedIndex()) - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); +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 . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 +"91 ""Modify Model +public ModifyModel(EBT em) +{ +super( em); + } - // Submit Listener - public void action Performed ( Action Event e ) { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - if ( e . get Source () == submit Button ) { - send Query TO Server (); +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - } - if ( e . get Source () == fetch Button ) { + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 - System . out . println ("" Fetch Button Pressed +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - void send Query TO Server () - { +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +/** + * 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 pull Value From DOORS () - { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - String project Name = this . proj Name Text . get +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - 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 -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 -"79 ""performance model Handler +for( ; nextChar( ); result += ch ) -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 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 - 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(); +/** + * 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 ) { } +} -//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; +/** + * 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 getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +/** + * 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 saveModel( int id) - { -// save current model -database. saveCurrentModel( 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: 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; - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - 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 -"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 -"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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - //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. +/** + * 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; -//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 + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -//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 + /** + * 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 -public String toString() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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 id. -* @return int -*/ - public String getId() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -return id; - } +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } + // 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 name. -* @return String -*/ - public String getName() + + public String getErrorMessage() { -return name; + return errMsg; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + 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 +"81 ""subscribermanager - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + // 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 +{ - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +} +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 value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +// 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 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; - } + // 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 +"85 ""Decompose Model - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +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 @@ -49711,133 +48500,97 @@ 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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= - - -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 +",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 +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -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 { + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -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 run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: 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 +"72 ""Balance /** - * Construct an evaluator object. - * @param s the string containing the expression. + * Symbol represents what will be placed on the stack. */ -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 static class Symbol +{ +public chartoken; +public int theLine; -/** - * Internal method that hides type-casting. - * Changed the method to support double +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. */ -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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); } /** - * 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. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** - * Internal routine to compute x^ n. + * Print an error message if clSym does not match opSym. + * Update errors. */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -/** - * 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. + /** + * 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( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: 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 +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 public String m_RequirementID =""""""""; @@ -49869,598 +48622,596 @@ public void ParseRequirement(String TextLine) 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 -"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 +",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 -/** - * 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 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 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 String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -/** - * 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 value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -/* - * 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 getValueTo() + { +return valueTo; + } /** - * 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. - */ - +* 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"84 ""White Board Execution Graph + ** +* Sets the name. +* @param name The name to set +*/ + 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 + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -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 EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -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 Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -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 boolean match( int mx, int my) + { +return true; + } - 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 int GetX() + { +return x; + } - 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 int GetY() + { +return y; + } - 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 Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String GetProject() + { +return ProjectName; + } -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 -"88 ""Event Model + 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 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 ; + 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 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); + // Speculate Gui + public Speculate Gui () + { - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + super ("" Speculate GUI ""); + container = get Content Pane (); -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + // Submit Listener -public void drawModel() -{ -repaint(); -} + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + send Query TO Server (); + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + if ( e . get Source () == fetch Button ) { -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 ("" Fetch Button Pressed -public void CheckNotifyStatus() + void send Query TO Server () { -//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(){} + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -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 pull Value From DOORS () { -Even + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + 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 - 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 -"64 ""DOORs Thread Pool +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 final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 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 - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"71 ""Requirement + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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 Vector get Values From Data Base () { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath -public void ParseRequirement(String TextLine) + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -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 -"80 ""Requirement + return panel ; + }"" +",48,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: 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 +"52 ""Pair -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +private String queryID; + private String queryString; -public Requirement() {// empty constructor + public Pair(String queryID, String queryString) { -} +this. queryID = queryID; +this. queryString = queryString; -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; } + public String 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 String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: 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 -"89 ""Event Line + public void setQueryString(String queryString) { +this. queryString = queryString; + } -protected int top, left, right, bottom; + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + }"" +",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; -public int GetT() { return top;} -public int GetL() { return left;} + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; // 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) + // database and eventserver information + S + + public Notification_Processing() { - setTitle(""""EventsProcessor""""); +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener( new WindowAdapter() { + public void windowClosing(WindowEvent evt) + { +try - 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) +public static void main(String args[]) { -int index = eventList. getSelectedIndex(); -if ( index != -1) +try { - try - { -Notification + 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 First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -Notification_Event nEvt1 = (Notificati +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" -/ 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) + private void saveMenuItemActionPerformed (ActionEvent evt) { try { - int i, j=-1; - for ( i=0; i< events. size(); i++) + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +exitApplication(); + } -void DeleteRelatedEvents() + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -while ( m_Deleterequirement List. size()!=0) +if (! listModel. isEmpty()) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - m_Deleterequirement List. remove(0); + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +new AboutDialog ( this, true). show(); + } void UpdateDisplayList() { listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + 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; - // 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 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(); + } -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 -"67 ""Event Detail Dialog + public Vector getConstraints() + { +return constraintVector; + } -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 Vector getDrivers() + { +return driverVector; + } + public String getName() + { +return name; + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + public void setName(String name) + { +this. name = name; + } -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public boolean containsDriver(DriverDescription driver) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + 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++) { -setVisible ( false); -dispose (); -} + 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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + public long getQueryID() + { +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } -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 + 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 "47 ""Impact Report private String server IP = """" local host """"; @@ -50599,203 +49350,178 @@ public void action Performed ( Action Event e ) { 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 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } +",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 +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: 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 modifying a requirement.,124,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"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 = """"""""; - } - + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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 boolean match( int mx, int my) - { -return true; - } +public void drawModel() +{ +repaint(); +} - public int GetX() - { -return x; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 int GetY() - { -return y; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public Color GetC() +public Requirement() { -return c; - } +} - public String GetReqno() +public Object clone() throws CloneNotSupportedException { -return requirement No; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String GetProject() - { -return ProjectName; - } + 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 GetModule() +public void ParseRequirement(String TextLine) { -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 -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 -"85 ""Decompose Model + 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 +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + 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(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: 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 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +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 - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - 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 - performance model Handler(String msg) - { -this. strES = msg; - } +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 messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; 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; + 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 int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + 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 saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +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 "54 ""eventserver public static void (String args[]) @@ -50811,207 +49537,273 @@ p public final static int defaultPort = 1701; ServerSocket theServer;"" -",54,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"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 +",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 -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 -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 -"75 ""Driver +Socket aSocket; + int ID; + String EventLog; -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; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public String toString() + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ - /** -* Returns the id. -* @return int -*/ - public String getId() + +} +public void sendImpactReportToEventServer(String text) { -return id; - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - /** -* Returns the name. -* @return String -*/ - public String getName() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -return name; - } +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -return valueFrom; - } +// 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 + +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 double getValueTo() +public Object clone() throws CloneNotSupportedException { -return valueTo; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void ParseEvent(String TextLine) { -this. id = 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 - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. name = name; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +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 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; + + + DOORsThread(ServerSocket ss) { -this. valueFrom = valueFrom; + theServer = ss; + count++; + taskNumber = count; } - public void setValueTo( double value) + public void run() { -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 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"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 -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); +// 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 -// 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 ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -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 -"66 ""Config Dialog +// 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 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 (); -} + //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 +/** +* 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); -// 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 +/** +* 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 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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: 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 -"90 ""Merge Model + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -public MergeModel(EBT em) + /** +* 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 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ super( em); - MinimumNoRects = 3; } @@ -51019,167 +49811,204 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +AddEventRect(60,80,1); +CurrentEvent = 4; +} public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"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 (); - - } +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public Vector search Date () - { + 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 - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +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= - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +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 - query String Combo . remove All Items (); +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - query String Combo . add Item ("""" Select Query String """"); +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - Socket server ; - String line = new String (); +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 { - // Select Actions - public void action Performed ( Action Event e ) - { +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +/** + * 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 - // Button Actions +/** + * 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 action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - if ( pair - . get +/** + * 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 impact Report ( String 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 - // super ("""" Impact Report """"); - container = get Content Pane (); + /** + * 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 Size ( 1020 , 740 ); - this . query ID = 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. + */ - System . out . println ("""" Impact Report Constructor ..... ID """" + - public Vector get Constraint From Data Base () - { +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 - Vector v = new Vector (); +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - Socket server ; - String line = new String (); +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - try - { - server = new Socket ( server IP , 1701 ); +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - if ( server . is Connected () ) - { - Buffered +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public Vector get Driver From Data Base () - { +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - Vector v = new Vector (); - Socket server ; - String line = new String (); +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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,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 eventserver shall receive event messages when a requirement changes.,127,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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"91 ""Modify 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 +"92 ""New Model -public ModifyModel(EBT em) +public NewModel(EBT em) { super( em); } @@ -51188,100 +50017,238 @@ 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - 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 -"94 ""Refine Model + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { -public RefineModel(EBT em) -{ -super( em); - } + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - // Construct Visual model for Merge Event -public void BuildEvent() + +public String getNextID() + { +try { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public StringBuffer GenerateEvent() + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"89 ""Event Line + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -protected int top, left, right, bottom; + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -public EventLine ( int t, int l, int r, int b) + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -top = t; -left = l; -right = r; -bottom = b; -} + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -public int GetT() { return top;} + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 int GetL() { return left;} +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 +"50 ""Driver Description -public int GetR() { return right;} +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public int GetB() { return bottom;}"" -",89,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"51 ""Driver Inner Panel + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -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, +public DriverDescription( +String projectName, String modulePath, String requirementID, String description, -String changeAttribute, -String fromValue, -String toValue) { +String changedAttribute, +String fromAttribute, +String toAttribute) + { -panel = new JPanel(); +this. projectName = projec -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public String getChangedAttribute() + { +return changedAttribute; + } -return panel; - }"" -",51,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: 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 + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 """"; @@ -51347,208 +50314,109 @@ public JPanel get Panel () { return panel ; }"" -",48,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"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 +",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. */ - public String getId() - { -return id; - } - + private int _ activeThreads = 0; /** -* Returns the logic. -* @return String +* 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 getLogic() - { -return logic; - } - - /** -* Returns the name. -* @return String -*/ - public String getName() + synchronized public void waitDone() { -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; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - /** -* Returns the type. -* @return String +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public String getType() { -return type; + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } /** -* Sets the type. -* @param type The type to set +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public void setType(String type) { -this. type = type; + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } /** -* Returns the project_ path. -* @return String +* Called to reset this object to +* its initial state. */ - public String getProject_ path() { -return project_ path; + 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 + +String msg=""""""""; + +public ModelDriver(String text) + { +this. msg = text; +init(); } - /** -* 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 + 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; @@ -51640,361 +50508,524 @@ this. valueFrom = valueFrom; { 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 +",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 RefineModel(EBT 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 + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () + { + + super ("""" Search Result GUI """"); + + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 +"92 ""New Model + +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: 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 +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 -/** -* 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 id; + String name; + double value; + String 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 + 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 */ - pub + public String getId() { +return id; + } /** -* Get a new work assignment. -* -* @return A new assignment +* Returns the logic. +* @return String */ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + public String getLogic() { +return logic; + } /** -* Called to block the current thread until -* the thread pool has no more work. +* Returns the name. +* @return String */ - 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 String getName() { +return name; } -}"" -",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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - // database and eventserver information - S - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +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 + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -// 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"""" + /** +* 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 ; - private void saveMenuItemActionPerformed (ActionEvent evt) + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + public String get Description () { + return this . description ; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + public String get Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + 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 ; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } -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 -"61 ""Worker Thread + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -/** -* True if this thread is currently processing. - */ -public boolean busy; + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + public void set Units ( String units ) { + this . units = units ; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"88 ""Event Model + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -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 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 EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + 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 getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +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 ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +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 -public void drawModel() -{ -repaint(); -} +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 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 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 BuildEvent(){} +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + 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 AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even + 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 getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + 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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - 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 +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 "72 ""Balance /** * Symbol represents what will be placed on the stack. @@ -52048,1530 +51079,1123 @@ if( opSym. token == '(' && clSym. token != ')' || * 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"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 -Test case: Delete subscriptions (2.2.3) 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 -"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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - - -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); - - - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } - - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} - - -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} - - -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +",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 - //@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 -"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 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 Balance( Reader inStream ) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -errors = 0; -tok = new Tokenizer( inStream ); +return errors; } /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants */ -public int checkBalance( ) +public char getNextOpenClose( ) +{ +while( nextChar( ) ) { -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. + * Return true if ch can be part of a Java identifier */ -private void checkMatch( Symbol opSym, Symbol clSym ) +private static final boolean isIdChar( char ch ) { -if( opSym. token == '(' && clSym. token != ')' || +return Character. isJavaIdentifierPart( ch ); +} - /** - * 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. +/** + * Return an identifier read from input stream + * First character is already read into ch */ -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 -"86 ""EB Shape +private String getRemainingString( ) +{ +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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 String GetReqno() - { -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: 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 subscribermanager shall restore the executable model to its prior state.,119,0 -"50 ""Driver Description +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -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 +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"60 ""Thread Pool -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +/** +* 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. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; - } +/** +* 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 getDescription() - { -return description; - } - public String getFromAttribute() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return fromAttribute; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public String getModulePath() - { -return modulePath; - } - public String getProjectName() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -return projectName; - } - - public String getRequirementID() +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -return requirementID; +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 - public String getToAttribute() - { -return toAttribute; - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + private JPanel driver Panel = new JPanel (); - public void setDescription(String description) - { -this. description = description; - } + private JPanel driver Inner Panel = null ; - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P - public void setModulePath(String modulePath) + public Impact Report () { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + super ("""" Search Result GUI """"); - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + container = get Content Pane (); - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + set Size ( 800 , 250 ); - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } + panel = new JPanel (); - 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() - { + panel . set Layout ( null ); -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + this . server IP = + JOption Pane + . show In -public int hashCode() + public static void main ( String [] args ) { -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 -"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;/ + Impact Report im = new Impact Report (); - 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() + public Vector search Date () { -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 - + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public String getErrorMessage() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { - return errMsg; - } + pair Vector = new Vector (); - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"75 ""Driver + query String Combo . remove All Items (); -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; - } + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); - 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; - } + // Select Actions + public void action Performed ( Action Event e ) + { - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +public void action Performed ( Action Event e ) { - public double getValueTo() - { -return valueTo; - } + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - ** -* 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) + public void impact Report ( String id ) { -this. valueFrom = valueFrom; - } + // super ("""" Impact Report """"); - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"93 ""Obsolete Model + container = get Content Pane (); -public ObsoleteModel(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); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + System . out . println ("""" Impact Report Constructor ..... ID """" + -public StringBuffer GenerateEvent() + public Vector get Constraint From Data Base () { -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 -"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 + Vector v = new Vector (); + Socket server ; + String line = new String (); - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - 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 Vector get Driver From Data Base () + { + Vector v = new Vector (); -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 + Socket server ; + String line = new String (); -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"89 ""Event Line - 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 int top, left, right, bottom; - 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 EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - 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 GetT() { return top;} +public int GetL() { return left;} -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"64 ""DOORs Thread Pool +Socket aSocket; + int ID; + String EventLog; -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - //@param argsNo arguments are used. - public static void main(String args[]) + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) { - 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 -"85 ""Decompose Model +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -public DecomposeModel(EBT em) +// 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 { -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 + // 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; -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 comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"82 ""Tokenizer + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants + /** + * Construct a connection object. + * @param Returns an object of type Connection */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { + Class. fo /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +* 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 /** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; +* 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 -for( ; nextChar( ); result += ch ) + /** +* 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 - /** - * 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 getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -/** - * 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 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 -/** - * 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 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 -/** - * 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 +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -/** - * 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"private JPanel center Panel = null ; + private Hash table performanceModelTable = new Hash table(); - 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 PerformanceModel performance model= null - // Speculate Gui - public Speculate Gui () + public void parseSpeculateInformation(String str) { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - super ("" Speculate GUI ""); - container = get Content Pane (); +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - // Submit Listener +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { - send Query TO Server (); + public void createExecuteString() + { - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - if ( e . get Source () == fetch Button ) { +public void parseImpactReport(String str) + { - System . out . println ("" Fetch Button Pressed +Connection conn = null; +Statement stmt = null; - void send Query TO Server () - { +Vector constraintsVector = null; +Vector driversVector = null; - String ip = this . event Server IP ; - int Port No = 1701 ; +ConstraintsDescription constraint = null; - Socket socket ; - try { +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 - socket = new Socket ( ip , Port No ); +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - Output Stream os = socket . get Output Stream (); - Output Stream +public Requirement() +{ +} - public void pull Value From DOORS () +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + 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 +"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 + - String project Name = this . proj Name Text . get +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 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,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,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"78 ""Notification Event +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 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 timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore 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 timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - 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 timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target -// 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 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() - //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 -"88 ""Event Model +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 -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 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 EventModel(EBT e) +public TextModel(EBT e) { + // System. out. println(""""Trying to create text box""""); ebt = e; CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + 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 ClearVectors() +public void ShowInfo( int CE) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); } - public void drawModel() { repaint(); } -public void drawModel(EBShape sh) +protected void paintComponent(Graphics g) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} - + super. paintComponent( g); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +if (HideMsg == true) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + 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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = 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 + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public void CheckNotifyStatus() +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -//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)); -} +this. projectName = projec -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 String getChangedAttribute() { -Even - - -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); +return changedAttribute; } - - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - - - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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 getDescription() + { +return description; } - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String getFromAttribute() + { +return fromAttribute; } - - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String getModulePath() + { +return modulePath; } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public String getProjectName() + { +return projectName; } - - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public String getRequirementID() + { +return requirementID; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String getToAttribute() + { +return toAttribute; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void setDescription(String description) + { +this. description = description; } - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - /** -* 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 -"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 ); -} - + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -for( ; nextChar( ); result += ch ) + 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() + { - /** - * 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 +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -/** - * 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 int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -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 - + 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 +"62 ""Call Back -/** - * 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 +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -/** - * 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"80 ""Requirement + private Hash table performanceModelTable = new Hash table(); -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + private PerformanceModel performance model= null -public Requirement() {// empty constructor + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - 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 pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -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 -"88 ""Event Model +public void insertValuesInDataBase() + { +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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +private String queryID; + private String queryString; -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -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 getQueryID() { +return this. queryID; + } -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 String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - protected void BuildEvent(){} + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + }"" +",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 -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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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; - 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 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 + //@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 /** @@ -53610,700 +52234,660 @@ 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 -"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; +",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 ; - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public void run() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"93 ""Obsolete Model + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -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 String get Description () { + return this . description ; + } -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: 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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"89 ""Event Line + public String get Logic () { + return this . logic ; + } -protected int top, left, right, bottom; + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -public int GetT() { return top;} + public String get Value () { + return this . value ; + } -public int GetL() { return left;} + public void set Description ( String description ) { + this . description = description ; + } -public int GetR() { return right;} + public void set Logic ( String logic ) { + this . logic = logic ; + } -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 -"75 ""Driver + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -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 Project Name ( String project Name ) { + this . project Name = project Name ; } + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; + public void set Units ( String units ) { + this . units = units ; } - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; + public void set Value ( String units ) { + this . value = units ; } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } + public String get Performance Model Name () { + return this . performance Model Name ; + } - public double getValueTo() - { -return valueTo; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } +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 - 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 -"85 ""Decompose Model +protected int top, left, right, bottom; -public DecomposeModel(EBT em) +public EventLine ( int t, int l, int r, int b) { -super( em); -MinimumNoRects = 3; - } +top = t; +left = l; +right = r; +bottom = b; +} - // 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 GetT() { return top;} +public int GetL() { return left;} +public int GetR() { return right;} -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 -"75 ""Driver +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 +"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; +return ModulePath; }"" -",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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"53 ""Performance Model +",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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - public static int count = 0; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - public PerformanceModel(String name, long queryID) + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - public Vector getConstraints() + + + /** +* 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) { -return constraintVector; - } +conn = this. getConnect - public Vector getDrivers() + +/** +* 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) { -return driverVector; - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public String getName() + +public void solveStructureEquation() { -return name; - } +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - 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 - public void addDriver(DriverDescription driver) + +public void setCalculatedValues() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } +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 removeDriver(DriverDescription driver) + + public Vector getImpactReport() { -this. driverVector. remove( driver); +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); + public String getQueryID() { +return this. queryID; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); + public String getQueryString() { +return this. queryString; } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + public void setQueryID(String queryID) { +this. queryID = queryID ; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); + public void setQueryString(String queryString) { +this. queryString = queryString; } - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - 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; - } + }"" +",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 ; - public void setQueryID( long id) - { -this. queryID = 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 - public String toString() + // Speculate Gui + + public Speculate Gui () { -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: Delete subscriptions (2.2.3) 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 -"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 + super ("" Speculate GUI ""); + container = get Content Pane (); - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + // Submit Listener + public void action Performed ( Action Event e ) { -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 + if ( e . get Source () == submit Button ) { + send Query TO Server (); -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++ + if ( e . get Source () == fetch Button ) { - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + System . out . println ("" Fetch Button Pressed - 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 send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; - 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 + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -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 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"73 ""Constraints + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -String id; - String name; - double value; - String logic; + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - 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 ) + { + 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 - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - 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; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +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 +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 - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - /** -* 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 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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - /** -* 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 -"52 ""Pair +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 -private String queryID; - private String queryString; +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 Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - } +this. projectName = projec - public String getQueryID() { -return this. queryID; +public String getChangedAttribute() + { +return changedAttribute; } - public String getQueryString() { -return this. queryString; + public String getDescription() + { +return description; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String getFromAttribute() + { +return fromAttribute; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public String getModulePath() + { +return modulePath; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public String getProjectName() + { +return projectName; + } + public String getRequirementID() + { +return requirementID; + } - }"" -",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 -"65 ""About Dialog + public String getToAttribute() + { +return toAttribute; + } -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - /** -* 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 setDescription(String description) + { +this. description = description; + } - synchronized public void waitDone() + public void setFromAttribute(String fromAttribute) { -try { - while ( _ activeThreads>0 ) { -wait(); +this. fromAttribute = fromAttribute; } -} 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 setModulePath(String modulePath) { -try { - while ( !_ started ) { -wait(); +this. modulePath = modulePath; } -} catch ( InterruptedException e + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public void setRequirementID(String requirementID) { -_ activeThreads++; -_ started = true; -notify(); +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String createKey() { -_ activeThreads--; -notify(); +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() + { - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() { -_ 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 +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: 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; @@ -54354,572 +52938,691 @@ 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 -"64 ""DOORs Thread Pool +",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 -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: 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 -"83 ""Variable +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 +// 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 - //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 void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -//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 +// 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -//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 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 String toString() + public Vector getConstraints() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } - /** -* Returns the id. -* @return int -*/ - public String getId() + public String getName() { -return id; +return name; } + public void setName(String name) + { +this. name = name; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public void addDriver(DriverDescription driver) { -return logic; +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() + public boolean containsDriver(DriverDescription driver) { -return name; +return this. driverVector. contains( driver); } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; } + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"60 ""Thread Pool - /** -* Sets the logic. -* @param logic The logic to set +/** +* The threads in the pool. */ - public void setLogic(String logic) { -this. logic = logic; - } +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); - /** -* Sets the name. -* @param name The name to set +/** +* 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 void setName(String name) { -this. name = name; - } + pub /** -* Sets the value. -* @param value The value to set +* Get a new work assignment. +* +* @return A new assignment */ - public void setValue( double value) { -this. value = value; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Returns the speculateValue. -* @return double +* Called to block the current thread until +* the thread pool has no more work. */ - public double getSpeculateValue() { -return speculateValue; + 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 +"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 /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + * 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 type. -* @return String +* 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 getType() { -return type; - } + public int get /** -* Sets the type. -* @param type The type to set +* 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 setType(String type) { -this. type = type; - } + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - /** -* Returns the project_ path. -* @return String +/** +* 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 String getProject_ path() { -return project_ path; - } + 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 - /** -* 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 -"53 ""Performance Model + 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 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(); - } - public Vector getConstraints() +this. projectName = projec + +public String getChangedAttribute() { -return constraintVector; +return changedAttribute; } - public Vector getDrivers() + public String getDescription() { -return driverVector; +return description; } - public String getName() + public String getFromAttribute() { -return name; +return fromAttribute; } - public void setName(String name) + public String getModulePath() { -this. name = name; +return modulePath; } - public void addDriver(DriverDescription driver) + public String getProjectName() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return projectName; } - public void removeDriver(DriverDescription driver) + public String getRequirementID() { -this. driverVector. remove( driver); +return requirementID; } - public boolean containsDriver(DriverDescription driver) + public String getToAttribute() { -return this. driverVector. contains( driver); +return toAttribute; } - public void addConstraint(ConstraintsDescription constraint) + public void setChangedAttribute(String changedAttribute) { -this. constraintVector. add( constraint); +this. changedAttribute = changedAttribute; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setDescription(String description) { -return this. constraintVector. contains( constraint); +this. description = description; } - public void removeConstraint(ConstraintsDescription constraint) + public void setFromAttribute(String fromAttribute) { -this. constraintVector. remove( constraint); +this. fromAttribute = fromAttribute; } - public DriverDescription getDriver(DriverDescription driver) + public void setModulePath(String modulePath) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. modulePath = modulePath; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public void setProjectName(String projectName) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +this. projectName = projectName; + } - public long getQueryID() + public void setRequirementID(String requirementID) { -return this. queryID; +this. requirementID = requirementID; } - public void setQueryID( long id) + public void setToAttribute(String toAttribute) { -this. queryID = id; +this. toAttribute = toAttribute; } - public String toString() + public String createKey() { -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 -"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 +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -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 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 void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set -public void HideText() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + 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 void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} +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 drawModel() +// constructor +public Notification_Event() { -repaint(); + 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 -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - // 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) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - setTitle(""""EventsProcessor""""); +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -addWindowListener( new WindowAdapter() + + + //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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + performance model Handler(String msg) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try +this. strES = msg; + } + + public void messageParser() { -Notification +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +//Re-execut +public String generateReport() { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) + + public void saveModel( int id) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +// save current model +database. saveCurrentModel( id); + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 + +public ModifyModel(EBT em) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +super( em); + } - m_Deleterequirement List. remove(0); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -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 StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) + protected void paintComponent(Graphics g) { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +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 +private Connection conn; + private ResultSet rs; + private Statement stmt; - // 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 + //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; -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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall be able to delete subscriptions.,107,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall immediately process speculative events.,116,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; +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +//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 -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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"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 +//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 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 speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - 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 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 -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -protected void paintComponent(Graphics g) + // Construct Visual model for Merge Event +public void BuildEvent() { - super. paintComponent( g); + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -if (HideMsg == true) + +public StringBuffer GenerateEvent() { - 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 +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; @@ -54969,234 +53672,327 @@ 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 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); - } +",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 +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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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,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 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 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,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,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; + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ - DOORsThread(ServerSocket ss) +} +public void sendImpactReportToEventServer(String text) { - theServer = ss; - count++; - taskNumber = count; - } +//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 +{ - while( true) - { - try + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -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 -"73 ""Constraints +// 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 +"74 ""database -String id; - String name; - double value; - String logic; +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 - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + /** + * 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 String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - 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 logic. -* @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 getLogic() { -return logic; - } + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - /** -* Returns the name. -* @return String +/** +* 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 String getName() { -return name; - } + public void injectVa /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +* 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 id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = 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 - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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 - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 - /** -* 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 -"62 ""Call Back + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 Hash table requirementDescTable = new Hash table(); +private Connection conn; + private ResultSet rs; + private Statement stmt; - private Hash table constraintDescTable = new Hash table(); + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null + 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 parseSpeculateInformation(String str) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void identifyPerformanceModels() + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public void pullInformationFromDoors() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +// 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 insertValuesInDataBase() + public void speculate(String str) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 void createExecuteString() +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 -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + 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 parseImpactReport(String str) + +// 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 -Connection conn = null; -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + //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 -ConstraintsDescription constraint = null; +private String queryID; + private String queryString; -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 + + 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 """"; @@ -55315,98 +54111,31 @@ 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,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 comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"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. + { + Buffered - /** -* 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 Vector get Driver 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: 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 + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: 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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -55438,65 +54167,146 @@ 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"79 ""performance model Handler +",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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +public ObsoleteModel(EBT em) +{ +super( em); + } - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + +// 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 - performance model Handler(String msg) +public StringBuffer GenerateEvent() { -this. strES = msg; +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; + + public PerformanceModel(String name, long queryID) + { +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; + } -//Re-execut -public String generateReport() + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +} +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 int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - public void saveModel( int id) + public void removeConstraint(ConstraintsDescription constraint) { -// save current model -database. saveCurrentModel( 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) - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + 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 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 + 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=""""""""; @@ -55514,321 +54324,216 @@ 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 -"91 ""Modify Model +",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 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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) { -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 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"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; +super( em); +MinimumNoRects = 3; } - 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: 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 -"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() + // 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 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()) +public StringBuffer GenerateEvent() { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +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. +*/ -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + synchronized public void waitDone() { -N +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e -void DeleteRelatedEvents() +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +_ activeThreads++; +_ started = true; +notify(); + } -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +_ activeThreads--; +notify(); + } -void UpdateDisplayList() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +_ 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 +"89 ""Event Line +protected int top, left, right, bottom; - // 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 EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} +public int GetT() { return top;} -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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"52 ""Pair +public int GetL() { return left;} -private String queryID; - private String queryString; +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 +"95 ""Text Model - public Pair(String queryID, String queryString) { +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -this. queryID = queryID; -this. queryString = queryString; +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 getQueryID() { -return this. queryID; - } + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - public String getQueryString() { -return this. queryString; - } +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - public void setQueryString(String queryString) { -this. queryString = queryString; - } +public void drawModel() +{ +repaint(); +} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - }"" -",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 +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 public String m_SubscriberName = """"""""; @@ -55879,411 +54584,496 @@ 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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"65 ""About Dialog +",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 -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"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 +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +public EBShape( int xpos, int ypos, Color col) { -this. id = id; -this. type = type; -this. +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public void Updaterequirement Info(String rno, String pname, String mname) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -//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 boolean match( int mx, int my) + { +return true; + } -public String toString() + public int GetX() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +return x; + } - /** -* Returns the id. -* @return int -*/ - public String getId() + public int GetY() { -return id; +return y; } + public Color GetC() +{ +return c; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public String GetReqno() { -return logic; +return requirement No; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public String GetProject() { -return name; +return ProjectName; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + 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;/ - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + 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 logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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. - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } + public void Dispatch - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + public String getErrorMessage() + { + return errMsg; } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - /** -* 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""""; - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +public Requirement() {// empty constructor +} - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public static void (String args[]) + +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 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"87 ""EBT + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) { -p + return true; + } -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: 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"Test case: 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: 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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"91 ""Modify Model -public ModifyModel(EBT em) + public boolean mouseUp( java. awt.Evente, int x, int y) { -super( em); +return true; } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + - // Construct Visual model for Merge Event -public void BuildEvent() +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"56 ""Event Parser +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 -private Connection conn; - private ResultSet rs; - private Statement stmt; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public void updateEvent(String str, String ID) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -//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 String get Description () { + return this . description ; + } -//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 Logic () { + return this . logic ; + } + public String get Module Path () { + return this . module Path ; + } -//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 Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"58 ""Subscribed Model + public void set Description ( String description ) { + this . description = description ; + } -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public void set Logic ( String logic ) { + this . logic = logic ; + } -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -public String GetSubscriberName() { return SubscriberName;} + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -public String GetSubscriberReqno() { return SubscriberReqno;} + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } -public String GetSubscriberModule() { return SubscriberModule;} + public void set Units ( String units ) { + this . units = units ; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public void set Value ( String units ) { + this . value = units ; + } -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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - /** -* 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 set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public String get Attribute () { + return this . attribute ; } -} 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(); + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } -} catch ( InterruptedException e + public String get Performance Model Name () { + return this . performance Model Name ; + } -/** -* 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 set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: 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 static void (String args[]) { -_ 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 +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: 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 @@ -56311,9 +55101,28 @@ StringBuffer temp = new StringBuffer(); int MergeCount = -1; thisEvent. append(""""Merge|""""); for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +",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 @@ -56437,606 +55246,940 @@ 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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"56 ""Event Parser +",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 -private Connection conn; - private ResultSet rs; - private Statement stmt; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - //EventParser Constructor - // initializes the Database connection - public EventParser() +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException { -try +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +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 updateEvent(String str, String ID) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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 mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; String mSQL; -String mDate; -String mReqtext; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi -//Check if a subscription exists - public boolean CheckSubscription(String str) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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. -//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 Dispatch -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public String getErrorMessage() { -// 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 + return errMsg; + } - public void speculate(String str) + public boolean Contains(String ContextString, String SearchString) { -System. out. println(""""Speculate""""); -CallBack +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"61 ""Worker Thread -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"49 ""Constraints Description +/** +* True if this thread is currently processing. + */ +public boolean busy; -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - 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 ; +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - } +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 String get Description () { - return this . description ; - } + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - public String get Logic () { - return this . logic ; - } +addWindowListener( new WindowAdapter() +{ - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } +// 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 Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +/ 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 Project Name ( String project Name ) { - this . project Name = project 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 void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public void set Value ( String units ) { - this . value = units ; - } + m_Deleterequirement List. remove(0); - 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 ; - } +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 set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { + // 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 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 +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; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -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 -"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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + /** + * 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 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 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 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 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 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 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 JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -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 -"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; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) - { - try + public boolean mouseDown( java. awt.Evente, int x, int y) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + return true; + } -public String getNextID() - { -try + public boolean mouseUp( java. awt.Evente, int x, int y) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - +return true; + } -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try + public void mouseClicked( java. awt. event.MouseEvente) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +VisualPanel.Clicked( e. getX(), e. getY()); +} -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +public void mouseExited( java. awt. event.MouseEvente){} - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"47 ""Impact Report +public void mouseEntered( java. awt. event.MouseEvente){} -private String server IP = """" local host """"; - private JPanel center Panel = null ; +public void paint(Graphics g) {} - private JPanel driver Panel = new JPanel (); +public void update(Graphics g) {} - private JPanel driver Inner Panel = null ; + public JSplitPane getSplitPane() +{ +return splitPane; +} - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () +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()) - super ("""" Search Result GUI """"); +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - container = get Content Pane (); +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 - set Size ( 800 , 250 ); - panel = new JPanel (); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public static void main ( String [] args ) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) { + return true; + } - Impact Report im = new Impact Report (); + 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 Vector search Date () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +public void mouseExited( java. awt. event.MouseEvente){} - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +public void mousePressed( java. awt. event.MouseEvente){} - query String Combo . remove All Items (); +public void mouseReleased( java. awt. event.MouseEvente){} - query String Combo . add Item ("""" Select Query String """"); +public void mouseEntered( java. awt. event.MouseEvente){} - Socket server ; - String line = new String (); +public void paint(Graphics g) {} +public void update(Graphics g) {} - // Select Actions + public JSplitPane getSplitPane() +{ +return splitPane; +} - 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 void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - // Button Actions +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 void action Performed ( Action Event e ) { +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 +"87 ""EBT - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +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 void impact Report ( String id ) + public boolean mouseDown( java. awt.Evente, int x, int y) { + return true; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - set Size ( 1020 , 740 ); + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +public void mouseExited( java. awt. event.MouseEvente){} - public Vector get Constraint From Data Base () - { +public void mousePressed( java. awt. event.MouseEvente){} - Vector v = new Vector (); +public void mouseReleased( java. awt. event.MouseEvente){} - Socket server ; - String line = new String (); +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - try - { - server = new Socket ( server IP , 1701 ); +public void update(Graphics g) {} - if ( server . is Connected () ) - { - Buffered + public JSplitPane getSplitPane() +{ +return splitPane; +} +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public Vector get Driver From Data Base () +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { +switch(EventList. getSelectedIndex()) - Vector v = new Vector (); - - Socket server ; - String line = new String (); +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - try - { - server = new Socket ( server IP , 1701 ); +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 - 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 -"85 ""Decompose Model +String id; + String name; + double value; + String logic; -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - // 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 toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + /** +* Returns the id. +* @return int +*/ + public String getId() { +return 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 -"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; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - 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 name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + /** +* 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 pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public void insertValuesInDataBase() + //@param argsNo arguments are used. + public static void main(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"" +",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 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 createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -public void parseImpactReport(String str) + 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 -Connection conn = null; - -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -ConstraintsDescription constraint = null; +if ( m_Eve -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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +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 "58 ""Subscribed Model private String SubscriberName; @@ -57062,399 +56205,602 @@ public String GetSubscriberModule() { return SubscriberModule;} public String GetSubscriberKeyword1() { return SubscriberKeyword1;} public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"76 ""Evaluator +",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 -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= +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 -private static class Precedence + 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() { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"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() { } -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 -{ -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 { +// 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 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 + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"74 ""database -/** - * 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 +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and /** - * Another internal method that hides type-casting. + * Construct a connection object. + * @param Returns an object of type Connection */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo -/** - * 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 + /** +* 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 /** - * 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. +* 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 /** - * 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. - */ +* 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 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 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A user shall register as a subscriber.,103,0 -"84 ""White Board Execution Graph +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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 toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -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 + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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; -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 Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int 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++ + 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 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 getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"53 ""Performance 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); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - 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 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 getIP Server( String serverIP) + public Vector getConstraints() { -this. serverIP = serverIP; +return constraintVector; } + public Vector getDrivers() + { +return driverVector; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public String getName() + { +return name; + } + public void setName(String name) + { +this. name = name; + } -public void drawModel() + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -repaint(); } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } -} + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public void Clicked ( int x, int y) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -int Hit = 0; -for ( int i = 0; i < EventShapes. 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++) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public void CheckNotifyStatus() + public void setQueryID( long id) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; - protected void BuildEvent(){} + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - protected void AddLine( int t, int l, int r, int b) + // 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 { -EventLines. addElement( new EventLine( t, l, r, b)); + + } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +// 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 { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -Even +// 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 ModifyModel(EBT em) +{ +super( em); + } -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); +CurrentEvent = 4; +} - public StringBuffer GenerateEvent() +public StringBuffer GenerateEvent() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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); -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 -"54 ""eventserver + }"" +",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 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 +/** +* 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 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: 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 -"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; +/** +* 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 - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -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 -"71 ""Requirement + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"58 ""Subscribed Model -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -public Requirement() +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -} +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} - 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 GetSubscriberModule() { return SubscriberModule;} -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: 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: 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 +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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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; @@ -57480,7 +56826,38 @@ 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 +",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 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 @@ -57587,823 +56964,751 @@ try 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 +",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 +"86 ""EB Shape -public static void (String args[]) + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) { -p +return true; + } -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 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"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 int GetX() + { +return x; + } - DOORsThread(ServerSocket ss) + public int GetY() { - theServer = ss; - count++; - taskNumber = count; +return y; } + public Color GetC() +{ +return c; + } - public void run() + public String GetReqno() { +return requirement No; + } - while( true) + public String GetProject() { - try +return ProjectName; + } + + + public String GetModule() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"60 ""Thread Pool +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 -/** -* 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); +// 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 -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try { -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 + 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 - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() + + private void saveMenuItemActionPerformed (ActionEvent evt) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +exitApplication(); } -}"" -",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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include modifying a requirement.,124,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The prototype system shall utilize a driver to trigger events.,120,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -// 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 + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -// 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 -"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; +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; + } - 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: Delete subscriptions (2.2.3) 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 + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -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 double getValueTo() + { +return valueTo; + } -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 id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + 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""""; -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: 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 -"85 ""Decompose Model +public Requirement() {// empty constructor -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 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 -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"81 ""subscribermanager -Socket aSocket; - int ID; - String EventLog; +private Hash table requirementDescTable = new Hash table(); - Connection conn; - ResultSet rs; - Statement stmt; + private Hash table constraintDescTable = new Hash table(); - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + private Hash table performanceModelTable = new Hash table(); - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -} -public void sendImpactReportToEventServer(String text) +public void identifyPerformanceModels() { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -// run method will be execute from the main method when u say Thread. start() in main - public void run() +public void pullInformationFromDoors() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +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; - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public void createExecuteString() { -// 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 -"89 ""Event Line -protected int top, left, right, bottom; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} +public void parseImpactReport(String str) + { +Connection conn = null; -public int GetT() { return top;} +Statement stmt = null; -public int GetL() { return left;} +Vector constraintsVector = null; +Vector driversVector = null; -public int GetR() { return right;} +ConstraintsDescription constraint = null; -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 -"52 ""Pair +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 queryID; - private String queryString; +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - public Pair(String queryID, String queryString) { + public static int count = 0; + public PerformanceModel(String name, long queryID) + { +this. name = name; this. queryID = queryID; -this. queryString = queryString; - +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getQueryID() { -return this. queryID; + public Vector getConstraints() + { +return constraintVector; } - public String getQueryString() { -return this. queryString; + public Vector getDrivers() + { +return driverVector; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String getName() + { +return name; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void setName(String name) + { +this. name = name; } - 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 -"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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: 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 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) + public void addDriver(DriverDescription driver) { -this. msg = text; -init(); +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - public void init() + public boolean containsDriver(DriverDescription driver) { -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 -"76 ""Evaluator +return this. driverVector. contains( driver); + } -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 addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -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 removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { + dd = (DriverDescription) this. driverVector. get( i) -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -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 + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + public void setQueryID( long id) + { +this. queryID = id; + } + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +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 -/** - * 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 + } - /** - * 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 ); + 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: 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 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 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: 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 -"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 - + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public DriverDescription getDriver(DriverDescription driver) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { - 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 - + dd = (DriverDescription) this. driverVector. get( i) - /** -* 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 ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -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 +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - /** -* 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 long getQueryID() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - +return this. queryID; + } -public void solveStructureEquation() + public void setQueryID( long id) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - +this. queryID = id; + } -public void getTrackVariableName() + public String toString() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +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 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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include deleting a requirement.,125,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"93 ""Obsolete Model -public ObsoleteModel(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); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +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(""""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 -"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 double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = 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 String getQueryID() { -return this. queryID; - } + 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 getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + 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 setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - }"" -",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: 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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: 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 attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +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 "76 ""Evaluator private static final int EOL = 0; @@ -58460,549 +57765,333 @@ str = new StringTokeni // The only publicly visible routine /** * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - - -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl - - -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP - - - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. - - -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Delete subscriptions (2.2.3) 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - - - performance model Handler(String msg) - { -this. strES = msg; - } - - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); - - -//Re-execut -public String generateReport() -{ - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - - - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"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 - + * 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 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 +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** -* 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 + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} /** -* 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 + * 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 - /** -* 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 +/* + * 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 solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + /** + * 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 getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +/** + * 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 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 -"71 ""Requirement +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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +"73 ""Constraints -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +String id; + String name; + double value; + String logic; -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +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=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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"56 ""Event Parser + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } -private Connection conn; - private ResultSet rs; - private Statement stmt; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = 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; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"75 ""Driver -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public String toString() { -// 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 temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } - public void speculate(String str) + /** +* Returns the id. +* @return int +*/ + public String getId() { -System. out. println(""""Speculate""""); -CallBack +return id; + } -public void impactReport(String str) + /** +* Returns the name. +* @return String +*/ + public String getName() { -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 -"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(); -} +return name; + } -public Object clone() throws CloneNotSupportedException + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +return valueFrom; + } - public void ParseEvent(String TextLine) + public double getValueTo() { - 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 valueTo; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; +this. id = id; + } - // 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) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +this. name = name; + } -} -public void sendImpactReportToEventServer(String text) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +this. valueFrom = valueFrom; + } -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public void setValueTo( double value) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +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 +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - // 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 -"90 ""Merge Model + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } + + 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(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +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(); -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 -"95 ""Text Model +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 int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +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 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 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 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 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 ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + 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 -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -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 + +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; @@ -59026,7 +58115,60 @@ 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 +",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) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: 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 /** @@ -59065,1141 +58207,770 @@ 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 -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() - { -return constraintVector; - } - - public Vector getDrivers() - { -return driverVector; - } - - public String getName() - { -return name; - } - - public void setName(String name) - { -this. name = name; - } - - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include merging requirements.,126,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"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 +",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 +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 void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public JPanel get Panel () - { - return 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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(); -} +",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 -// 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 +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 ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - 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() +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - // 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 okButtonActionPerformed (ActionEvent evt) { - - -} -public void sendImpactReportToEventServer(String text) + if ( displayMode == true) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -// 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 +// 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 - // 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"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 +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 - public static void main ( String [] args ) - { +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 () - { - - 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 (); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - // Select Actions + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 ); - } - } + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - // Button Actions + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -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 ( submit Button == e . get Source ()) { + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - if ( pair - . get + /** +* 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 +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public void impact Report ( String id ) - { - // super ("""" Impact Report """"); + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - container = get Content Pane (); - set Size ( 1020 , 740 ); - this . query ID = id ; + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - System . out . println ("""" Impact Report Constructor ..... 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 - public Vector get Constraint From Data Base () - { - Vector v = new Vector (); +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 - Socket server ; - String line = new String (); +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - try - { - server = new Socket ( server IP , 1701 ); + 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 ( server . is Connected () ) - { - Buffered + 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 get Driver From Data Base () - { + 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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - 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 -"80 ""Requirement +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 +"82 ""Tokenizer -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public Requirement() {// empty constructor +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"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); + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} /** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants */ -public ThreadPool( int size) +public char getNextOpenClose( ) { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +while( nextChar( ) ) { -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(); + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); } -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: 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 -"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 +/** + * 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"53 ""Performance Model + /** + * 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 + */ - public String getName() - { -return name; - } +private void skip - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) +/** + * 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( ) { -} -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - public boolean containsDriver(DriverDescription driver) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -return this. driverVector. contains( driver); +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public String toString() { -return this. constraintVector. contains( constraint); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public void removeConstraint(ConstraintsDescription constraint) + /** +* Returns the id. +* @return int +*/ + public String getId() { -this. constraintVector. remove( constraint); +return id; } - 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() + /** +* Returns the name. +* @return String +*/ + public String getName() { -return this. queryID; +return name; } - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"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; +return valueFrom; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"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 double getValueTo() + { +return valueTo; + } - public void parseSpeculateInformation(String str) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +this. id = id; + } -public void identifyPerformanceModels() + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +this. name = name; + } -public void pullInformationFromDoors() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +this. valueFrom = valueFrom; + } -public void insertValuesInDataBase() + public void setValueTo( double value) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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) { - public void createExecuteString() - { +panel = new JPanel(); -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +return panel; + }"" +",51,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +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 ; -public void parseImpactReport(String str) - { + 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 -Connection conn = null; + // Speculate Gui -Statement stmt = null; + public Speculate Gui () + { -Vector constraintsVector = null; -Vector driversVector = null; + super ("" Speculate GUI ""); -ConstraintsDescription constraint = null; + container = get Content Pane (); -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 -"52 ""Pair + set Size ( 800 , 600 ); -private String queryID; - private String queryString; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public Pair(String queryID, String queryString) { + // Submit Listener -this. queryID = queryID; -this. queryString = queryString; + public void action Performed ( Action Event e ) { - } + if ( e . get Source () == submit Button ) { - public String getQueryID() { -return this. queryID; - } + send Query TO Server (); - public String getQueryString() { -return this. queryString; - } + } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + if ( e . get Source () == fetch Button ) { - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + System . out . println ("" Fetch Button Pressed - }"" -",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 -"79 ""performance model Handler + void send Query TO Server () + { -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + String ip = this . event Server IP ; + int Port No = 1701 ; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - performance model Handler(String msg) - { -this. strES = msg; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public void messageParser() + public void pull Value From DOORS () { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -//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; - + String [] attribute = { "" Value "", "" Attribute "" }; -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + String project Name = this . proj Name Text . get - public void saveModel( int id) + public static void main ( String [] args ) { -// save current model -database. saveCurrentModel( id); - } + 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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - 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 -"48 ""Constraint Inner Panel + //@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 +"93 ""Obsolete Model -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 ObsoleteModel(EBT em) +{ +super( em); + } - 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 + +// 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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public StringBuffer GenerateEvent() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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); } -public Vector get Values 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 + + +public StringBuffer GenerateEvent() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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 - 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 ) - { - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"86 ""EB Shape +/** + * 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + 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 EBShape( int xpos, int ypos, Color col) + public Speculate Gui () { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + super ("" Speculate 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 , 600 ); - public boolean match( int mx, int my) - { -return true; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public int GetX() - { -return x; - } + // Submit Listener + public void action Performed ( Action Event e ) { - public int GetY() - { -return y; - } + if ( e . get Source () == submit Button ) { - public Color GetC() -{ -return c; - } + send Query TO Server (); - public String GetReqno() - { -return requirement No; - } + } - public String GetProject() - { -return ProjectName; - } + if ( e . get Source () == fetch Button ) { - 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: 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"91 ""Modify Model + System . out . println ("" Fetch Button Pressed -public ModifyModel(EBT em) -{ -super( em); - } + void send Query TO Server () + { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"83 ""Variable + public void pull Value From DOORS () + { -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 + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; - //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 project Name = this . proj Name Text . get -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public static void main ( String [] args ) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this + 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; -//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; } @@ -60207,9 +58978,8 @@ return id; /** * Returns the logic. * @return String -*/ - public String getLogic() - { +*/ + public String getLogic() { return logic; } @@ -60218,12 +58988,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -60241,8 +59009,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -60266,307 +59033,102 @@ this. name = name; */ 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; - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } /** -* Returns the type. -* @return String +* Returns the id. +* @return int */ - public String getType() { -return type; + public String getId() { +return id; } /** -* Sets the type. -* @param type The type to set +* Returns the logic. +* @return String */ - public void setType(String type) { -this. type = type; + public String getLogic() { +return logic; } /** -* Returns the project_ path. +* Returns the name. * @return String */ - public String getProject_ path() { -return project_ path; + public String getName() { +return name; } - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set + /** +* Returns the value. +* @return double */ - 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 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,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 re execute the model using the speculative values.,117,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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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: 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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 double getValue() { +return value; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - 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 """" - - -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"71 ""Requirement + /** +* 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 =""""""""; @@ -60574,545 +59136,683 @@ 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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; +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 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 - public boolean match( int mx, int my) - { -return true; - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public int GetX() - { -return x; +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 int GetY() + public boolean mouseDown( java. awt.Evente, int x, int y) { -return y; + return true; } - public Color GetC() + + public boolean mouseUp( java. awt.Evente, int x, int y) { -return c; +return true; } - public String GetReqno() - { -return requirement No; - } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public String GetProject() - { -return ProjectName; - } +public void mouseExited( java. awt. event.MouseEvente){} - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"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 mousePressed( java. awt. event.MouseEvente){} -public Requirement() +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { +return splitPane; } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +switch(EventList. getSelectedIndex()) -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,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 notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"private JPanel center Panel = 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 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 +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 + +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - // Speculate Gui + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public Speculate Gui () + + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { - super ("" Speculate GUI ""); + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - 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 String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - // Submit Listener + public String get Module Path () { + return this . module Path ; + } - public void action Performed ( Action Event e ) { + public String get Project Name () { + return this . project Name ; + } - if ( e . get Source () == submit Button ) { + public String get Requirement ID () { + return this . requirement ID ; + } - send Query TO Server (); + public String get Units () { + return this . units ; + } - } + public String get Value () { + return this . value ; + } - if ( e . get Source () == fetch Button ) { + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - System . out . println ("" Fetch Button Pressed + 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 ; + } - void send Query TO Server () - { + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + public void set Units ( String units ) { + this . units = units ; + } - Socket socket ; - try { + public void set Value ( String units ) { + this . value = units ; + } - socket = new Socket ( ip , Port No ); + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - Output Stream os = socket . get Output Stream (); - Output Stream + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - public void pull Value From DOORS () - { + public String get Attribute () { + return this . attribute ; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - String [] attribute = { "" Value "", "" Attribute "" }; + public String get Performance Model Name () { + return this . performance Model Name ; + } - String project Name = this . proj Name Text . get + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { - 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 -"74 ""database + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +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 - 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 - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo +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 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 id. +* @return int */ - public int get + public String getId() + { +return 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 +* Returns the name. +* @return String */ - public void saveCurrentModel( int graphId) + public String getName() { -conn = this. getConnect - +return name; + } -/** -* 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) +* Returns the value. +* @return double +*/ + public double getValueFrom() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +return valueFrom; + } -public void solveStructureEquation() + public double getValueTo() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +return valueTo; + } -public void getTrackVariableName() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(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 +this. id = id; + } -public void setCalculatedValues() + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -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 +this. name = name; + } - public Vector getImpactReport() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -//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 -"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 +this. valueFrom = valueFrom; + } - // Speculate Gui - public Speculate Gui () + public void setValueTo( double value) { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"76 ""Evaluator - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); +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 . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +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 - // Submit Listener +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - public void action Performed ( Action Event e ) { +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - if ( e . get Source () == submit Button ) { - send Query TO Server (); +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 ( e . get Source () == fetch Button ) { +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 - System . out . println ("" Fetch Button Pressed +/** + * 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 - void send Query TO Server () - { - String ip = this . event Server IP ; - int Port No = 1701 ; +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () - { +/** + * 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 server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +/* + * 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 - String project Name = this . proj Name Text . 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 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 -"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 +/** + * 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 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 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 +"50 ""Driver Description -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public void drawModel() -{ -repaint(); -} +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); +this. projectName = projec -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: 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"53 ""Performance Model +public String getChangedAttribute() + { +return changedAttribute; + } -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + public String getDescription() + { +return description; + } - private long queryID = 0; + public String getFromAttribute() + { +return fromAttribute; + } - public static int count = 0; + public String getModulePath() + { +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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"85 ""Decompose Model - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) - { -this. queryID = id; +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall restore the executable model to its prior state.,119,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 + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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; @@ -61152,429 +59852,318 @@ return """"Query ID: """" }"" -",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 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; +",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 /** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); + * 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 ); +} /** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +public int checkBalance( ) { -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 +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + * 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 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(); + * 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 (); } -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 -"53 ""Performance Model -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 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 - 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(); - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public Vector getConstraints() - { -return constraintVector; - } +// 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 - public Vector getDrivers() - { -return driverVector; - } +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - public String getName() - { -return name; - } + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public void setName(String name) + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -this. name = name; - } - public void addDriver(DriverDescription driver) +this. projectName = projec + +public String getChangedAttribute() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return changedAttribute; } - public void removeDriver(DriverDescription driver) + public String getDescription() { -this. driverVector. remove( driver); +return description; } - public boolean containsDriver(DriverDescription driver) + public String getFromAttribute() { -return this. driverVector. contains( driver); +return fromAttribute; } - public void addConstraint(ConstraintsDescription constraint) + public String getModulePath() { -this. constraintVector. add( constraint); +return modulePath; } - public boolean containsConstraint(ConstraintsDescription constraint) + public String getProjectName() { -return this. constraintVector. contains( constraint); +return projectName; } - public void removeConstraint(ConstraintsDescription constraint) + public String getRequirementID() { -this. constraintVector. remove( constraint); +return requirementID; } - public DriverDescription getDriver(DriverDescription driver) + public String getToAttribute() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +return toAttribute; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public void setChangedAttribute(String changedAttribute) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +this. changedAttribute = changedAttribute; + } - public long getQueryID() + public void setDescription(String description) { -return this. queryID; +this. description = description; } - public void setQueryID( long id) + public void setFromAttribute(String fromAttribute) { -this. queryID = id; +this. fromAttribute = fromAttribute; } - public String toString() + public void setModulePath(String modulePath) { -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); +this. modulePath = modulePath; } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,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,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,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public String getQueryID() { -return this. queryID; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public String getQueryString() { -return this. queryString; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public void setQueryString(String queryString) { -this. queryString = queryString; - } + 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 String toString(){ -return """"Query ID: """" -+ this. queryID +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID + """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - }"" -",52,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"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 int hashCode() { -p +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 -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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"70 ""Notification Processing +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -// 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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 -// 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 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++ - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + 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 """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } + 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 - // 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 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 - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +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 + +String msg=""""""""; + +public ModelDriver(String text) { -new AboutDialog ( this, true). show(); +this. msg = text; +init(); } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + public void init() { - "" -",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,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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; @@ -61690,464 +60279,664 @@ 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 -"54 ""eventserver +",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 +"60 ""Thread Pool -public static void (String args[]) +/** +* 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() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +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() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -p +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 +"77 ""Model Driver -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 -"82 ""Tokenizer +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 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 + +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 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"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(); +} -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public void drawModel() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +repaint(); +} -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public void drawModel(EBShape sh) { -return currentLine; +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +private void ClearData() { -return errors; +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } } -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) +public void Clicked ( int x, int y) { -while( nextChar( ) ) +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(){} - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) + + protected void AddLine( int t, int l, int r, int b) { -return Character. isJavaIdentifierPart( ch ); +EventLines. addElement( new EventLine( t, l, r, b)); } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +protected void AddEventRect( int x, int y, int colorStatus) { -String result = """""""" + ch; +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even -for( ; nextChar( ); result += ch ) +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() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** - * 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( ) + protected void paintComponent(Graphics g) { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - +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 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 /** - * 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 +* True if this thread is currently processing. */ -private - +public boolean busy; /** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote + * The thread pool that this object belongs to. */ - -private void skip +public ThreadPool owner; /** - * 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. + * The constructor. + * + * @param o the thread pool */ -private void processSlash( ) +WorkerThread(ThreadPool o) { -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,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,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"50 ""Driver Description +owner = o; +} -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 +/** + * 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 +Test case: Delete subscriptions (2.2.3) 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -this. projectName = projec -public String getChangedAttribute() + DOORsThread(ServerSocket ss) { -return changedAttribute; + theServer = ss; + count++; + taskNumber = count; } - public String getDescription() - { -return description; - } - public String getFromAttribute() + public void run() { -return fromAttribute; - } - public String getModulePath() + while( true) { -return modulePath; - } - - public String getProjectName() + try { -return projectName; - } +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 - public String getRequirementID() - { -return requirementID; - } +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - public String getToAttribute() - { -return toAttribute; - } +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } +public String GetSubscriberName() { return SubscriberName;} - public void setDescription(String description) - { -this. description = description; - } +public String GetSubscriberReqno() { return SubscriberReqno;} - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public String GetSubscriberModule() { return SubscriberModule;} - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +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 void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +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 setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +panel = new JPanel(); - 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() - { +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +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 -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Delete subscriptions (2.2.3) 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall send the customized message to each impacted executable model.,136,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"85 ""Decompose Model +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 DecomposeModel(EBT em) +private static class Precedence { -super( em); -MinimumNoRects = 3; - } - +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - // Construct Visual model for Merge Event -public void BuildEvent() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { - 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 -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 -"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 ) +private static class Token { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; } - /** - * 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. + * 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 void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - +public Token getToken - /** - * 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. +/** + * Construct an evaluator object. + * @param s the string containing the expression. */ -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: 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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 - +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine -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 -// 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: 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -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;} + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} +/** + * 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 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 -"91 ""Modify 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 -public ModifyModel(EBT em) -{ -super( em); - } + /** + * 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. - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +/** + * 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +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 ; @@ -62281,69 +61070,283 @@ 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 receive event messages when a requirement changes.,127,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;/ +",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); + } - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + // 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[]) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p -// finds the subscribers for this requirement - public void IdentifySubscribers() +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 + +/** +* 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() { -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 +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + /** +* 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 +"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 () { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + super ("" Speculate GUI ""); - // 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. + container = get Content Pane (); - public void Dispatch + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String getErrorMessage() + // 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 () { - return errMsg; + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"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 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: 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 +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -public MergeModel(EBT em) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 + +public ModifyModel(EBT em) +{ super( em); - MinimumNoRects = 3; } @@ -62351,21 +61354,159 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"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 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,The user shall update related artifacts according to the information contained in the event messages.,138,0 +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); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: 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 m_RequirementID =""""""""; @@ -62396,1173 +61537,959 @@ public void ParseRequirement(String TextLine) { 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"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 - +",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; /** -* Returns the id. -* @return int +* 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 getId() + + synchronized public void waitDone() { -return id; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - /** -* Returns the logic. -* @return String +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public String getLogic() + synchronized public void waitBegin() { -return logic; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - /** -* Returns the name. -* @return String +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public String getName() + synchronized public void workerBegin() { -return name; +_ activeThreads++; +_ started = true; +notify(); } /** -* Returns the value. -* @return double +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public double getValue() { -return value; + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } /** -* Sets the id. -* @param id The id to set +* Called to reset this object to +* its initial state. */ - public void setId(String id) { -this. id = id; - } - + 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 +"74 ""database - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - + * 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 speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set +* 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 void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + public int get /** -* Returns the type. -* @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 getType() { -return type; - } + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - /** -* Sets the type. -* @param type The type to set +/** +* 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 setType(String type) { -this. type = type; - } - + public void injectVa /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"62 ""Call Back - +* 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 Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +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 parseSpeculateInformation(String str) +public void setCalculatedValues() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 identifyPerformanceModels() + public Vector getImpactReport() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +//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 +private String queryID; + private String queryString; -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + public Pair(String queryID, String queryString) { -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +this. queryID = queryID; +this. queryString = queryString; + } + public String getQueryID() { +return this. queryID; + } - public void createExecuteString() - { + public String getQueryString() { +return this. queryString; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } -public void parseImpactReport(String str) - { + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -Connection conn = null; -Statement stmt = null; + }"" +",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 -Vector constraintsVector = null; -Vector driversVector = null; +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -ConstraintsDescription constraint = 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 -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 -"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 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 Requirement() {// empty constructor +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +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 +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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -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 -"94 ""Refine Model -public RefineModel(EBT em) + //@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 +"92 ""New Model + +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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"93 ""Obsolete Model +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 -public ObsoleteModel(EBT em) -{ -super( em); - } +private String queryID; + private String queryString; -// 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 Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -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 -"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 getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. 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. + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +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 toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -//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 + }"" +",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 + // Speculate Gui -public String toString() + public Speculate Gui () { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + super ("" Speculate GUI ""); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + container = get Content Pane (); + set Size ( 800 , 600 ); - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + // Submit Listener + public void action Performed ( Action Event e ) { - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + if ( e . get Source () == submit Button ) { + send Query TO Server (); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + } + if ( e . get Source () == fetch Button ) { - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + System . out . println ("" Fetch Button Pressed - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + void send Query TO Server () + { - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"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 +"78 ""Notification Event - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return 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(); +} - /** -* 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +// 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 - 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 ParseEvent(String TextLine) { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - while( true) - { - try + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -public String getNextID() - { -try + + //This method displays the contents of two array list to console +public void DisplayValues() { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + 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 -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +public EBT(Frame f) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +WorkArea. showText( sh); + } - public String getDriverFromDataBase(String queryID) + public boolean mouseDown( java. awt.Evente, int x, int y) { -String driverString = new String(); -try + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) { - 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: 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 -"50 ""Driver Description +return true; + } -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +public void mouseExited( java. awt. event.MouseEvente){} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { -this. projectName = projec +public void mousePressed( java. awt. event.MouseEvente){} -public String getChangedAttribute() - { -return changedAttribute; - } +public void mouseReleased( java. awt. event.MouseEvente){} - public String getDescription() - { -return description; - } +public void mouseEntered( java. awt. event.MouseEvente){} - public String getFromAttribute() +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -return fromAttribute; +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"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 getModulePath() - { -return modulePath; - } - public String getProjectName() + public boolean mouseDown( java. awt.Evente, int x, int y) { -return projectName; + return true; } - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() - { -return toAttribute; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public void mouseExited( java. awt. event.MouseEvente){} - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +public void mousePressed( java. awt. event.MouseEvente){} - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +public void mouseReleased( java. awt. event.MouseEvente){} - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +public void mouseEntered( java. awt. event.MouseEvente){} - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +public void paint(Graphics g) {} - 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 update(Graphics g) {} -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + public JSplitPane getSplitPane() +{ +return splitPane; +} -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +public void valueChanged(ListSelectionEvent e) { - 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 -"79 ""performance model Handler +if ( e. getValueIsAdjusting()) +return; +} -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"87 ""EBT - 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(); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -//Re-execut -public String generateReport() +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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A user shall register as a subscriber.,103,0 -"73 ""Constraints + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -String id; - String name; - double value; - String logic; +public void mouseExited( java. awt. event.MouseEvente){} - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +public void mousePressed( java. awt. event.MouseEvente){} - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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; +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +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""""); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +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 - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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: 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 user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"54 ""eventserver +// 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 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d +// 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 - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { - try - { -Notification +return errors; +} -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +/** + * 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( ) ) { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N -void DeleteEvent(String SubscriberName, String EventID) - { -try + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +return Character. isJavaIdentifierPart( ch ); +} -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +String result = """""""" + ch; - m_Deleterequirement List. remove(0); +for( ; nextChar( ); result += ch ) -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 + /** + * 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 -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +/** + * 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( ) { - 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 +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 -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 -"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 +/** + * 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 - //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. +/** + * 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 -//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; } @@ -63571,8 +62498,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -63581,12 +62507,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -63604,8 +62528,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -63629,429 +62552,420 @@ this. name = name; */ public void setValue( double value) { this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - + }"" +",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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; +public ObsoleteModel(EBT em) +{ +super( em); } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +// 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 type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +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 +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +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 - /** -* 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol + 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** - * 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 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"62 ""Call Back + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -private Hash table requirementDescTable = new Hash table(); + private JPanel impact Panel = null ; + private JPanel impact Inner P - private Hash table constraintDescTable = new Hash table(); + public Impact Report () + { - private Hash table performanceModelTable = new Hash table(); + super ("""" Search Result GUI """"); - private PerformanceModel performance model= null + container = get Content Pane (); + set Size ( 800 , 250 ); - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + panel = new JPanel (); + panel . set Layout ( null ); -public void identifyPerformanceModels() + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + Impact Report im = new Impact Report (); -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: 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; the eventserver shall identify all relevant subscribers for the event.,129,0 -"87 ""EBT +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + if ( pair + . get - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + public void impact Report ( String id ) + { - public boolean mouseDown( java. awt.Evente, int x, int y) + // 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 () { - return true; - } + Vector v = new Vector (); - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } + Socket server ; + String line = new String (); - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + try + { + server = new Socket ( server IP , 1701 ); -public void mouseExited( java. awt. event.MouseEvente){} + if ( server . is Connected () ) + { + Buffered -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + public Vector get Driver From Data Base () + { -public void mouseEntered( java. awt. event.MouseEvente){} + Vector v = new Vector (); -public void paint(Graphics g) {} + Socket server ; + String line = new String (); -public void update(Graphics g) {} + try + { + server = new Socket ( server IP , 1701 ); - public JSplitPane getSplitPane() -{ -return splitPane; -} + 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; -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + //@param argsNo arguments are used. + public static void main(String args[]) { -switch(EventList. getSelectedIndex()) +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 -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) +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) { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -mainframe. addWindowListener( new WindowAdapter() + + public void showText(EBShape sh) { -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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"51 ""Driver Inner Panel + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -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 HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -panel = new JPanel(); +public void drawModel() +{ +repaint(); +} -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 -"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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"53 ""Performance Model +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +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 - private long queryID = 0; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - public static int count = 0; + // database and eventserver information + S - public PerformanceModel(String name, long queryID) + public Notification_Processing() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public Vector getConstraints() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -return constraintVector; - } +try - public Vector getDrivers() - { -return driverVector; - } - public String getName() +public static void main(String args[]) { -return 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 - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) + private void saveMenuItemActionPerformed (ActionEvent evt) { -this. constraintVector. add( constraint); - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public boolean containsConstraint(ConstraintsDescription constraint) + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -return this. constraintVector. contains( constraint); +exitApplication(); } - public void removeConstraint(ConstraintsDescription constraint) + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. constraintVector. remove( constraint); +openEventsMenuItemActionPerformed( evt); } - public DriverDescription getDriver(DriverDescription driver) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +if (! listModel. isEmpty()) { - dd = (DriverDescription) this. driverVector. get( i) + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +if (! listModel. isEmpty()) { - cd = (ConstraintsDescription) this + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -this. queryID = id; +new AboutDialog ( this, true). show(); } - public String toString() + +void UpdateDisplayList() { -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 +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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 =""""""""; @@ -64082,685 +62996,801 @@ public void ParseRequirement(String TextLine) { 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 -"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; +",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 - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +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; + } - while( true) + + public String toString() { - try +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +return id; + } -public String getNextID() + /** +* Returns the name. +* @return String +*/ + public String getName() { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +return name; + } -public String searchDate() + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +return valueFrom; + } -public String searchQueryID(String date) + public double getValueTo() { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +return valueTo; + } - public String getConstraintFromDataBase(String queryID) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +this. id = id; + } - public String getDriverFromDataBase(String queryID) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -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 -"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 + ** +* 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: 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 -Test case: Delete subscriptions (2.2.3) 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 -"81 ""subscribermanager +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 -Socket aSocket; - int ID; - String EventLog; +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 - Connection conn; - ResultSet rs; - Statement stmt; +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 - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + 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(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: Delete subscriptions (2.2.3) 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,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"63 ""Doors Thread + 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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +/** +* 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); - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +/** +* 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 run() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - while( true) + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { - try +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"93 ""Obsolete Model +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 ObsoleteModel(EBT em) +public ModifyModel(EBT em) { super( em); } -// Construct Visual model for Merge Event -public void BuildEvent() + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 + + +/** + * 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( ) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +return currentLine; +} -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"74 ""database +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +/** + * 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( ) ) +{ - 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 + * Return true if ch can be part of a Java identifier */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +private static final boolean isIdChar( char ch ) { - Class. fo +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 ) - /** -* 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 + * 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 /** -* 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 + * 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 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 +/** + * 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 solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +/** + * 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 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 void skip -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 +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"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 Vector getImpactReport() +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"77 ""Model Driver +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -String msg=""""""""; -public ModelDriver(String text) + public void ParseEvent(String TextLine) { -this. msg = text; -init(); - } + 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 init() + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -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 -"79 ""performance model Handler +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +if ( m_Eve - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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;/ - performance model Handler(String msg) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -this. strES = msg; - } +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - public void messageParser() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +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 -//Re-execut -public String generateReport() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + 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 int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + public void Dispatch - public void saveModel( int id) + public String getErrorMessage() { -// save current model -database. saveCurrentModel( id); + return errMsg; } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"73 ""Constraints + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -String id; - String name; - double value; - String logic; +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; - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; +public String getChangedAttribute() + { +return changedAttribute; } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public String getDescription() + { +return description; } + public String getFromAttribute() + { +return fromAttribute; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public String getModulePath() + { +return modulePath; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String getProjectName() + { +return projectName; } + public String getRequirementID() + { +return requirementID; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String getToAttribute() + { +return toAttribute; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } + public void setDescription(String description) + { +this. description = description; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"48 ""Constraint Inner Panel + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -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 setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - 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 setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -private void set goal Label Values ( - String attribute , - String logic , - String value , - String 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() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public Vector get Values From Data Base () +public int hashCode() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 - if ( server . is Connected () ) - { - Buffered R +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 - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +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 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 -"85 ""Decompose Model +public void drawModel() +{ +repaint(); +} -public DecomposeModel(EBT em) +protected void paintComponent(Graphics g) { -super( em); -MinimumNoRects = 3; - } - + super. paintComponent( g); - // Construct Visual model for Merge Event -public void BuildEvent() +if (HideMsg == true) { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + 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 +//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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 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 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 - if ( server . is Connected () ) - { - Buffered R +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 set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + 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 ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + 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 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: 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 -"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 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 Requirement() {// empty constructor +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -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 -"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 user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: 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 @@ -64867,502 +63897,621 @@ 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 -"75 ""Driver +",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 -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +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 { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String toString() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* Returns the id. -* @return int -*/ - public String getId() +public void ParseRequirement(String TextLine) { -return id; + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); } - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +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 + +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 double getValueTo() - { -return valueTo; - } + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"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) { -this. id = id; - } + 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 name. -* @param name The name to set -*/ - public void setName(String name) +public String getNextID() { -this. name = name; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public String searchDate() { -this. valueFrom = valueFrom; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void setValueTo( double value) +public String searchQueryID(String date) { -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 -"84 ""White Board Execution Graph +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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: 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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + 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 + 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 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++ +//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 double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - 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 saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } - 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 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: 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; -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + // 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 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: Delete subscriptions (2.2.3) 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 -"48 ""Constraint Inner Panel +addWindowListener( new WindowAdapter() +{ -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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +// 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 -public Vector get Values From Data Base () +// action for """"Open First Record"""" 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 ); - - if ( server . is Connected () ) - { - Buffered R +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { +N - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +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 JPanel get Panel () +void DeleteRelatedEvents() { - 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 -"69 ""Notification Event +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(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 + m_Deleterequirement List. remove(0); -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} -public Object clone() throws CloneNotSupportedException +void AddSubscription(String SubscriberName, Requirement requirement ) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +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 ParseEvent(String TextLine) +void UpdateDisplayList() { - 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 +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + // 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 -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 -"91 ""Modify Model -public ModifyModel(EBT em) +private boolean Analyze_CheckSubscription(String str) { -super( 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= - // 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 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,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"90 ""Merge Model +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 MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +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 Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +/** + * 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 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 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } -// 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 +/** + * 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 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 -// 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 -"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. -*/ + * 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. - 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() - { + * 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 { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e + "" +",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() +{ +} -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() +public Object clone() throws CloneNotSupportedException { -_ activeThreads++; -_ started = true; -notify(); +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -_ activeThreads--; -notify(); - } - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +public void ParseRequirement(String TextLine) { -_ 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,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,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,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 -"83 ""Variable + 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 ) +{ +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; -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 + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || - //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. + /** + * 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 -//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; } @@ -65371,8 +64520,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -65381,12 +64529,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -65404,8 +64550,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -65429,1102 +64574,1083 @@ this. name = name; */ public void setValue( double value) { this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; }"" -",83,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +",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 - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + //@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 +"50 ""Driver Description - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - public String get Logic () { - return this . logic ; - } + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - public String get Requirement ID () { - return this . requirement ID ; - } +this. projectName = projec - public String get Units () { - return this . units ; +public String getChangedAttribute() + { +return changedAttribute; } - public String get Value () { - return this . value ; + public String getDescription() + { +return description; } - public void set Description ( String description ) { - this . description = description ; + public String getFromAttribute() + { +return fromAttribute; } - public void set Logic ( String logic ) { - this . logic = logic ; + public String getModulePath() + { +return modulePath; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public String getProjectName() + { +return projectName; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public String getRequirementID() + { +return requirementID; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public String getToAttribute() + { +return toAttribute; } - public void set Units ( String units ) { - this . units = units ; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - public void set Value ( String units ) { - this . value = units ; + public void setDescription(String description) + { +this. description = description; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public String get Attribute () { - return this . attribute ; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public String get Performance Model Name () { - return this . performance Model Name ; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - + 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 -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) +public static void (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( int i=0; i<4; i++) + { +p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Delete subscriptions (2.2.3) 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 -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +public RefineModel(EBT em) { -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"89 ""Event Line - -protected int top, left, right, bottom; - +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 = 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 +"62 ""Call Back -public int GetT() { return top;} - -public int GetL() { return left;} -public int GetR() { return right;} +private Hash table requirementDescTable = new Hash table(); -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 -"86 ""EB Shape + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + private PerformanceModel performance model= null -public EBShape( int xpos, int ypos, Color col) + public void parseSpeculateInformation(String str) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void Updaterequirement Info(String rno, String pname, String mname) +public void identifyPerformanceModels() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public boolean match( int mx, int my) +public void pullInformationFromDoors() { -return true; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public int GetX() +public void insertValuesInDataBase() { -return x; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public int GetY() + + public void createExecuteString() { -return y; - } - public Color GetC() -{ -return c; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public String GetReqno() - { -return requirement No; - } - public String GetProject() +public void parseImpactReport(String str) { -return ProjectName; - } +Connection conn = null; - public String GetModule() - { -return ModulePath; - }"" -",86,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"81 ""subscribermanager +Statement stmt = null; -Socket aSocket; - int ID; - String EventLog; +Vector constraintsVector = null; +Vector driversVector = null; - Connection conn; - ResultSet rs; - Statement stmt; +ConstraintsDescription constraint = null; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +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 - // 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 ObsoleteModel(EBT em) { +super( em); + } -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +// 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 -// run method will be execute from the main method when u say Thread. start() in main - public void run() +public StringBuffer GenerateEvent() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +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 ; + 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 - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public Speculate Gui () { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"88 ""Event Model + super ("" Speculate GUI ""); -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); + container = get Content Pane (); + set Size ( 800 , 600 ); - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + // Submit Listener + public void action Performed ( Action Event e ) { - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + if ( e . get Source () == submit Button ) { + send Query TO Server (); -public void drawModel() -{ -repaint(); -} + } + if ( e . get Source () == fetch Button ) { -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + System . out . println ("" Fetch Button Pressed -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + void send Query TO Server () + { -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 ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -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 ((((( + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { - protected void BuildEvent(){} + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + String project Name = this . proj Name Text . get -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 static void main ( String [] args ) { -Even - + 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 String getrequirement Text(String r, String p, String m) +public RefineModel(EBT em) { -return new String(""""requirementwill go here""""); +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - public StringBuffer GenerateEvent() +public StringBuffer GenerateEvent() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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 + +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) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -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 -"89 ""Event Line +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -protected int top, left, right, bottom; + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public EventLine ( int t, int l, int r, int b) +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -top = t; -left = l; -right = r; -bottom = b; +setVisible ( false); +dispose (); } -public int GetT() { return top;} - -public int GetL() { return left;} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -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 -"61 ""Worker Thread +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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: 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 -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - 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 identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - while( true) - { - try + +public void pullInformationFromDoors() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public String getNextID() +public void insertValuesInDataBase() { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -public String searchDate() + + public void createExecuteString() { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public String searchQueryID(String date) +public void parseImpactReport(String str) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +Connection conn = null; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - 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 -"89 ""Event Line +ConstraintsDescription constraint = null; -protected int top, left, right, bottom; +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 +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 int GetL() { return left;} + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -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: 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 -"89 ""Event Line + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -protected int top, left, right, bottom; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } -public int GetT() { return top;} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public int GetL() { return left;} -public int GetR() { return right;} + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -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 -"62 ""Call Back + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -private Hash table requirementDescTable = new Hash table(); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); + /** +* 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 - private PerformanceModel performance model= null +String msg=""""""""; + +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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +"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 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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= + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -private static class Precedence +protected void AddEventRect( int x, int y, int colorStatus) { -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[ ] +if ( colorStatus == 1) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even -private static class Token +public String getrequirement Text(String r, String p, String 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 { +return new String(""""requirementwill go here""""); + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** - * 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 + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 /** - * Construct an evaluator object. - * @param s the string containing the expression. + * Symbol represents what will be placed on the stack. */ -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 static class Symbol +{ +public chartoken; +public int theLine; -/** - * Internal method that hides type-casting. - * Changed the method to support double +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. */ -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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); } /** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -private void processToken( Token lastToken ) { -System. out. printl +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. + /** + * Print an error message if clSym does not match opSym. + * Update errors. */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || /** - * Internal routine to compute x^ 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. */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. +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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = 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 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 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 -"63 ""Doors Thread + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -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 String get Description () { + return this . description ; } + public String get Logic () { + return this . logic ; + } - public void run() - { + public String get Module Path () { + return this . module Path ; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,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,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Each artifact shall be placed under the control of a subscribermanager,106,0 -"63 ""Doors Thread + public String get Project Name () { + return this . project Name ; + } -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + public String get Value () { + return this . value ; } + public void set Description ( String description ) { + this . description = description ; + } - public void run() - { + public void set Logic ( String logic ) { + this . logic = logic ; + } - 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"private JPanel center Panel = null ; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - 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 set Project Name ( String project Name ) { + this . project Name = project Name ; + } - // Speculate Gui + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - public Speculate Gui () - { + public void set Units ( String units ) { + this . units = units ; + } - super ("" Speculate GUI ""); + public void set Value ( String units ) { + this . value = units ; + } - container = get Content Pane (); + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - set Size ( 800 , 600 ); + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - // Submit Listener + public String get Performance Model Name () { + return this . performance Model Name ; + } - public void action Performed ( Action Event e ) { + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - if ( e . get Source () == submit Button ) { + public String to String () { - send Query TO Server (); + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - } - if ( e . get Source () == fetch Button ) { +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 - System . out . println ("" Fetch Button Pressed +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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - void 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: - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + 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; - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - public void pull Value From DOORS () +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 - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +//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 project Name = this . proj Name Text . get + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - public static void main ( String [] args ) +public void impactReport(String str) { - 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: 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: Delete subscriptions (2.2.3) 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +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;} - /** -* 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 GetSubscriberReqno() { return SubscriberReqno;} - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +public String GetSubscriberModule() { return SubscriberModule;} -/** -* 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 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 -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - /** -* 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(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + +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[]) { -_ 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: 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 +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 "56 ""Event Parser private Connection conn; @@ -66592,878 +65718,664 @@ 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 -"77 ""Model Driver +",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 -String msg=""""""""; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public void init() +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"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 ; +this. projectName = projec - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public String getChangedAttribute() { - - 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 ; +return changedAttribute; } - public String get Units () { - return this . units ; + public String getDescription() + { +return description; } - public String get Value () { - return this . value ; + public String getFromAttribute() + { +return fromAttribute; } - public void set Description ( String description ) { - this . description = description ; + public String getModulePath() + { +return modulePath; } - public void set Logic ( String logic ) { - this . logic = logic ; + public String getProjectName() + { +return projectName; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public String getRequirementID() + { +return requirementID; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public String getToAttribute() + { +return toAttribute; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - public void set Units ( String units ) { - this . units = units ; + public void setDescription(String description) + { +this. description = description; } - public void set Value ( String units ) { - this . value = units ; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public String get Attribute () { - return this . attribute ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public String get Performance Model Name () { - return this . performance Model Name ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = 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 String to String () { +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 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 +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 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 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); + performance model Handler(String msg) + { +this. strES = msg; } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -public StringBuffer GenerateEvent() +//Re-execut +public String generateReport() { -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 -"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; + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void run() + public void saveModel( int id) { +// save current model +database. saveCurrentModel( id); + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"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 constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); + 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 -// 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} -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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + 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 ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - +public chartoken; +public int theLine; -private void okButtonActionPerformed (ActionEvent evt) +public Symbol( char tok, int line ) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +public Balance( Reader inStream ) { -setVisible ( false); -dispose (); +errors = 0; +tok = new Tokenizer( inStream ); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - /** - * The thread pool that this object belongs to. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -public ThreadPool owner; +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -/** - * The constructor. - * - * @param o the thread pool + /** + * Print an error message if clSym does not match opSym. + * Update errors. */ -WorkerThread(ThreadPool o) +private void checkMatch( Symbol opSym, Symbol clSym ) { -owner = o; -} +if( opSym. token == '(' && clSym. token != ')' || -/** - * Scan for and execute tasks. + /** + * 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 void run() -{ -Runnable target = null; +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 -do -{ -target = owner. getAssignment(); -if ( target!=null) +public ModifyModel(EBT em) { - 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 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"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 StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - 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 + 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 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 + // Speculate Gui - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public Speculate Gui () { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve + super ("" Speculate GUI ""); -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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"74 ""database + container = get Content Pane (); + set Size ( 800 , 600 ); -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + // Submit Listener - /** - * 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 void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { + send Query TO Server (); - /** -* 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 + } + if ( e . get Source () == fetch Button ) { - /** -* 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 + System . out . println ("" Fetch Button Pressed -/** -* 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) + void send Query TO Server () { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -public void getTrackVariableName() + public void pull Value From DOORS () { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -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 [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get - public Vector getImpactReport() + public static void main ( String [] args ) { -//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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"88 ""Event Model + 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 -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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +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 drawModel() -{ -repaint(); -} +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 void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -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++){ -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + + 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 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 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 CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - protected void BuildEvent(){} +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 - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -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 EBShape( int xpos, int ypos, Color col) { -Even +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - + public boolean match( int mx, int my) + { +return true; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"73 ""Constraints -String id; - String name; - double value; - String logic; + public int GetX() + { +return x; + } - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + public int GetY() + { +return y; } - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public Color GetC() +{ +return c; } + public String GetReqno() + { +return requirement No; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String GetProject() + { +return ProjectName; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + private JPanel driver Panel = new JPanel (); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + public Impact Report () + { - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + super ("""" Search Result 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 , 250 ); + panel = new JPanel (); - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"90 ""Merge Model + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In -public MergeModel(EBT em) + public static void main ( String [] args ) { -super( em); - MinimumNoRects = 3; + + 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 + { + + 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 (); -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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + query String Combo . add Item ("""" Select Query String """"); - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + Socket server ; + String line = new String (); - 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 + // Select Actions + public void action Performed ( Action Event e ) + { -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +public void action Performed ( Action Event e ) { -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - 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 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 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 eventserver shall identify all related requirements and constraints for each impacted executable model.,133,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 -"80 ""Requirement -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 + 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 @@ -67579,317 +66491,455 @@ 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 -"52 ""Pair +",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 queryID; - private String queryString; +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 Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + 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 getQueryID() { -return this. queryID; + + public String get Description () { + return this . description ; } - public String getQueryString() { -return this. queryString; + public String get Logic () { + return this . logic ; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String get Module Path () { + return this . module Path ; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public String get Project Name () { + return this . project Name ; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } - }"" -",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 -"70 ""Notification Processing + public String get Value () { + return this . value ; + } -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + public void set Description ( String description ) { + this . description = description ; + } - // database and eventserver information - S + public void set Logic ( String logic ) { + this . logic = logic ; + } - public Notification_Processing() + 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) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +this. strES = msg; + } -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + public void messageParser() { -try +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; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) { -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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 + +public RefineModel(EBT em) { - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() +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 +"56 ""Event Parser + +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { try { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public void updateEvent(String str, String ID) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"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 - private void saveMenuItemActionPerformed (ActionEvent evt) + public static void main ( String [] args ) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + Impact Report im = new Impact Report (); - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public Vector search Date () { -openEventsMenuItemActionPerformed( evt); - } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + 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 (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + pair Vector = new Vector (); - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -// 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 immediately process speculative events.,116,0 -"60 ""Thread Pool + // Select 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 ) + { + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -/** -* 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 + // Button 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 ( submit Button == e . get Source ()) { - /** -* 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 -"58 ""Subscribed Model + for ( int i = 0 ; i < pair Vector . size (); i ++) { -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + Pair pair = ( Pair ) pair Vector . get ( i ); -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + if ( pair + . get -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} + public void impact Report ( String id ) + { -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + // super ("""" Impact Report """"); -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: 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 -"86 ""EB Shape + container = get Content Pane (); + set Size ( 1020 , 740 ); -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + this . query ID = id ; + 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; - } + Vector v = new Vector (); - public String GetReqno() - { -return requirement No; - } + Socket server ; + String line = new String (); - public String GetProject() - { -return ProjectName; - } + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"54 ""eventserver - public String GetModule() +public static void (String args[]) { -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 +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 "53 ""Performance Model private String name = null; @@ -67999,127 +67049,7 @@ 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 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: Delete subscriptions (2.2.3) 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; - - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d - - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() -{ - - - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} - - -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification - - -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati - - -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N - -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i - - -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - - - -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) - { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req - - -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - - - // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response -private boolean Check_Subscription(String ip, - int PortNo, - String SubscriberName, - String Requirement // Takes an event string returned from the eventserver and -// extracts True or False response - - - -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 +",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 @@ -68191,392 +67121,257 @@ notify(); { _ 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 subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"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("""""""","""""""",""""""""); - } -} +",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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -public void Clicked ( int x, int y) -{ -int Hit = 0; -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); -if (( x >= ebs.GetX() && ( x <= ebs +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} -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 String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} - protected void BuildEvent(){} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +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 void AddEventRect( int x, int y, int colorStatus) +private static class Precedence { -if ( colorStatus == 1) +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[ ] { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public String getrequirement Text(String r, String p, String m) +private static class Token { -return new String(""""requirementwill go here""""); - } +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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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 - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete subscriptions (2.2.3) 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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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: 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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: 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 -"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: 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 +/** + * 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 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 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 -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +protected int top, left, right, bottom; -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - public String getDescription() - { -return description; - } - public String getFromAttribute() - { -return fromAttribute; - } +public int GetT() { return top;} - public String getModulePath() - { -return modulePath; - } +public int GetL() { return left;} - public String getProjectName() - { -return projectName; - } +public int GetR() { return right;} - public String getRequirementID() - { -return requirementID; - } +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 +"80 ""Requirement - public String getToAttribute() - { -return toAttribute; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } +public Requirement() {// empty constructor - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +} - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + 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 setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +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 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 - 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() - { +/** +* True if this thread is currently processing. + */ +public boolean busy; -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - 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 +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 "49 ""Constraints Description private String project Name = null ; @@ -68710,275 +67505,390 @@ 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 attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +",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 -/** -* 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 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: -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + 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 ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -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 + 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 */ - pub + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - /** -* Get a new work assignment. -* -* @return A new assignment +/** +* 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 synchronized Runnable getAssignment() + 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) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() +public void solveStructureEquation() { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() { -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 -"66 ""Config Dialog +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +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 void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + 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 +"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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"87 ""EBT +public int GetT() { return top;} -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public int GetL() { return left;} +public int GetR() { return right;} -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +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; - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + 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 boolean mouseDown( java. awt.Evente, int x, int y) + public Vector getDrivers() { - return true; +return driverVector; } + public String getName() + { +return name; + } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public void setName(String name) + { +this. name = name; } - public void mouseClicked( java. awt. event.MouseEvente) + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -VisualPanel.Clicked( e. getX(), e. getY()); } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -public void mouseEntered( java. awt. event.MouseEvente){} + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -public void paint(Graphics g) {} + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -public void update(Graphics g) {} + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - public JSplitPane getSplitPane() + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -return splitPane; -} - + dd = (DriverDescription) this. driverVector. get( i) -public void valueChanged(ListSelectionEvent e) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -if ( e. getValueIsAdjusting()) -return; -} + cd = (ConstraintsDescription) this -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public long getQueryID() { -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""""); +return this. queryID; + } -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 -"85 ""Decompose Model + public void setQueryID( long id) + { +this. queryID = id; + } + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,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 -"83 ""Variable +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 -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. +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 +String msg=""""""""; -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public ModelDriver(String text) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +this. msg = text; +init(); + } -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ + 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 +"75 ""Driver + +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. @@ -68990,16 +67900,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -69014,229 +67914,195 @@ 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; - } - - - /** -* 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; + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; + public void setValueTo( double value) + { +this. valueTo = valueTo; }"" -",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 -"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 +",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 - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +private Connection conn; + private ResultSet rs; + private Statement stmt; -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + //EventParser Constructor + // initializes the Database connection + public EventParser() { try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public static void main(String args[]) + public void updateEvent(String str, String ID) { -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 mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - private void saveMenuItemActionPerformed (ActionEvent evt) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -exitApplication(); - } +// 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 - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public void speculate(String str) { -openEventsMenuItemActionPerformed( evt); - } +System. out. println(""""Speculate""""); +CallBack - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + +public void impactReport(String str) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +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 + +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + // 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) { -if (! listModel. isEmpty()) + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +} +public void sendImpactReportToEventServer(String text) { -new AboutDialog ( this, true). show(); - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -void UpdateDisplayList() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +System. out. println(""""Inside Run method""""); +String str=""""""""; 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: 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 -"63 ""Doors Thread -static private int count = 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: 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; + 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) @@ -69245,572 +68111,674 @@ static private int count = 0; { 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: 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"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 - +PrintWriter output = new P - performance model Handler(String msg) - { -this. strES = msg; - } - public void messageParser() +public String getNextID() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -//Re-execut -public String generateReport() +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void saveModel( int id) + public String getConstraintFromDataBase(String queryID) { -// save current model -database. saveCurrentModel( id); - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + 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 +"85 ""Decompose Model - 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 -"94 ""Refine Model -public RefineModel(EBT em) +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + 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 -"74 ""database +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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - /** - * Construct a connection object. - * @param Returns an object of type Connection +/** + * Gets error count. + * @return error count. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public int getErrorCount( ) { - Class. fo +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( ) ) +{ - /** -* 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 + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} /** -* 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 - + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +for( ; nextChar( ); result += ch ) -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 + /** + * 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 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 +/** + * 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 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 -"61 ""Worker Thread /** -* True if this thread is currently processing. + * 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 boolean busy; +private + /** - * The thread pool that this object belongs to. + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote */ -public ThreadPool owner; + +private void skip /** - * The constructor. - * - * @param o the thread pool + * 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. */ -WorkerThread(ThreadPool o) +private void processSlash( ) { -owner = o; -} +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 + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"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 /** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: 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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -p +_ 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 -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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"81 ""subscribermanager -Socket aSocket; - int ID; - String EventLog; +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); - Connection conn; - ResultSet rs; - Statement stmt; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + +public void getIP Server( String serverIP) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +this. serverIP = serverIP; + } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -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 +public void drawModel() { +repaint(); +} +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -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 -"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 void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +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 -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"49 ""Constraints Description +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 ((((( -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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 - public String get Units () { - return this . units ; - } +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 - public String get Value () { - return this . value ; - } +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - public void set Description ( String description ) { - this . description = description ; - } + private long queryID = 0; - public void set Logic ( String logic ) { - this . logic = logic ; - } + public static int count = 0; - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public Vector getConstraints() + { +return constraintVector; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public Vector getDrivers() + { +return driverVector; } - public void set Units ( String units ) { - this . units = units ; + public String getName() + { +return name; } - public void set Value ( String units ) { - this . value = units ; + public void setName(String name) + { +this. name = name; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); } - public String get Attribute () { - return this . attribute ; + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); } - public String get Performance Model Name () { - return this . performance Model Name ; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); } - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: Delete subscriptions (2.2.3) 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 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; + 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 String getQueryID() { + public long 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 void setQueryID( long id) + { +this. queryID = id; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"86 ""EB Shape + 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 -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; +// save current model +database. saveCurrentModel( id); } - public Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - public String GetProject() - { -return ProjectName; - } + 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 + +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() { - public String GetModule() - { -return ModulePath; +return panel; }"" -",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 +",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 // member variables for menu @@ -69917,110 +68885,591 @@ try 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"93 ""Obsolete Model +",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 -public ObsoleteModel(EBT em) +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: 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 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: 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 + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function + + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 + +public ModifyModel(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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 +"84 ""White Board Execution Graph + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +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 + + +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: 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 -"65 ""About Dialog + private Hash table performanceModelTable = new Hash table(); -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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: 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 -"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 PerformanceModel performance model= null - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + public void parseSpeculateInformation(String str) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -// finds the subscribers for this requirement - public void IdentifySubscribers() + +public void identifyPerformanceModels() { -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 +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +public void pullInformationFromDoors() { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -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 insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public void Dispatch - public String getErrorMessage() + public void createExecuteString() { - return errMsg; - } + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public boolean Contains(String ContextString, String SearchString) +public void parseImpactReport(String str) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; -for ( int i = 0"" -",57,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"85 ""Decompose Model +Connection conn = null; +Statement stmt = null; -public DecomposeModel(EBT em) -{ +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 +"90 ""Merge Model + + +public MergeModel(EBT em) + { super( em); -MinimumNoRects = 3; + MinimumNoRects = 3; } @@ -70028,1218 +69477,1084 @@ MinimumNoRects = 3; public void BuildEvent() { ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - +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 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: 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 -"70 ""Notification Processing +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 -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - // database and eventserver information - S + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -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 + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = 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 Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); + public String get Requirement ID () { + return this . requirement ID ; } + public String get Units () { + return this . units ; + } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + public String get Value () { + return this . value ; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - // 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 Module Path ( String module Path ) { + this . module Path = module Path ; + } + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } + public void set Units ( String units ) { + this . units = units ; + } -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 -"64 ""DOORs Thread Pool + public void set Value ( String units ) { + this . value = units ; + } -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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,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,Each artifact shall be placed under the control of a subscribermanager,106,0 -"80 ""Requirement + public String get Attribute () { + return this . attribute ; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -public Requirement() {// empty constructor + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } -} + public String to String () { -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ 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 +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 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 manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"79 ""performance model Handler +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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - 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(); +// 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 -//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; +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 +"92 ""New Model -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; +public NewModel(EBT em) +{ +super( em); } - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +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 +"private JPanel center Panel = null ; - 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"62 ""Call Back + 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 Hash table requirementDescTable = new Hash table(); + public Speculate Gui () + { - private Hash table constraintDescTable = new Hash table(); + super ("" Speculate GUI ""); - private Hash table performanceModelTable = new Hash table(); + container = get Content Pane (); - private PerformanceModel performance model= null + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + // Submit Listener -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + send Query TO Server (); + } + + if ( e . get Source () == fetch Button ) { -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + System . out . println ("" Fetch Button Pressed - public void createExecuteString() + void send Query TO Server () { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -public void parseImpactReport(String str) + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () { -Connection conn = null; + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -Statement stmt = null; + String [] attribute = { "" Value "", "" Attribute "" }; -Vector constraintsVector = null; -Vector driversVector = null; + String project Name = this . proj Name Text . get -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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"71 ""Requirement + 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 String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -public Requirement() -{ -} + // database and eventserver information + S -public Object clone() throws CloneNotSupportedException + public Notification_Processing() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +public static void main(String args[]) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_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 ParseRequirement(String TextLine) + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { - 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 -"60 ""Thread Pool +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" -/** -* 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++) + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { -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 + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +exitApplication(); + } - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +openEventsMenuItemActionPerformed( evt); } -}"" -",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 -"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 """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public Requirement() {// empty constructor + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - 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 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 +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -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 -"88 ""Event Model + 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 ) + { + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = 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 + } -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; + public String get Description () { + return this . description ; } + public String get Logic () { + return this . logic ; + } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - + 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))); + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } - else - { -Even + 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: Delete subscriptions (2.2.3) 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,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,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include merging requirements.,126,0 -Test case: 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 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"61 ""Worker Thread +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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +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 -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = 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. -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 -"88 ""Event Model + +//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 -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); +//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 EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -public void getIP Server( String serverIP) + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -this. serverIP = serverIP; +return logic; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -public void drawModel() -{ -repaint(); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(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 + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = 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 ((((( + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - protected void BuildEvent(){} + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -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 type. +* @return String +*/ + public String getType() { +return type; } - else - { -Even -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include adding new requirements.,121,0 -"Test case: 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: Delete subscriptions (2.2.3) 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 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = 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: 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 String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +private Hash table requirementDescTable = new Hash table(); -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + private Hash table constraintDescTable = new Hash table(); -this. projectName = projec + private Hash table performanceModelTable = new Hash table(); -public String getChangedAttribute() - { -return changedAttribute; - } + private PerformanceModel performance model= null - public String getDescription() - { -return description; - } - public String getFromAttribute() + public void parseSpeculateInformation(String str) { -return fromAttribute; - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public String getModulePath() - { -return modulePath; - } - public String getProjectName() +public void identifyPerformanceModels() { -return projectName; - } +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() +public void pullInformationFromDoors() { -return toAttribute; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) +public void insertValuesInDataBase() { -this. description = description; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + public void createExecuteString() { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() +public void parseImpactReport(String str) { -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() - { +Connection conn = null; -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +ConstraintsDescription constraint = 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. -*/ +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 - synchronized public void waitDone() +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() - { -_ 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 -"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 double getValueFrom() { -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 valueFrom; + } -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + public double getValueTo() { - -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 +return valueTo; + } - public String getErrorMessage() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { - return errMsg; +this. id = id; } - public boolean Contains(String ContextString, String SearchString) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -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 -"77 ""Model Driver +this. name = name; + } -String msg=""""""""; -public ModelDriver(String text) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -this. msg = text; -init(); +this. valueFrom = valueFrom; } - public void init() + public void setValueTo( double value) { -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: 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 -"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 (); -} +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 +"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= -// 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 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 cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ -// 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 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"82 ""Tokenizer +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +private static class Token { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 { -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; +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 /** - * Gets error count. - * @return error count. + * Construct an evaluator object. + * @param s the string containing the expression. */ -public int getErrorCount( ) -{ -return errors; -} +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 /** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants + * Internal method that hides type-casting. + * Changed the method to support double */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System /** - * Return true if ch can be part of a Java identifier + * Another internal method that hides type-casting. */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } /** - * Return an identifier read from input stream - * First character is already read into ch + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. */ -private String getRemainingString( ) -{ -String result = """""""" + ch; +private void processToken( Token lastToken ) { +System. out. printl -for( ; nextChar( ); result += ch ) +/* + * 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 /** - * 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. + * Internal routine to compute x^ n. */ -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 ) { } -} +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. /** - * 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 + * 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 -/** - * 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 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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -/** - * 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 SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -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 -"73 ""Constraints +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -String id; - String name; - double value; - String logic; +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} - Constraints(String id, String name, double value, String logic){ +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 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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) + { 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; } @@ -71247,162 +70562,325 @@ 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall be able to delete subscriptions.,107,0 -"82 ""Tokenizer +",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 +"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; -/** - * 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; -} + public void run() + { -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 { -return errors; + + } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -/** - * 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( ) ) +// 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 { - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char 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: Delete subscriptions (2.2.3) 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 + +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)) { -return Character. isJavaIdentifierPart( ch ); } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) + 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++) { -String result = """""""" + ch; + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"63 ""Doors Thread + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -for( ; nextChar( ); result += ch ) +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 - */ + public int GetY() + { +return y; + } -private void skip + public Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } -/** - * 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 + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -71468,257 +70946,382 @@ 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 -"54 ""eventserver +",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 +"49 ""Constraints Description -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 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 ) { -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 -"94 ""Refine Model + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -public RefineModel(EBT em) -{ -super( em); } - // Construct Visual model for Merge Event -public void BuildEvent() + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,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() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -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 -"82 ""Tokenizer +// 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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +// 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 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + + //This method displays the contents of two array list to console +public void DisplayValues() { -return errors; -} + 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 -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) +public TextModel(EBT e) { -while( nextChar( ) ) + // 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(); +} - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +public void drawModel() { -return Character. isJavaIdentifierPart( ch ); +repaint(); } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +protected void paintComponent(Graphics g) { -String result = """""""" + ch; + super. paintComponent( g); -for( ; nextChar( ); result += ch ) +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= - /** - * 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 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[ ] +{ -/** - * 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( ) +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} +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; +} /** - * 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 + * 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 - +public Token getToken /** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote + * 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 void skip +/** + * 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 /** - * 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. + * Internal method that hides type-casting. + * Changed the method to support double */ -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 -"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 +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -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 -"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. -*/ + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - 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 + * 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 by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } +/* + * 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 by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + * 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. - /** -* 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 +/** + * 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. @@ -71772,107 +71375,436 @@ 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"66 ""Config Dialog +",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 -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; } -// 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 +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + +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 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"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(); } -// 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 -"86 ""EB Shape +// 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 -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + 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 EBShape( int xpos, int ypos, Color col) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); } - public void Updaterequirement Info(String rno, String pname, String mname) + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"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) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ - public boolean match( int mx, int my) + + 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) { -return true; - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public int GetX() - { -return x; - } +public Requirement() {// empty constructor - public int GetY() - { -return y; - } +} - public Color GetC() -{ -return c; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } + 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 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 +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 protected int top, left, right, bottom; @@ -71894,916 +71826,943 @@ public int GetL() { return left;} public int GetR() { return right;} public int GetB() { return bottom;}"" -",89,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"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 +",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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + EventServerThread(ServerSocket ss) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { - 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 ) + while( true) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () + try { - 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 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - 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 getNextID() { -return constraintVector; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public Vector getDrivers() - { -return driverVector; - } - public String getName() +public String searchDate() { -return name; - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +public String searchQueryID(String date) { -if ( driverVector. contains( driver)) +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -} -else - this. driverVector. add( driver); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + public String getConstraintFromDataBase(String queryID) { -return this. driverVector. contains( driver); - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public String getDriverFromDataBase(String queryID) { -return this. constraintVector. contains( constraint); - } +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 +"60 ""Thread Pool - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } +/** +* 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 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++) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } +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 setQueryID( long id) - { -this. queryID = id; - } - public String toString() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -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 fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"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 +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () +done. waitBegin(); +done. waitDone(); + } protected void finalize() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +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 +"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 void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public JPanel get Panel () - { - return panel ; +return panel; }"" -",48,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"82 ""Tokenizer +",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; /** - * Constructor. - * @param inStream the stream containing a program. + * The thread pool that this object belongs to. */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +public ThreadPool owner; /** - * Gets current line number. - * @return current line number. + * The constructor. + * + * @param o the thread pool */ -public int getLineNumber( ) +WorkerThread(ThreadPool o) { -return currentLine; +owner = o; } /** - * Gets error count. - * @return error count. + * Scan for and execute tasks. */ -public int getErrorCount( ) +public void run() { -return errors; -} +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 /** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants +* True if this thread is currently processing. */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - /** - * Return true if ch can be part of a Java identifier +/** + * The constructor. + * + * @param o the thread pool */ -private static final boolean isIdChar( char ch ) +WorkerThread(ThreadPool o) { -return Character. isJavaIdentifierPart( ch ); +owner = o; } /** - * Return an identifier read from input stream - * First character is already read into ch + * Scan for and execute tasks. */ -private String getRemainingString( ) +public void run() { -String result = """""""" + ch; +Runnable target = null; -for( ; nextChar( ); result += ch ) +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 - /** - * 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 Speculate Gui () + { + super ("" Speculate GUI ""); -/** - * 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 ) { } -} + container = get Content Pane (); + set Size ( 800 , 600 ); -/** - * 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 . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + public void action Performed ( Action Event e ) { -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + if ( e . get Source () == submit Button ) { -private void skip + send Query TO Server (); + } -/** - * 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"85 ""Decompose Model + if ( e . get Source () == fetch Button ) { -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + System . out . println ("" Fetch Button Pressed - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + void send Query TO Server () + { + 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 Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + socket = new Socket ( ip , Port No ); -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; -/** - * 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 project Name = this . proj Name Text . get - /** - * 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 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 - /** - * 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 -"85 ""Decompose Model +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= 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 parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -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 -"48 ""Constraint Inner Panel +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -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 pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public void insertValuesInDataBase() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - } -public Vector get Values From Data Base () + public void createExecuteString() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered R +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +public void parseImpactReport(String str) { - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +Connection conn = null; +Statement stmt = null; -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"50 ""Driver Description +Vector constraintsVector = null; +Vector driversVector = null; -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +ConstraintsDescription constraint = null; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +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)); -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { -this. projectName = projec +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -public String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() +// 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 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -return description; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; } - public String getFromAttribute() + + public String toString() { -return fromAttribute; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public String getModulePath() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return modulePath; +return id; } - public String getProjectName() + + /** +* Returns the name. +* @return String +*/ + public String getName() { -return projectName; +return name; } - public String getRequirementID() + + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -return requirementID; +return valueFrom; } - public String getToAttribute() + + public double getValueTo() { -return toAttribute; +return valueTo; } - public void setChangedAttribute(String changedAttribute) + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -this. changedAttribute = changedAttribute; +this. id = id; } - public void setDescription(String description) + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -this. description = description; +this. name = name; } - public void setFromAttribute(String fromAttribute) + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -this. fromAttribute = fromAttribute; +this. valueFrom = valueFrom; } - public void setModulePath(String modulePath) + + public void setValueTo( double value) { -this. modulePath = modulePath; - } +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 - public void setProjectName(String projectName) + +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. projectName = projectName; +this. serverIP = serverIP; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + + 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 setToAttribute(String toAttribute) + +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() { -this. toAttribute = toAttribute; - } +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public String createKey() + + 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 { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - 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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) + protected void paintComponent(Graphics g) { - 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: 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 -"92 ""New Model +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 NewModel(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); -AddArrow(35,97,59,97); -CurrentEvent = 0; +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(""""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 -"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 +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + /** + * 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** + * 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 +"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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall restore the executable model to its prior state.,119,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 -"58 ""Subscribed Model + // database and eventserver information + S -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +addWindowListener( new WindowAdapter() { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + public void windowClosing(WindowEvent evt) + { +try -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +// 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 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"86 ""EB Shape -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -public EBShape( int xpos, int ypos, Color col) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +exitApplication(); } - public void Updaterequirement Info(String rno, String pname, String mname) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +openEventsMenuItemActionPerformed( evt); } - - public boolean match( int mx, int my) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -return true; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public int GetX() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -return x; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public int GetY() +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -return y; +new AboutDialog ( this, true). show(); } - public Color GetC() -{ -return c; - } - public String GetReqno() +void UpdateDisplayList() { -return requirement No; - } +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 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 String GetProject() +public static void (String args[]) { -return ProjectName; - } +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 String GetModule() +public MergeModel(EBT em) { -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 -"62 ""Call Back - +super( em); + MinimumNoRects = 3; + } -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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; - 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; + } - public void createExecuteString() - { + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public void parseImpactReport(String str) - { + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -Connection conn = null; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + /** +* 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 @@ -72876,676 +72835,761 @@ 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"92 ""New Model +",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 -public NewModel(EBT em) + +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) { -super( 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; } - // Construct Visual model for Merge Event -public void BuildEvent() + public void ClearVectors() { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -public StringBuffer GenerateEvent() +public void drawModel() { -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 -"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 +repaint(); +} -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +public void drawModel(EBShape sh) { +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + +private void ClearData() { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -private void okButtonActionPerformed (ActionEvent evt) +public void Clicked ( int x, int y) { - if ( displayMode == true) +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() { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) { -setVisible ( false); -dispose (); +EventLines. addElement( new EventLine( t, l, r, b)); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - +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 -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 -"92 ""New Model -public NewModel(EBT em) +public String getrequirement Text(String r, String p, String m) { -super( em); +return new String(""""requirementwill go here""""); } - // Construct Visual model for Merge Event -public void BuildEvent() + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +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 +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -public StringBuffer GenerateEvent() +public TextModel(EBT e) { -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 -"92 ""New Model + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -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 - // Construct Visual model for Merge Event -public void BuildEvent() +public void ShowInfo( int CE) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); } - -public StringBuffer GenerateEvent() +public void drawModel() { -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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"94 ""Refine Model +repaint(); +} -public RefineModel(EBT em) -{ -super( em); - } - // Construct Visual model for Merge Event -public void BuildEvent() +protected void paintComponent(Graphics g) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + super. paintComponent( g); -public StringBuffer GenerateEvent() +if (HideMsg == true) { -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 -"63 ""Doors Thread + 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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +String id; + String name; + double value; + String logic; - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - public void run() - { + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Delete subscriptions (2.2.3) 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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"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 + /** +* 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 subscriptions (2.2.3) 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() -{ + /** +* 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 windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification + /** +* 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 +"60 ""Thread Pool -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +/** +* 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); -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - try - { -N - -void DeleteEvent(String SubscriberName, String EventID) - { -try +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -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 -void DeleteRelatedEvents() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -void AddSubscription(String SubscriberName, Requirement requirement ) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +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: Delete subscriptions (2.2.3) 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; -void UpdateDisplayList() + 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) { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try { - 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 +} +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 boolean Analyze_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 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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"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: 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 - 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 +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); - // Submit Listener + 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 action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } - send Query TO Server (); - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - if ( e . get Source () == fetch Button ) { +public void drawModel() +{ +repaint(); +} - System . out . println ("" Fetch Button Pressed +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - void send Query TO Server () - { - String ip = this . event Server IP ; - int Port No = 1701 ; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} - Socket socket ; - try { - socket = new Socket ( ip , Port 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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +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 ((((( - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + protected void BuildEvent(){} - String project Name = this . proj Name Text . get + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public static void main ( String [] args ) +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { - 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 -"74 ""database - +Even -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 String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - /** - * 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 StringBuffer GenerateEvent() { - Class. fo +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 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - /** -* 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 long queryID = 0; + public static int count = 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 -*/ - public void saveCurrentModel( int graphId) + public PerformanceModel(String name, long queryID) { -conn = this. getConnect - +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } -/** -* 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 Vector getConstraints() + { +return constraintVector; + } - /** -* 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 Vector getDrivers() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +return driverVector; + } + public String getName() + { +return name; + } -public void solveStructureEquation() + public void setName(String name) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } -public void getTrackVariableName() + public void removeDriver(DriverDescription driver) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -public void setCalculatedValues() + public void addConstraint(ConstraintsDescription constraint) { -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 +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - public Vector getImpactReport() + public void removeConstraint(ConstraintsDescription constraint) { -//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 -Test case: Delete subscriptions (2.2.3) 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 -"83 ""Variable +this. constraintVector. remove( 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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public long getQueryID() { -this. id = id; -this. type = type; -this. +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + public String toString() { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +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); + } -//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 +// 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() +public StringBuffer GenerateEvent() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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; - /** -* Returns the id. -* @return int -*/ - public String getId() + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) { -return id; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public Vector getConstraints() { -return logic; +return constraintVector; } + public Vector getDrivers() + { +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); } - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); } - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = 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) - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; + public long getQueryID() + { +return this. queryID; } - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; + public void setQueryID( long id) + { +this. queryID = id; } - - /** -* 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 + 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 "76 ""Evaluator private static final int EOL = 0; @@ -73610,169 +73654,267 @@ private Stack postfixStack;// Stack for postfix machine that stores the numbers 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 +/** + * 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 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 +"47 ""Impact Report + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -/** - * 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 Impact Report () + { + super ("""" Search Result GUI """"); -/* - * 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 + container = get Content Pane (); + set Size ( 800 , 250 ); - /** - * 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. + panel = new JPanel (); + panel . set Layout ( 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. - */ + this . server IP = + JOption Pane + . show In + public static void main ( String [] args ) + { -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 -"private JPanel center Panel = null ; + Impact Report im = new Impact Report (); - 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 Vector search Date () { - super ("" Speculate GUI ""); + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - container = get Content Pane (); + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { - set Size ( 800 , 600 ); + pair Vector = new Vector (); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - // Submit Listener + Socket server ; + String line = new String (); - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + // Select Actions - send Query TO Server (); + 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 ); } + } - if ( e . get Source () == fetch Button ) { + // Button Actions - System . out . println ("" Fetch Button Pressed +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - void send Query TO Server () - { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - String ip = this . event Server IP ; - int Port No = 1701 ; + Pair pair = ( Pair ) pair Vector . get ( i ); - Socket socket ; - try { + if ( pair + . get - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + public void impact Report ( String id ) { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + // super ("""" Impact Report """"); - String [] attribute = { "" Value "", "" Attribute "" }; + container = get Content Pane (); - String project Name = this . proj Name Text . get + set Size ( 1020 , 740 ); + this . query ID = id ; - public static void main ( String [] args ) + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () { - new Speculate Gui (); - }",46,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"71 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + Vector v = new Vector (); -public Requirement() -{ -} + Socket server ; + String line = new String (); -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + try + { + server = new Socket ( server IP , 1701 ); - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + if ( server . is Connected () ) + { + Buffered -public void ParseRequirement(String TextLine) + + + public Vector get Driver From Data Base () { - 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 + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"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. @@ -73826,184 +73968,10 @@ if( opSym. token == '(' && clSym. token != ')' || * 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 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - - -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"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: 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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() -{ -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - - - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo - -// finds the subscribers for this requirement - public void IdentifySubscribers() - { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi - - -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { - -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o - - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - - public void Dispatch - - - public String getErrorMessage() - { - return errMsg; - } - - - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +",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 @@ -74047,201 +74015,96 @@ public void insertValuesInDataBase() { Connection conn = null; Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() - { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - - -public void parseImpactReport(String str) - { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } - - - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - - - public boolean match( int mx, int my) - { -return true; - } - - - public int GetX() - { -return x; - } - - - public int GetY() - { -return y; - } - - public Color GetC() -{ -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } - - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"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(); - +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - // 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 void createExecuteString() { - return true; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} +public void parseImpactReport(String str) + { +Connection conn = null; -public void mouseExited( java. awt. event.MouseEvente){} +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public void mousePressed( java. awt. event.MouseEvente){} +ConstraintsDescription constraint = null; -public void mouseReleased( java. awt. event.MouseEvente){} +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;/ -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + 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 update(Graphics g) {} +// 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 JSplitPane getSplitPane() -{ -return splitPane; -} +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -public void valueChanged(ListSelectionEvent e) +String sName, sReqno, sModule, sKey1, sKey2; +try { -if ( e. getValueIsAdjusting()) -return; -} + System. o -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + // 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() { -switch(EventList. getSelectedIndex()) + return errMsg; + } -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +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 @@ -74313,1360 +74176,1407 @@ notify(); { _ 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +",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; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + /** +* 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 /** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +* 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 /** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -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 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -public Requirement() {// empty constructor + /** +* 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - 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 ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -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 +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -//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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +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 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 MergeModel(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(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -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() +{ +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 - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - 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 + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } - 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 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 +"62 ""Call Back -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +private Hash table requirementDescTable = new Hash table(); -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 -"81 ""subscribermanager + private Hash table constraintDescTable = new Hash table(); -Socket aSocket; - int ID; - String EventLog; + private Hash table performanceModelTable = new Hash table(); - Connection conn; - ResultSet rs; - Statement stmt; + private PerformanceModel performance model= null - // 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 void parseSpeculateInformation(String str) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -} -public void sendImpactReportToEventServer(String text) +public void identifyPerformanceModels() { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -// run method will be execute from the main method when u say Thread. start() in main - public void run() +public void pullInformationFromDoors() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +public void insertValuesInDataBase() { -// 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 -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: 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 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include merging requirements.,126,0 -"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; - } - +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + public void createExecuteString() + { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +public void parseImpactReport(String str) + { +Connection conn = null; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +Statement stmt = null; - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 - /** -* 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 -"56 ""Event Parser +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - +return currentLine; +} - 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; +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -//Check if a subscription exists - public boolean CheckSubscription(String str) - { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +/** + * 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( ) ) +{ -//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 + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -//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 +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +for( ; nextChar( ); result += ch ) -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"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 + /** + * 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 - //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. +/** + * 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 ) { } +} -//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 +/** + * 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 -//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 +/** + * 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 toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +/** + * 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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + performance model Handler(String msg) { -return logic; +this. strES = msg; } - - /** -* Returns the name. -* @return String -*/ - public String getName() + public void messageParser() { -return name; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +//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; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; +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) { -this. name = 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 +"88 ""Event Model - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +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 speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +public void drawModel() +{ +repaint(); +} - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +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: Delete subscriptions (2.2.3) 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 -"81 ""subscribermanager +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +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 - // 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 void CheckNotifyStatus() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + protected void BuildEvent(){} -// 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 + protected void AddLine( int t, int l, int r, int b) { +EventLines. addElement( new EventLine( t, l, r, b)); +} - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -// 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"75 ""Driver +Even -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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +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 value. -* @return double -*/ - public double getValueFrom() +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -return valueFrom; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - public double getValueTo() + public void ParseEvent(String TextLine) { -return valueTo; - } +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. id = id; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -this. valueFrom = valueFrom; - } - - public void setValueTo( double value) + while( true) { -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 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -"87 ""EBT + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public EBT(Frame f) +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -WorkArea. showText( sh); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public boolean mouseDown( java. awt.Evente, int x, int y) + public String getConstraintFromDataBase(String queryID) { - return true; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public boolean mouseUp( java. awt.Evente, int x, int y) + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { -return true; - } + 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 - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} +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 mouseExited( java. awt. event.MouseEvente){} + 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 mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public void update(Graphics g) {} - public JSplitPane getSplitPane() +public void drawModel() { -return splitPane; +repaint(); } -public void valueChanged(ListSelectionEvent e) +public void drawModel(EBShape sh) { -if ( e. getValueIsAdjusting()) -return; +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) -public void RedrawAll(EBShape sh) +private void ClearData() { -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) +for ( int i = 0; i < EventShapes. size(); i++) { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -mainframe. addWindowListener( new WindowAdapter() + +public void Clicked ( int x, int y) { -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: 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 -"47 ""Impact Report +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +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 ((((( - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P + protected void BuildEvent(){} - public Impact Report () - { - super ("""" Search Result GUI """"); + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - container = get Content Pane (); - set Size ( 800 , 250 ); +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 - panel = new JPanel (); - panel . set Layout ( null ); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - this . server IP = - JOption Pane - . show In + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + 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 - } +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - public Vector search Date () - { + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - 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 ) + /** + * 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 Vector = new Vector (); - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); + /** +* 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 - Socket server ; - String line = new 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 void saveCurrentModel( int graphId) + { +conn = this. getConnect - // Select Actions - public void action Performed ( Action Event 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 +*/ + public void injectVa - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + /** +* 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 - // Button Actions +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 action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +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 - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +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 - if ( pair - . get + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Delete subscriptions (2.2.3) 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. +*/ - public void impact Report ( String id ) + synchronized public void waitDone() { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - // super ("""" Impact Report """"); +/** +* 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 - container = get Content Pane (); - set Size ( 1020 , 740 ); +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - public Vector get Constraint From Data Base () + /** +* 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 +"48 ""Constraint Inner Panel - Vector v = new Vector (); - - Socket server ; - String line = new String (); +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 - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +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 Driver From Data Base () +public Vector get Values From Data Base () { - Vector v = new Vector (); - - Socket server ; + Socket server ; String line = new String (); - try { server = new Socket ( server IP , 1701 ); if ( server . is Connected () ) { - Buffered"" -",47,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"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++ - + Buffered R - 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 void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String 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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - 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 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 +"50 ""Driver Description +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -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 -"90 ""Merge Model +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec -public MergeModel(EBT em) +public String getChangedAttribute() { -super( em); - MinimumNoRects = 3; +return changedAttribute; } + public String getDescription() + { +return description; + } - // 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 getFromAttribute() + { +return fromAttribute; + } -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 -"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 getModulePath() + { +return modulePath; + } + public String getProjectName() + { +return projectName; + } - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + public String getRequirementID() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +return requirementID; + } -// finds the subscribers for this requirement - public void IdentifySubscribers() + public String getToAttribute() { -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 toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + public void setDescription(String description) { +this. description = description; + } -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } - // 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 setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - public void Dispatch + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - public String getErrorMessage() + public void setToAttribute(String toAttribute) { - return errMsg; +this. toAttribute = toAttribute; } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - public boolean Contains(String ContextString, String SearchString) + public boolean equals(Object o) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) +if (!( o instance of DriverDescription)) return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { -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 -"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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ 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 int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"64 ""DOORs Thread Pool -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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter 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: 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 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 Requirement() {// empty constructor - 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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + 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 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +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 - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +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 - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) - { - try + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +this. id = id; +this. type = type; +this. -public String getNextID() +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +//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 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) +public String toString() { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public String getDriverFromDataBase(String queryID) + /** +* Returns the id. +* @return int +*/ + public String getId() { -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 -"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 +return id; + } -public void getIP Server( String serverIP) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -this. serverIP = serverIP; +return logic; } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} - - -public void drawModel() -{ -repaint(); -} + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. 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 + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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 name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - protected void BuildEvent(){} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - else - { -Even -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - 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: 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 + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +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 "57 ""Event Notifier // Variables to process the requirement private String requirement No;//Requirement No. @@ -75720,99 +75630,7 @@ 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 -"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 +",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; @@ -75880,61 +75698,111 @@ 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 -"75 ""Driver +",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 + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { + String name; + double value; + String logic; + + + 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; } @@ -75942,742 +75810,630 @@ 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 setValueTo( double value) - { -this. valueTo = valueTo; + public void setValue( double value) { +this. value = value; }"" -",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 -"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; - +",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; - public void createExecuteString() + EventServerThread(ServerSocket ss) { - -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) + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"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) + while( true) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo - -// 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 +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +public String getNextID() { - -String sName, sReqno, sModule, sKey1, sKey2; try { - System. o - - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - - public void Dispatch - - - public String getErrorMessage() - { - return errMsg; - } - - - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"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 +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public String searchDate() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() +String dateString = new String(); +Vector dateVector = new Vector(); +try { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -"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= + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -private static class Precedence +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -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 getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -private static class Token + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +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 { + 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 +"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 EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + 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 -/** - * 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 +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -/** - * 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 +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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String 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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -/* - * 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 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 +private String project Name = null ; + private String module Path = null ; + private String requirement ID = 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. + 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 manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); + public String get Description () { + return this . description ; } + public String get Logic () { + return this . logic ; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } - 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 -"52 ""Pair + public String get Value () { + return this . value ; + } -private String queryID; - private String queryString; + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - public Pair(String queryID, String queryString) { + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -this. queryID = queryID; -this. queryString = queryString; + 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 String getQueryID() { -return this. queryID; + public void set Units ( String units ) { + this . units = units ; } - public String getQueryString() { -return this. queryString; + public void set Value ( String units ) { + this . value = units ; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public String get Impacted Constraint () { + return this . impacted Constraint ; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - }"" -",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 -"82 ""Tokenizer + 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 ; + } -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + 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 """" -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +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 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +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 -/** - * 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 MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - /** - * 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(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -/** - * 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(); +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 -for( ; nextChar( ); result += ch ) +String msg=""""""""; +public ModelDriver(String text) + { +this. msg = text; +init(); + } - /** - * 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 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 +public NewModel(EBT em) +{ +super( em); + } -/** - * 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( ) + + // Construct Visual model for Merge Event +public void BuildEvent() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -/** - * 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 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; -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + private long queryID = 0; -private void skip + 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; + } -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"92 ""New Model + public Vector getDrivers() + { +return driverVector; + } -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; } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -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 -"52 ""Pair + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -private String queryID; - private String queryString; + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - public Pair(String queryID, String queryString) { + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -this. queryID = queryID; -this. queryString = queryString; + 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 String getQueryID() { + public long getQueryID() + { return this. queryID; } - public String getQueryString() { -return this. queryString; + public void setQueryID( long id) + { +this. queryID = id; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + 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 +"88 ""Event Model - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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); - }"" -",52,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"81 ""subscribermanager + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } - // 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 ClearVectors() { +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} +public void drawModel() +{ +repaint(); } -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 +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("""""""","""""""",""""""""); + } +} - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"73 ""Constraints -String id; - String name; - double value; - String 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 - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +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 String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + protected void BuildEvent(){} - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; +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 name. -* @return String -*/ - public String getName() { -return name; - } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* 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() +{ +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 +"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 - /** -* 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 +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 =""""""""; @@ -76709,634 +76465,901 @@ public void ParseRequirement(String TextLine) 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 -"56 ""Event Parser +",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 Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +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) + { +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() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +return c; + } + public String GetReqno() + { +return requirement No; + } - public void updateEvent(String str, String ID) + public String GetProject() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +return ProjectName; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + 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 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + 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() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int 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) { -// 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 +conn = this. getConnect - public void speculate(String str) +/** +* 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(""""Speculate""""); -CallBack +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -public void impactReport(String str) +public void solveStructureEquation() { -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: Delete subscriptions (2.2.3) 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: 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 -"58 ""Subscribed Model +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -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 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 GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"83 ""Variable -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: 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 -"56 ""Event Parser +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 Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +this. id = id; +this. type = type; +this. - public void updateEvent(String str, String ID) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +//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 -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) +public String toString() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + /** +* Returns the id. +* @return int +*/ + public String getId() { -// 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 +return id; + } - public void speculate(String str) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -System. out. println(""""Speculate""""); -CallBack +return logic; + } -public void impactReport(String str) + /** +* Returns the name. +* @return String +*/ + public String getName() { -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 -"86 ""EB Shape +return name; + } -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -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; + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public String GetReqno() - { -return requirement No; + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public String GetProject() - { -return ProjectName; + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public String GetModule() - { -return ModulePath; + /** +* 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; }"" -",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,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"81 ""subscribermanager +",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 -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; +System. out. println("""" in get Connection""""); +Connection connect=null; try { + Class. fo -} -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 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 -// run method will be execute from the main method when u say Thread. start() in main - public void run() + /** +* 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) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +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 - // set up for reading the byte data in to characte // start of class from here - 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) { -// 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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - // 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 void solveStructureEquation() { - setTitle(""""EventsProcessor""""); +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -addWindowListener( new WindowAdapter() -{ + +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 windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +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 -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + public Vector getImpactReport() { -int index = eventList. getSelectedIndex(); -if ( index != -1) +//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 + +public NewModel(EBT em) { - try - { -Notification +super( em); + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) + // Construct Visual model for Merge Event +public void BuildEvent() { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public StringBuffer GenerateEvent() { - try - { -N +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 -void DeleteEvent(String SubscriberName, String EventID) +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) { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) +this. strES = msg; + } + + public void messageParser() { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +//Re-execut +public String generateReport() { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - m_Deleterequirement List. remove(0); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -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 saveModel( int id) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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; + + + 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 ; + } -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ 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 + }"" +",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) +{ +super( em); + } -private boolean Analyze_CheckSubscription(String str) + // Construct Visual model for Merge Event +public void BuildEvent() { -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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 -"82 ""Tokenizer +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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. + */ +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 Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public Balance( Reader inStream ) { -return currentLine; +errors = 0; +tok = new Tokenizer( inStream ); } /** - * Gets error count. - * @return error count. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -public int getErrorCount( ) +public int checkBalance( ) { -return errors; -} +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants + /** + * Print an error message if clSym does not match opSym. + * Update errors. */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) +private void checkMatch( Symbol opSym, Symbol clSym ) { - +if( opSym. token == '(' && clSym. token != ')' || /** - * Return true if ch can be part of a Java identifier + * 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. */ -private static final boolean isIdChar( char ch ) +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; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() { -return Character. isJavaIdentifierPart( ch ); -} + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -/** - * 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(); +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 -for( ; nextChar( ); result += ch ) +//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 - /** - * 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 ) { } -} + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -/** - * 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 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 -/** - * 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 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 skip +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -/** - * 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 manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -"61 ""Worker Thread + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + 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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"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() { -owner = o; + 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 -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; -do -{ -target = owner. getAssignment(); -if ( target!=null) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"92 ""New Model + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -public NewModel(EBT 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 + + + + //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 MergeModel(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(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent 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 -"71 ""Requirement +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 +"89 ""Event Line -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +protected int top, left, right, bottom; -public Requirement() + +public EventLine ( int t, int l, int r, int b) { +top = t; +left = l; +right = r; +bottom = b; } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public int GetT() { return top;} - 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 GetL() { return left;} -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 +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) @@ -77361,2611 +77384,2797 @@ StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""""Obsolete|0|""""); thisEvent. append( new Date(). toString()+""""|""""); ebs = (EBShape)EventShapes. e"" -",93,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,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: 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 -"58 ""Subscribed Model +",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; -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + +public Balance( Reader inStream ) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +errors = 0; +tok = new Tokenizer( inStream ); +} -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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); + + +/** +* 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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -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 -"88 ""Event Model + /** +* 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 +"67 ""Event Detail Dialog -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 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 - -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public void ClearVectors() +private void okButtonActionPerformed (ActionEvent evt) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public void drawModel() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -repaint(); +setVisible ( false); +dispose (); } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} +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 -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 commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public void CheckNotifyStatus() + performance model Handler(String msg) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - +this. strES = msg; + } - protected void BuildEvent(){} + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - protected void AddLine( int t, int l, int r, int b) +//Re-execut +public String generateReport() { -EventLines. addElement( new EventLine( t, l, r, b)); -} + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - else - { -Even -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + 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 +"89 ""Event Line - 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 -"50 ""Driver Description +protected int top, left, right, bottom; -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 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) - { +public int GetT() { return top;} -this. projectName = projec +public int GetL() { return left;} -public String getChangedAttribute() - { -return changedAttribute; - } +public int GetR() { return right;} - public String getDescription() - { -return description; - } +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 - public String getFromAttribute() +public static void (String args[]) { -return fromAttribute; - } - - public String getModulePath() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -return modulePath; - } - - public String getProjectName() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -return projectName; - } +p - public String getRequirementID() - { -return requirementID; - } +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 - public String getToAttribute() - { -return toAttribute; - } +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 setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + 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 setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. fromAttribute = fromAttribute; - } + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) +public Vector get Values From Data Base () { -this. requirementID = requirementID; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + if ( server . is Connected () ) + { + Buffered R - 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() + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -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 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - // 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 JPanel get Panel () { - setTitle(""""EventsProcessor""""); + 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 -addWindowListener( new WindowAdapter() -{ +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + public Impact Report () { -Notification + super ("""" Search Result GUI """"); -// 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 ( 800 , 250 ); -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N + panel = new JPanel (); -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 + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In -void DeleteRelatedEvents() + public static void main ( String [] args ) { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - m_Deleterequirement List. remove(0); + Impact Report im = new Impact Report (); + } -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + public Vector search Date () { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -void UpdateDisplayList() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; + pair Vector = new Vector (); - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - 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; + Socket server ; + String line = new String (); -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + // Select Actions -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + 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 ); + } + } -//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 + // Button Actions -//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 action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + for ( int i = 0 ; i < pair Vector . size (); i ++) { + Pair pair = ( Pair ) pair Vector . get ( i ); -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 -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 -"88 ""Event Model + if ( pair + . get -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 impact Report ( String id ) + { - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + // super ("""" Impact Report """"); + container = get Content Pane (); -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + set Size ( 1020 , 740 ); + this . query ID = id ; - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + System . out . println ("""" Impact Report Constructor ..... ID """" + -public void drawModel() -{ -repaint(); -} + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + Socket server ; + String line = new String (); -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered -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 Vector get Driver 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 (); + + Socket server ; + String line = new String (); - protected void BuildEvent(){} + 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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - protected void AddLine( int t, int l, int r, int b) +public Requirement() { -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 +public Object clone() throws CloneNotSupportedException { -Even +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"51 ""Driver Inner Panel - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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(); - 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 -"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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 +"73 ""Constraints - private long queryID = 0; +String id; + String name; + double value; + String logic; - public static int count = 0; - public PerformanceModel(String name, long queryID) - { + Constraints(String id, String name, double value, String logic){ +this. id = id; this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() - { -return constraintVector; +this. value = value; +this. logic = logic; } - public Vector getDrivers() - { -return driverVector; - } - public String getName() - { -return name; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - 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; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void setQueryID( long id) - { -this. queryID = id; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - 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 -"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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -public String GetSubscriberReqno() { return SubscriberReqno;} +private String queryID; + private String queryString; -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public Pair(String queryID, 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 -"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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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; + /** +* 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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +/** +* 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 /** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -for( ; nextChar( ); result += ch ) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } /** - * 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 +* 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 +"94 ""Refine Model +public RefineModel(EBT em) +{ +super( em); + } -/** - * 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( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -/** - * 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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -/** - * 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 + //@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 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -/** - * 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 SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -// 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 GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +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 -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"90 ""Merge Model +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; } - // 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 run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -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 -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 -"77 ""Model Driver +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -String msg=""""""""; -public ModelDriver(String text) + DOORsThread(ServerSocket ss) { -this. msg = text; -init(); + theServer = ss; + count++; + taskNumber = count; } - public void init() + public void run() { -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: 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: 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 ModifyModel(EBT em) -{ -super( em); - } + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - protected void paintComponent(Graphics g) +public String getNextID() + { +try { -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 -"94 ""Refine Model +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public RefineModel(EBT em) -{ -super( em); - } - // Construct Visual model for Merge Event -public void BuildEvent() +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -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 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -super( em); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -// Construct Visual model for Merge Event -public void BuildEvent() + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -public StringBuffer GenerateEvent() + public String getDriverFromDataBase(String queryID) { -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 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: 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 -"84 ""White Board Execution Graph +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 +"83 ""Variable -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + //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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +//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 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 String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -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 id. +* @return int +*/ + public String getId() + { +return 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++){ + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return 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 + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -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 -"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 logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -// 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 -"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 + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -// 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 + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - 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 + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -// 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 + /** +* 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; - //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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall re execute the model using the speculative values.,117,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 -"50 ""Driver Description +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: 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 -public String getChangedAttribute() +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 changedAttribute; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getDescription() + public Vector getConstraints() { -return description; +return constraintVector; } - public String getFromAttribute() + public Vector getDrivers() { -return fromAttribute; +return driverVector; } - public String getModulePath() + public String getName() { -return modulePath; +return name; } - public String getProjectName() + public void setName(String name) { -return projectName; +this. name = name; } - public String getRequirementID() + public void addDriver(DriverDescription driver) { -return requirementID; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public String getToAttribute() + public void removeDriver(DriverDescription driver) { -return toAttribute; +this. driverVector. remove( driver); } - public void setChangedAttribute(String changedAttribute) + public boolean containsDriver(DriverDescription driver) { -this. changedAttribute = changedAttribute; +return this. driverVector. contains( driver); } - public void setDescription(String description) + public void addConstraint(ConstraintsDescription constraint) { -this. description = description; +this. constraintVector. add( constraint); } - public void setFromAttribute(String fromAttribute) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. fromAttribute = fromAttribute; +return this. constraintVector. contains( constraint); } - public void setModulePath(String modulePath) + public void removeConstraint(ConstraintsDescription constraint) { -this. modulePath = modulePath; +this. constraintVector. remove( constraint); } - public void setProjectName(String projectName) + public DriverDescription getDriver(DriverDescription driver) { -this. projectName = projectName; - } +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public void setRequirementID(String requirementID) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. requirementID = requirementID; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public void setToAttribute(String toAttribute) + public long getQueryID() { -this. toAttribute = toAttribute; +return this. queryID; } - public String createKey() + public void setQueryID( long id) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +this. queryID = 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() + 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 -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +protected int top, left, right, bottom; -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +public EventLine ( int t, int l, int r, int b) { - 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 -"93 ""Obsolete Model +top = t; +left = l; +right = r; +bottom = b; +} -public ObsoleteModel(EBT em) -{ -super( em); - } +public int GetT() { return top;} -// 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 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 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - 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() - { +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +// 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 getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +// 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) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +top = t; +left = l; +right = r; +bottom = b; +} -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +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) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +super( em); +MinimumNoRects = 3; + } - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + // Construct Visual model for Merge Event +public void BuildEvent() { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try + +public StringBuffer GenerateEvent() { - 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 -"77 ""Model Driver +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 -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public void init() +public EBShape( int xpos, int ypos, Color col) { -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 -"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 +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public int GetX() + { +return x; + } -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 int GetY() + { +return y; + } -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 Color GetC() +{ +return 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++ + public String GetReqno() + { +return requirement No; + } + public String GetProject() + { +return ProjectName; + } - 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 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; - 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 + // 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 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 +addWindowListener( new WindowAdapter() +{ -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -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 -"48 ""Constraint Inner Panel +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -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 +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +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 Vector get Values From Data Base () +void DeleteRelatedEvents() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - if ( server . is Connected () ) - { - Buffered R + m_Deleterequirement List. remove(0); - 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 +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 JPanel get Panel () +void UpdateDisplayList() { - 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 -"65 ""About Dialog +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -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 -"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 + // 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +private boolean Analyze_CheckSubscription(String str) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +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 -private void okButtonActionPerformed (ActionEvent evt) +public DecomposeModel(EBT em) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +super( em); +MinimumNoRects = 3; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + // Construct Visual model for Merge Event +public void BuildEvent() { -setVisible ( false); -dispose (); -} - + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: 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: 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -"91 ""Modify Model +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 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 +"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 - protected void paintComponent(Graphics g) + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() { -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 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: 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 -"91 ""Modify Model + public void windowClosing(WindowEvent evt) + { +try -public ModifyModel(EBT em) + +public static void main(String args[]) + { +try { -super( em); + 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(); } - // Construct Visual model for Merge Event -public void BuildEvent() + // 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()) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -public StringBuffer GenerateEvent() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - protected void paintComponent(Graphics g) +// 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 { -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: Delete subscriptions (2.2.3) 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 -"73 ""Constraints + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -String id; - String name; - double value; - String logic; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public boolean match( int mx, int my) + { +return true; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public int GetX() + { +return x; } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public int GetY() + { +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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 + - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"49 ""Constraints Description +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"65 ""About Dialog -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +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 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 - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +// 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 . 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 - public String get Description () { - return this . description ; - } + // 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 Logic () { - return this . logic ; - } + public void Dispatch - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; + public String getErrorMessage() + { + return errMsg; } - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - public String get Value () { - return this . value ; - } +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 void set Description ( String description ) { - this . description = description ; - } +/** +* 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 Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +/** +* 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 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() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); } +}"" +",60,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 +"private JPanel center Panel = null ; - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + 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 set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + // Speculate Gui - public String get Attribute () { - return this . attribute ; - } + public Speculate Gui () + { - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + super ("" Speculate GUI ""); - public String get Performance Model Name () { - return this . performance Model Name ; - } + container = get Content Pane (); - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } + set Size ( 800 , 600 ); - public String to String () { + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + // Submit Listener -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 ( e . get Source () == submit Button ) { -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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"93 ""Obsolete Model + send Query TO Server (); -public ObsoleteModel(EBT em) -{ -super( em); - } + } + if ( e . get Source () == fetch Button ) { -// 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 + System . out . println ("" Fetch Button Pressed -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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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,The subscribermanager shall re execute the model using the speculative values.,117,0 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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: 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 -"71 ""Requirement + Output Stream os = socket . get Output Stream (); + Output Stream -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void pull Value From DOORS () + { -public Requirement() -{ -} + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . 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 -public void ParseRequirement(String TextLine) + public static void main ( String [] args ) { - 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 -"92 ""New Model + 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 -public NewModel(EBT em) -{ -super( em); - } +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public StringBuffer GenerateEvent() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -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 -"51 ""Driver Inner Panel + Class. fo -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(); + /** +* 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. 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: Delete subscriptions (2.2.3) 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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: 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 -"77 ""Model 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) + { +conn = this. getConnect -String msg=""""""""; -public ModelDriver(String text) +/** +* 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) { -this. msg = text; -init(); - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public void init() +public void solveStructureEquation() { -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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -"75 ""Driver +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + +public void getTrackVariableName() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -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 - public String toString() +public void setCalculatedValues() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +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 - /** -* Returns the id. -* @return int -*/ - public String getId() + + public Vector getImpactReport() { -return 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 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 - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() +public Object clone() throws CloneNotSupportedException { -return valueFrom; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - public double getValueTo() + public void ParseEvent(String TextLine) { -return valueTo; - } + 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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. id = id; - } +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +"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 value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -this. valueFrom = valueFrom; - } + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"90 ""Merge Model + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -public MergeModel(EBT em) + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -super( em); - MinimumNoRects = 3; - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - // Construct Visual model for Merge Event -public void BuildEvent() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -public StringBuffer GenerateEvent() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) { -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: 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 -"93 ""Obsolete Model + try + { +N -public ObsoleteModel(EBT em) +void DeleteEvent(String SubscriberName, String EventID) + { +try { -super( em); - } + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -// Construct Visual model for Merge Event -public void BuildEvent() +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -public StringBuffer GenerateEvent() + + +void AddSubscription(String SubscriberName, Requirement requirement ) { -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 -"52 ""Pair +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 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) { -this. queryID = queryID; -this. queryString = 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 - } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +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 - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +private Hash table requirementDescTable = new Hash table(); - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - }"" -",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 -"private JPanel center Panel = null ; + private PerformanceModel performance model= 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 parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public Speculate Gui () + +public void identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - super ("" Speculate GUI ""); - container = get Content Pane (); +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - // Submit Listener - public void action Performed ( Action Event e ) { + public void createExecuteString() + { - if ( e . get Source () == submit Button ) { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - send Query TO Server (); - } +public void parseImpactReport(String str) + { - if ( e . get Source () == fetch Button ) { +Connection conn = null; +Statement stmt = null; - System . out . println ("" Fetch Button Pressed +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - void send Query TO Server () - { +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 - String ip = this . event Server IP ; - int Port No = 1701 ; +Socket aSocket; + int ID; + String EventLog; - Socket socket ; - try { + Connection conn; + ResultSet rs; + Statement stmt; - socket = new Socket ( ip , Port No ); + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - Output Stream os = socket . get Output Stream (); - Output Stream + // 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 pull Value From DOORS () + +} +public void sendImpactReportToEventServer(String text) { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +// 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 project Name = this . proj Name Text . get - public static void main ( String [] args ) + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { - new Speculate Gui (); - }",46,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: 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 -"94 ""Refine Model +// 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 -public RefineModel(EBT em) + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -super( em); - } +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - // Construct Visual model for Merge Event -public void BuildEvent() + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +return currentLine; } -public StringBuffer GenerateEvent() + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -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: 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 -"71 ""Requirement +return errors; +} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public 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 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 + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -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 -"61 ""Worker Thread /** -* True if this thread is currently processing. + * Return an identifier read from input stream + * First character is already read into ch */ -public boolean busy; +private String getRemainingString( ) +{ +String result = """""""" + ch; -/** - * The thread pool that this object belongs to. +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 ThreadPool owner; +public String getNe /** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + * 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( ) { -owner = o; +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } } /** - * Scan for and execute tasks. + * 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 void run() -{ -Runnable target = null; +private -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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Delete subscriptions (2.2.3) 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; +/** + * 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 - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try + +/** + * 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( ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +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 + +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 updateEvent(String str, String ID) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +this. id = id; +this. type = type; +this. -//Check if a subscription exists - public boolean CheckSubscription(String str) +//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 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + +//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 -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + +public String toString() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + /** +* Returns the id. +* @return int +*/ + public String getId() { -// 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 +return id; + } - public void speculate(String str) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -System. out. println(""""Speculate""""); -CallBack +return logic; + } -public void impactReport(String str) + /** +* Returns the name. +* @return String +*/ + public String getName() { -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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -"58 ""Subscribed Model +return name; + } -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 + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -public String GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -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: Delete subscriptions (2.2.3) 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; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -/** - * 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; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } /** - * 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"Test case: Event server 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 -"51 ""Driver Inner Panel +* Returns the type. +* @return String +*/ + public String getType() { +return 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) { + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -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: 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 subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"85 ""Decompose Model +",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 -public DecomposeModel(EBT em) -{ +public MergeModel(EBT em) + { super( em); -MinimumNoRects = 3; + MinimumNoRects = 3; } @@ -79973,305 +80182,195 @@ MinimumNoRects = 3; public void BuildEvent() { ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - +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 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 -"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(); -} +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 -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try +public EBShape( int xpos, int ypos, Color col) { -Notification_Event nEvt1 = (Notificati - +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/ 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 Updaterequirement Info(String rno, String pname, String mname) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -void DeleteRelatedEvents() + public boolean match( int mx, int my) { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +return true; + } -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 GetX() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +return x; + } -void UpdateDisplayList() + public int GetY() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - - - // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response -private boolean Check_Subscription(String ip, - int PortNo, - String SubscriberName, - String Requirement // Takes an event string returned from the eventserver and -// extracts True or False response - - - -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"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 +return y; + } -public void HideText() + public Color GetC() { -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +return c; + } -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + public String GetReqno() + { +return requirement No; + } -public void drawModel() -{ -repaint(); -} + public String GetProject() + { +return ProjectName; + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + 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 -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 -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 -"52 ""Pair +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -private String queryID; - private String queryString; + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. 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 void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - }"" -",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 -"48 ""Constraint Inner Panel + 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 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 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 goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + 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 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 targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + 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 JPanel get Panel () +public void ParseRequirement(String TextLine) { - 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 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 + 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 "47 ""Impact Report private String server IP = """" local host """"; @@ -80410,277 +80509,131 @@ 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 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 -"69 ""Notification Event +",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 -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() +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { - 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(); +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -if ( m_Eve -public void DisplayValues() +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -"95 ""Text Model +return currentLine; +} -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) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +return errors; +} - public void showText(EBShape 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( ) { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() +while( nextChar( ) ) { -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() + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -repaint(); +return Character. isJavaIdentifierPart( ch ); } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - 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 -"77 ""Model Driver +String result = """""""" + ch; -String msg=""""""""; +for( ; nextChar( ); result += ch ) -public ModelDriver(String text) - { -this. msg = text; -init(); - } - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"94 ""Refine 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 -public RefineModel(EBT em) -{ -super( em); - } - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * 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( ) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } } -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 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - - - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -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 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null - - - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // - - -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - - -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - - -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() - { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - -public void parseImpactReport(String str) - { +/** + * 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 -Connection conn = null; -Statement stmt = null; +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -Vector constraintsVector = null; -Vector driversVector = null; +private void skip -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 +/** + * 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 "80 ""Requirement public String m_RequirementID =""""""""; @@ -80700,352 +80653,399 @@ 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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 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,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"93 ""Obsolete Model +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -public ObsoleteModel(EBT em) + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -super( em); - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -// Construct Visual model for Merge Event -public void BuildEvent() + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -public StringBuffer GenerateEvent() + public String getDriverFromDataBase(String queryID) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Delete subscriptions (2.2.3) 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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: 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 -"73 ""Constraints +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 -String id; - String name; - double value; - String logic; +protected int top, left, right, bottom; - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +public int GetT() { return top;} + +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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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=""""""""; - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; +public ModelDriver(String text) + { +this. msg = text; +init(); } - /** -* Returns the name. -* @return String + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. */ - public String getName() { -return name; - } + private int _ activeThreads = 0; /** -* Returns the value. -* @return double +* 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 double getValue() { -return value; - } + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - /** -* Sets the id. -* @param id The id to set +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public void setId(String id) { -this. id = id; + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - ** -* Sets the logic. -* @param logic The logic to set + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public void setLogic(String logic) { -this. logic = logic; + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } /** -* Sets the name. -* @param name The name to set +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public void setName(String name) { -this. name = name; + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } /** -* Sets the value. -* @param value The value to set +* Called to reset this object to +* its initial state. */ - public void setValue( double value) { -this. value = value; + synchronized public void reset() + { +_ activeThreads = 0; }"" -",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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } +",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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -public StringBuffer GenerateEvent() +public EBT(Frame f) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - protected void paintComponent(Graphics g) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -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 -"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 +WorkArea. showText( sh); + } - performance model Handler(String msg) + public boolean mouseDown( java. awt.Evente, int x, int y) { -this. strES = msg; + return true; } - 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 mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } -//Re-execut -public String generateReport() + public void mouseClicked( java. awt. event.MouseEvente) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +VisualPanel.Clicked( e. getX(), e. getY()); +} -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +public void mouseExited( java. awt. event.MouseEvente){} - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +public void mouseEntered( java. awt. event.MouseEvente){} - 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -"73 ""Constraints +public void paint(Graphics g) {} -String id; - String name; - double value; - String logic; +public void update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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 id. -* @return int -*/ - public String getId() { -return id; - } +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +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 - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + * 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 - /** -* 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 + /** +* 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 void setLogic(String logic) { -this. logic = logic; - } + public int get /** -* Sets the name. -* @param name The name to set +* 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 setName(String name) { -this. name = name; - } + public void saveCurrentModel( int graphId) + { +conn = this. getConnect - /** -* Sets the value. -* @param value The value to set +/** +* 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 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 -"91 ""Modify Model + public void injectVa -public ModifyModel(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 = 4; -} +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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 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 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0