diff --git "a/train.csv" "b/train.csv" --- "a/train.csv" +++ "b/train.csv" @@ -6180,196 +6180,9 @@ StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""""Refine|0|""""); thisEvent. append( new Date(). toString()+""""|""""); ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null - - - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // - - -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - - -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - - -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() - { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - - -public void parseImpactReport(String str) - { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - - - performance model Handler(String msg) - { -this. strES = msg; - } - - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); - - -//Re-execut -public String generateReport() -{ - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - - - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 +",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 @@ -6485,586 +6298,277 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A user shall register as a subscriber.,103,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - - -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} - - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,For speculative events; the eventserver shall construct a composite event message.,132,0 -"91 ""Modify Model +",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 ModifyModel(EBT em) +public ObsoleteModel(EBT em) { super( em); } - // Construct Visual model for Merge Event +// Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -CurrentEvent = 4; -} +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve public StringBuffer GenerateEvent() -{ + { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"47 ""Impact Report +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 -private String server IP = """" local host """"; - private JPanel center Panel = null ; +String id; + String name; + double value; + String logic; - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - super ("""" Search Result GUI """"); - container = get Content Pane (); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - set Size ( 800 , 250 ); - panel = new JPanel (); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public Vector search Date () - { + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { + /** +* 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 - pair Vector = new Vector (); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - query String Combo . remove All Items (); + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new 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(); - // Select Actions - public void action Performed ( Action Event 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; - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -public void action Performed ( Action Event e ) { + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - Pair pair = ( Pair ) pair Vector . get ( i ); + 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 +"73 ""Constraints - if ( pair - . get +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 void impact Report ( String id ) - { - // super ("""" Impact Report """"); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} - -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - - -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl - - -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP - - - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. - - -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } /** -* 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 value. +* @return double */ - public int get + public double getValue() { +return value; + } /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - 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 +* Sets the id. +* @param id The id to set */ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - - // database and eventserver information - S - - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try - - -public static void main(String args[]) - { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No - - -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) - { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - - - - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); + public void setId(String id) { +this. id = id; } - - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = 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) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall restore the executable model to its prior state.,119,0 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 "59 ""Done /** * The number of Worker object * threads that are currently working @@ -7136,1978 +6640,2301 @@ notify(); { _ activeThreads = 0; }"" -",59,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"81 ""subscribermanager +",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 -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - // 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 EBShape( int xpos, int ypos, Color col) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -} -public void sendImpactReportToEventServer(String text) + public void Updaterequirement Info(String rno, String pname, String mname) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public boolean match( int mx, int my) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - +return true; + } - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public int GetX() { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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) - { - try + public String GetProject() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c +return ProjectName; + } - // Speculate Gui - public Speculate Gui () + 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 - super ("" Speculate GUI ""); +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 - container = get Content Pane (); +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - // Submit Listener + 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 action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - send Query TO Server (); +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 - if ( e . get Source () == fetch Button ) { +/** +* 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 ("" Fetch Button Pressed +/** +* 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 - void send Query TO Server () + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + /** +* 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 +"86 ""EB Shape - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public void pull Value From DOORS () + +public EBShape( int xpos, int ypos, Color col) { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - String project Name = this . proj Name Text . get + + public boolean match( int mx, int my) + { +return true; + } - public static void main ( String [] args ) + public int GetX() { - new Speculate Gui (); - }",46,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"47 ""Impact Report +return x; + } -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); + public int GetY() + { +return y; + } - private JPanel driver Inner Panel = null ; + public Color GetC() +{ +return c; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public String GetReqno() + { +return requirement No; + } - public Impact Report () + public String GetProject() { +return ProjectName; + } - super ("""" Search Result GUI """"); - container = get Content Pane (); + 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 - set Size ( 800 , 250 ); +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - panel = new JPanel (); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - public static void main ( String [] args ) +public String getChangedAttribute() { +return changedAttribute; + } - Impact Report im = new Impact Report (); + public String getDescription() + { +return description; + } + public String getFromAttribute() + { +return fromAttribute; } + public String getModulePath() + { +return modulePath; + } - public Vector search Date () + public String getProjectName() { +return projectName; + } - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + public String getRequirementID() + { +return requirementID; + } - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) + public String getToAttribute() { +return toAttribute; + } - pair Vector = new Vector (); + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - query String Combo . remove All Items (); + public void setDescription(String description) + { +this. description = description; + } - query String Combo . add Item ("""" Select Query String """"); + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } - Socket server ; - String line = new String (); + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - // Select Actions + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - public void action Performed ( Action Event e ) - { + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - // Button Actions + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +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 - for ( int i = 0 ; i < pair Vector . size (); i ++) { +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - Pair pair = ( Pair ) pair Vector . get ( i ); + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - if ( pair - . get + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - public void impact Report ( String id ) - { + } - // super ("""" Impact Report """"); - container = get Content Pane (); + public String get Description () { + return this . description ; + } - set Size ( 1020 , 740 ); + public String get Logic () { + return this . logic ; + } - this . query ID = id ; + public String get Module Path () { + return this . module Path ; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + public String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } - public Vector get Constraint From Data Base () - { + public String get Units () { + return this . units ; + } - Vector v = new Vector (); + public String get Value () { + return this . value ; + } - Socket server ; - String line = new String (); + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - try - { - server = new Socket ( server IP , 1701 ); + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () - { + public void set Value ( String units ) { + this . value = units ; + } - Vector v = new Vector (); + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - Socket server ; - String line = new String (); + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - try - { - server = new Socket ( server IP , 1701 ); + public String get Attribute () { + return this . attribute ; + } - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"77 ""Model Driver + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -String msg=""""""""; + public String get Performance Model Name () { + return this . performance Model Name ; + } -public ModelDriver(String text) - { -this. msg = text; -init(); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include deleting a requirement.,125,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ 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 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 - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +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. + */ +private static class Symbol +{ +public chartoken; +public int theLine; -public String getNextID() - { -try +public Symbol( char tok, int line ) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +public Balance( Reader inStream ) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +errors = 0; +tok = new Tokenizer( inStream ); +} -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +if( opSym. token == '(' && clSym. token != ')' || - public String getDriverFromDataBase(String queryID) + /** + * 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) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - /** -* 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 void Updaterequirement Info(String rno, String pname, String mname) { -try { - while ( _ activeThreads>0 ) { -wait(); +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + + public boolean match( int mx, int my) { -try { - while ( !_ started ) { -wait(); +return true; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public int GetX() { -_ activeThreads++; -_ started = true; -notify(); +return x; } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public int GetY() { -_ activeThreads--; -notify(); +return y; } + public Color GetC() +{ +return c; + } - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public String GetReqno() { -_ activeThreads = 0; +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; }"" -",59,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"94 ""Refine Model +",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 +"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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +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 - private long queryID = 0; +/** +* 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 static int count = 0; - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return driverVector; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public String getName() - { -return name; - } - public void setName(String name) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -this. name = name; - } - - public void addDriver(DriverDescription driver) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -if ( driverVector. contains( driver)) -{ +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); } -else - this. driverVector. add( driver); +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 +"62 ""Call Back - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +private Hash table requirementDescTable = new Hash table(); - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } + private Hash table constraintDescTable = new Hash table(); - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } + private Hash table performanceModelTable = new Hash table(); - public void removeConstraint(ConstraintsDescription constraint) + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) { -this. constraintVector. remove( constraint); - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public DriverDescription getDriver(DriverDescription driver) + +public void identifyPerformanceModels() { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +Enumeration subscriberTableEnumeration = nu - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + +public void pullInformationFromDoors() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public long getQueryID() + +public void insertValuesInDataBase() { -return this. queryID; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public void setQueryID( long id) + + + public void createExecuteString() { -this. queryID = id; - } - public String toString() +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"89 ""Event Line -protected int top, left, right, bottom; +Connection conn = null; + +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public EventLine ( int t, int l, int r, int b) +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 + +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() { -top = t; -left = l; -right = r; -bottom = b; + 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 int GetT() { return top;} -public int GetL() { return left;} + 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 int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall send the customized message to each impacted executable model.,136,0 -"50 ""Driver Description +// 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 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 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 -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -this. projectName = projec + // database and eventserver information + S -public String getChangedAttribute() + public Notification_Processing() { -return changedAttribute; - } +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public String getDescription() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -return description; - } +try - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() +public static void main(String args[]) { -return 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 String getProjectName() - { -return projectName; - } - public String getRequirementID() +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -return requirementID; - } +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - public String getToAttribute() + + + private void saveMenuItemActionPerformed (ActionEvent evt) { -return toAttribute; - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public void setChangedAttribute(String changedAttribute) + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -this. changedAttribute = changedAttribute; +exitApplication(); } - public void setDescription(String description) + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. description = description; +openEventsMenuItemActionPerformed( evt); } - public void setFromAttribute(String fromAttribute) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -this. fromAttribute = fromAttribute; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -this. projectName = projectName; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -this. toAttribute = toAttribute; +new AboutDialog ( this, true). show(); } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - 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()) { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + "" +",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 -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +public DecomposeModel(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 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"95 ""Text Model +super( em); +MinimumNoRects = 3; + } -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) + // Construct Visual model for Merge Event +public void BuildEvent() { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - 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) +public StringBuffer GenerateEvent() { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 +"86 ""EB Shape -public void drawModel() -{ -repaint(); -} +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Only registered subscribers shall be allowed to establish traces.,102,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall be able to delete subscriptions.,107,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"88 ""Event Model +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -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 Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + public boolean match( int mx, int my) + { +return true; + } -public void getIP Server( String serverIP) + public int GetX() { -this. serverIP = serverIP; +return x; } - public void ClearVectors() + public int GetY() + { +return y; + } + + public Color GetC() { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +return c; + } + public String GetReqno() + { +return requirement No; + } -public void drawModel() -{ -repaint(); -} + public String GetProject() + { +return ProjectName; + } -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + 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 +"85 ""Decompose Model -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public DecomposeModel(EBT em) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +super( em); +MinimumNoRects = 3; } -} -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) + // Construct Visual model for Merge Event +public void BuildEvent() { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -public void CheckNotifyStatus() - { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) + +public StringBuffer GenerateEvent() { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( +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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - protected void BuildEvent(){} + private long queryID = 0; + public static int count = 0; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + 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; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + public Vector getDrivers() + { +return driverVector; } - else + + public String getName() { -Even +return name; + } + public void setName(String name) + { +this. name = name; + } -public String getrequirement Text(String r, String p, String m) + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -return new String(""""requirementwill go here""""); +} +else + this. driverVector. add( driver); } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"56 ""Event Parser + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -private Connection conn; - private ResultSet rs; - private Statement stmt; + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } - //EventParser Constructor - // initializes the Database connection - public EventParser() + 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: + 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 updateEvent(String str, String ID) + public long getQueryID() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + 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 +"62 ""Call Back -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +private Hash table requirementDescTable = new Hash table(); -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + + public void parseSpeculateInformation(String str) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - public void speculate(String str) +public void identifyPerformanceModels() { -System. out. println(""""Speculate""""); -CallBack +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public void impactReport(String str) +public void pullInformationFromDoors() { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"79 ""performance model Handler +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -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 insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - performance model Handler(String msg) + + public void createExecuteString() { -this. strES = msg; - } - public void messageParser() +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) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +Connection conn = null; -//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; +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +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 - public void saveModel( int id) +String msg=""""""""; + +public ModelDriver(String text) { -// save current model -database. saveCurrentModel( id); +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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() + public void init() { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +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 -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + +public MergeModel(EBT em) { -try { - while ( !_ started ) { -wait(); +super( em); + MinimumNoRects = 3; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } +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 +"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 - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - // database and eventserver information - S +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() +private void okButtonActionPerformed (ActionEvent evt) { - public void windowClosing(WindowEvent evt) + if ( displayMode == true) { -try +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public static void main(String args[]) - { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -try +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} -// 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 GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - private void saveMenuItemActionPerformed (ActionEvent evt) +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 + +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 { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +} +public void sendImpactReportToEventServer(String text) { -exitApplication(); - } - +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); - } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -if (! listModel. isEmpty()) +System. out. println(""""Inside Run method""""); +String str=""""""""; +try { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +// 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=""""""""; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) +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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,For speculative events; the eventserver shall construct a composite event message.,132,0 -"87 ""EBT +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 +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 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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; -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + private long queryID = 0; + public static int count = 0; - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + 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 boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -public void mouseReleased( java. awt. event.MouseEvente){} + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -public void mouseEntered( java. awt. event.MouseEvente){} + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -public void paint(Graphics g) {} + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public void update(Graphics g) {} + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public JSplitPane getSplitPane() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -return splitPane; -} + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + public void setQueryID( long id) + { +this. queryID = id; + } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public String toString() { -switch(EventList. getSelectedIndex()) +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 void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); +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 (); } -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Only registered subscribers shall be allowed to establish traces.,102,0 -"69 ""Notification Event -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim +// 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 Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + +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 -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public void ParseEvent(String TextLine) + DOORsThread(ServerSocket ss) { - 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 + theServer = ss; + count++; + taskNumber = count; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public void run() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve + 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 void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - // Speculate Gui - public Speculate Gui () + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"73 ""Constraints - super ("" Speculate GUI ""); +String id; + String name; + double value; + String logic; - container = get Content Pane (); - set Size ( 800 , 600 ); + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - // Submit Listener - public void action Performed ( Action Event e ) { + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - if ( e . get Source () == submit Button ) { - send Query TO Server (); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - } - if ( e . get Source () == fetch Button ) { + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - System . out . println ("" Fetch Button Pressed + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - void send Query TO Server () - { + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 - public void pull Value From DOORS () - { +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get + 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 ) - { - new Speculate Gui (); - }",46,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"47 ""Impact Report + } -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); + public String get Description () { + return this . description ; + } - private JPanel driver Inner Panel = null ; + public String get Logic () { + return this . logic ; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public String get Module Path () { + return this . module Path ; + } - public Impact Report () - { + public String get Project Name () { + return this . project Name ; + } - super ("""" Search Result GUI """"); + public String get Requirement ID () { + return this . requirement ID ; + } - container = get Content Pane (); + public String get Units () { + return this . units ; + } - set Size ( 800 , 250 ); + public String get Value () { + return this . value ; + } - panel = new JPanel (); + public void set Description ( String description ) { + this . description = description ; + } - panel . set Layout ( null ); + public void set Logic ( String logic ) { + this . logic = logic ; + } - this . server IP = - JOption Pane - . show In + 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 static void main ( String [] args ) - { + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - Impact Report im = new Impact Report (); + 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 Vector search Date () - { + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { + public String get Attribute () { + return this . attribute ; + } - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - pair Vector = new Vector (); + public String get Performance Model Name () { + return this . performance Model Name ; + } - query String Combo . remove All Items (); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - query String Combo . add Item ("""" Select Query String """"); + public String to String () { - Socket server ; - String line = new String (); + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - // Select Actions +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na - public void action Performed ( Action Event e ) - { - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 - // Button Actions +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); -public void action Performed ( Action Event e ) { +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"78 ""Notification Event +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public void impact Report ( String id ) +// 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 - // super ("""" Impact Report """"); - container = get Content Pane (); + 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 Size ( 1020 , 740 ); - this . query ID = id ; +// 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 - System . out . println ("""" Impact Report Constructor ..... ID """" + - public Vector get Constraint From Data Base () - { + //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 +"private JPanel center Panel = null ; - Vector v = new Vector (); + 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 server ; - String line = new String (); + // Speculate Gui + public Speculate Gui () + { - try - { - server = new Socket ( server IP , 1701 ); + super ("" Speculate GUI ""); - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () - { - Vector v = new Vector (); + // Submit Listener - Socket server ; - String line = new String (); + public void action Performed ( Action Event e ) { - try - { - server = new Socket ( server IP , 1701 ); + if ( e . get Source () == submit Button ) { - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A user shall register as a subscriber.,103,0 -"95 ""Text Model + send Query TO Server (); -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 + if ( e . get Source () == fetch Button ) { - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + System . out . println ("" Fetch Button Pressed -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(); -} + void send Query TO Server () + { -public void drawModel() -{ -repaint(); -} + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + socket = new Socket ( ip , Port No ); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"82 ""Tokenizer + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + String project Name = this . proj Name Text . get -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +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= -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) + +private static class Precedence { -while( nextChar( ) ) +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +private static class Token { -return Character. isJavaIdentifierPart( ch ); -} +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; +} + /** - * Return an identifier read from input stream - * First character is already read into ch + * 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 String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - +public Token getToken - /** - * 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. +/** + * Construct an evaluator object. + * @param s the string containing the expression. */ -public String getNe - +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine /** - * 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 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 /** - * 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 + * Internal method that hides type-casting. + * Changed the method to support double */ -private +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote + /** + * Another internal method that hides type-casting. */ - -private void skip +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} /** - * 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. + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +private void processToken( Token lastToken ) { +System. out. printl -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +/* + * 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** + * 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 ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"53 ""Performance Model -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +/** + * 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 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 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 - public Vector getConstraints() - { -return constraintVector; - } +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - public Vector getDrivers() - { -return driverVector; - } +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s - public String getName() - { -return name; - } +public String GetSubscriberName() { return SubscriberName;} - public void setName(String name) - { -this. name = name; - } +public String GetSubscriberReqno() { return SubscriberReqno;} - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } +public String GetSubscriberModule() { return SubscriberModule;} - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +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 void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } +private String queryID; + private String queryString; - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } + public Pair(String queryID, String queryString) { - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. queryID = queryID; +this. queryString = queryString; - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this + } - public long getQueryID() - { + public String getQueryID() { return this. queryID; } - public void setQueryID( long id) - { -this. queryID = id; + public String getQueryString() { +return this. queryString; } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall immediately process speculative events.,116,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + public void setQueryID(String queryID) { +this. queryID = queryID ; } - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall send the customized message to each impacted executable model.,136,0 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - - -public Requirement() {// empty constructor - -} - -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + public void setQueryString(String queryString) { +this. queryString = queryString; } - - 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 toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 + }"" +",52,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 "52 ""Pair private String queryID; @@ -9147,453 +8974,346 @@ return """"Query ID: """" }"" -",52,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c +",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; - // Speculate Gui + /** +* 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 Speculate Gui () + synchronized public void waitDone() { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - super ("" Speculate GUI ""); +/** +* 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 ( 800 , 600 ); +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - // Submit Listener - public void action Performed ( Action Event e ) { + /** +* 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 - if ( e . get Source () == submit Button ) { +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - send Query TO Server (); - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - if ( e . get Source () == fetch Button ) { - System . out . println ("" Fetch Button Pressed + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - void 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 - 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 void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include adding new requirements.,121,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + 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 - 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 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 void saveModel( int id) +public MergeModel(EBT em) { -// save current model -database. saveCurrentModel( id); +super( em); + MinimumNoRects = 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +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 -// 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 +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - System. o +owner = 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 +/** + * 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 ; - public String getErrorMessage() - { - return errMsg; - } + 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 boolean Contains(String ContextString, String SearchString) + public Speculate Gui () { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + super ("" Speculate GUI ""); -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + container = get Content Pane (); + set Size ( 800 , 600 ); -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + // Submit Listener -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"76 ""Evaluator + public void action Performed ( Action Event e ) { -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= + if ( e . get Source () == submit Button ) { + send Query TO Server (); -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[ ] -{ + if ( e . get Source () == fetch Button ) { -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + System . out . println ("" Fetch Button Pressed -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 { + void send Query TO Server () + { -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + String ip = this . event Server IP ; + int Port No = 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 + Socket socket ; + try { -/** - * 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 + socket = new Socket ( ip , Port No ); -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte + Output Stream os = socket . get Output Stream (); + Output Stream + public void pull Value From DOORS () + { -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + 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 /** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. + * Symbol represents what will be placed on the stack. */ -private void processToken( Token lastToken ) { -System. out. printl - +private static class Symbol +{ +public chartoken; +public int theLine; -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. */ -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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} /** - * 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. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** - * Construct a connection object. - * @param Returns an object of type Connection + * Print an error message if clSym does not match opSym. + * Update errors. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +private void checkMatch( Symbol opSym, Symbol clSym ) { - Class. fo - - - - /** -* 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 - +if( opSym. token == '(' && clSym. token != ')' || -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 + * 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; @@ -9685,217 +9405,24 @@ this. name = name; public void setValue( double value) { this. value = value; }"" -",73,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"92 ""New Model +",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 -public NewModel(EBT em) -{ -super( em); - } +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + // database and eventserver information + S - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } - - - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e - - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - - // database and eventserver information - S - - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener( new WindowAdapter() { @@ -9986,968 +9513,925 @@ try while ( rs. next()) { "" -",70,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"60 ""Thread Pool +",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 -/** -* 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); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. + 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 -*/ - 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall be able to delete subscriptions.,107,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; +conn = this. getConnect - 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; - } +/** +* 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 getDrivers() + /** +* 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() - { -return name; - } - public void setName(String name) +public void solveStructureEquation() { -this. name = name; - } +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) +public void getTrackVariableName() { -this. driverVector. remove( driver); - } +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) +public void setCalculatedValues() { -this. constraintVector. add( 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 - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) + public Vector getImpactReport() { -this. constraintVector. remove( 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"74 ""database - public 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 +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - public long getQueryID() - { -return this. queryID; - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } - +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; - } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +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 - /** -* 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 Vector getImpactReport() { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException +//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 -/** -* 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 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 -/** -* 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 showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } +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(); +} - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall send the customized message to each impacted executable model.,136,0 -"58 ""Subscribed Model +public void drawModel() +{ +repaint(); +} -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) +protected void paintComponent(Graphics g) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + super. paintComponent( g); -public String GetSubscriberName() { return SubscriberName;} +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 -public String GetSubscriberReqno() { return SubscriberReqno;} +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 GetSubscriberModule() { return SubscriberModule;} + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,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; + + + //@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 String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. + * Constructor. + * @param inStream the stream containing a program. */ -private static class Symbol +public Tokenizer( Reader inStream ) { -public chartoken; -public int theLine; +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. + +/** + * 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( ) { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +while( nextChar( ) ) +{ + /** - * 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"49 ""Constraints Description +private String getRemainingString( ) +{ +String result = """""""" + ch; -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +for( ; nextChar( ); result += ch ) - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + /** + * Return 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 - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} - public String get Description () { - return this . description ; - } +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +/** + * 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 get Project Name () { - return this . project Name ; - } +private void skip - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +/** + * 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 Value () { - return this . value ; - } +String id; + String name; + double value; + String logic; - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +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 String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - 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 logic. +* @return String +*/ + public String getLogic() { +return logic; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - public String get Attribute () { - return this . attribute ; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - 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 id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public String to String () { + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - 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 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 -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"71 ""Requirement +public RefineModel(EBT em) +{ +super( em); + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() -{ -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include merging requirements.,126,0 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); - } - - -// Construct Visual model for Merge Event + // 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 - +CurrentEvent = 3; +} public StringBuffer GenerateEvent() - { +{ StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); +thisEvent. append(""""Refine|0|""""); thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"71 ""Requirement +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 +"83 ""Variable -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +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 Requirement() -{ -} -public Object clone() throws CloneNotSupportedException + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +this. id = id; +this. type = type; +this. - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include merging requirements.,126,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic - private String 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 String toString() { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -this. projectName = projec -public String getChangedAttribute() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return changedAttribute; +return id; } - public String getDescription() - { -return description; - } - public String getFromAttribute() + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -return fromAttribute; +return logic; } - public String getModulePath() - { -return modulePath; - } - public String getProjectName() + /** +* Returns the name. +* @return String +*/ + public String getName() { -return projectName; +return name; } - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() - { -return toAttribute; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = 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() - { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - 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() - { + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + /** +* 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +protected int top, left, right, bottom; - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try +public EventLine ( int t, int l, int r, int b) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +top = t; +left = l; +right = r; +bottom = b; +} - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"58 ""Subscribed Model +public int GetT() { return top;} -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +public int GetL() { return left;} -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"71 ""Requirement + // 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 m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +public StringBuffer GenerateEvent() { -} +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int 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 -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member - public Impact Report () - { - super ("""" Search Result GUI """"); +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 - container = get Content Pane (); +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - set Size ( 800 , 250 ); - panel = new JPanel (); + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + 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 static void main ( String [] args ) - { + 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 - Impact Report im = new Impact Report (); - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public Vector search Date () +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); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 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 (); @@ -11047,34 +10531,62 @@ public void action Performed ( Action Event e ) { if ( server . is Connected () ) { Buffered"" -",47,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall be able to construct speculative queries using a GUI.,115,0 -"58 ""Subscribed Model +",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 -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +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 SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -public String GetSubscriberName() { return SubscriberName;} +panel = new JPanel(); -public String GetSubscriberReqno() { return SubscriberReqno;} +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public String GetSubscriberModule() { return SubscriberModule;} +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 -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -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 + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 "74 ""database @@ -11176,65 +10688,120 @@ 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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,For speculative events; the eventserver shall construct a composite event message.,132,0 -"79 ""performance model Handler +",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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + + //@param argsNo arguments are used. + public static void main(String args[]) + { +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 - performance model Handler(String msg) +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) { -this. strES = msg; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public void messageParser() + + public void Updaterequirement Info(String rno, String pname, String mname) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -//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 boolean match( int mx, int my) + { +return true; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public int GetX() + { +return x; } - public void saveModel( int id) + public int GetY() { -// save current model -database. saveCurrentModel( id); +return y; } + public Color GetC() +{ +return c; + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public String GetReqno() + { +return requirement No; } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; }"" -",79,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 +",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; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 "70 ""Notification Processing // member variables for menu @@ -11341,327 +10908,187 @@ try while ( rs. next()) { "" -",70,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"95 ""Text Model +",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 -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -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 + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public void showText(EBShape sh) +addWindowListener( new WindowAdapter() { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + public void windowClosing(WindowEvent evt) + { +try -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi -public void ShowInfo( int CE) +public static void main(String args[]) + { +try { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { -repaint(); -} - - -protected void paintComponent(Graphics g) +try { - super. paintComponent( g); +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"53 ""Performance Model -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +// 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 long queryID = 0; - public static int count = 0; - public PerformanceModel(String name, long queryID) + private void saveMenuItemActionPerformed (ActionEvent evt) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -return driverVector; +exitApplication(); } - public String getName() - { -return name; - } - public void setName(String name) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. name = name; +openEventsMenuItemActionPerformed( evt); } - public void addDriver(DriverDescription driver) + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -if ( driverVector. contains( driver)) +if (! listModel. isEmpty()) { -} -else - this. driverVector. add( driver); - } + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -return this. driverVector. contains( driver); - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -return this. constraintVector. contains( constraint); +new AboutDialog ( this, true). show(); } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) +void UpdateDisplayList() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { - dd = (DriverDescription) this. driverVector. get( i) - - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this + "" +",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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; - public long getQueryID() - { -return this. queryID; - } + /** +* 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 setQueryID( long id) + synchronized public void waitDone() { -this. queryID = id; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - public String toString() +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"74 ""database +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e -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 +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - 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 +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -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() + synchronized public void workerEnd() { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); +_ activeThreads--; +notify(); } -// Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve - - -public StringBuffer GenerateEvent() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 +_ activeThreads = 0; + }"" +",59,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 "69 ""Notification Event public String m_SubscriberName = """"""""; @@ -11705,133 +11132,224 @@ public void DisplayValues() System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); System. out. println("""" m_EventI"" -",69,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"73 ""Constraints +",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 -String id; - String name; - double value; - String logic; +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + 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 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"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 ; + } - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; + public String get Description () { + return this . description ; } + public String get Logic () { + return this . logic ; + } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public String get Module Path () { + return this . module Path ; } + public String get Project Name () { + return this . project Name ; + } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public String get Requirement ID () { + return this . requirement ID ; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public void set Description ( String description ) { + this . description = description ; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Logic ( String logic ) { + this . logic = logic ; } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void set Project Name ( String project Name ) { + this . project Name = project Name ; } + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"66 ""Config Dialog + public void set Units ( String units ) { + this . units = units ; + } -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } -// 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 set Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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; @@ -11923,102 +11441,521 @@ this. name = name; public void setValue( double value) { this. value = value; }"" -",73,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"94 ""Refine Model +",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 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - +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 - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; +public ModifyModel(EBT em) +{ +super( em); } - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"52 ""Pair + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -private String queryID; - private String queryString; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + 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 - } +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - public String getQueryID() { -return this. queryID; + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - public String getQueryString() { -return this. queryString; + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } - public void setQueryID(String queryID) { -this. queryID = queryID ; + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - public void setQueryString(String queryString) { -this. queryString = queryString; + +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 + { +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 +"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 + + +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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - }"" -",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 + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 @@ -12120,7 +12057,25 @@ 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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; + + + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 "48 ""Constraint Inner Panel private String server IP = """" local host """"; @@ -12186,200 +12141,280 @@ public JPanel get Panel () { return panel ; }"" -",48,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"74 ""database - +",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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get + public String get Description () { + return this . description ; + } - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"60 ""Thread Pool + +/** +* The threads in the pool. */ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); /** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable +* 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 injectVa + pub + /** -* 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) +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -public void solveStructureEquation() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -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. waitBegin(); +done. waitDone(); + } protected void finalize() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +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 + // Speculate Gui -public void setCalculatedValues() + public Speculate Gui () { -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 + super ("" Speculate GUI ""); - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"91 ""Modify Model + container = get Content Pane (); -public ModifyModel(EBT em) -{ -super( em); - } + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + // Submit Listener -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"66 ""Config Dialog + send Query TO Server (); -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + } + if ( e . get Source () == fetch Button ) { -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + System . out . println ("" Fetch Button Pressed -// 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 + void send Query TO Server () + { -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + String ip = this . event Server IP ; + int Port No = 1701 ; -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"89 ""Event Line + Socket socket ; + try { -protected int top, left, right, bottom; + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public int GetT() { return top;} + String [] attribute = { "" Value "", "" Attribute "" }; -public int GetL() { return left;} + String project Name = this . proj Name Text . get -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 + 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 "73 ""Constraints String id; @@ -12471,891 +12506,930 @@ 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"69 ""Notification Event +",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 +"76 ""Evaluator -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 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 Notification_Event() + +private static class Precedence { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +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 Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - 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 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 ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -if ( m_Eve +/** + * 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 DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"70 ""Notification Processing +/** + * 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 -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +/** + * 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 - // database and eventserver information - S - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -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 +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl -// action for """"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"""" +/* + * 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 saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ - // action for """"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 static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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; - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); } + public String getQueryID() { +return this. queryID; + } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"70 ""Notification Processing + public String getQueryString() { +return this. queryString; + } -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - // database and eventserver information - S + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + }"" +",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 -public static void main(String args[]) +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { try { - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + Class. 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; - private void saveMenuItemActionPerformed (ActionEvent evt) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -exitApplication(); - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -openEventsMenuItemActionPerformed( evt); - } +// 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"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + + public void speculate(String str) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +System. out. println(""""Speculate""""); +CallBack - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public void impactReport(String str) { -if (! listModel. isEmpty()) +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 +"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 { - int index = SubscriberList. getSelectedIndex(); - if ( index != -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[ ] +{ -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +private static class Token { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"84 ""White Board Execution Graph +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 { -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * 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 - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -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 + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -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++ +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +/* + * 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 timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target + /** + * 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 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 +/** + * 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 targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"88 ""Event Model -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"74 ""database +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); -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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +public void getIP Server( String serverIP) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +this. serverIP = serverIP; + } + + + public void ClearVectors() { - Class. fo +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} +public void drawModel() +{ +repaint(); +} - /** -* 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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -/** -* 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 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 solveStructureEquation() +public void CheckNotifyStatus() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -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 BuildEvent(){} -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 + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public Vector getImpactReport() +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"75 ""Driver +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() + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 id; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } + public Vector getConstraints() + { +return constraintVector; + } - /** -* Returns the name. -* @return String -*/ - public String getName() + public Vector getDrivers() { -return name; +return driverVector; } + public String getName() + { +return name; + } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void setName(String name) { -return valueFrom; +this. name = name; } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - public double getValueTo() + public void removeDriver(DriverDescription driver) { -return valueTo; +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void addConstraint(ConstraintsDescription constraint) { -this. id = id; +this. constraintVector. add( constraint); } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + public void removeConstraint(ConstraintsDescription constraint) { -this. name = name; +this. constraintVector. remove( constraint); } + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -this. valueFrom = valueFrom; +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 void setValueTo( double value) + public String toString() { -this. valueTo = valueTo; - }"" -",75,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"50 ""Driver Description +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 -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +String msg=""""""""; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin +public ModelDriver(String text) + { +this. msg = text; +init(); + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + 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 -this. projectName = projec +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; -public String getChangedAttribute() + 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"94 ""Refine Model -public RefineModel(EBT em) +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: Delete subscriptions (2.2.3) 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; +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 - /** -* 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 = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - 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() + //@param argsNo arguments are used. + public static void main(String args[]) { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +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 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) { -_ activeThreads--; -notify(); - } +try - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +public static void main(String args[]) { -_ activeThreads = 0; - }"" -",59,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall re execute the model using the speculative values.,117,0 -"50 ""Driver Description +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -private 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 +// 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + + private void saveMenuItemActionPerformed (ActionEvent evt) { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -this. projectName = projec -public String getChangedAttribute() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -return changedAttribute; +exitApplication(); } - public String getDescription() - { -return description; - } - public String getFromAttribute() + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -return fromAttribute; +openEventsMenuItemActionPerformed( evt); } - public String getModulePath() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -return modulePath; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public String getProjectName() + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -return projectName; - } +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public String getRequirementID() + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -return requirementID; +new AboutDialog ( this, true). show(); } - 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) +void UpdateDisplayList() { -this. fromAttribute = fromAttribute; - } - - public void setModulePath(String modulePath) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { -this. modulePath = modulePath; - } + "" +",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 - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +protected int top, left, right, bottom; - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - 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 int GetT() { return top;} -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +public int GetL() { return left;} +public int GetR() { return right;} -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 +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 //Driver data members @@ -13428,85 +13502,127 @@ public double targetResponseTimeAfter(){ System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); targetResponse time = timeToBroadcastShapeAfter() + timeToBroadcastText() + w"" -",84,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"94 ""Refine Model +",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 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +repaint(); +} - 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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -// finds the subscribers for this requirement - public void IdentifySubscribers() - { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +public void Clicked ( int x, int y) { - System. o +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - public void Dispatch +public void 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 getErrorMessage() + 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 { - return errMsg; +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -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 + + 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 @@ -13534,364 +13650,217 @@ StringBuffer temp = new StringBuffer(); int MergeCount = -1; thisEvent. append(""""Merge|""""); for ( int i = 0; i < EventSha"" -",90,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"74 ""database - +",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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + // database and eventserver information + S + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent 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 +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 - /** -* 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 """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -conn = this. getConnect +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" -/** -* 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) + private void saveMenuItemActionPerformed (ActionEvent evt) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -public void solveStructureEquation() + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +exitApplication(); + } -public void getTrackVariableName() + // action for """"Open Events"""" 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 - +openEventsMenuItemActionPerformed( evt); + } -public void setCalculatedValues() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (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 +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public Vector getImpactReport() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -//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 +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - +new AboutDialog ( this, true). show(); } -public Vector get Values From Data Base () +void UpdateDisplayList() { - 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 ) +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { + "" +",70,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"80 ""Requirement - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +public Requirement() {// empty constructor - 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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + 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 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -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 +/** +* 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 getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try +/** +* 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""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return driverVector; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public String getName() - { -return name; - } - public void setName(String name) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -this. name = name; - } - - public void addDriver(DriverDescription driver) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -if ( driverVector. contains( driver)) -{ +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); } -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; +done. waitDone(); } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"78 ""Notification Event +}"" +",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 = """"""""; @@ -13900,150 +13869,183 @@ 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include deleting a requirement.,125,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include merging requirements.,126,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + 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; -public Requirement() -{ -} + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ -public Object clone() throws CloneNotSupportedException + synchronized public void waitDone() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - public void Updaterequirement Info(String rno, String pname, String mname) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +_ activeThreads++; +_ started = true; +notify(); } - public boolean match( int mx, int my) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -return true; +_ activeThreads--; +notify(); } - public int GetX() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -return x; - } +_ 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); - public int GetY() - { -return y; - } - public Color GetC() +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -return c; - } +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub - public String GetReqno() - { -return requirement No; - } - public String GetProject() + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return ProjectName; - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public String GetModule() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -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 +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 @@ -14167,230 +14169,113 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"53 ""Performance Model +",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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - private long queryID = 0; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public static int count = 0; - public PerformanceModel(String name, long queryID) + performance model Handler(String msg) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +this. strES = msg; } - public Vector getConstraints() + public void messageParser() { -return constraintVector; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public Vector getDrivers() - { -return driverVector; - } - public String getName() - { -return name; - } +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + public void saveModel( int id) { -return this. driverVector. contains( driver); +// save current model +database. saveCurrentModel( id); } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + //@param argsNo arguments are used. + public static void main(String args[]) { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; - } - - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() - { -return constraintVector; - } - - public Vector getDrivers() - { -return driverVector; - } - - public String getName() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -return name; - } + 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 void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) +public DecomposeModel(EBT em) { -} -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); +super( em); +MinimumNoRects = 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++) + // Construct Visual model for Merge Event +public void BuildEvent() { - cd = (ConstraintsDescription) this + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - public long getQueryID() - { -return this. queryID; - } - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include merging requirements.,126,0 +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 String m_SubscriberName = """"""""; @@ -14441,735 +14326,279 @@ public void DisplayValues() { System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" "" -",78,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A user shall register as a subscriber.,103,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include modifying a requirement.,124,0 -"64 ""DOORs Thread Pool +",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 final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 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 - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public Notification_Processing() { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"60 ""Thread Pool +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -/** -* 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); +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) +public static void main(String args[]) + { +try { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { -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 +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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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; + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } - public Pair(String queryID, String queryString) { + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -this. queryID = queryID; -this. queryString = queryString; - } + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; - } +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 - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - }"" -",52,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -/** -* 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++) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub +WorkArea. showText( sh); + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public boolean mouseDown( java. awt.Evente, int x, int y) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + return true; + } - /** -* 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 boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } -}"" -",60,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() -{ +public void mouseExited( java. awt. event.MouseEvente){} - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +return splitPane; +} -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public void valueChanged(ListSelectionEvent e) { - try - { -N +if ( e. getValueIsAdjusting()) +return; +} -void DeleteEvent(String SubscriberName, String EventID) - { -try +private class ValueReporter implements ListSelectionListener { - int i, j=-1; - for ( i=0; i< events. size(); i++) +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +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""""); -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +mainframe. addWindowListener( new WindowAdapter() { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - - - -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) - { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req - - -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - - - // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response -private boolean Check_Subscription(String ip, - int PortNo, - String SubscriberName, - String Requirement // Takes an event string returned from the eventserver and -// extracts True or False response - - - -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - +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; /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include modifying a requirement.,124,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec - -public String getChangedAttribute() - { -return changedAttribute; - } - - public String getDescription() - { -return description; - } - - public String getFromAttribute() - { -return fromAttribute; - } - - public String getModulePath() - { -return modulePath; - } - - public String getProjectName() - { -return projectName; - } - - public String getRequirementID() - { -return requirementID; - } - - public String getToAttribute() - { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - - public void setDescription(String description) - { -this. description = description; - } - - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } +* 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 createKey() + synchronized public void waitDone() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - 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() +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); +try { + while ( !_ started ) { +wait(); } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A user shall register as a subscriber.,103,0 -"90 ""Merge Model +} catch ( InterruptedException e -public MergeModel(EBT em) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -super( em); - MinimumNoRects = 3; +_ activeThreads++; +_ started = true; +notify(); } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - - -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} - - -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button - - -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} - -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; - - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () - { - - super ("""" Search Result GUI """"); - - container = get Content Pane (); - - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); - - this . server IP = - JOption Pane - . show In - - - public static void main ( String [] args ) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { - - Impact Report im = new Impact Report (); - +_ activeThreads--; +notify(); } - 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 () + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +_ 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 @@ -15261,869 +14690,661 @@ JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); mainframe. addWindowListener( new WindowAdapter() { public void windowClosing(Wind"" -",87,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall re execute the model using the speculative values.,117,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +",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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; - 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 +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -// 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 +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { -String sName, sReqno, sModule, sKey1, sKey2; -try +/** + * Scan for and execute tasks. + */ +public void run() { - System. o +Runnable target = null; - // 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. +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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 - public void Dispatch +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public String getErrorMessage() + DOORsThread(ServerSocket ss) { - return errMsg; + theServer = ss; + count++; + taskNumber = count; } - public boolean Contains(String ContextString, String SearchString) + public void run() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall immediately process speculative events.,116,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + while( true) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - + 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 - /** -* 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 Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - /** -* 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 parseSpeculateInformation(String str) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public void solveStructureEquation() +public void identifyPerformanceModels() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public void getTrackVariableName() +public void pullInformationFromDoors() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public void setCalculatedValues() +public void insertValuesInDataBase() { -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 +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - public Vector getImpactReport() + + public void createExecuteString() { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s -public String GetSubscriberName() { return SubscriberName;} +public void parseImpactReport(String str) + { -public String GetSubscriberReqno() { return SubscriberReqno;} +Connection conn = null; -public String GetSubscriberModule() { return SubscriberModule;} +Statement stmt = null; -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +Vector constraintsVector = null; +Vector driversVector = null; -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"83 ""Variable +ConstraintsDescription constraint = 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 +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 - //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 Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); -//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 Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= 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 + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -public String toString() +public void identifyPerformanceModels() { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Returns the id. -* @return int -*/ - public String getId() +public void pullInformationFromDoors() { -return id; - } +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - /** -* Returns the logic. -* @return String -*/ - public String getLogic() +public void insertValuesInDataBase() { -return logic; - } +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - /** -* Returns the name. -* @return String -*/ - public String getName() + + public void createExecuteString() { -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; +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: Delete subscriptions (2.2.3) 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=""""""""; - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; +public ModelDriver(String text) + { +this. msg = text; +init(); } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,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 - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; +public NewModel(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); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - /** -* 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(""""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; - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + 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; - // 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) +//Check if a subscription exists + public boolean CheckSubscription(String str) { - setTitle(""""EventsProcessor""""); -addWindowListener( new WindowAdapter() -{ +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +//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 -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -Notification +// 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 First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try + public void speculate(String str) { -Notification_Event nEvt1 = (Notificati +System. out. println(""""Speculate""""); +CallBack -/ 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 impactReport(String str) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - - +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -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 GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - // 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 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 +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 boolean Analyze_CheckSubscription(String str) +private static class Precedence { -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,For speculative events; the eventserver shall construct a composite event message.,132,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } - - - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - - - public boolean match( int mx, int my) - { -return true; - } - - - public int GetX() - { -return x; - } - - - public int GetY() - { -return y; - } +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - public Color GetC() +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } - - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"89 ""Event Line -protected int top, left, right, bottom; +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public EventLine ( int t, int l, int r, int b) +private static class Token { -top = t; -left = l; -right = r; -bottom = b; -} +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { -public int GetT() { return top;} +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -public int GetL() { return left;} +/** + * 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 int GetR() { return right;} +/** + * 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 int GetB() { return bottom;}"" -",89,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"82 ""Tokenizer +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte /** - * Constructor. - * @param inStream the stream containing a program. + * Internal method that hides type-casting. + * Changed the method to support double */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -/** - * Gets current line number. - * @return current line number. + /** + * Another internal method that hides type-casting. */ -public int getLineNumber( ) -{ -return currentLine; +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); } /** - * Gets error count. - * @return error count. + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. */ -public int getErrorCount( ) -{ -return errors; -} +private void processToken( Token lastToken ) { +System. out. printl -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP /** - * Return true if ch can be part of a Java identifier + * Internal routine to compute x^ n. */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. /** - * Return an identifier read from input stream - * First character is already read into ch + * 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 getRemainingString( ) -{ -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) +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 +"80 ""Requirement - /** - * 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"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 Requirement() {// empty constructor + } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ -private void skip +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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; -/** - * 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"62 ""Call Back - +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -private Hash table requirementDescTable = new Hash table(); +public String GetSubscriberName() { return SubscriberName;} - private Hash table constraintDescTable = new Hash table(); +public String GetSubscriberReqno() { return SubscriberReqno;} - private Hash table performanceModelTable = new Hash table(); +public String GetSubscriberModule() { return SubscriberModule;} - private PerformanceModel performance model= null +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"63 ""Doors Thread - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public void identifyPerformanceModels() + DOORsThread(ServerSocket ss) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + theServer = ss; + count++; + taskNumber = count; + } -public void pullInformationFromDoors() + public void run() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - -public void insertValuesInDataBase() + while( true) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + 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 - public void createExecuteString() + public Speculate Gui () { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - + super ("" Speculate GUI ""); -public void parseImpactReport(String str) - { + container = get Content Pane (); -Connection conn = null; + set Size ( 800 , 600 ); -Statement stmt = null; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + // Submit Listener -int driverLoop"" -",62,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Only registered subscribers shall be allowed to establish traces.,102,0 -"90 ""Merge Model + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } + send Query TO Server (); + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + if ( e . get Source () == fetch 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 + System . out . println ("" Fetch Button Pressed -public MergeModel(EBT em) + void send Query TO Server () { -super( em); - MinimumNoRects = 3; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + Socket socket ; + try { + socket = new Socket ( ip , Port No ); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - - } - - public String getQueryID() { -return this. queryID; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public String getQueryString() { -return this. queryString; - } + public void pull Value From DOORS () + { - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public void setQueryString(String queryString) { -this. queryString = queryString; - } + String [] attribute = { "" Value "", "" Attribute "" }; - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + String project Name = this . proj Name Text . get - }"" -",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 + 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 private Connection conn; @@ -16191,155 +15412,181 @@ public void impactReport(String str) CallBack cb = new CallBack(); cb. parseImpactReport( str); }// end impactReport()"" -",56,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"48 ""Constraint Inner Panel +",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 -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 +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 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; + } -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + /** +* Returns the id. +* @return int +*/ + public String getId() { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +return id; + } + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; } -public Vector get Values From Data Base () + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +return valueFrom; + } - if ( server . is Connected () ) - { - Buffered R + public double getValueTo() + { +return valueTo; + } - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public JPanel get Panel () + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { - return panel ; +this. valueFrom = valueFrom; + } + + + public void setValueTo( double value) + { +this. valueTo = valueTo; }"" -",48,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include modifying a requirement.,124,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"51 ""Driver Inner Panel +",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 -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"77 ""Model Driver -String msg=""""""""; + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -public ModelDriver(String text) - { -this. msg = text; -init(); - } +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 init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A user shall register as a subscriber.,103,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The prototype system shall utilize a driver to trigger events.,120,0 -"89 ""Event Line -protected int top, left, right, bottom; +public 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 EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = 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++){ -public int GetT() { return top;} -public int GetL() { return left;} + 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 GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A user shall register as a subscriber.,103,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall immediately process speculative events.,116,0 -"90 ""Merge Model + public 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 MergeModel(EBT em) - { +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ super( em); - MinimumNoRects = 3; } @@ -16347,589 +15594,482 @@ 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"82 ""Tokenizer +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + protected void paintComponent(Graphics g) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 +public RefineModel(EBT em) +{ +super( em); + } -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -return currentLine; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +public StringBuffer GenerateEvent() { -return errors; -} +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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int 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( ) ) -{ + 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 true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +public String getNextID() + { +try { -return Character. isJavaIdentifierPart( ch ); -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -String result = """""""" + ch; + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -for( ; nextChar( ); result += ch ) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. 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 + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" 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( ) -{ -if( ch == '\ n' ) -currentLine--; + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - +{ + 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;/ -/** - * 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 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 -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi -private void skip +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * 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( ) +String sName, sReqno, sModule, sKey1, sKey2; +try { -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"82 ""Tokenizer + System. o + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public void Dispatch -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + public String getErrorMessage() + { + return errMsg; + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Delete subscriptions (2.2.3) 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 +"70 ""Notification Processing -/** - * 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( ) ) -{ +// 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); - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +addWindowListener( new WindowAdapter() { -return Character. isJavaIdentifierPart( ch ); -} + public void windowClosing(WindowEvent evt) + { +try -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +public static void main(String args[]) + { +try { -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( ) + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() { -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 reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ +// 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 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( ) + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; -this. queryID = queryID; -this. queryString = queryString; + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - }"" -",52,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"61 ""Worker Thread +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"72 ""Balance /** -* True if this thread is currently processing. + * Symbol represents what will be placed on the stack. */ -public boolean busy; +private static class Symbol +{ +public chartoken; +public int theLine; -/** - * The thread pool that this object belongs to. +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. */ -public ThreadPool owner; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public Balance( Reader inStream ) { -owner = o; +errors = 0; +tok = new Tokenizer( inStream ); } /** - * Scan for and execute tasks. + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) +public int checkBalance( ) { - target. run(); - owner. done. worker"" -",61,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"85 ""Decompose Model +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public DecomposeModel(EBT em) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -super( em); -MinimumNoRects = 3; - } +if( opSym. token == '(' && clSym. token != ')' || - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + /** + * 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 +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - 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() + /** + * 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 - 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 + /** +* 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 searchDate() + /** +* 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) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +conn = this. getConnect -public String searchQueryID(String date) +/** +* 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) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public String getConstraintFromDataBase(String queryID) +public void solveStructureEquation() { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public String getDriverFromDataBase(String queryID) +public void getTrackVariableName() { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"52 ""Pair - -private String queryID; - private String queryString; +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse - public Pair(String queryID, String queryString) { +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 -this. queryID = queryID; -this. queryString = queryString; - } + 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 String getQueryID() { -return this. queryID; +public ModifyModel(EBT em) +{ +super( em); } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +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); }"" -",52,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; +",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 - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() -{ -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall be able to construct speculative queries using a GUI.,115,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +/** +* 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); /** @@ -16987,559 +16127,292 @@ for ( int i=0; i< threads. length; i++) { done. waitDone(); } }"" -",60,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"88 ""Event Model - - -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); +",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 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 - - -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement - public void ClearVectors() + public void showText(EBShape sh) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -public void drawModel() +public void ShowInfo( int CE) { -repaint(); +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); } - -public void drawModel(EBShape sh) +public void drawModel() { -EventShapes. setElementAt( sh, ESCursor); repaint(); } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +protected void paintComponent(Graphics g) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} - + super. paintComponent( g); -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) +if (HideMsg == true) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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. +*/ -public void CheckNotifyStatus() + synchronized public void waitDone() { -//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(){} - +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +/** +* 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 -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -Even +_ 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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;/ - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall be able to construct speculative queries using a GUI.,115,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include modifying a requirement.,124,0 -"61 ""Worker Thread + 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 -/** -* True if this thread is currently processing. - */ -public boolean busy; +// 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 -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +String sName, sReqno, sModule, sKey1, sKey2; +try { -owner = o; -} + 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. -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public void Dispatch -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + public String getErrorMessage() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; + return errMsg; } - public String toString() + public boolean Contains(String ContextString, String SearchString) { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + performance model Handler(String msg) { -return valueFrom; +this. strES = msg; } - - public double getValueTo() + public void messageParser() { -return valueTo; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void saveModel( int id) { -this. valueFrom = valueFrom; +// save current model +database. saveCurrentModel( id); } - public void setValueTo( double value) - { -this. valueTo = valueTo; + 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); }"" -",75,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"77 ""Model Driver +",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 -String msg=""""""""; +private String queryID; + private String queryString; -public ModelDriver(String text) - { -this. msg = text; -init(); - } + public Pair(String queryID, String queryString) { - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"75 ""Driver +this. queryID = queryID; +this. queryString = queryString; -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 String getQueryID() { +return this. queryID; } - - public double getValueTo() - { -return valueTo; + public String getQueryString() { +return this. queryString; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; + public void setQueryID(String queryID) { +this. queryID = queryID ; } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; + public void setQueryString(String queryString) { +this. queryString = queryString; } - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public void setValueTo( double value) - { -this. valueTo = valueTo; }"" -",75,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - - -//Check if a subscription exists - public boolean CheckSubscription(String str) - { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - - -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - - -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models - - - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack - - -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 +",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 private String project Name = null ; @@ -17673,787 +16546,779 @@ 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"63 ""Doors Thread +",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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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(); +} - DOORsThread(ServerSocket ss) + +public Object clone() throws CloneNotSupportedException { - theServer = ss; - count++; - taskNumber = count; - } +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - public void run() + 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 - while( true) - { - try + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"80 ""Requirement +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +if ( m_Eve +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"74 ""database -public Requirement() {// empty constructor -} +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and - 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 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 ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include modifying a requirement.,124,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Each artifact shall be placed under the control of a subscribermanager,106,0 -"private JPanel center Panel = null ; - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c + /** +* 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 - // Speculate Gui - public Speculate Gui () + /** +* 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 ("" Speculate GUI ""); - - container = get Content Pane (); - set Size ( 800 , 600 ); +/** +* 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 . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of 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 - // Submit Listener +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 ( e . get Source () == submit Button ) { +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 - send Query TO Server (); - } +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 ( e . get Source () == fetch Button ) { + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 - System . out . println ("" Fetch Button Pressed +// 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 - void send Query TO Server () + public Notification_Processing() { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - String ip = this . event Server IP ; - int Port No = 1701 ; +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - Socket socket ; - try { - socket = new Socket ( ip , Port No ); +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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - public static void main ( String [] args ) + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { - new Speculate Gui (); - }",46,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"77 ""Model Driver +exitApplication(); + } -String msg=""""""""; -public ModelDriver(String text) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. msg = text; -init(); +openEventsMenuItemActionPerformed( evt); } - - public void init() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -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) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - 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 +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { -repaint(); -} + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; -protected void paintComponent(Graphics g) + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { - super. paintComponent( g); + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); - } + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall re execute the model using the speculative values.,117,0 -"81 ""subscribermanager -Socket aSocket; - int ID; - String EventLog; +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models - Connection conn; - ResultSet rs; - Statement stmt; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + +public void impactReport(String str) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try +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 +"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; } -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 +/** + * 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( ) ) +{ - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"52 ""Pair -private String queryID; - private String queryString; + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; +/** + * 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 String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } + /** + * 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 setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ 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 ) { } +} - }"" -",52,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall restore the executable model to its prior state.,119,0 -"62 ""Call Back +/** + * 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 Hash table requirementDescTable = new Hash table(); +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - private Hash table constraintDescTable = new Hash table(); +private void skip - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +public ObsoleteModel(EBT em) +{ +super( em); + } - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -public void identifyPerformanceModels() +public StringBuffer GenerateEvent() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -public void insertValuesInDataBase() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - 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 get Description () { + return this . description ; + } -public void parseImpactReport(String str) - { + public String get Logic () { + return this . logic ; + } -Connection conn = null; + public String get Module Path () { + return this . module Path ; + } -Statement stmt = null; + public String get Project Name () { + return this . project Name ; + } -Vector constraintsVector = null; -Vector driversVector = null; + public String get Requirement ID () { + return this . requirement ID ; + } -ConstraintsDescription constraint = null; + public String get Units () { + return this . units ; + } -int driverLoop"" -",62,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include merging requirements.,126,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall receive event messages when a requirement changes.,127,0 -"51 ""Driver Inner Panel + public String get Value () { + return this . value ; + } -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 set Description ( String description ) { + this . description = description ; + } - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + public void set Logic ( String logic ) { + this . logic = logic ; + } -panel = new JPanel(); + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } -return panel; - }"" -",51,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"71 ""Requirement + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void set Units ( String units ) { + this . units = units ; + } -public Requirement() -{ -} + public void set Value ( String units ) { + this . value = units ; + } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + public String get Impacted Constraint () { + return this . impacted Constraint ; } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - 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 Attribute () { + return this . attribute ; + } -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include modifying a requirement.,124,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"77 ""Model Driver + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -String msg=""""""""; + public String get Performance Model Name () { + return this . performance Model Name ; + } -public ModelDriver(String text) - { -this. msg = text; -init(); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - private PerformanceModel performance model= null +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 parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public void pullInformationFromDoors() + DOORsThread(ServerSocket ss) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + theServer = ss; + count++; + taskNumber = count; + } -public void insertValuesInDataBase() + public void run() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - public void createExecuteString() + while( true) { - -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) + try { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"89 ""Event Line - -protected int top, left, right, bottom; - - -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +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 { -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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -private static class Token + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -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( opSym. token == '(' && clSym. token != ')' || -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. + /** + * 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 Token getToken +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 /** - * Construct an evaluator object. - * @param s the string containing the expression. +* True if this thread is currently processing. */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - +public boolean busy; /** - * Internal method that hides type-casting. - * Changed the method to support double + * The thread pool that this object belongs to. */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public ThreadPool owner; - /** - * Another internal method that hides type-casting. +/** + * The constructor. + * + * @param o the thread pool */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +WorkerThread(ThreadPool o) +{ +owner = o; } /** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. + * Scan for and execute tasks. */ -private void processToken( Token lastToken ) { -System. out. printl +public void run() +{ +Runnable target = null; +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 -/* - * 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 ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -/** - * 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. - */ +// 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 static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include deleting a requirement.,125,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"92 ""New Model +// 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 NewModel(EBT em) +public ModifyModel(EBT em) { super( em); } @@ -18462,79 +17327,28 @@ super( em); // Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +CurrentEvent = 4; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); +thisEvent. append(""""Modify|0|""""); thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall immediately process speculative events.,116,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - - - performance model Handler(String msg) - { -this. strES = msg; - } - - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + ebs = (EBShape)EventShapes -//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; - - -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); +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); }"" -",79,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 +",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 public String m_SubscriberName = """"""""; @@ -18585,179 +17399,126 @@ public void DisplayValues() { System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" "" -",78,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"83 ""Variable +",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 -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 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); - //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 EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public void getIP Server( String serverIP) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +this. serverIP = serverIP; + } -//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 ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} +public void drawModel() +{ +repaint(); +} -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* 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; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +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 ((((( - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + protected void BuildEvent(){} - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } + else + { +Even - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - /** -* 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 + 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; @@ -18849,412 +17610,485 @@ this. valueFrom = valueFrom; { this. valueTo = valueTo; }"" -",75,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"56 ""Event Parser +",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 ResultSet rs; + private Connection conn; private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - //EventParser Constructor - // initializes the Database connection - public EventParser() + EventServerThread(ServerSocket ss) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -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) + while( true) { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +public String getNextID() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) +public String searchDate() { -// 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 dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void speculate(String str) +public String searchQueryID(String date) { -System. out. println(""""Speculate""""); -CallBack +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -public void impactReport(String str) + public String getConstraintFromDataBase(String queryID) { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"54 ""eventserver +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -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 getDriverFromDataBase(String queryID) { -p +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 +"73 ""Constraints -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"87 ""EBT +String id; + String name; + double value; + String logic; -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +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){} + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void paint(Graphics g) {} -public void update(Graphics g) {} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 JSplitPane getSplitPane() +public NewModel(EBT em) { -return splitPane; -} +super( em); + } -public void valueChanged(ListSelectionEvent e) + // Construct Visual model for Merge Event +public void BuildEvent() { -if ( e. getValueIsAdjusting()) -return; +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) +public StringBuffer GenerateEvent() { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +StringBuffer thisEvent = new StringBuffer(); +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 -mainframe. addWindowListener( new WindowAdapter() +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 void windowClosing(Wind"" -",87,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include modifying a requirement.,124,0 -"50 ""Driver Description +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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 String getChangedAttribute() - { -return changedAttribute; - } +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 getDescription() - { -return description; - } +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 String getFromAttribute() - { -return fromAttribute; - } + 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 getModulePath() - { -return modulePath; - } - public String getProjectName() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -return projectName; - } + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - public String getRequirementID() - { -return requirementID; } - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) +public Vector get Values From Data Base () { -this. changedAttribute = changedAttribute; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public void setDescription(String description) - { -this. description = description; - } + if ( server . is Connected () ) + { + Buffered R - public void setFromAttribute(String fromAttribute) + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () { -this. modulePath = modulePath; - } + 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 - public void setProjectName(String projectName) +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. projectName = projectName; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public void setRequirementID(String requirementID) + public Vector getConstraints() { -this. requirementID = requirementID; +return constraintVector; } - public void setToAttribute(String toAttribute) + public Vector getDrivers() { -this. toAttribute = toAttribute; +return driverVector; } - public String createKey() + public String getName() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +return name; } - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + public void setName(String name) { +this. name = name; + } -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() + public void addDriver(DriverDescription driver) { -int hashCode = 0; -if ( hashCode == 0) +if ( driverVector. contains( driver)) { - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - +} +else + this. driverVector. add( driver); + } -public EBShape( int xpos, int ypos, Color col) + public void removeDriver(DriverDescription driver) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. driverVector. remove( driver); } - - public void Updaterequirement Info(String rno, String pname, String mname) + public boolean containsDriver(DriverDescription driver) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return this. driverVector. contains( driver); } - - public boolean match( int mx, int my) + public void addConstraint(ConstraintsDescription constraint) { -return true; +this. constraintVector. add( constraint); } - - public int GetX() + public boolean containsConstraint(ConstraintsDescription constraint) { -return x; +return this. constraintVector. contains( constraint); } - - public int GetY() + public void removeConstraint(ConstraintsDescription constraint) { -return y; +this. constraintVector. remove( constraint); } - public Color GetC() + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { -return c; - } + dd = (DriverDescription) this. driverVector. get( i) - public String GetReqno() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -return requirement No; - } +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this - public String GetProject() + public long getQueryID() { -return ProjectName; +return this. queryID; } + public void setQueryID( long id) + { +this. queryID = id; + } - public String GetModule() + public String toString() { -return ModulePath; - }"" -",86,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +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 Requirement() {// empty constructor -} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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 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 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 + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 "55 ""eventserver Threadstatic private int count = 0; private int taskNumber; protected Done done; @@ -19329,423 +18163,469 @@ try { Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - +",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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +public ModifyModel(EBT em) +{ +super( em); } - 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(60,80,1); +CurrentEvent = 4; +} - public boolean match( int mx, int my) - { -return true; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public int GetX() - { -return x; - } + 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; + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - public int GetY() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -return y; - } + setTitle(""""EventsProcessor""""); - public Color GetC() +addWindowListener( new WindowAdapter() { -return c; - } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - public String GetModule() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -return ModulePath; - }"" -",86,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; - - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { +Notification - super ("""" Search Result GUI """"); - - container = get Content Pane (); - set Size ( 800 , 250 ); +// 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 = new JPanel (); - panel . set Layout ( null ); +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - this . server IP = - JOption Pane - . show In +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 static void main ( String [] args ) +void DeleteRelatedEvents() { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - Impact Report im = new Impact Report (); + m_Deleterequirement List. remove(0); - } - public Vector search Date () +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 - 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 ) +void UpdateDisplayList() { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - pair Vector = new Vector (); - - 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 ++) { - - 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 ; + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || - System . out . println ("""" Impact Report Constructor ..... ID """" + + /** + * 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 - public Vector get Constraint From Data Base () - { +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; - Vector v = new Vector (); +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s - Socket server ; - String line = new String (); +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} - try - { - server = new Socket ( server IP , 1701 ); +public String GetSubscriberModule() { return SubscriberModule;} - if ( server . is Connected () ) - { - Buffered +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 +"90 ""Merge Model - public Vector get Driver From Data Base () +public MergeModel(EBT em) { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; +super( em); + MinimumNoRects = 3; } - 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(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +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 + +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 logic. -* @return String -*/ - public String getLogic() { -return logic; - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +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 - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +// 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 name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"88 ""Event Model +// 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 +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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public EventModel(EBT e) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public void getIP Server( String serverIP) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -this. serverIP = serverIP; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public void ClearVectors() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +setVisible ( false); +dispose (); } -public void drawModel() -{ -repaint(); -} +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 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)); -} - - -protected void AddEventRect( int x, int y, int colorStatus) + 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { -if ( colorStatus == 1) +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public String getrequirement Text(String r, String p, String m) +public Balance( Reader inStream ) { -return new String(""""requirementwill go here""""); - } +errors = 0; +tok = new Tokenizer( inStream ); +} - public StringBuffer GenerateEvent() +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 public String m_SubscriberName = """"""""; @@ -19789,506 +18669,427 @@ public void DisplayValues() System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); System. out. println("""" m_EventI"" -",69,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"84 ""White Board Execution Graph +",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 -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +protected int top, left, right, bottom; - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} +public int GetT() { return top;} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public int GetL() { return left;} +public int GetR() { return right;} -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 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 -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 JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -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 EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - 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 boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -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 void mouseExited( java. awt. event.MouseEvente){} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +public void 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 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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"79 ""performance model Handler +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +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 - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +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 - 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 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 -//Re-execut -public String generateReport() +public void ShowInfo( int CE) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - public void saveModel( int id) +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 () { -// save current model -database. saveCurrentModel( id); - } + super ("" Speculate GUI ""); - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + container = get Content Pane (); - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"66 ""Config Dialog + set Size ( 800 , 600 ); -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + // Submit Listener + public void action Performed ( Action Event e ) { -// 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 + if ( e . get Source () == submit Button ) { + send Query TO Server (); -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + } -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"50 ""Driver Description + if ( e . get Source () == fetch 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 + System . out . println ("" Fetch Button Pressed -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + void send Query TO Server () { -this. projectName = projec + String ip = this . event Server IP ; + int Port No = 1701 ; -public String getChangedAttribute() - { -return changedAttribute; - } + Socket socket ; + try { - public String getDescription() - { -return description; - } + socket = new Socket ( ip , Port No ); - public String getFromAttribute() - { -return fromAttribute; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public String getModulePath() + public void pull Value From DOORS () { -return modulePath; - } - public String getProjectName() - { -return projectName; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public String getRequirementID() - { -return requirementID; - } + String [] attribute = { "" Value "", "" Attribute "" }; - public String getToAttribute() - { -return toAttribute; - } + String project Name = this . proj Name Text . get - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) + public static void main ( String [] args ) { -this. description = description; - } + 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 void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"88 ""Event Model - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = 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 void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = 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 String createKey() + +public void getIP Server( String serverIP) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +this. serverIP = serverIP; } - 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 ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) +public void drawModel() { - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= +repaint(); +} -private static class Precedence +public void drawModel(EBShape sh) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) { +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + +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 static class Token +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) { -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 { +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + protected void BuildEvent(){} -/** - * 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 + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** - * 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 paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -/* - * 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. +public Requirement() {// empty constructor +} -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ +public 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"77 ""Model Driver - -String msg=""""""""; - -public ModelDriver(String text) - { -this. msg = text; -init(); - } +public void 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 - 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 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 @@ -20412,836 +19213,282 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +",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) + { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + + public String toString() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -// finds the subscribers for this requirement - public void IdentifySubscribers() + /** +* Returns the id. +* @return int +*/ + public String getId() { -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 id; + } -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + /** +* Returns the name. +* @return String +*/ + public String getName() { +return 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. + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } - public void Dispatch + + public double getValueTo() + { +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; +this. name = name; + } -for ( int i = 0"" -",57,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + + public void setValueTo( double value) { - setTitle(""""EventsProcessor""""); +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 -addWindowListener( new WindowAdapter() +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 void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +public String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 -// 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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) + //@param argsNo arguments are used. + public static void main(String args[]) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; try { -N + 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 -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -void DeleteRelatedEvents() + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - m_Deleterequirement List. remove(0); + super ("""" Search Result GUI """"); + container = get Content Pane (); + set Size ( 800 , 250 ); -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 + panel = new JPanel (); + panel . set Layout ( null ); -void UpdateDisplayList() + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + Impact Report im = new Impact Report (); - // 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 search Date () + { -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include modifying a requirement.,124,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The prototype system shall utilize a driver to trigger events.,120,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -/** - * 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; + Socket server ; + String line = new String (); - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + // Select Actions + public void action Performed ( Action Event e ) + { - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"94 ""Refine Model + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -public RefineModel(EBT em) -{ -super( em); - } + // Button Actions - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"83 ""Variable +public void action Performed ( Action Event e ) { -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 + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - //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. + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -//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 void impact Report ( String id ) + { + // super ("""" Impact Report """"); + container = get Content Pane (); -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + set Size ( 1020 , 740 ); + this . query ID = id ; - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + System . out . println ("""" Impact Report Constructor ..... ID """" + - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public Vector get Constraint From Data Base () { -return logic; - } + Vector v = new Vector (); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + Socket server ; + String line = new String (); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + public Vector get Driver From Data Base () + { + Vector v = new Vector (); - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall immediately process speculative events.,116,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w - - -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - - -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } - - - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - - - public boolean match( int mx, int my) - { -return true; - } - - - public int GetX() - { -return x; - } - - - public int GetY() - { -return y; - } - - public Color GetC() -{ -return c; - } - - public String GetReqno() - { -return requirement No; - } - - public String GetProject() - { -return ProjectName; - } - - - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } - - public void set Logic ( String logic ) { - this . logic = logic ; - } - - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } - - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } - - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - - public void set Units ( String units ) { - this . units = units ; - } - - public void set Value ( String units ) { - this . value = units ; - } - - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } - - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 + 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 """"; @@ -21380,327 +19627,265 @@ public void action Performed ( Action Event e ) { if ( server . is Connected () ) { Buffered"" -",47,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"91 ""Modify Model +",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 -public ModifyModel(EBT em) -{ -super( em); - } +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); +return panel; }"" -",91,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null - +",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 +"63 ""Doors Thread - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public void identifyPerformanceModels() + DOORsThread(ServerSocket ss) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + theServer = ss; + count++; + taskNumber = count; + } -public void pullInformationFromDoors() + public void run() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - -public void insertValuesInDataBase() + while( true) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() + 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 +"70 ""Notification Processing -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +// 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 void parseImpactReport(String str) + public Notification_Processing() { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"78 ""Notification Event - -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim - -// constructor -public Notification_Event() +addWindowListener( new WindowAdapter() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + public void windowClosing(WindowEvent evt) { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +try - public void ParseEvent(String TextLine) +public static void main(String args[]) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) +try { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - //This method displays the contents of two array list to console -public void DisplayValues() + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include deleting a requirement.,125,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - // Speculate Gui - public Speculate Gui () + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { - - 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 +exitApplication(); + } - void send Query TO Server () + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { +openEventsMenuItemActionPerformed( evt); + } - String ip = this . event Server IP ; - int Port No = 1701 ; + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { +new AboutDialog ( this, true). show(); + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +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;/ - String project Name = this . proj Name Text . get + 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 static void main ( String [] args ) +// finds the subscribers for this requirement + public void IdentifySubscribers() { - new Speculate Gui (); - }",46,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"89 ""Event Line +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 -protected int top, left, right, bottom; +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -public EventLine ( int t, int l, int r, int b) +String sName, sReqno, sModule, sKey1, sKey2; +try { -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} + System. o -public int GetR() { return right;} + // 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 GetB() { return bottom;}"" -",89,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"90 ""Merge Model + public void Dispatch -public MergeModel(EBT em) + public String getErrorMessage() { -super( em); - MinimumNoRects = 3; + return errMsg; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"90 ""Merge Model +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; -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +owner = o; +} -public StringBuffer GenerateEvent() +/** + * Scan for and execute tasks. + */ +public void run() { -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 +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 private static final int EOL = 0; @@ -21826,393 +20011,238 @@ BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" ",76,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 - // 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""""); +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -addWindowListener( new WindowAdapter() + 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 - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - 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 + + /** +* 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) { -Notification +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +public void solveStructureEquation() { -if (! listModel. isEmpty()) -{ - int index =0; - 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() { -Notification_Event nEvt1 = (Notificati +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 """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) +public void setCalculatedValues() { -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 +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n -void DeleteRelatedEvents() + public Vector getImpactReport() { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"64 ""DOORs Thread Pool +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + //@param argsNo arguments are used. + public static void main(String args[]) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req - - -void UpdateDisplayList() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - - - // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response -private boolean Check_Subscription(String ip, - int PortNo, - String SubscriberName, - String Requirement // Takes an event string returned from the eventserver and -// extracts True or False response - - - -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe - - -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} + 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = 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 long queryID = 0; + public static int count = 0; -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } -private void skip + public Vector getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include deleting a requirement.,125,0 -"94 ""Refine Model + public String getName() + { +return name; + } -public RefineModel(EBT em) -{ -super( em); + 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); -CurrentEvent = 3; } +else + this. driverVector. add( driver); + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"90 ""Merge Model - - -public MergeModel(EBT em) + public void removeDriver(DriverDescription driver) { -super( em); - MinimumNoRects = 3; +this. driverVector. remove( driver); } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -if (HideMsg == true) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include modifying a requirement.,124,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include modifying a requirement.,124,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + dd = (DriverDescription) this. driverVector. get( i) -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} + cd = (ConstraintsDescription) this -public String GetSubscriberModule() { return SubscriberModule;} + public long getQueryID() + { +return this. queryID; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public void setQueryID( long id) + { +this. queryID = id; + } -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include modifying a requirement.,124,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 + 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 "59 ""Done /** * The number of Worker object * threads that are currently working @@ -22284,843 +20314,476 @@ notify(); { _ activeThreads = 0; }"" -",59,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +",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 +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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +public Notification_Event() { + 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 + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public void ParseEvent(String TextLine) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + 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(); +if ( m_Eve -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); + System. out. println("""" m_EventI"" +",69,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"56 ""Event Parser + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +this. projectName = projec - public void updateEvent(String str, String ID) +public String getChangedAttribute() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - +return changedAttribute; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + public String getDescription() { +return description; + } -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - + public String getFromAttribute() + { +return fromAttribute; + } -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + public String getModulePath() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +return modulePath; + } + public String getProjectName() + { +return projectName; + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public String getRequirementID() { -// 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 requirementID; + } + public String getToAttribute() + { +return toAttribute; + } - public void speculate(String str) + public void setChangedAttribute(String changedAttribute) { -System. out. println(""""Speculate""""); -CallBack +this. changedAttribute = changedAttribute; + } + public void setDescription(String description) + { +this. description = description; + } -public void impactReport(String str) + public void setFromAttribute(String fromAttribute) { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"80 ""Requirement +this. fromAttribute = fromAttribute; + } -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } -public Requirement() {// empty constructor + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -} + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include adding new requirements.,121,0 -"89 ""Event Line +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 ; -protected int top, left, right, bottom; + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + // Speculate Gui -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public Speculate Gui () + { + super ("" Speculate GUI ""); -public int GetT() { return top;} + container = get Content Pane (); -public int GetL() { return left;} + set Size ( 800 , 600 ); -public int GetR() { return right;} + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -public int GetB() { return bottom;}"" -",89,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); - } + // Submit Listener + public void action Performed ( Action Event e ) { -// 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 + if ( e . get Source () == submit Button ) { + send Query TO Server (); -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + } - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + if ( e . get Source () == fetch Button ) { - 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 + System . out . println ("" Fetch Button Pressed -public String getNextID() + void send Query TO Server () { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn + String ip = this . event Server IP ; + int Port No = 1701 ; -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - + Socket socket ; + try { -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - public String getConstraintFromDataBase(String queryID) + public void pull Value From DOORS () { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"53 ""Performance Model + 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -return driverVector; - } +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - public String getName() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -return name; - } +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 setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -if ( driverVector. contains( driver)) + +String sName, sReqno, sModule, sKey1, sKey2; +try { -} -else - this. driverVector. add( driver); - } + System. o - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + // 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 boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } + public void Dispatch - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + public String getErrorMessage() { -return this. constraintVector. contains( constraint); + return errMsg; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) + public boolean Contains(String ContextString, String SearchString) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +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 long getQueryID() +public static void (String args[]) { -return this. queryID; - } - - public void setQueryID( long id) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -this. queryID = id; - } - - public String toString() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall be able to delete subscriptions.,107,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Each artifact shall be placed under the control of a subscribermanager,106,0 -"89 ""Event Line +p -protected int top, left, right, bottom; +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 +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -public EventLine ( int t, int l, int r, int b) +public TextModel(EBT e) { -top = t; -left = l; -right = r; -bottom = b; -} - + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -public int GetT() { return top;} -public int GetL() { return left;} + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -public int GetR() { return right;} +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -public int GetB() { return bottom;}"" -",89,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"81 ""subscribermanager +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -Socket aSocket; - int ID; - String EventLog; +public void drawModel() +{ +repaint(); +} - Connection conn; - ResultSet rs; - Statement stmt; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try +if (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;/ -} -public void sendImpactReportToEventServer(String text) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo -// run method will be execute from the main method when u say Thread. start() in main - public void run() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -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 - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe - - -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; +String sName, sReqno, sModule, sKey1, sKey2; try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - - -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private - - -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ - -private void skip - - -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Each artifact shall be placed under the control of a subscribermanager,106,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include modifying a requirement.,124,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) { -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - + System. o -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"71 ""Requirement + // 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 m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void Dispatch -public Requirement() -{ -} -public Object clone() throws CloneNotSupportedException + 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) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Only registered subscribers shall be allowed to establish traces.,102,0 -"83 ""Variable - -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat - - - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public boolean Contains(String ContextString, String SearchString) { -this. id = id; -this. type = type; -this. +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 +"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; } @@ -23129,8 +20792,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -23139,12 +20801,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -23162,8 +20822,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -23187,153 +20846,100 @@ this. name = name; */ public void setValue( double value) { this. value = value; - } - + }"" +",73,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; +public RefineModel(EBT em) +{ +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""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 - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +public RefineModel(EBT em) +{ +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - /** -* 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(""""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 + +public ObsoleteModel(EBT em) +{ +super( em); } - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +// 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 project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall be able to construct speculative queries using a GUI.,115,0 -"69 ""Notification Event - -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim - -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - - -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - - - public void ParseEvent(String TextLine) - { - StringTokenizer LineSt; // Tokenizer for the line -int i=0; -LineSt = new StringTokenizer(TextLine, """"|""""); -m_SubscriberName = LineSt. nextToken// Set the other members before calling this function - - - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public StringBuffer GenerateEvent() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"63 ""Doors Thread - -static private int count = 0; +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; + 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) @@ -23342,248 +20948,226 @@ static private int count = 0; { Socket client = theServer. accept(); BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - - -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +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 +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"52 ""Pair -private String queryID; - private String queryString; +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public Pair(String queryID, String queryString) { + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -this. queryID = queryID; -this. queryString = queryString; - } + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"79 ""performance model Handler - public String getQueryID() { -return this. queryID; - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public String getQueryString() { -return this. queryString; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + performance model Handler(String msg) + { +this. strES = msg; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - - - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public void messageParser() { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - /** -* 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 +//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; -/** -* 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 int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() + public void saveModel( int id) { -_ activeThreads++; -_ started = true; -notify(); +// save current model +database. saveCurrentModel( id); } - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",59,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"94 ""Refine Model +",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 -public RefineModel(EBT em) -{ + +public MergeModel(EBT em) + { super( em); + MinimumNoRects = 3; } + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol +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 JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 + +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) { -public chartoken; -public int theLine; + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -public Symbol( char tok, int line ) + + public void showText(EBShape sh) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + // 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 Balance( Reader inStream ) +public void ShowInfo( int CE) { -errors = 0; -tok = new Tokenizer( inStream ); +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); } - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) +public void drawModel() { -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +repaint(); +} - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) +protected void paintComponent(Graphics g) { -if( opSym. token == '(' && clSym. token != ')' || - + super. paintComponent( g); - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +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 /** @@ -23622,82 +21206,249 @@ if ( target!=null) { target. run(); owner. done. worker"" -",61,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include modifying a requirement.,124,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"65 ""About Dialog +",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 +"48 ""Constraint Inner Panel -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include adding new requirements.,121,0 -"83 ""Variable +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 -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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. id = id; -this. type = type; -this. - + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -//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 Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered R -public String toString() + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 + + +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 + * 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 String getId() + 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 id; +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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) + { +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 logic. -* @return String +* Returns the id. +* @return int */ - public String getLogic() + public String getId() { -return logic; +return id; } @@ -23715,335 +21466,629 @@ 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; } + 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 + +/** +* 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 speculateValue. -* @return double +* Get a new work assignment. +* +* @return A new assignment */ - public double getSpeculateValue() { -return speculateValue; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set +* Called to block the current thread until +* the thread pool has no more work. */ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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; /** -* Returns the type. -* @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 getType() { -return type; + + 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 - /** -* Sets the type. -* @param type The type to set +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public void setType(String type) { -this. type = type; + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); } /** -* Returns the project_ path. -* @return String +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public String getProject_ path() { -return project_ path; + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set + /** +* Called to reset this object to +* its initial state. */ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; + synchronized public void reset() + { +_ activeThreads = 0; }"" -",83,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"81 ""subscribermanager +",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 -Socket aSocket; - int ID; - String EventLog; +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 - Connection conn; - ResultSet rs; - Statement stmt; +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; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - -} -public void sendImpactReportToEventServer(String text) + while( true) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -// run method will be execute from the main method when u say Thread. start() in main - public void run() +public String getNextID() { -System. out. println(""""Inside Run method""""); -String str=""""""""; try { +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +public String searchDate() { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public String getDriverFromDataBase(String queryID) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +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 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -setVisible ( false); -dispose (); +owner = o; } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Delete subscriptions (2.2.3) 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 -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"50 ""Driver Description +public NewModel(EBT em) +{ +super( em); + } -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +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 ; -this. projectName = projec + 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 getChangedAttribute() + // Speculate Gui + + public Speculate Gui () { -return changedAttribute; - } - public String getDescription() + 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 () { -return description; - } - public String getFromAttribute() + 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 () { -return fromAttribute; - } - public String getModulePath() + 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 ) { -return modulePath; - } + 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 String getProjectName() + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -return projectName; - } +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - public String getRequirementID() +// finds the subscribers for this requirement + public void IdentifySubscribers() { -return requirementID; - } +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 getToAttribute() + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) +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() { -this. changedAttribute = changedAttribute; + return errMsg; } - public void setDescription(String description) + + public boolean Contains(String ContextString, String SearchString) { -this. description = description; - } +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - public void setFromAttribute(String fromAttribute) +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 + + 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 ) { -this. fromAttribute = fromAttribute; + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public void setModulePath(String modulePath) + +public Vector get Values From Data Base () { -this. modulePath = modulePath; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public void setProjectName(String projectName) + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () { -this. requirementID = requirementID; - } + 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 void setToAttribute(String toAttribute) +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. toAttribute = toAttribute; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String createKey() + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public boolean equals(Object o) +public void ParseRequirement(String TextLine) { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + 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 +{ -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + +} +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 hashCode() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -int hashCode = 0; -if ( hashCode == 0) +System. out. println(""""Inside Run method""""); +String str=""""""""; +try { - 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 + + + + // 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 @@ -24116,883 +22161,620 @@ public double targetResponseTimeAfter(){ System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); targetResponse time = timeToBroadcastShapeAfter() + timeToBroadcastText() + w"" -",84,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A user shall register as a subscriber.,103,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"53 ""Performance Model +",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 name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - private long queryID = 0; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public static int count = 0; - public PerformanceModel(String name, long queryID) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; } - public Vector getConstraints() + public String getDescription() { -return constraintVector; +return description; } - public Vector getDrivers() + public String getFromAttribute() { -return driverVector; +return fromAttribute; } - public String getName() + public String getModulePath() { -return name; +return modulePath; } - public void setName(String name) + public String getProjectName() { -this. name = name; +return projectName; } - public void addDriver(DriverDescription driver) + public String getRequirementID() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return requirementID; } - public void removeDriver(DriverDescription driver) + public String getToAttribute() { -this. driverVector. remove( driver); +return toAttribute; } - public boolean containsDriver(DriverDescription driver) + public void setChangedAttribute(String changedAttribute) { -return this. driverVector. contains( driver); +this. changedAttribute = changedAttribute; } - public void addConstraint(ConstraintsDescription constraint) + public void setDescription(String description) { -this. constraintVector. add( constraint); +this. description = description; } - public boolean containsConstraint(ConstraintsDescription constraint) + public void setFromAttribute(String fromAttribute) { -return this. constraintVector. contains( constraint); +this. fromAttribute = fromAttribute; } - public void removeConstraint(ConstraintsDescription constraint) + public void setModulePath(String modulePath) { -this. constraintVector. remove( constraint); +this. modulePath = modulePath; } - public DriverDescription getDriver(DriverDescription driver) + public void setProjectName(String projectName) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. projectName = projectName; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public void setRequirementID(String requirementID) { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +this. requirementID = requirementID; + } - public long getQueryID() + public void setToAttribute(String toAttribute) { -return this. queryID; +this. toAttribute = toAttribute; } - public void setQueryID( long id) + public String createKey() { -this. queryID = id; +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String toString() + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,For speculative events; the eventserver shall construct a composite event message.,132,0 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"94 ""Refine Model + +public RefineModel(EBT em) { super( em); } - -// Construct Visual model for Merge Event + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve - +CurrentEvent = 3; +} public StringBuffer GenerateEvent() - { +{ StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); +thisEvent. append(""""Refine|0|""""); thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"58 ""Subscribed Model +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 +"82 ""Tokenizer -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) +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -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;} +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include modifying a requirement.,124,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall send the customized message to each impacted executable model.,136,0 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +/** + * 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 - 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + panel . set Layout ( null ); - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + this . server IP = + JOption Pane + . show In - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - while( true) - { - try + public static void main ( String [] args ) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + Impact Report im = new Impact Report (); -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() + public Vector search Date () { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public String searchQueryID(String date) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + pair Vector = new Vector (); - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall be able to delete subscriptions.,107,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"69 ""Notification Event + Socket server ; + String line = new String (); -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + // Select Actions + public void action Performed ( Action Event e ) + { -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - 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 action Performed ( Action Event e ) { - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + if ( submit Button == e . get Source ()) { -if ( m_Eve + for ( int i = 0 ; i < pair Vector . size (); i ++) { -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"77 ""Model Driver + Pair pair = ( Pair ) pair Vector . get ( i ); -String msg=""""""""; + if ( pair + . get -public ModelDriver(String text) - { -this. msg = text; -init(); - } - public void init() + public void impact Report ( String id ) { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"94 ""Refine Model -public RefineModel(EBT em) -{ -super( em); - } + // super ("""" Impact Report """"); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + container = get Content Pane (); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"79 ""performance model Handler + set Size ( 1020 , 740 ); -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + this . query ID = id ; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + System . out . println ("""" Impact Report Constructor ..... ID """" + - performance model Handler(String msg) + public Vector get Constraint From Data Base () { -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(); + Vector v = new Vector (); + Socket server ; + String line = new String (); -//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; + try + { + server = new Socket ( server IP , 1701 ); -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + if ( server . is Connected () ) + { + Buffered - public void saveModel( int id) + + public Vector get Driver From Data Base () { -// save current model -database. saveCurrentModel( id); - } + Vector v = new Vector (); - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + Socket server ; + String line = new String (); - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"95 ""Text Model + try + { + server = new Socket ( server IP , 1701 ); -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + 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 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 Hash table requirementDescTable = new Hash table(); - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + private Hash table constraintDescTable = new Hash table(); -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + private Hash table performanceModelTable = new Hash table(); -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + private PerformanceModel performance model= null -public void drawModel() -{ -repaint(); -} + 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 paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"51 ""Driver Inner Panel +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -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 pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = 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 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include adding new requirements.,121,0 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + public void createExecuteString() + { -public Requirement() {// empty constructor +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 { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public void parseImpactReport(String str) + { +Connection conn = 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 +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall re execute the model using the speculative values.,117,0 -"74 ""database +ConstraintsDescription constraint = null; +int driverLoop"" +",62,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"88 ""Event Model -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 +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); - /** - * 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 EventModel(EBT e) { - 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 - +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -/** -* 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 getIP Server( String serverIP) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - +this. serverIP = serverIP; + } -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 ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -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 drawModel() +{ +repaint(); +} -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +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(); -} -done. waitDone(); - } -}"" -",60,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"48 ""Constraint Inner Panel -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel + protected void BuildEvent(){} - 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 + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } - - -public Vector get Values From Data Base () + else { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +Even - if ( server . is Connected () ) - { - Buffered R +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - 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 StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public JPanel get Panel () - { - return panel ; - }"" -",48,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"80 ""Requirement + 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 public String m_RequirementID =""""""""; public String m_Project =""""""""; @@ -25000,462 +22782,523 @@ public String m_ModulePath=""""""""; public String m_Content = """"""""; public String m_RegFlag = """"N""""; - -public Requirement() {// empty constructor - +public Requirement() +{ } -public Object clone() throws CloneNotSupportedException { +public Object clone() throws CloneNotSupportedException + { Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement ; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { this. m_RequirementID = RequirementID; this. m_Project = Project; this. m_ModulePath - -public void ParseRequirement(String TextLine) { +public void ParseRequirement(String TextLine) + { StringTokenizer LineSt; LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A user shall register as a subscriber.,103,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"49 ""Constraints Description +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 -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +this. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; } - - public String get Description () { - return this . description ; + public String getDescription() + { +return 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 getFromAttribute() + { +return fromAttribute; } - public String get Requirement ID () { - return this . requirement ID ; + public String getModulePath() + { +return modulePath; } - public String get Units () { - return this . units ; + public String getProjectName() + { +return projectName; } - public String get Value () { - return this . value ; + public String getRequirementID() + { +return requirementID; } - public void set Description ( String description ) { - this . description = description ; + public String getToAttribute() + { +return toAttribute; } - public void set Logic ( String logic ) { - this . logic = logic ; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public void setDescription(String description) + { +this. description = description; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public void set Units ( String units ) { - this . units = units ; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public void set Value ( String units ) { - this . value = units ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String get Attribute () { - return this . attribute ; - } + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - 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 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 +"66 ""Config Dialog - public String to String () { +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,For speculative events; the eventserver shall construct a composite event message.,132,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"82 ""Tokenizer +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +// 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 +"71 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public Requirement() { -return currentLine; } +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -/** - * 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 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: Delete subscriptions (2.2.3) 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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public Speculate Gui () + { + super ("" Speculate GUI ""); -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + container = get Content Pane (); -for( ; nextChar( ); result += ch ) + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** - * 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 + // Submit Listener + public void action Performed ( Action Event 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 ) { } -} + if ( e . get Source () == submit Button ) { + send Query TO Server (); -/** - * 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 ( e . get Source () == fetch Button ) { -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ -private void skip + System . out . println ("" Fetch Button Pressed -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"53 ""Performance Model + void send Query TO Server () + { -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; + String ip = this . event Server IP ; + int Port No = 1701 ; - private long queryID = 0; + Socket socket ; + try { - public static int count = 0; + socket = new Socket ( ip , Port No ); - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + Output Stream os = socket . get Output Stream (); + Output Stream - public Vector getConstraints() + public void pull Value From DOORS () { -return constraintVector; - } - public Vector getDrivers() - { -return driverVector; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public String getName() - { -return name; - } + String [] attribute = { "" Value "", "" Attribute "" }; - public void setName(String name) - { -this. name = name; - } + String project Name = this . proj Name Text . get - public void addDriver(DriverDescription driver) + + public static void main ( String [] args ) { -if ( driverVector. contains( driver)) + 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 +"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) { -} -else - this. driverVector. add( driver); - } +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 removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() { -return this. driverVector. contains( driver); - } +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -return this. constraintVector. contains( constraint); - } - - public void removeConstraint(ConstraintsDescription constraint) +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -this. constraintVector. remove( constraint); +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); } +}"" +",60,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +private Connection conn; + private ResultSet rs; + private Statement stmt; - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +try { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() + public void updateEvent(String str, String ID) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"73 ""Constraints +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -String id; - String name; - double value; - String logic; +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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() { + 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; } @@ -25463,330 +23306,320 @@ 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall be able to delete subscriptions.,107,0 -"62 ""Call Back + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -private Hash table requirementDescTable = new Hash table(); + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +"76 ""Evaluator - private Hash table constraintDescTable = new Hash table(); +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 performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +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 void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = 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 +/** + * 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 createExecuteString() - { +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public void parseImpactReport(String str) - { -Connection conn = null; +/** + * 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 -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"48 ""Constraint Inner Panel + /** + * 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 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 +/** + * 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 goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"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 Vector get Values From Data Base () + EventServerThread(ServerSocket ss) + { + 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 + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +public String getNextID() { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -public JPanel get Panel () +public String searchDate() { - return panel ; - }"" -",48,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"82 ""Tokenizer +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -return currentLine; -} + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { -return errors; -} + 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 -/** - * 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 DecomposeModel(EBT em) { -while( nextChar( ) ) +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +public StringBuffer GenerateEvent() { -return Character. isJavaIdentifierPart( ch ); -} - +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 -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +public ObsoleteModel(EBT em) { -String result = """""""" + ch; +super( em); + } -for( ; nextChar( ); result += ch ) + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"89 ""Event Line - /** - * 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 int top, left, right, bottom; -/** - * 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 EventLine ( int t, int l, int r, int b) { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } +top = t; +left = l; +right = r; +bottom = b; } -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private - - -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ - -private void skip - - -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} +public int GetT() { return top;} -public String GetSubscriberModule() { return SubscriberModule;} +public int GetL() { return left;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +public int GetR() { return right;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 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 "61 ""Worker Thread /** @@ -25825,8 +23658,167 @@ if ( target!=null) { target. run(); owner. done. worker"" -",61,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 +",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 + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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; + + +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 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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); + } + + // 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 + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 /** @@ -25895,500 +23887,488 @@ for ( int i=0; i< threads. length; i++) { done. waitDone(); } }"" -",60,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +",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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +public ModelDriver(String text) + { +this. msg = text; +init(); + } + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + /** +* 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 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 +/** +* 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 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 +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + /** +* 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 +"91 ""Modify Model - 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 ModifyModel(EBT em) +{ +super( em); + } - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"63 ""Doors Thread + 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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 - DOORsThread(ServerSocket ss) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - theServer = ss; - count++; - taskNumber = count; - } - +this. id = id; +this. type = type; +this. - public void run() - { - while( true) - { - try +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"95 ""Text Model +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -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 +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The subscribermanager shall restore the executable model to its prior state.,119,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w - - -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - - -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Only registered subscribers shall be allowed to establish traces.,102,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - - } - - public String getQueryID() { -return this. queryID; - } - - public String getQueryString() { -return this. queryString; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { 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 logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } + /** -* Returns the id. -* @return int +* Sets the name. +* @param name The name to set */ - public String getId() - { -return id; + public void setName(String name) { +this. name = name; } /** -* Returns the name. -* @return String +* Sets the value. +* @param value The value to set */ - public String getName() - { -return name; + public void setValue( double value) { +this. value = value; } /** -* Returns the value. +* Returns the speculateValue. * @return double */ - public double getValueFrom() - { -return valueFrom; + public double getSpeculateValue() { +return speculateValue; } - public double getValueTo() - { -return valueTo; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } /** -* Sets the id. -* @param id The id to set +* Returns the type. +* @return String */ - public void setId(String id) - { -this. id = id; + public String getType() { +return type; } - ** -* Sets the name. -* @param name The name to set + /** +* Sets the type. +* @param type The type to set */ - public void setName(String name) - { -this. name = name; + public void setType(String type) { +this. type = type; } - ** -* Sets the value. -* @param value The value to set + /** +* Returns the project_ path. +* @return String */ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; + public String getProject_ path() { +return project_ path; } - public void setValueTo( double value) - { -this. valueTo = valueTo; + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; }"" -",75,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"64 ""DOORs Thread Pool +",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 -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +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 - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"62 ""Call Back + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -private Hash table requirementDescTable = new Hash table(); +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi - private Hash table constraintDescTable = new Hash table(); +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - private Hash table performanceModelTable = new Hash table(); +public void drawModel() +{ +repaint(); +} - private PerformanceModel performance model= null +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +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 -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -public void parseImpactReport(String str) - { -Connection conn = null; +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; -Statement stmt = null; +for( ; nextChar( ); result += ch ) -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Only registered subscribers shall be allowed to establish traces.,102,0 + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 public static void (String args[]) @@ -26404,476 +24384,226 @@ p public final static int defaultPort = 1701; ServerSocket theServer;"" -",54,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"61 ""Worker Thread +",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 -/** -* True if this thread is currently processing. - */ -public boolean busy; +private String server IP = """" local host """"; + private JPanel center Panel = null ; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + private JPanel impact Panel = null ; + private JPanel impact Inner P + public Impact Report () + { -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - - -//Check if a subscription exists - public boolean CheckSubscription(String str) - { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - - -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - + super ("""" Search Result GUI """"); -//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 + container = get Content Pane (); + set Size ( 800 , 250 ); - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + panel = new JPanel (); + panel . set Layout ( null ); -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"56 ""Event Parser + this . server IP = + JOption Pane + . show In -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() + public static void main ( String [] args ) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + Impact Report im = new Impact Report (); - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + public Vector search Date () { -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag + pair Vector = new Vector (); -//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 + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack + Socket server ; + String line = new String (); -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"64 ""DOORs Thread Pool + // Select Actions -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 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 ); + } + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"53 ""Performance Model + // Button Actions -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +public void action Performed ( Action Event e ) { - public static int count = 0; + if ( submit Button == e . get Source ()) { - public PerformanceModel(String name, long queryID) - { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } + for ( int i = 0 ; i < pair Vector . size (); i ++) { - public Vector getConstraints() - { -return constraintVector; - } + Pair pair = ( Pair ) pair Vector . get ( i ); - public Vector getDrivers() - { -return driverVector; - } + if ( pair + . get - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + public void impact Report ( String id ) { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + // super ("""" Impact Report """"); - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } + container = get Content Pane (); - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } + set Size ( 1020 , 740 ); - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } + this . query ID = id ; - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } + System . out . println ("""" Impact Report Constructor ..... 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) + public Vector get Constraint From Data Base () { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() - { -return this. queryID; - } + Vector v = new Vector (); - public void setQueryID( long id) - { -this. queryID = id; - } + Socket server ; + String line = new String (); - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ + try + { + server = new Socket ( server IP , 1701 ); - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + if ( server . is Connected () ) + { + Buffered -/** -* 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() + public Vector get Driver From Data Base () { -_ activeThreads++; -_ started = true; -notify(); - } + Vector v = new Vector (); - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"73 ""Constraints + 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 -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;} - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +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 +"81 ""subscribermanager - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + // 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 id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } +} +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 logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 "83 ""Variable String id = """"""""; // requirement id ex WB10 @@ -27045,281 +24775,27 @@ return project_ path; public void setProject_ path(String project_ path) { this. project_ path = project_ path; }"" -",83,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"85 ""Decompose Model - +",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 -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +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; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include modifying a requirement.,124,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec - -public String getChangedAttribute() - { -return changedAttribute; - } - - public String getDescription() - { -return description; - } - - public String getFromAttribute() - { -return fromAttribute; - } - - public String getModulePath() - { -return modulePath; - } - - public String getProjectName() - { -return projectName; - } - - public String getRequirementID() - { -return requirementID; - } - - public String getToAttribute() - { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - - public void setDescription(String description) - { -this. description = description; - } - - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"83 ""Variable - -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat - - - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) - { -this. id = id; -this. type = type; -this. - - -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) - { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - - -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic - - - -public String toString() + 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. @@ -27331,16 +24807,6 @@ return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - /** * Returns the name. * @return String @@ -27355,100 +24821,126 @@ 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 - /** -* 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(); } - - - /** -* 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 +}"" +",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 @@ -27620,406 +25112,252 @@ return project_ path; public void setProject_ path(String project_ path) { this. project_ path = project_ path; }"" -",83,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall restore the executable model to its prior state.,119,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include adding new requirements.,121,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The prototype system shall utilize a driver to trigger events.,120,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value +",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 -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public MergeModel(EBT em) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - +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 ); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - if ( server . is Connected () ) - { - Buffered R +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 - 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 +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - 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 + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} /** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - + * 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( ) ) +{ - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; - - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () - { - - super ("""" Search Result GUI """"); - - container = get Content Pane (); - - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); - - this . server IP = - JOption Pane - . show In - - - public static void main ( String [] args ) - { - - Impact Report im = new Impact Report (); - - } - - - public Vector search Date () - { - - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { - - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - - pair Vector = new Vector (); - - query String Combo . remove All Items (); - - query String Combo . add Item ("""" Select Query String """"); - - Socket server ; - String line = new String (); - - - // Select Actions - - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - System . out . println ("""" Impact Report Constructor ..... ID """" + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - public Vector get Constraint From Data Base () - { +for( ; nextChar( ); result += ch ) - Vector v = new Vector (); - Socket server ; - String line = new 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 - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered +/** + * 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 get Driver From Data Base () - { - Vector v = new Vector (); +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - Socket server ; - String line = new String (); +private void skip - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"90 ""Merge Model +/** + * 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 +/** +* True if this thread is currently processing. + */ +public boolean busy; -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +owner = o; +} -public StringBuffer GenerateEvent() +/** + * Scan for and execute tasks. + */ +public void run() { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +Runnable target = null; -return panel; - }"" -",51,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"52 ""Pair +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 String queryID; - private String queryString; +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 Pair(String queryID, String queryString) { +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +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 "81 ""subscribermanager Socket aSocket; @@ -28070,1240 +25408,1494 @@ int port = 1705; // the message coming from eventserver String LogName = """"EventLog""""; //LogName is the database name used to log t"" -",81,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"74 ""database +",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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +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); - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +public void getIP Server( String serverIP) { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +this. serverIP = serverIP; + } + + + public void ClearVectors() { - Class. fo +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} +public void drawModel() +{ +repaint(); +} - /** -* 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 drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -/** -* 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 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 getTrackVariableName() +public void CheckNotifyStatus() { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -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 + protected void BuildEvent(){} - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include deleting a requirement.,125,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall send the customized message to each impacted executable model.,136,0 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"91 ""Modify Model -public ModifyModel(EBT em) +protected void AddEventRect( int x, int y, int colorStatus) { -super( em); +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } + else + { +Even - // Construct Visual model for Merge Event -public void BuildEvent() +public String getrequirement Text(String r, String p, String m) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +return new String(""""requirementwill go here""""); + } -public StringBuffer GenerateEvent() + public StringBuffer GenerateEvent() { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +return new StringBuffer("""" """"); + }// end of GenerateEvent method protected void paintComponent(Graphics g) { -g. drawString(""""TESTING MODIFY"""",5,5); super. paintComponent( g); - }"" -",91,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +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 + +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -// finds the subscribers for this requirement - public void IdentifySubscribers() + + public void updateEvent(String str, String ID) { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi +String mDate; +String mReqtext; -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - public void Dispatch +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - public String getErrorMessage() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { - return errMsg; - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models - public boolean Contains(String ContextString, String SearchString) + public void speculate(String str) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +System. out. println(""""Speculate""""); +CallBack -for ( int i = 0"" -",57,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"94 ""Refine Model -public RefineModel(EBT em) -{ -super( em); - } +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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"79 ""performance model Handler + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -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 DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - performance model Handler(String msg) +public String getChangedAttribute() { -this. strES = msg; +return changedAttribute; } - public void messageParser() + public String getDescription() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); - +return 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 getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; + public String getProjectName() + { +return projectName; } + public String getRequirementID() + { +return requirementID; + } - public void saveModel( int id) + public String getToAttribute() { -// save current model -database. saveCurrentModel( id); +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); + public void setDescription(String description) + { +this. description = description; } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"63 ""Doors Thread + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - DOORsThread(ServerSocket ss) + public void setRequirementID(String requirementID) { - theServer = ss; - count++; - taskNumber = count; +this. requirementID = requirementID; } + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - public void run() + public String createKey() { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - while( true) + public boolean equals(Object o) { - try +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include adding new requirements.,121,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"95 ""Text Model +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 +"66 ""Config Dialog -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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 closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - 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 (); } +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"86 ""EB Shape -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"89 ""Event Line +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -protected int top, left, right, bottom; +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public int GetT() { return top;} -public int GetL() { return left;} + public boolean match( int mx, int my) + { +return true; + } -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); + public int GetX() + { +return x; + } -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"63 ""Doors Thread + public int GetY() + { +return y; + } -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } - DOORsThread(ServerSocket ss) + public String GetProject() { - theServer = ss; - count++; - taskNumber = count; +return ProjectName; } - public void run() + 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 - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol +public NewModel(EBT em) { -public chartoken; -public int theLine; +super( em); + } -public Symbol( char tok, int line ) + + // Construct Visual model for Merge Event +public void BuildEvent() { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -public Balance( Reader inStream ) +public StringBuffer GenerateEvent() { -errors = 0; -tok = new Tokenizer( inStream ); -} +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 +/** +* True if this thread is currently processing. + */ +public boolean busy; /** - * Print an error message for unbalanced symbols. - * @return number of errors detected. + * The thread pool that this object belongs to. */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; +public ThreadPool owner; - /** - * Print an error message if clSym does not match opSym. - * Update errors. +/** + * The constructor. + * + * @param o the thread pool */ -private void checkMatch( Symbol opSym, Symbol clSym ) +WorkerThread(ThreadPool o) { -if( opSym. token == '(' && clSym. token != ')' || +owner = o; +} - /** - * 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. +/** + * Scan for and execute tasks. */ -public static void main( St"" -",72,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Only registered subscribers shall be allowed to establish traces.,102,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - +public void run() +{ +Runnable target = null; - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 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 getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } -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 getName() + { +return 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++ + public void setName(String name) + { +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - 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 removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - 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 addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( 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 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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + 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 double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"48 ""Constraint Inner Panel + public void setQueryID( long id) + { +this. queryID = id; + } -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 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 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public Object clone() throws CloneNotSupportedException { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - +Requirement requirement= (Requirement) super. clone(); +return requirement ; } -public Vector get Values From Data Base () + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +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 +"78 ""Notification Event - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +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 JPanel get Panel () +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { - return panel ; - }"" -",48,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"88 ""Event Model - - -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - public EventModel(EBT e) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -public void getIP Server( String serverIP) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -this. serverIP = serverIP; - } - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} -public void drawModel() + //This method displays the contents of two array list to console +public void DisplayValues() { -repaint(); -} + 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 void drawModel(EBShape sh) +public Notification_Event() { -EventShapes. setElementAt( sh, ESCursor); -repaint(); + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -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 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 CheckNotifyStatus() + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); + +if ( m_Eve + +public void DisplayValues() { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + 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 - protected void BuildEvent(){} +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } - protected void AddLine( int t, int l, int r, int b) + // Construct Visual model for Merge Event +public void BuildEvent() { -EventLines. addElement( new EventLine( t, l, r, b)); -} + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -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() +public StringBuffer GenerateEvent() { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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; - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"51 ""Driver Inner Panel + private 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) { - -panel = new JPanel(); +String changedAttribute, +String fromAttribute, +String toAttribute) + { -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +this. projectName = projec -return panel; - }"" -",51,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"54 ""eventserver +public String getChangedAttribute() + { +return changedAttribute; + } -public static void (String args[]) + public String getDescription() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +return description; + } + + public String getFromAttribute() { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +return fromAttribute; + } + + public String getModulePath() { -p +return modulePath; + } -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall re execute the model using the speculative values.,117,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + public String getProjectName() + { +return projectName; + } - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + public String getRequirementID() + { +return requirementID; + } - EventServerThread(ServerSocket ss) + public String getToAttribute() { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) { +this. changedAttribute = changedAttribute; + } - while( true) + public void setDescription(String description) { - try +this. description = description; + } + + public void setFromAttribute(String fromAttribute) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -public String getNextID() + public void setProjectName(String projectName) { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -public String searchDate() + public void setToAttribute(String toAttribute) { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +this. toAttribute = toAttribute; + } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -public String searchQueryID(String date) + public boolean equals(Object o) { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - public String getConstraintFromDataBase(String queryID) +public int hashCode() { -String ConstString = new String(); -try +int hashCode = 0; +if ( hashCode == 0) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + 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); - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try + +/** +* 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""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"80 ""Requirement +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 m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. -public Requirement() {// empty constructor + /** +* 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(); } - -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +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. +*/ - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +/** +* 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"77 ""Model Driver +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } -String msg=""""""""; -public ModelDriver(String text) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -this. msg = text; -init(); +_ activeThreads--; +notify(); } - public void init() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +_ 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 - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + DOORsThread(ServerSocket ss) { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - + 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: Delete subscriptions (2.2.3) 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 - public String get Project Name () { - return this . project Name ; - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public String get Requirement ID () { - return this . requirement ID ; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; + performance model Handler(String msg) + { +this. strES = msg; } - public void set Description ( String description ) { - this . description = description ; - } + 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 set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +//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 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 int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - public String get Attribute () { - return this . attribute ; - } + 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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); } +} catch ( InterruptedException - public String get Performance Model Name () { - return this . performance Model Name ; +/** +* 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 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() + { +_ activeThreads++; +_ started = true; +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 """" + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -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 + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include modifying a requirement.,124,0 -"53 ""Performance Model +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - 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(); + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() + public boolean mouseDown( java. awt.Evente, int x, int y) { -return driverVector; + return true; } - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) + public void mouseClicked( java. awt. event.MouseEvente) { +VisualPanel.Clicked( e. getX(), e. getY()); } -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 mouseExited( java. awt. event.MouseEvente){} - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } +public void mousePressed( java. awt. event.MouseEvente){} - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } +public void mouseReleased( java. awt. event.MouseEvente){} - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { - dd = (DriverDescription) this. driverVector. get( i) +return splitPane; +} - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) + +public void valueChanged(ListSelectionEvent e) { - cd = (ConstraintsDescription) this +if ( e. getValueIsAdjusting()) +return; +} - public long getQueryID() +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -return this. queryID; - } +switch(EventList. getSelectedIndex()) - public void setQueryID( long id) - { -this. queryID = id; - } +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 toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Only registered subscribers shall be allowed to establish traces.,102,0 +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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= + + +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 + + +private static class Token +{ +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { + + +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} + +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken + +/** + * Construct an evaluator object. + * @param s the string containing the expression. + */ +public Evaluator( String s ) { +opStack = new Stack( ); +postfixStack = new Stack( ); +str = new StringTokeni // The only publicly visible routine + +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte + + +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System + + + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} + + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 "70 ""Notification Processing // member variables for menu @@ -29410,941 +27002,759 @@ 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 -"61 ""Worker Thread +",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 -/** -* 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"67 ""Event Detail Dialog + public String get Module Path () { + return this . module Path ; + } -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + public String get Project Name () { + return this . project Name ; + } + public String get Requirement ID () { + return this . requirement ID ; + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + public String get Units () { + return this . units ; + } -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"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) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -private void okButtonActionPerformed (ActionEvent evt) + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - if ( displayMode == true) +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + return true; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + public boolean mouseUp( java. awt.Evente, int x, int y) { -setVisible ( false); -dispose (); +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public void mouseExited( java. awt. event.MouseEvente){} -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Only registered subscribers shall be allowed to establish traces.,102,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include merging requirements.,126,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +public void mousePressed( java. awt. event.MouseEvente){} - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d +public void mouseReleased( java. awt. event.MouseEvente){} - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); +public void mouseEntered( java. awt. event.MouseEvente){} -addWindowListener( new WindowAdapter() -{ +public void paint(Graphics g) {} +public void update(Graphics g) {} - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); + public JSplitPane getSplitPane() +{ +return splitPane; } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public void valueChanged(ListSelectionEvent e) { - try - { -Notification - +if ( e. getValueIsAdjusting()) +return; +} -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +private class ValueReporter implements ListSelectionListener { - int index =0; - try +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -Notification_Event nEvt1 = (Notificati - +switch(EventList. getSelectedIndex()) -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public void RedrawAll(EBShape sh) { - try - { -N +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -void DeleteEvent(String SubscriberName, String EventID) - { -try +mainframe. addWindowListener( new WindowAdapter() { - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +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 RefineModel(EBT em) +{ +super( em); + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + // Construct Visual model for Merge Event +public void BuildEvent() { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - m_Deleterequirement List. remove(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. + */ -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 Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response -private boolean Check_Subscription(String ip, - int PortNo, - String SubscriberName, - String Requirement // Takes an event string returned from the eventserver and -// extracts True or False response + /** + * Print an error message 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 -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"83 ""Variable +private String server IP = """" local host """"; + private JPanel center Panel = null ; -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -this. id = id; -this. type = type; -this. + super ("""" Search Result GUI """"); -//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 + container = get Content Pane (); + + set Size ( 800 , 250 ); + panel = new JPanel (); -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In -public String toString() + public static void main ( String [] args ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + Impact Report im = new Impact Report (); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public Vector search Date () { -return logic; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** -* Returns the name. -* @return String -*/ - public String getName() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -return name; - } + pair Vector = new Vector (); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + Socket server ; + String line = new String (); - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + // Select Actions + 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 ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +public void action Performed ( Action Event e ) { - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - /** -* 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; - } - + public void impact Report ( String id ) + { - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + // super ("""" Impact Report """"); + container = get Content Pane (); - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"81 ""subscribermanager + set Size ( 1020 , 740 ); -Socket aSocket; - int ID; - String EventLog; + this . query ID = id ; - Connection conn; - ResultSet rs; - Statement stmt; + System . out . println ("""" Impact Report Constructor ..... 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) + public Vector get Constraint From Data Base () { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ + Vector v = new Vector (); -} -public void sendImpactReportToEventServer(String text) + 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 () { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + Vector v = new Vector (); -// run method will be execute from the main method when u say Thread. start() in main - public void run() + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"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(""""Inside Run method""""); -String str=""""""""; -try -{ +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 - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + +public void pullInformationFromDoors() { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"65 ""About Dialog +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"83 ""Variable -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + + public void createExecuteString() { -this. id = id; -this. type = type; -this. + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public void parseImpactReport(String str) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +Connection conn = 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 +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; -public String toString() +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;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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 - /** -* 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 + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public void Dispatch + + + public String getErrorMessage() { -return logic; + return errMsg; } - /** -* Returns the name. -* @return String -*/ - public String getName() + public boolean Contains(String ContextString, String SearchString) { -return name; - } +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 - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +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 id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + * 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 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; - } - + public void injectVa /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +* 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 speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +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 type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +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 - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + 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 - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Each artifact shall be placed under the control of a subscribermanager,106,0 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** * Constructor. * @param inStream the stream containing a program. */ +public 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( ) { -if( opSym. token == '(' && clSym. token != ')' || +while( nextChar( ) ) +{ + /** - * 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall re execute the model using the speculative values.,117,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe + /** + * 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 /** @@ -30393,234 +27803,7 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Only registered subscribers shall be allowed to establish traces.,102,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - - - - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get - - - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect - - -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include adding new requirements.,121,0 -"90 ""Merge Model - - -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 +",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 public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -30652,189 +27835,282 @@ private JLabel DSN Label; private JTextField DSN; private JLabel EventServerIP Label; private JTextField EventSe"" -",66,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"private JPanel center Panel = null ; +",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 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 server IP = """" local host """"; + private JPanel center Panel = null ; - // Speculate Gui + private JPanel driver Panel = new JPanel (); - public Speculate Gui () + private JPanel driver Inner Panel = null ; + + 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 + set Size ( 800 , 250 ); + panel = new JPanel (); - // Submit Listener + panel . set Layout ( null ); - public void action Performed ( Action Event e ) { + this . server IP = + JOption Pane + . show In - if ( e . get Source () == submit Button ) { - send Query TO Server (); + public static void main ( String [] args ) + { - } + Impact Report im = new Impact Report (); - if ( e . get Source () == fetch Button ) { + } - System . out . println ("" Fetch Button Pressed + public Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - void send Query TO Server () + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { + pair Vector = new Vector (); - socket = new Socket ( ip , Port No ); + query String Combo . remove All Items (); - Output Stream os = socket . get Output Stream (); - Output Stream + query String Combo . add Item ("""" Select Query String """"); - public void pull Value From DOORS () + 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 ) { - 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; + Vector v = new Vector (); - //EventParser Constructor - // initializes the Database connection - public EventParser() + 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 () { -try + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"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) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - 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; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + public boolean mouseDown( java. awt.Evente, int x, int y) { + return true; + } -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } -//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 mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -//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 mouseExited( java. awt. event.MouseEvente){} - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +public void mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"89 ""Event Line +public void mouseEntered( java. awt. event.MouseEvente){} -protected int top, left, right, bottom; +public void paint(Graphics g) {} +public void update(Graphics g) {} -public EventLine ( int t, int l, int r, int b) + public JSplitPane getSplitPane() { -top = t; -left = l; -right = r; -bottom = b; +return splitPane; } -public int GetT() { return top;} +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -public int GetL() { return left;} +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -public int GetR() { return right;} +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -public int GetB() { return bottom;}"" -",89,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"75 ""Driver +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 +"83 ""Variable -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; this. name = name; - } +this. value = value; +this - public String toString() +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() { String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + /** * Returns the id. @@ -30846,6 +28122,16 @@ return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + /** * Returns the name. * @return String @@ -30860,15 +28146,8 @@ return name; * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -30876,284 +28155,537 @@ 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include adding new requirements.,121,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"52 ""Pair - -private String queryID; - private String queryString; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public Pair(String queryID, String queryString) { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -this. queryID = queryID; -this. queryString = queryString; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ 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; }"" -",52,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +",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 - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); - /** - * Construct a connection object. - * @param Returns an object of type Connection +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +public ThreadPool( int size) { - Class. fo - +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName +* Get a new work assignment. +* +* @return A new assignment */ - public int get + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables +* Called to block the current thread until +* the thread pool has no more work. */ - public void saveCurrentModel( int graphId) + public void complete() { -conn = this. getConnect +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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""""; -/** -* 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 Requirement() {// empty constructor +} -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n +public void 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 - public Vector getImpactReport() + performance model Handler(String 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 +this. strES = msg; + } -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +//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; -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; +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); }"" -",51,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"91 ""Modify Model +",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 -public ModifyModel(EBT em) +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) { -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 = 4; +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -public StringBuffer GenerateEvent() +public void drawModel() { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +repaint(); +} - protected void paintComponent(Graphics g) +public void drawModel(EBShape sh) { -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } } -// 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 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 void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +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)); } -// 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 + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 + +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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; @@ -31212,71 +28744,130 @@ if (HideMsg == true) g. drawString("""" """",20,25); g. drawString("""" """",20,40); g. drawString("""" """",20,55 "" -",95,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"67 ""Event Detail Dialog +",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 +"53 ""Performance Model -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + public static int count = 0; -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + 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; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public Vector getDrivers() { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +return driverVector; + } + public String getName() + { +return name; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) { -setVisible ( false); -dispose (); } +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide - - -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"87 ""EBT + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public EBT(Frame f) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"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; @@ -31355,494 +28946,562 @@ JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); mainframe. addWindowListener( new WindowAdapter() { public void windowClosing(Wind"" -",87,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"83 ""Variable +",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 -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 +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - //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. + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -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 - - +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo -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 +* 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() + public void saveCurrentModel( int graphId) { -return logic; - } +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; - } + 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 +private String server IP = """" local host """"; + private JPanel center Panel = null ; - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P + public Impact Report () + { - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + super ("""" Search Result GUI """"); + container = get Content Pane (); - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + set Size ( 800 , 250 ); + panel = new JPanel (); - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 static void main ( String [] args ) + { -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); + Impact Report im = new 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 + public Vector search Date () + { -public void getIP Server( String serverIP) + 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 ) { -this. serverIP = serverIP; - } + pair Vector = new Vector (); - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -public void drawModel() -{ -repaint(); -} + Socket server ; + String line = new String (); -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + // Select Actions + public void action Performed ( Action Event e ) + { -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -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 action Performed ( Action Event e ) { -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 ((((( + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - protected void BuildEvent(){} + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - 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 + 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + public Vector get Constraint From Data Base () + { - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + Vector v = new Vector (); + Socket server ; + String line = new 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(); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered -//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 Vector get Driver From Data Base () + { -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } + 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 - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"58 ""Subscribed Model +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -private String 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 void showText(EBShape sh) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set -public String GetSubscriberName() { return SubscriberName;} +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi -public String GetSubscriberReqno() { return SubscriberReqno;} +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -public String GetSubscriberModule() { return SubscriberModule;} +public void drawModel() +{ +repaint(); +} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"61 ""Worker Thread +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); -/** -* True if this thread is currently processing. - */ -public boolean busy; +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 -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + 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) { -owner = o; -} +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -/** - * Scan for and execute tasks. - */ -public void run() + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -Runnable target = null; +WorkArea. showText( sh); + } -do + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) { -target = owner. getAssignment(); -if ( target!=null) +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) { - target. run(); - owner. done. worker"" -",61,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall restore the executable model to its prior state.,119,0 -"66 ""Config Dialog +VisualPanel.Clicked( e. getX(), e. getY()); +} -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public void mouseExited( java. awt. event.MouseEvente){} -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); + +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; } -// 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 valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); } +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"54 ""eventserver +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 -public static void (String args[]) +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) { -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( int i=0; i<4; i++) +//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() { -p +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -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 + + + // 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 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 @@ -31898,764 +29557,641 @@ database. injectVariables( id, variable); // inject data into model database. executeModel( id, variable); }"" -",79,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel +",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 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 +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } +this. id = id; +this. type = type; +this. -public Vector get Values From Data Base () +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - 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 - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d -public JPanel get Panel () +public String toString() { - return panel ; - }"" -",48,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - - // database and eventserver information - S +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + /** +* Returns the id. +* @return int +*/ + public String getId() { -try +return id; + } -public static void main(String args[]) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -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 +return logic; + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the name. +* @return String +*/ + public String getName() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - +return name; + } - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent 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 """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"92 ""New Model + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -public NewModel(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); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + /** +* 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(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"49 ""Constraints Description + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -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 ; + /** +* 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 - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { +this. id = id; +this. type = type; +this. - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } +//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 Description () { - return this . description ; - } +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic - public 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 temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; } - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; } - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return 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 ; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public String get Performance Model Name () { - return this . performance Model Name ; + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public String to String () { - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -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 + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"65 ""About Dialog + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include deleting a requirement.,125,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall receive event messages when a requirement changes.,127,0 -"82 ""Tokenizer + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + /** +* 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 +"94 ""Refine Model -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public RefineModel(EBT em) { -return currentLine; -} - +super( em); + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -return errors; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) +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 +"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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try { -String result = """""""" + ch; + System. o -for( ; nextChar( ); result += ch ) + // 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 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 getErrorMessage() + { + return errMsg; + } -/** - * 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 Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -/** - * 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 String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + private JPanel driver Inner Panel = null ; -private void skip + private JPanel impact Panel = null ; + private JPanel impact Inner P + public 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 identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Only registered subscribers shall be allowed to establish traces.,102,0 -"87 ""EBT + 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 ); -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + panel = new JPanel (); + panel . set Layout ( null ); - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + this . server IP = + JOption Pane + . show In - public boolean mouseDown( java. awt.Evente, int x, int y) + public static void main ( String [] args ) { - 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 () + { -public void mouseExited( java. awt. event.MouseEvente){} + 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 mousePressed( java. awt. event.MouseEvente){} + pair Vector = new Vector (); -public void mouseReleased( java. awt. event.MouseEvente){} + query String Combo . remove All Items (); -public void mouseEntered( java. awt. event.MouseEvente){} + query String Combo . add Item ("""" Select Query String """"); -public void paint(Graphics g) {} + Socket server ; + String line = new String (); -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + // Select Actions + public void action Performed ( Action Event e ) + { -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) + // Button Actions -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include modifying a requirement.,124,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +public void action Performed ( Action Event e ) { -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get -/** - * 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 void impact Report ( String id ) + { + // super ("""" 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 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"50 ""Driver Description + container = get Content Pane (); -private String projectName = null; - private String modulePath = null; - private String requirementID = null; + set Size ( 1020 , 740 ); - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + + public Vector get Constraint From Data Base () { -this. projectName = projec + Vector v = new Vector (); -public String getChangedAttribute() - { -return changedAttribute; - } + Socket server ; + String line = new String (); - public String getDescription() - { -return description; - } - public String getFromAttribute() - { -return fromAttribute; - } + try + { + server = new Socket ( server IP , 1701 ); - public String getModulePath() - { -return modulePath; - } + if ( server . is Connected () ) + { + Buffered - public String getProjectName() - { -return projectName; - } - public String getRequirementID() - { -return requirementID; - } - public String getToAttribute() + public Vector get Driver From Data Base () { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + Vector v = new Vector (); - public void setDescription(String description) - { -this. description = description; - } + Socket server ; + String line = new String (); - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + try + { + server = new Socket ( server IP , 1701 ); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + 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 void setProjectName(String projectName) +public static void (String args[]) { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -this. requirementID = requirementID; - } - - public void setToAttribute(String toAttribute) + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -this. toAttribute = toAttribute; - } +p - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } +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 - public boolean equals(Object o) +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; + + + //@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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,For speculative events; the eventserver shall construct a composite event message.,132,0 +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 "65 ""About Dialog public AboutDialog(JFrame parent, boolean modal) { @@ -32665,582 +30201,596 @@ public AboutDialog(JFrame parent, boolean modal) { setName ("""" aboutDialog""""); private JTextArea text;"" -",65,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"93 ""Obsolete Model +",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 ObsoleteModel(EBT em) -{ -super( em); - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -// Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"82 ""Tokenizer + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +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 -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} +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 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ + public double 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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + 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 -/** - * 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 double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 - /** - * 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 Hash table requirementDescTable = new Hash table(); -/** - * 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 Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); -/** - * 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 PerformanceModel performance model= 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 void skip + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"49 ""Constraints Description +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -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 pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +public void insertValuesInDataBase() { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } + public void createExecuteString() + { - public String get Description () { - return this . description ; - } +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } +public void parseImpactReport(String str) + { - public String get Project Name () { - return this . project Name ; - } +Connection conn = null; - public String get Requirement ID () { - return this . requirement ID ; - } +Statement stmt = null; - public String get Units () { - return this . units ; - } +Vector constraintsVector = null; +Vector driversVector = null; - public String get Value () { - return this . value ; - } +ConstraintsDescription constraint = null; - public void set Description ( String description ) { - this . description = description ; - } +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 - public void set Logic ( String logic ) { - this . logic = logic ; - } +String msg=""""""""; - public void set Module Path ( String module Path ) { - this . module Path = module Path ; +public ModelDriver(String text) + { +this. msg = text; +init(); } - 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 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 - public void set Units ( String units ) { - this . units = units ; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - public String get Performance Model Name () { - return this . performance Model Name ; - } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } +public void 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 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 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 equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include adding new requirements.,121,0 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + 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 closeDialog(WindowEvent 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 -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} +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 -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"82 ""Tokenizer +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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;/ -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + 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 -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) +String 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. - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + public void Dispatch -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public String getErrorMessage() + { + return errMsg; + } -for( ; nextChar( ); result += ch ) + 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 +"93 ""Obsolete 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 ObsoleteModel(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); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -/** - * 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(""""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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { -private void skip + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -/** - * 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 String getNextID() + { +try { -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - 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() +public String searchDate() { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() +public String searchQueryID(String date) { -_ activeThreads++; -_ started = true; -notify(); - } +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + public String getConstraintFromDataBase(String queryID) { -_ activeThreads--; -notify(); - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + public String getDriverFromDataBase(String queryID) { -_ activeThreads = 0; +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; + + 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; }"" -",59,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"95 ""Text Model +",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 -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 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() { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +return c; + } + public String GetReqno() + { +return requirement No; + } - public void showText(EBShape sh) + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 { - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +public chartoken; +public int theLine; -public void HideText() +public Symbol( char tok, int line ) { -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public void ShowInfo( int CE) + +public Balance( Reader inStream ) { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); +errors = 0; +tok = new Tokenizer( inStream ); } -public void drawModel() + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -repaint(); -} +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -protected void paintComponent(Graphics g) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { - super. paintComponent( g); +if( opSym. token == '(' && clSym. token != ')' || -if (HideMsg == 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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) { - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,For speculative events; the eventserver shall construct a composite event message.,132,0 +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 "47 ""Impact Report private String server IP = """" local host """"; @@ -33379,76 +30929,40 @@ 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 -"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 +",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 - 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 +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 goal Label Values ( - String attribute , - String logic , - String value , - String units ) + DOORsThread(ServerSocket ss) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - + theServer = ss; + count++; + taskNumber = count; } -public Vector get Values From Data Base () + 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +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 ModifyModel(EBT em) +public NewModel(EBT em) { super( em); } @@ -33457,131 +30971,205 @@ 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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=""""""""; - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"62 ""Call Back +public ModelDriver(String text) + { +this. msg = text; +init(); + } -private Hash table requirementDescTable = new Hash table(); + 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 Hash table constraintDescTable = new Hash table(); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - private Hash table performanceModelTable = new Hash table(); + private long queryID = 0; - private PerformanceModel performance model= null + 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 parseSpeculateInformation(String str) + public Vector getConstraints() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } -public void identifyPerformanceModels() + public String getName() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +return name; + } + public void setName(String name) + { +this. name = name; + } -public void pullInformationFromDoors() + public void addDriver(DriverDescription driver) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } -public void insertValuesInDataBase() + public boolean containsDriver(DriverDescription driver) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +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 createExecuteString() + 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 -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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"92 ""New Model + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -public NewModel(EBT em) + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try { -super( 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. -public StringBuffer GenerateEvent() +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"77 ""Model Driver -String msg=""""""""; + + + // 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) { @@ -33596,108 +31184,7 @@ System. out. println(""""MODEL DRIVER CLASS 1/10""""); performance modelHandler pmh = new performance modelHandler( msg); System. out. println(""""MODEL DRIVER CLASS 2/10""""); pmh. messageParser"" -",77,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +",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 "58 ""Subscribed Model private String SubscriberName; @@ -33723,179 +31210,8 @@ public String GetSubscriberModule() { return SubscriberModule;} public String GetSubscriberKeyword1() { return SubscriberKeyword1;} public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"83 ""Variable - -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat - - - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) - { -this. id = id; -this. type = type; -this. - - -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) - { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - - -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic - - - -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +",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 "74 ""database @@ -33997,8 +31313,123 @@ 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Each artifact shall be placed under the control of a subscribermanager,106,0 +",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 + + +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); + + + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add + + +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} + + +public void drawModel() +{ +repaint(); +} + + +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} + + +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} + + +public void Clicked ( int x, int y) +{ +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs + + +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( + + + protected void BuildEvent(){} + + + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} + + +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even + + +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } + + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + + + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -34030,200 +31461,174 @@ private JLabel DSN Label; private JTextField DSN; private JLabel EventServerIP Label; private JTextField EventSe"" -",66,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall be able to delete subscriptions.,107,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} +",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 -public String GetSubscriberModule() { return SubscriberModule;} +/** +* 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 GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"72 ""Balance /** - * Symbol represents what will be placed on the stack. +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) +public ThreadPool( int size) { -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -errors = 0; -tok = new Tokenizer( inStream ); -} - - +thr /** - * 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; +* 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 /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; - - public static int count = 0; - - public PerformanceModel(String name, long queryID) +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -return constraintVector; +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 - public Vector getDrivers() - { -return driverVector; - } +String msg=""""""""; - public String getName() +public ModelDriver(String text) { -return name; +this. msg = text; +init(); } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + public void init() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } +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 +"65 ""About Dialog - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +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 +"79 ""performance model Handler - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public void removeConstraint(ConstraintsDescription constraint) + + performance model Handler(String msg) { -this. constraintVector. remove( constraint); +this. strES = msg; } - public DriverDescription getDriver(DriverDescription driver) + public void messageParser() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) + +//Re-execut +public String generateReport() { - cd = (ConstraintsDescription) this + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - public long getQueryID() - { -return this. queryID; + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public void setQueryID( long id) + + public void saveModel( int id) { -this. queryID = id; +// save current model +database. saveCurrentModel( id); } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A user shall register as a subscriber.,103,0 + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 "65 ""About Dialog public AboutDialog(JFrame parent, boolean modal) { @@ -34233,264 +31638,423 @@ public AboutDialog(JFrame parent, boolean modal) { setName ("""" aboutDialog""""); private JTextArea text;"" -",65,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"88 ""Event Model - - -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); +",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 EventModel(EBT e) +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -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; - } +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public void ClearVectors() +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +return currentLine; } -public void drawModel() +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -repaint(); +return errors; } -public void drawModel(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( ) +{ +while( nextChar( ) ) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } +return Character. isJavaIdentifierPart( ch ); } -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -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 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 AddLine( int t, int l, int r, int b) +/** + * 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( ) { -EventLines. addElement( new EventLine( t, l, r, b)); +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception 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 - +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +private void skip - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); 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( ) { -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall send the customized message to each impacted executable model.,136,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +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 - // 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 -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +public int GetT() { return top;} +public int GetL() { return left;} -// 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 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 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 saveMenuItemActionPerformed (ActionEvent evt) - { -try +// constructor +public Notification_Event() { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -exitApplication(); - } - +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); - } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + public void ParseEvent(String TextLine) { -if (! listModel. isEmpty()) +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -// 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 + //This method displays the contents of two array list to console +public void DisplayValues() { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"71 ""Requirement + 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 -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 Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 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 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 "76 ""Evaluator private static final int EOL = 0; @@ -34615,420 +32179,628 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall re execute the model using the speculative values.,117,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - +",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 +"83 ""Variable -} -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 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 -// run method will be execute from the main method when u say Thread. start() in main - public void run() + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - +this. id = id; +this. type = type; +this. - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); +//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 PerformanceModel performance model= null - public void parseSpeculateInformation(String str) +public String toString() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -public void identifyPerformanceModels() + /** +* Returns the id. +* @return int +*/ + public String getId() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +return id; + } -public void pullInformationFromDoors() + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +return logic; + } -public void insertValuesInDataBase() + /** +* Returns the name. +* @return String +*/ + public String getName() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -public void parseImpactReport(String str) - { + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -Connection conn = null; -Statement stmt = null; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -int driverLoop"" -",62,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A user shall register as a subscriber.,103,0 -"private JPanel center Panel = null ; - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - // Speculate Gui - public Speculate Gui () - { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - super ("" Speculate GUI ""); - container = get Content Pane (); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - // Submit Listener + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + /** +* 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 - send Query TO Server (); +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; - } + private long queryID = 0; - if ( e . get Source () == fetch 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(); + } - System . out . println ("" Fetch Button Pressed + public Vector getConstraints() + { +return constraintVector; + } + public Vector getDrivers() + { +return driverVector; + } - void send Query TO Server () + public String getName() { +return name; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + public void setName(String name) + { +this. name = name; + } - Socket socket ; - try { + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } - socket = new Socket ( ip , Port No ); + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - Output Stream os = socket . get Output Stream (); - Output Stream + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - public void pull Value From DOORS () + public void addConstraint(ConstraintsDescription constraint) { +this. constraintVector. add( constraint); + } - 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 ) + public boolean containsConstraint(ConstraintsDescription constraint) { - new Speculate Gui (); - }",46,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"93 ""Obsolete Model +return this. constraintVector. contains( constraint); + } -public ObsoleteModel(EBT em) -{ -super( em); + 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) -// Construct Visual model for Merge Event -public void BuildEvent() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -public StringBuffer GenerateEvent() + public void setQueryID( long id) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The prototype system shall utilize a driver to trigger events.,120,0 -"87 ""EBT +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 JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +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 EBT(Frame f) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -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) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -WorkArea. showText( sh); - } +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public boolean mouseDown( java. awt.Evente, int x, int y) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { - return true; - } - +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -VisualPanel.Clicked( e. getX(), e. getY()); +setVisible ( false); +dispose (); } -public void mouseExited( java. awt. event.MouseEvente){} - +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Delete subscriptions (2.2.3) 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 -public void mouseEntered( java. awt. event.MouseEvente){} +Socket aSocket; + int ID; + String EventLog; -public void paint(Graphics g) {} + Connection conn; + ResultSet rs; + Statement stmt; -public void update(Graphics g) {} + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public JSplitPane getSplitPane() + // 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 splitPane; + + } +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 void valueChanged(ListSelectionEvent e) +// 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 { -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener + + + // 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 void valueChanged(ListSelectionEvent event) +public chartoken; +public int theLine; + +public Symbol( char tok, int line ) { - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public void RedrawAll(EBShape sh) + +public Balance( Reader inStream ) { -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); +errors = 0; +tok = new Tokenizer( inStream ); } -public static void main(String s[]) + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -mainframe. addWindowListener( new WindowAdapter() + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -public void windowClosing(Wind"" -",87,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"86 ""EB Shape +if( opSym. token == '(' && clSym. token != ')' || -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + /** + * 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 EBShape( int xpos, int ypos, Color col) + //@param argsNo arguments are used. + public static void main(String args[]) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +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 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(60,80,1); +CurrentEvent = 4; +} - public boolean match( int mx, int my) - { -return true; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public int GetX() - { -return x; - } + 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 int GetY() - { -return y; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public Color GetC() + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { -return c; - } +return currentLine; +} - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"85 ""Decompose Model +/** + * 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 DecomposeModel(EBT em) + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -super( em); -MinimumNoRects = 3; - } +return Character. isJavaIdentifierPart( ch ); +} - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -public StringBuffer GenerateEvent() + + /** + * 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( ) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall manage traces for one or more artifacts.,112,0 +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 private String server IP = """" local host """"; @@ -35167,961 +32939,763 @@ public void action Performed ( Action Event e ) { if ( server . is Connected () ) { Buffered"" -",47,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +",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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +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 Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public boolean match( int mx, int my) +public void getIP Server( String serverIP) { -return true; +this. serverIP = serverIP; } - public int GetX() - { -return x; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public int GetY() - { -return y; - } +public void drawModel() +{ +repaint(); +} - public Color GetC() + +public void drawModel(EBShape sh) { -return c; - } +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - public String GetModule() +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() { -return ModulePath; - }"" -",86,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include deleting a requirement.,125,0 -"52 ""Pair +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -private String queryID; - private String queryString; + protected void BuildEvent(){} - public Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - } - public String getQueryID() { -return this. 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 + { +Even - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - public void setQueryString(String queryString) { -this. queryString = queryString; - } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - }"" -",52,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"86 ""EB Shape + 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 +"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 int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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 match( int mx, int my) - { -return true; - } +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public int GetX() - { -return x; - } +/** + * 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 int GetY() - { -return y; - } +/** + * 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 Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - public String GetProject() - { -return ProjectName; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p +/** + * 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 final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include merging requirements.,126,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"73 ""Constraints -String id; - String name; - double value; - String logic; +/* + * 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 - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +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 +"66 ""Config Dialog - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +// 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 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; - } +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 - /** -* Sets the name. -* @param name The name to set +/** +* The threads in the pool. */ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. */ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } - +Collection assignments = new ArrayList(3); - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - /** -* Returns the id. -* @return int +/** +* 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 getId() - { -return id; - } + pub /** -* Returns the name. -* @return String +* Get a new work assignment. +* +* @return A new assignment */ - public String getName() + public synchronized Runnable getAssignment() { -return name; - } +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 getValueFrom() + public void complete() { -return valueFrom; - } - - - public double getValueTo() +done. waitBegin(); +done. waitDone(); + } protected void finalize() { -return valueTo; +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 - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } + 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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } - - - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall receive event messages when a requirement changes.,127,0 -"91 ""Modify Model - -public ModifyModel(EBT em) +public void ShowInfo( int CE) { -super( em); - } - +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} - // Construct Visual model for Merge Event -public void BuildEvent() +public void drawModel() { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; +repaint(); } -public StringBuffer GenerateEvent() +protected void paintComponent(Graphics g) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - + super. paintComponent( g); - protected void paintComponent(Graphics g) +if (HideMsg == true) { -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; + 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; + // popup menu private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - // database and eventserver information - S - - public Notification_Processing() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + setTitle(""""EventsProcessor""""); 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 + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - private void saveMenuItemActionPerformed (ActionEvent evt) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -try +if (! listModel. isEmpty()) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + int index =0; + try { -exitApplication(); - } +Notification_Event nEvt1 = (Notificati - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -openEventsMenuItemActionPerformed( evt); - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) +void DeleteEvent(String SubscriberName, String EventID) { -if (! listModel. isEmpty()) +try { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +void DeleteRelatedEvents() { -if (! listModel. isEmpty()) +while ( m_Deleterequirement List. size()!=0) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + + +void AddSubscription(String SubscriberName, Requirement requirement ) { -new AboutDialog ( this, true). show(); - } +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(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +for ( int j=0; j< events. size(); j++) { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include deleting a requirement.,125,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall receive event messages when a requirement changes.,127,0 -"87 ""EBT - + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + // 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 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) +private boolean Analyze_CheckSubscription(String str) { -WorkArea. showText( sh); - } +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 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ - public boolean mouseDown( java. awt.Evente, int x, int y) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { - return true; - } +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 mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} +//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 void mouseExited( java. awt. event.MouseEvente){} + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + public void Dispatch -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} + public String getErrorMessage() + { + return errMsg; + } -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -public void update(Graphics g) {} +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; - public JSplitPane getSplitPane() +public Symbol( char tok, int line ) { -return splitPane; -} +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public void valueChanged(ListSelectionEvent e) +public Balance( Reader inStream ) { -if ( e. getValueIsAdjusting()) -return; +errors = 0; +tok = new Tokenizer( inStream ); } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public void RedrawAll(EBShape sh) + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String 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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 { -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +public chartoken; +public int theLine; -mainframe. addWindowListener( new WindowAdapter() +public Symbol( char tok, int line ) { -public void windowClosing(Wind"" -",87,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"74 ""database +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** - * Construct a connection object. - * @param Returns an object of type Connection + * Print an error message if clSym does not match opSym. + * Update errors. */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +private void checkMatch( Symbol opSym, Symbol clSym ) { - Class. fo - +if( opSym. token == '(' && clSym. token != ')' || /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int 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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"56 ""Event Parser +private Connection conn; + private ResultSet rs; + private Statement stmt; - /** -* 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) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall restore the executable model to its prior state.,119,0 -"90 ""Merge Model - - -public MergeModel(EBT em) + public void updateEvent(String str, String ID) { -super( em); - MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null +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; // - -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void pullInformationFromDoors() +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(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 -public void insertValuesInDataBase() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - +// 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 createExecuteString() + public void speculate(String str) { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +System. out. println(""""Speculate""""); +CallBack -public void parseImpactReport(String str) +public void impactReport(String str) { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Each artifact shall be placed under the control of a subscribermanager,106,0 -"89 ""Event Line - -protected int top, left, right, bottom; - - -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include deleting a requirement.,125,0 +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; @@ -36196,839 +33770,699 @@ try { Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +",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 - 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() - { +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public String getNextID() + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { +System. out. println("""" in get Connection""""); +Connection connect=null; try { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - + Class. fo -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 + /** +* 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 getConstraintFromDataBase(String 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) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +conn = this. getConnect - public String getDriverFromDataBase(String queryID) +/** +* 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) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"90 ""Merge Model +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru -public MergeModel(EBT em) +public void solveStructureEquation() { -super( em); - MinimumNoRects = 3; - } - +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - // 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 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) +public void setCalculatedValues() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = 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 - public String toString() + public Vector getImpactReport() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +//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 - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 - /** -* Returns the name. -* @return String -*/ - public String getName() + performance model Handler(String msg) { -return name; +this. strES = msg; } - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + public void messageParser() { -return valueFrom; - } +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - public double getValueTo() - { -return valueTo; - } +//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 name. -* @param name The name to set -*/ - public void setName(String name) + public void saveModel( int id) { -this. name = name; +// save current model +database. saveCurrentModel( id); } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - - public void setValueTo( double value) - { -this. valueTo = valueTo; + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); }"" -",75,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +",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 - // database and eventserver information - S +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + //@param argsNo arguments are used. + public static void main(String args[]) { -try - - -public static void main(String args[]) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -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 - + 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 -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) - { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +private String 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 saveMenuItemActionPerformed (ActionEvent evt) +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +this. projectName = projec - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +public String getChangedAttribute() { -exitApplication(); +return changedAttribute; } - - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public String getDescription() { -openEventsMenuItemActionPerformed( evt); +return description; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + public String getFromAttribute() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) - +return fromAttribute; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + public String getModulePath() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - +return modulePath; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + public String getProjectName() { -new AboutDialog ( this, true). show(); +return projectName; } - -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + public String getRequirementID() { - "" -",70,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include adding new requirements.,121,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall restore the executable model to its prior state.,119,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - +return requirementID; + } - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + public String getToAttribute() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +return toAttribute; + } -// finds the subscribers for this requirement - public void IdentifySubscribers() + public void setChangedAttribute(String changedAttribute) { -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. 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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); - } +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // Construct Visual model for Merge Event -public void BuildEvent() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - + 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 -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 paintComponent(Graphics g) +private static class Precedence { -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"63 ""Doors Thread +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +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 run() - { - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"60 ""Thread Pool +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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +/** + * 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 GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +/* + * 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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + /** + * 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 GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"56 ""Event Parser -private Connection conn; - private ResultSet rs; - private Statement stmt; +/** + * 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. + */ - //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) +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 +"75 ""Driver + +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -//Check if a subscription exists - public boolean CheckSubscription(String str) + public String toString() { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -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) + /** +* Returns the name. +* @return String +*/ + public String getName() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +return name; + } -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -// 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 valueFrom; + } - public void speculate(String str) + public double getValueTo() { -System. out. println(""""Speculate""""); -CallBack +return valueTo; + } -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); + /** +* 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); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public StringBuffer GenerateEvent() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A user shall register as a subscriber.,103,0 -"90 ""Merge Model +this. valueFrom = valueFrom; + } -public MergeModel(EBT em) + public void setValueTo( double value) { -super( em); - MinimumNoRects = 3; - } +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 +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(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +// 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"70 ""Notification Processing + private Hash table performanceModelTable = new Hash table(); -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + private PerformanceModel performance model= null - // database and eventserver information - S - public Notification_Processing() + public void parseSpeculateInformation(String str) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + +public void identifyPerformanceModels() { -try +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public static void main(String args[]) +public void pullInformationFromDoors() { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void insertValuesInDataBase() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - private void saveMenuItemActionPerformed (ActionEvent evt) + public void createExecuteString() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + +public void parseImpactReport(String str) { -exitApplication(); - } +Connection conn = null; - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"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) { -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()) + public void saveModel( int id) { - "" -",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 +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 =""""""""; @@ -37059,586 +34493,650 @@ 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 -"88 ""Event Model - +",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 -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) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs - + dd = (DriverDescription) this. driverVector. get( i) -public void CheckNotifyStatus() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } - protected void BuildEvent(){} + 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 - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} +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 AddEventRect( int x, int y, int colorStatus) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -if ( colorStatus == 1) + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public String getrequirement Text(String r, String p, String m) +private void okButtonActionPerformed (ActionEvent evt) { -return new String(""""requirementwill go here""""); - } + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public StringBuffer GenerateEvent() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -return new StringBuffer("""" """"); - }// end of GenerateEvent method +setVisible ( false); +dispose (); +} - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +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) { -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"50 ""Driver Description + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement -private String 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 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} -this. projectName = projec +public void drawModel() +{ +repaint(); +} -public String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() - { -return description; - } +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - public String getFromAttribute() - { -return fromAttribute; - } +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 +"47 ""Impact Report - public String getModulePath() - { -return modulePath; - } +private String server IP = """" local host """"; + private JPanel center Panel = null ; - public String getProjectName() - { -return projectName; - } + private JPanel driver Panel = new JPanel (); - public String getRequirementID() - { -return requirementID; - } + private JPanel driver Inner Panel = null ; - public String getToAttribute() - { -return toAttribute; - } + private JPanel impact Panel = null ; + private JPanel impact Inner P - public void setChangedAttribute(String changedAttribute) + public Impact Report () { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } + super ("""" Search Result GUI """"); - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + container = get Content Pane (); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + set Size ( 800 , 250 ); - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + panel = new JPanel (); - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } + panel . set Layout ( null ); - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + this . server IP = + JOption Pane + . show In - public String createKey() + + public static void main ( String [] args ) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); + + Impact Report im = new Impact Report (); + } - public boolean equals(Object o) + + public Vector search Date () { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + + 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 ) { -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + pair Vector = new Vector (); + + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"79 ""performance model Handler + Socket server ; + String line = new String (); -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 + // Select Actions + public void action Performed ( Action Event e ) + { - performance model Handler(String msg) - { -this. strES = msg; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + // Button Actions -//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 action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - public void saveModel( int id) + + + public void impact Report ( String id ) { -// save current model -database. saveCurrentModel( id); - } + // super ("""" Impact Report """"); - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } + container = get Content Pane (); - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"90 ""Merge Model + set Size ( 1020 , 740 ); + this . query ID = id ; -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } + System . out . println ("""" Impact Report Constructor ..... ID """" + - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"53 ""Performance Model + Socket server ; + String line = new String (); -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; + try + { + server = new Socket ( server IP , 1701 ); - public static int count = 0; + if ( server . is Connected () ) + { + Buffered - 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() + public Vector get Driver From Data Base () { -return driverVector; - } - public String getName() - { -return name; - } + Vector v = new Vector (); - public void setName(String name) - { -this. name = name; - } + Socket server ; + String line = new String (); - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } + try + { + server = new Socket ( server IP , 1701 ); - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } + 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 - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +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 - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } +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 boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) + +public EBT(Frame f) { - dd = (DriverDescription) this. driverVector. get( i) +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { - cd = (ConstraintsDescription) this +WorkArea. showText( sh); + } - public long getQueryID() + + public boolean mouseDown( java. awt.Evente, int x, int y) { -return this. queryID; + return true; } - public void setQueryID( long id) - { -this. queryID = id; + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"77 ""Model Driver + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } +public void mouseExited( java. awt. event.MouseEvente){} - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"61 ""Worker Thread +public void mousePressed( java. awt. event.MouseEvente){} -/** -* True if this thread is currently processing. - */ -public boolean busy; +public void mouseReleased( java. awt. event.MouseEvente){} -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public void update(Graphics g) {} + + public JSplitPane getSplitPane() { -owner = o; +return splitPane; } -/** - * Scan for and execute tasks. - */ -public void run() +public void valueChanged(ListSelectionEvent e) { -Runnable target = null; +if ( e. getValueIsAdjusting()) +return; +} -do +private class ValueReporter implements ListSelectionListener { -target = owner. getAssignment(); -if ( target!=null) +public void valueChanged(ListSelectionEvent event) { - target. run(); - owner. done. worker"" -",61,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"92 ""New Model + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -public NewModel(EBT em) +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) { + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"81 ""subscribermanager +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; -Socket aSocket; - int ID; - String EventLog; +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - Connection conn; - ResultSet rs; - Statement stmt; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - // 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 + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try + /** + * 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); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 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 "49 ""Constraints Description private String project Name = null ; @@ -37772,497 +35270,460 @@ 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"78 ""Notification Event +",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 +"48 ""Constraint Inner Panel -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim +private String 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 -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + 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 -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public void ParseEvent(String TextLine) + +public Vector get Values From Data Base () { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R -// Set the other members before calling this function - 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 //Comment Added by Amit Uchat + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"66 ""Config Dialog +public 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 +"52 ""Pair -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +private String queryID; + private String queryString; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + } + public String getQueryID() { +return this. queryID; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + public String getQueryString() { +return this. queryString; + } -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,For speculative events; the eventserver shall construct a composite event message.,132,0 -"private JPanel center Panel = null ; + public void setQueryID(String queryID) { +this. queryID = 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 + public void setQueryString(String queryString) { +this. queryString = queryString; + } - // Speculate Gui + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public Speculate Gui () - { - super ("" Speculate GUI ""); + }"" +",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 - container = get Content Pane (); +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 - set Size ( 800 , 600 ); +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); - // Submit Listener +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public void action Performed ( Action Event e ) { +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 - if ( e . get Source () == submit Button ) { +public ObsoleteModel(EBT em) +{ +super( em); + } - send Query TO Server (); - } +// 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 - if ( e . get Source () == fetch Button ) { +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 - System . out . println ("" Fetch Button Pressed +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; + } - void send Query TO Server () + public String toString() { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { +return valueFrom; + } - 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 double getValueTo() + { +return valueTo; + } - public static void main ( String [] args ) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { - new Speculate Gui (); - }",46,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A user shall register as a subscriber.,103,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"78 ""Notification Event +this. id = 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 -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +this. name = name; + } - public void ParseEvent(String TextLine) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +this. valueFrom = valueFrom; + } -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public void setValueTo( double value) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat +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 +"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 - //This method displays the contents of two array list to console -public void DisplayValues() +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - -public String getNextID() - { -try +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try +private void okButtonActionPerformed (ActionEvent evt) { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +setVisible ( false); +dispose (); +} - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +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 - 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 + // Speculate Gui -// finds the subscribers for this requirement - public void IdentifySubscribers() + 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 (); -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o + set Size ( 800 , 600 ); - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public void Dispatch + // Submit Listener - public String getErrorMessage() - { - return errMsg; - } + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + send Query TO Server (); -for ( int i = 0"" -",57,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"85 ""Decompose Model + } + 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 ; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include merging requirements.,126,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"73 ""Constraints + Socket socket ; + try { -String id; - String name; - double value; - String logic; + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } + 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 - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - /** -* 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; - }"" -",73,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"92 ""New Model + public int GetY() + { +return y; + } -public NewModel(EBT em) + public Color GetC() { -super( em); +return c; } + public String GetReqno() + { +return requirement No; + } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + public String GetProject() + { +return ProjectName; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 + 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 "75 ""Driver String id; @@ -38354,409 +35815,411 @@ this. valueFrom = valueFrom; { this. valueTo = valueTo; }"" -",75,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"65 ""About Dialog +",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 -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"92 ""New Model +Socket aSocket; + int ID; + String EventLog; -public NewModel(EBT em) -{ -super( em); - } + Connection conn; + ResultSet rs; + Statement stmt; + // 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); -AddArrow(35,97,59,97); -CurrentEvent = 0; + + } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -public StringBuffer GenerateEvent() +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub + // 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 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +String msg=""""""""; - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() +public ModelDriver(String text) { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +this. msg = text; +init(); + } - /** -* 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 init() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"93 ""Obsolete Model +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 -public ObsoleteModel(EBT em) +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() { -super( em); - } +} +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -// Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public StringBuffer GenerateEvent() +public void ParseRequirement(String TextLine) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"73 ""Constraints + 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 +"50 ""Driver Description -String id; - String name; - double value; - String logic; +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 - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + +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 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"78 ""Notification Event +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -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() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); } -// end of class Notification_Event public Object clone() throws CloneNotSupportedException { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public void ParseEvent(String TextLine) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public void ParseRequirement(String TextLine) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat - + 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""""; - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"88 ""Event Model +public Requirement() {// empty constructor -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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +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 void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public void drawModel() -{ -repaint(); -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public void drawModel(EBShape sh) + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} - + Class. fo -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 + /** +* 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 CheckNotifyStatus() + /** +* 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) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - +conn = this. getConnect - protected void BuildEvent(){} +/** +* 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 - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + /** +* 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 -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 solveStructureEquation() { -Even +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +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 - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall be able to delete subscriptions.,107,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include adding new requirements.,121,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 "49 ""Constraints Description private String project Name = null ; @@ -38890,351 +36353,109 @@ 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +",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 +"67 ""Event Detail Dialog -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - 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() +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - - - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A user shall register as a subscriber.,103,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } - - - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } - - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } - - - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } - - - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - - - performance model Handler(String msg) - { -this. strES = msg; - } - - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -//Re-execut -public String generateReport() +private void okButtonActionPerformed (ActionEvent evt) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } - - - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } - - - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () + if ( displayMode == true) { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - 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 ""; +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"56 ""Event Parser +private 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 -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 +// constructor +public Notification_Event() { - 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; - + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -//Check if a subscription exists - public boolean CheckSubscription(String str) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + public void ParseEvent(String TextLine) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -// 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 - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat - 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 + //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 @@ -39336,7 +36557,8 @@ System. out. println("""" enter calcValue // this method creates the token for e Vector report = new Vector(); report. add( trackVariableName); report. add(Stri"" -",74,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +",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 = """"""""; @@ -39380,629 +36602,529 @@ public void DisplayValues() System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); System. out. println("""" m_EventI"" -",69,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"87 ""EBT - +",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 -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +protected int top, left, right, bottom; -public EBT(Frame f) +public EventLine ( int t, int l, int r, int b) { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +top = t; +left = l; +right = r; +bottom = b; +} - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } +public int GetT() { return top;} +public int GetL() { return left;} - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } +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 - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } +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 mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + //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 mouseExited( java. awt. event.MouseEvente){} +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -public void mousePressed( java. awt. event.MouseEvente){} -public void mouseReleased( java. awt. event.MouseEvente){} +//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 mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} -public void update(Graphics g) {} +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public JSplitPane getSplitPane() -{ -return splitPane; -} + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -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 logic; + } -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"52 ""Pair -private String queryID; - private String queryString; + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } - public Pair(String queryID, String queryString) { + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -this. queryID = queryID; -this. queryString = queryString; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + /** +* Sets the name. +* @param name The name to set +*/ + 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include modifying a requirement.,124,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall re execute the model using the speculative values.,117,0 -"85 ""Decompose Model + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + /** +* 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"90 ""Merge Model + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - // Construct Visual model for Merge Event -public void BuildEvent() + /** +* 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 { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent - +public chartoken; +public int theLine; -public StringBuffer GenerateEvent() +public Symbol( char tok, int line ) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"90 ""Merge Model +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public StringBuffer GenerateEvent() + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"48 ""Constraint Inner Panel +if( opSym. token == '(' && clSym. token != ')' || -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 + /** + * 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 +"77 ""Model Driver +String msg=""""""""; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +public ModelDriver(String text) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - +this. msg = text; +init(); } -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 init() { - return panel ; - }"" -",48,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"76 ""Evaluator +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 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 GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p -private static class Precedence +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -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[ ] +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -private static class Token +private void okButtonActionPerformed (ActionEvent evt) { -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 ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); } -/** - * 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 LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 ; -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + 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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public Speculate Gui () + { + super ("" Speculate GUI ""); -/** - * 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 + container = get Content Pane (); + set Size ( 800 , 600 ); -/* - * 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 + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. + // Submit Listener + public void action Performed ( Action Event e ) { -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ + if ( e . get Source () == submit Button ) { + send Query TO Server (); + } -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"51 ""Driver Inner Panel + if ( e . get Source () == fetch Button ) { -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 ("" Fetch Button Pressed -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + void send Query TO Server () + { -return panel; - }"" -",51,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"56 ""Event Parser + String ip = this . event Server IP ; + int Port No = 1701 ; -private Connection conn; - private ResultSet rs; - private Statement stmt; + Socket socket ; + try { - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - public void updateEvent(String str, String ID) + public void pull Value From DOORS () { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -//Check if a subscription exists - public boolean CheckSubscription(String str) - { + String [] attribute = { "" Value "", "" Attribute "" }; -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next + String project Name = this . proj Name Text . get -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) + public static void main ( String [] args ) { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag + 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)); -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +// 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 impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +// 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 -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -return panel; - }"" -",51,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"75 ""Driver + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } /** -* Returns the id. -* @return int +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName */ - public String getId() - { -return id; - } + public int get /** -* Returns the name. -* @return String +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables */ - public String getName() + public void saveCurrentModel( int graphId) { -return name; - } +conn = this. getConnect - /** -* Returns the value. -* @return double +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable */ - public double getValueFrom() - { -return valueFrom; - } - + public void injectVa - public double getValueTo() + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) { -return valueTo; - } +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) +public void solveStructureEquation() { -this. id = id; - } +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +public void getTrackVariableName() { -this. name = name; - } +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public void setCalculatedValues() { -this. valueFrom = valueFrom; - } +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n - public void setValueTo( double value) + public Vector getImpactReport() { -this. valueTo = valueTo; - }"" -",75,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +//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 @@ -40068,7 +37190,33 @@ 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 +",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 + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 "52 ""Pair private String queryID; @@ -40108,83 +37256,11 @@ return """"Query ID: """" }"" -",52,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include merging requirements.,126,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include adding new requirements.,121,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e - - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall be able to construct speculative queries using a GUI.,115,0 +",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 "61 ""Worker Thread /** @@ -40223,567 +37299,564 @@ if ( target!=null) { target. run(); owner. done. worker"" -",61,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"54 ""eventserver +",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 -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 +protected int top, left, right, bottom; -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include deleting a requirement.,125,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -public Requirement() {// empty constructor +public int GetT() { return top;} -} +public int GetL() { return left;} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public int GetR() { return right;} +public int GetB() { return bottom;}"" +",89,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_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 ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"65 ""About Dialog +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"77 ""Model Driver +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -String msg=""""""""; -public ModelDriver(String text) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -this. msg = text; -init(); - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"49 ""Constraints Description +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} -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 LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +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 - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - } + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin - public String get Description () { - return this . description ; - } +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - public String get Logic () { - return this . logic ; - } +this. projectName = projec - public String get Module Path () { - return this . module Path ; +public String getChangedAttribute() + { +return changedAttribute; } - public String get Project Name () { - return this . project Name ; + public String getDescription() + { +return description; } - public String get Requirement ID () { - return this . requirement ID ; + public String getFromAttribute() + { +return fromAttribute; } - public String get Units () { - return this . units ; + public String getModulePath() + { +return modulePath; } - public String get Value () { - return this . value ; + public String getProjectName() + { +return projectName; } - public void set Description ( String description ) { - this . description = description ; + public String getRequirementID() + { +return requirementID; } - public void set Logic ( String logic ) { - this . logic = logic ; + public String getToAttribute() + { +return toAttribute; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public void setDescription(String description) + { +this. description = description; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public void set Units ( String units ) { - this . units = units ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public void set Value ( String units ) { - this . value = units ; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public String get Attribute () { - return this . attribute ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + 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 get Performance Model Name () { - return this . performance Model Name ; - } +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { +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 +"private JPanel center Panel = null ; - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + 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 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 Speculate Gui () + { + super ("" Speculate GUI ""); -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"88 ""Event Model + container = get Content Pane (); + set Size ( 800 , 600 ); -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add + // Submit Listener + public void action Performed ( Action Event e ) { -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } + if ( e . get Source () == submit Button ) { + 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 () + { -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + 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 + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -public void CheckNotifyStatus() + public void pull Value From DOORS () { -//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 ""; - protected void BuildEvent(){} - + 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 registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 String getrequirement Text(String r, String p, String m) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -return new String(""""requirementwill go here""""); - } +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +public String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Only registered subscribers shall be allowed to establish traces.,102,0 -"73 ""Constraints +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -String id; - String name; - double value; - String logic; +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; - 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; } - - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public String getFromAttribute() + { +return fromAttribute; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String getModulePath() + { +return modulePath; } - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String getProjectName() + { +return projectName; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public String getRequirementID() + { +return requirementID; } + public String getToAttribute() + { +return toAttribute; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } + public void setDescription(String description) + { +this. description = description; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"47 ""Impact Report + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } -private String server IP = """" local host """"; - private JPanel center Panel = null ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - private JPanel driver Panel = new JPanel (); + public void setProjectName(String projectName) + { +this. projectName = projectName; + } - private JPanel driver Inner Panel = null ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - private JPanel impact Panel = null ; - private JPanel impact Inner P + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - public Impact Report () + public String createKey() { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - super ("""" Search Result GUI """"); + 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() + { - container = get Content Pane (); +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - set Size ( 800 , 250 ); - panel = new JPanel (); +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 - panel . set Layout ( null ); +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - this . server IP = - JOption Pane - . show In + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - public static void main ( String [] args ) + performance model Handler(String msg) { - - Impact Report im = new Impact Report (); - +this. strES = msg; } - - public Vector search Date () + public void messageParser() { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - 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 (); +//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; - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - Socket server ; - String line = new String (); + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } - // Select Actions - public void action Performed ( Action Event e ) - { + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + 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; - // Button Actions + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -public void action Performed ( Action Event e ) { +/** +* 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 - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } - 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 () + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - +_ activeThreads--; +notify(); + } - public Vector get Driver From Data Base () + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { - - 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 +_ 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 @@ -40856,388 +37929,514 @@ notify(); _ activeThreads = 0; }"" ",59,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"79 ""performance model Handler +"80 ""Requirement -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +public Requirement() {// empty constructor - performance model Handler(String msg) - { -this. strES = msg; +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -//Re-execut -public String generateReport() -{ - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"82 ""Tokenizer -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public void saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +/** + * 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( ) ) +{ -// 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() - { + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -String sName, sReqno, sModule, sKey1, sKey2; -try + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - System. o +String result = """""""" + ch; - // 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. +for( ; nextChar( ); result += ch ) - public void Dispatch - public String getErrorMessage() - { - return errMsg; - } + /** + * 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 boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +/** + * 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 ) { } +} -for ( int i = 0"" -",57,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"88 ""Event Model + +/** + * 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 -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); +/** + * 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 EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +/** + * 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 -public void getIP Server( String serverIP) +public static void (String args[]) { -this. serverIP = serverIP; - } +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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + 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() -{ -repaint(); -} + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -public void drawModel(EBShape sh) +public String getNextID() + { +try { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -public void CheckNotifyStatus() + public String getConstraintFromDataBase(String queryID) { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) +String ConstString = new String(); +try { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - protected void BuildEvent(){} + 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 +"49 ""Constraints Description +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = 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 Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -Even + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"73 ""Constraints + 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include merging requirements.,126,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"81 ""subscribermanager + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) +public int 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[]) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ +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; + } + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ } -public void sendImpactReportToEventServer(String text) +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public void addConstraint(ConstraintsDescription constraint) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try +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; + } - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public void setQueryID( long 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include deleting a requirement.,125,0 +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; @@ -41329,7 +38528,154 @@ this. valueFrom = valueFrom; { 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 +",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 + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: Delete subscriptions (2.2.3) 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""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 =""""""""; @@ -41360,646 +38706,557 @@ public void ParseRequirement(String TextLine) { LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); m_Project=Line"" -",80,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - +",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 - 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: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"77 ""Model Driver - -String msg=""""""""; + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -public ModelDriver(String text) - { -this. msg = text; -init(); - } +public void mouseExited( java. awt. event.MouseEvente){} - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"95 ""Text Model -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p +public void mousePressed( java. awt. event.MouseEvente){} -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 mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set +public void paint(Graphics g) {} -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi +public void update(Graphics g) {} -public void ShowInfo( int CE) + public JSplitPane getSplitPane() { -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); +return splitPane; } -public void drawModel() + +public void valueChanged(ListSelectionEvent e) { -repaint(); +if ( e. getValueIsAdjusting()) +return; } - -protected void paintComponent(Graphics g) +private class ValueReporter implements ListSelectionListener { - super. paintComponent( g); +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -if (HideMsg == true) +public void RedrawAll(EBShape sh) { - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"60 ""Thread Pool +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -/** -* 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); +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= -/** -* 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 static class Precedence { -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub +public int 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[ ] +{ - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"62 ""Call Back +private 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 Hash table requirementDescTable = new Hash table(); +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - private Hash table constraintDescTable = new Hash table(); +/** + * 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 Hash table performanceModelTable = new Hash table(); +/** + * 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 PerformanceModel performance model= null +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = 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 void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + /** + * 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 createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +/** + * 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 parseImpactReport(String str) - { -Connection conn = null; +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 -Statement stmt = null; +String id; + String name; + double value; + String logic; -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -int driverLoop"" -",62,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"69 ""Notification Event -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -if ( m_Eve -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"51 ""Driver Inner Panel + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = 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; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; }"" -",51,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"84 ""White Board Execution Graph +",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 -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +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 WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +//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 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 getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -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 saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"49 ""Constraints Description - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target +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 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 Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement 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 -"63 ""Doors Thread -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + public String get Module Path () { + return this . module Path ; } + public String get Project Name () { + return this . project Name ; + } - public void run() - { + public String get Requirement ID () { + return this . requirement ID ; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"61 ""Worker Thread + public String get Units () { + return this . units ; + } -/** -* True if this thread is currently processing. - */ -public boolean busy; + public String get Value () { + return this . value ; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + 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 ; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"78 ""Notification Event + public void set Units ( String units ) { + this . units = units ; + } -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim + public void set Value ( String units ) { + this . value = units ; + } -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public String get Impacted Constraint () { + return this . impacted Constraint ; + } -// 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 Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } - 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 Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model Name ; + } -// 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 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 """" - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p +public 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 final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"81 ""subscribermanager -Socket aSocket; - int ID; - String EventLog; +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 - Connection conn; - ResultSet rs; - Statement stmt; +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - // 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - -} -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 +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -private void closeDialog(WindowEvent evt) { +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent 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 LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -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 +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 = """"""""; @@ -42050,846 +39307,1292 @@ public void DisplayValues() { System. out. println(""""\ r\ nValues of the event:\ r\ n""""); System. out. println("""" "" -",78,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; +",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 static int count = 0; +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 PerformanceModel(String name, long queryID) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); } - public Vector getConstraints() + + public String toString() { -return constraintVector; +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - public Vector getDrivers() + /** +* Returns the id. +* @return int +*/ + public String getId() { -return driverVector; +return id; } - public String getName() + + /** +* Returns the name. +* @return String +*/ + public String getName() { return name; } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); +return valueFrom; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - public boolean containsDriver(DriverDescription driver) + public double getValueTo() { -return this. driverVector. contains( driver); +return valueTo; } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -return this. constraintVector. contains( constraint); +this. id = id; } - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +this. name = name; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -return this. queryID; +this. valueFrom = valueFrom; } - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() + public void setValueTo( double value) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; +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 +"76 ""Evaluator - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +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 updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +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[ ] +{ -//Check if a subscription exists - public boolean CheckSubscription(String str) - { +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +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 { -//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 EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -//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 +/** + * 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 speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +/** + * 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 impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"58 ""Subscribed Model +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + 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 + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public String GetSubscriberName() { return SubscriberName;} -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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"79 ""performance model Handler +/* + * 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 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 + /** + * 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. - performance model Handler(String msg) - { -this. strES = msg; - } +/** + * 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 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 static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Delete subscriptions (2.2.3) 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 +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } + 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 saveModel( int id) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -// save current model -database. saveCurrentModel( id); + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } +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 execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"85 ""Decompose Model + if ( server . is Connected () ) + { + Buffered R -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - // 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 speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"93 ""Obsolete Model + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -public ObsoleteModel(EBT em) -{ -super( em); - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -// 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 +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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -public StringBuffer GenerateEvent() + + //@param argsNo arguments are used. + public static void main(String args[]) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include adding new requirements.,121,0 -"89 ""Event Line +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 +"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;} +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -public int GetL() { return left;} -public int GetR() { return right;} +/** + * 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 int GetB() { return bottom;}"" -",89,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"85 ""Decompose Model -public DecomposeModel(EBT em) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -super( em); -MinimumNoRects = 3; - } +return Character. isJavaIdentifierPart( ch ); +} - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) -public StringBuffer GenerateEvent() + /** + * 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( ) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"61 ""Worker Thread +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + /** -* 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 /** - * Scan for and execute tasks. + * Symbol represents what will be placed on the stack. */ -public void run() +private static class Symbol { -Runnable target = null; +public chartoken; +public int theLine; -do -{ -target = owner. getAssignment(); -if ( target!=null) +public Symbol( char tok, int line ) { - target. run(); - owner. done. worker"" -",61,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"47 ""Impact Report +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 ); + /** + * 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 - panel = new JPanel (); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + 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 search Date () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +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 - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - pair Vector = new Vector (); - query String Combo . remove All Items (); + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + 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 - // Select Actions + 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 action Performed ( Action Event e ) - { - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - // Button Actions +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 -public void action Performed ( Action Event e ) { +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - Pair pair = ( Pair ) pair Vector . get ( i ); - if ( pair - . get +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} - public void impact Report ( String id ) +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 + + +public MergeModel(EBT em) { +super( em); + MinimumNoRects = 3; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent - set Size ( 1020 , 740 ); - this . query ID = id ; +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 - System . out . println ("""" Impact Report Constructor ..... 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 - public Vector get Constraint From Data Base () + //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. - Vector v = new Vector (); - Socket server ; - String line = new String (); +//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 - try - { - server = new Socket ( server IP , 1701 ); +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + - if ( server . is Connected () ) - { - Buffered +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - public Vector get Driver 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 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,For speculative events; the eventserver shall construct a composite event message.,132,0 -"95 ""Text Model + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } - 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) { +this. id = 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(); -} + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void drawModel() -{ -repaint(); -} + /** +* 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); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"private JPanel center Panel = null ; + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - // Speculate Gui + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public Speculate Gui () - { - super ("" Speculate GUI ""); + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - container = get Content Pane (); - set Size ( 800 , 600 ); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - // Submit Listener - public void action Performed ( Action Event e ) { + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - if ( e . get Source () == submit Button ) { - send Query TO Server (); + /** +* 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 - } - if ( e . get Source () == fetch 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 - System . out . println ("" Fetch Button Pressed + /** + * 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 - void 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 + + + /** +* 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 +//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 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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 +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 DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // Construct Visual model for Merge Event -public void BuildEvent() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect + 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 +/** +* 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 StringBuffer GenerateEvent() +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"92 ""New Model - -public NewModel(EBT em) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -super( 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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); } +done. waitDone(); + } +}"" +",60,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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 ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + + } + + + public String get Description () { + return this . description ; + } + + public String get Logic () { + return this . logic ; + } + + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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(""""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 +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 "73 ""Constraints String id; @@ -42981,321 +40684,536 @@ 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 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include modifying a requirement.,124,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall send the customized message to each impacted executable model.,136,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +",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 -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +// constructor +public Notification_Event() { + 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 +// 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 void okButtonActionPerformed (ActionEvent evt) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { - if ( displayMode == true) + 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_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + + //This method displays the contents of two array list to console +public void DisplayValues() { -setVisible ( false); -dispose (); -} + 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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,A user shall register as a subscriber.,103,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include deleting a requirement.,125,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +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 panel; - }"" -",51,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"81 ""subscribermanager -Socket aSocket; - int ID; - String EventLog; +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 - Connection conn; - ResultSet rs; - Statement stmt; +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, 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 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 sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + 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 -// 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 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() - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"62 ""Call Back +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 -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - public void parseSpeculateInformation(String str) + public void Updaterequirement Info(String rno, String pname, String mname) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -public void identifyPerformanceModels() + public boolean match( int mx, int my) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +return true; + } -public void pullInformationFromDoors() + public int GetX() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +return x; + } -public void insertValuesInDataBase() + public int GetY() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +return y; + } + public Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } - public void createExecuteString() + public String GetProject() { +return ProjectName; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 -public void parseImpactReport(String str) +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; + public void run() + { -Vector constraintsVector = null; -Vector driversVector = null; + 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 -ConstraintsDescription constraint = null; +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 -int driverLoop"" -",62,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"93 ""Obsolete Model +public 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 ObsoleteModel(EBT em) +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 + +public ModifyModel(EBT em) { super( em); } -// Construct Visual model for Merge Event + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +CurrentEvent = 4; +} public StringBuffer GenerateEvent() - { +{ StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include modifying a requirement.,124,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include merging requirements.,126,0 -"84 ""White Board Execution Graph +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; + public static int count = 0; - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + public Vector getConstraints() + { +return constraintVector; + } -public void 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 getDrivers() + { +return driverVector; + } + public String getName() + { +return name; + } -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const + public 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++ + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } - 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 boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( 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 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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public long getQueryID() + { +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 + 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 + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 /** @@ -43334,393 +41252,162 @@ if ( target!=null) { target. run(); owner. done. worker"" -",61,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +",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 - 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() - { -return requirementID; - } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + }"" +",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 +"48 ""Constraint Inner Panel - public void setDescription(String description) - { -this. description = description; - } +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 setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + 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 setModulePath(String modulePath) + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. modulePath = modulePath; + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec - -public String getChangedAttribute() - { -return changedAttribute; - } - - public String getDescription() - { -return description; - } - - public String getFromAttribute() - { -return fromAttribute; - } - - public String getModulePath() - { -return modulePath; - } - - public String getProjectName() - { -return projectName; - } - - public String getRequirementID() - { -return requirementID; - } - - public String getToAttribute() - { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) +public Vector get Values From Data Base () { -this. fromAttribute = fromAttribute; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + if ( server . is Connected () ) + { + Buffered R - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - 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 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 -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"56 ""Event Parser +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; - - -//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 +top = t; +left = l; +right = r; +bottom = b; +} - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +public int GetT() { return top;} +public int GetL() { return left;} -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A user shall register as a subscriber.,103,0 -"77 ""Model Driver +public int GetR() { return right;} -String msg=""""""""; +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 -public ModelDriver(String text) - { -this. msg = text; -init(); +public RefineModel(EBT em) +{ +super( em); } - - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include deleting a requirement.,125,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall be able to construct speculative queries using a GUI.,115,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() + // Construct Visual model for Merge Event +public void BuildEvent() { + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +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; @@ -43812,190 +41499,311 @@ 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 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +",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 - private long queryID = 0; +public NewModel(EBT em) +{ +super( em); + } - 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(); - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() - { -return driverVector; - } +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 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 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 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); - } +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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - dd = (DriverDescription) this. driverVector. get( i) - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include merging requirements.,126,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -owner = o; +setVisible ( false); +dispose (); } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide -do -{ -target = owner. getAssignment(); -if ( target!=null) + +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 Requirement() { - target. run(); - owner. done. worker"" -",61,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"85 ""Decompose Model +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public DecomposeModel(EBT 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 + +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 RefineModel(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 - - +AddEventRect(60,80,1); +CurrentEvent = 3; +} public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The prototype system shall utilize a driver to trigger events.,120,0 +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 + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"89 ""Event Line + +protected int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} + + +public int GetT() { return top;} + +public int GetL() { return left;} + +public int GetR() { return right;} + +public int GetB() { return bottom;}"" +",89,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 ; @@ -44064,74 +41872,173 @@ Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription public static void main ( String [] args ) { new Speculate Gui (); - }",46,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"86 ""EB Shape + }",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 +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 int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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 match( int mx, int my) - { -return true; - } +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public int GetX() - { -return x; - } +/** + * 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 int GetY() - { -return y; - } +/** + * 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 Color GetC() -{ -return c; - } - public String GetReqno() - { -return requirement No; - } +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - public String GetProject() - { -return ProjectName; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 + +/** + * After a token is read, use operator precedence parsing + * approach to process it; missing opening parentheses + * are detected here. + */ +private void processToken( Token lastToken ) { +System. out. printl + + +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP + + + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 "47 ""Impact Report private String server IP = """" local host """"; @@ -44271,293 +42178,197 @@ public void action Performed ( Action Event e ) { { Buffered"" ",47,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} +private String queryID; + private String queryString; -/** - * 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 Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - /** - * 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 getQueryID() { +return this. queryID; + } - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A user shall register as a subscriber.,103,0 -"87 ""EBT + public String getQueryString() { +return this. queryString; + } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -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 setQueryString(String queryString) { +this. queryString = queryString; } - 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 String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public void update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + }"" +",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 +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) +public Requirement() {// empty constructor -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); } -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () - { - - super ("""" Search Result GUI """"); +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - container = get Content Pane (); - set Size ( 800 , 250 ); + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - panel = new JPanel (); - panel . set Layout ( null ); +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 . server IP = - JOption Pane - . show In +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public static void main ( String [] args ) + DOORsThread(ServerSocket ss) { - - Impact Report im = new Impact Report (); - + theServer = ss; + count++; + taskNumber = count; } - public Vector search Date () + public void run() { - 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 ) + while( true) { - - 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 ) + 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 - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; +private Connection conn; + private ResultSet rs; + private Statement stmt; - System . out . println ("""" Impact Report Constructor ..... ID """" + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public Vector get Constraint From Data Base () + public void updateEvent(String str, String ID) { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - Vector v = new Vector (); - - Socket server ; - String line = new String (); +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - try - { - server = new Socket ( server IP , 1701 ); +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - if ( server . is Connected () ) - { - Buffered +//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 Vector get Driver From Data Base () +//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 - Vector v = new Vector (); - Socket server ; - String line = new String (); + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The prototype system shall utilize a driver to trigger events.,120,0 +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 "76 ""Evaluator private static final int EOL = 0; @@ -44682,183 +42493,270 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; +",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 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; - public static int count = 0; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - public PerformanceModel(String name, long queryID) + EventServerThread(ServerSocket ss) { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); - } - - public Vector getConstraints() + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() { -return constraintVector; - } - public Vector getDrivers() + while( true) { -return driverVector; - } - - public String getName() + try { -return name; - } +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) +public String getNextID() { -if ( driverVector. contains( driver)) +try { -} -else - this. driverVector. add( driver); - } - - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); - } - - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); - } - public boolean containsConstraint(ConstraintsDescription constraint) +public String searchDate() { -return this. constraintVector. contains( constraint); - } +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - public void removeConstraint(ConstraintsDescription constraint) - { -this. constraintVector. remove( constraint); - } - public DriverDescription getDriver(DriverDescription driver) +public String searchQueryID(String date) { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { - dd = (DriverDescription) this. driverVector. get( i) + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) - { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this - public long getQueryID() + public String getConstraintFromDataBase(String queryID) { -return this. queryID; - } +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() + public String getDriverFromDataBase(String queryID) { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"86 ""EB Shape +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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -public EBShape( int xpos, int ypos, Color col) + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ - public void Updaterequirement Info(String rno, String pname, String mname) +} +public void sendImpactReportToEventServer(String text) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public boolean match( int mx, int my) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -return true; - } - +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - public int GetX() - { -return x; - } - public int GetY() + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -return y; - } +// 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 Color GetC() +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 { -return c; - } +public chartoken; +public int theLine; - public String GetReqno() - { -return requirement No; - } +public Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ - public String GetProject() + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"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 () { -return ProjectName; - } + super ("" Speculate GUI ""); - public String GetModule() + 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 () { -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 + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 "59 ""Done /** * The number of Worker object * threads that are currently working @@ -44930,565 +42828,265 @@ 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 -"76 ""Evaluator +",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 static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= +private String 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 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 Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { + public String get Description () { + return this . description ; + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + public String get Logic () { + return this . logic ; + } -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken + public String get Module Path () { + return this . module Path ; + } -/** - * 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 Project Name () { + return this . project 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 get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -/** - * 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 Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public void set Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } -/** - * 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 Project Name ( String project Name ) { + this . project Name = project Name ; + } + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement 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 + public void set Units ( String units ) { + this . units = units ; + } + public void set Value ( String units ) { + this . value = units ; + } - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ + public String get 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 static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"86 ""EB Shape + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -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 Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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 +private Connection conn; + private ResultSet rs; + private Statement stmt; - public boolean match( int mx, int my) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -return true; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public int GetX() + public void updateEvent(String str, String ID) { -return x; - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public int GetY() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -return y; - } - public Color GetC() -{ -return c; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public String GetReqno() + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -return requirement No; - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - public String GetProject() + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -return ProjectName; - } +// 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 GetModule() + public void speculate(String str) { -return ModulePath; - }"" -",86,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"89 ""Event Line +System. out. println(""""Speculate""""); +CallBack -protected int top, left, right, bottom; +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"49 ""Constraints Description -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} +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 int GetT() { return top;} -public int GetL() { return left;} + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -public int GetR() { return right;} + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -public int GetB() { return bottom;}"" -",89,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"95 ""Text Model + } -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + public String get Module Path () { + return this . module Path ; + } -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + public String get Project Name () { + return this . project Name ; + } -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + public String get Requirement ID () { + return this . requirement ID ; + } -public void drawModel() -{ -repaint(); -} + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"83 ""Variable - -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat - - - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) - { -this. id = id; -this. type = type; -this. - - -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) - { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - - -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic - - - -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } - - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } - - - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } - - - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } - - - public String get Description () { - return this . description ; - } - - public String get Logic () { - return this . logic ; - } - - public String get Module Path () { - return this . module Path ; - } - - public String get Project Name () { - return this . project Name ; - } - - public String get Requirement ID () { - return this . requirement ID ; - } - - public String get Units () { - return this . units ; - } - - public String get Value () { - return this . value ; - } - - public void set Description ( String description ) { - this . description = description ; - } + public void set Description ( String description ) { + this . description = description ; + } public void set Logic ( String logic ) { this . logic = logic ; @@ -45566,96 +43164,134 @@ 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"69 ""Notification Event +",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 -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() +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) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - public void ParseEvent(String TextLine) + public boolean mouseDown( java. awt.Evente, int x, int y) { - 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 true; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } -if ( m_Eve + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -public void DisplayValues() + +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() { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include merging requirements.,126,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"52 ""Pair +return splitPane; +} -private String queryID; - private String queryString; +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 Pair(String queryID, String queryString) { +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. queryID = queryID; -this. queryString = queryString; +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 String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +public Requirement() {// empty constructor - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +} - public void setQueryString(String queryString) { -this. queryString = queryString; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - }"" -",52,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Each artifact shall be placed under the control of a subscribermanager,106,0 + +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 private JLabel projectNameLabel = null; @@ -45679,150 +43315,200 @@ panel. setBackground(Color.LIGHTpublic JPanel createPanel() { return panel; }"" -",51,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"66 ""Config Dialog +",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 +"80 ""Requirement -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); +public Requirement() {// empty constructor + } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 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 +"89 ""Event Line -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +protected int top, left, right, bottom; - private long queryID = 0; - public static int count = 0; +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} - 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 int GetT() { return top;} - public Vector getDrivers() - { -return driverVector; - } +public int GetL() { return left;} - public String getName() - { -return name; - } +public int GetR() { return right;} - public void setName(String name) - { -this. name = name; - } +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 +"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) + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +"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) { -return this. driverVector. contains( driver); +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public void addConstraint(ConstraintsDescription constraint) + + public void Updaterequirement Info(String rno, String pname, String mname) { -this. constraintVector. add( constraint); +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public boolean containsConstraint(ConstraintsDescription constraint) + + public boolean match( int mx, int my) { -return this. constraintVector. contains( constraint); +return true; } - public void removeConstraint(ConstraintsDescription constraint) + + public int GetX() { -this. constraintVector. remove( constraint); +return x; } - public DriverDescription getDriver(DriverDescription driver) - { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public int GetY() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) +return y; + } + + public Color GetC() { - cd = (ConstraintsDescription) this +return c; + } - public long getQueryID() + public String GetReqno() { -return this. queryID; +return requirement No; } - public void setQueryID( long id) + public String GetProject() { -this. queryID = id; +return ProjectName; } - public String toString() + + public String GetModule() { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"78 ""Notification Event +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 = """"""""; @@ -45831,322 +43517,208 @@ 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence + 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +public chartoken; +public int theLine; -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +public Symbol( char tok, int line ) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -private static class Token +public Balance( Reader inStream ) { -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; +errors = 0; +tok = new Tokenizer( inStream ); } -/** - * 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 + * Print an error message for unbalanced symbols. + * @return number of errors detected. */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; /** - * 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. + * Print an error message if clSym does not match opSym. + * Update errors. */ -private void processToken( Token lastToken ) { -System. out. printl +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. + /** + * 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 double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +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; - /** - * 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. + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -/** - * 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, 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. -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"50 ""Driver Description -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - private String 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) + // 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 -this. projectName = projec +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -public String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() + DOORsThread(ServerSocket ss) { -return description; + theServer = ss; + count++; + taskNumber = count; } - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() + public void run() { -return modulePath; - } - public String getProjectName() + while( true) { -return projectName; - } - - public String getRequirementID() + try { -return requirementID; - } +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 String getToAttribute() - { -return toAttribute; - } +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) + //@param argsNo arguments are used. + public static void main(String args[]) { -this. description = description; - } - - public void setFromAttribute(String fromAttribute) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -this. fromAttribute = fromAttribute; - } + 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 ; - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + 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 setProjectName(String projectName) - { -this. projectName = projectName; - } + // Speculate Gui - public void setRequirementID(String requirementID) + public Speculate Gui () { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) - { -this. toAttribute = toAttribute; - } - - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); + super ("" Speculate GUI ""); container = get Content Pane (); @@ -46200,9 +43772,8 @@ Test case: Notify subscribers when an evolutionary event occurs (5.5) Precondit public static void main ( String [] args ) { new Speculate Gui (); - }",46,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 + }",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; @@ -46242,168 +43813,73 @@ return """"Query ID: """" }"" -",52,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec +",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 String getChangedAttribute() - { -return changedAttribute; - } - public String getDescription() - { -return description; - } +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() +public EBShape( int xpos, int ypos, Color col) { -return modulePath; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public String getProjectName() - { -return projectName; - } - public String getRequirementID() + public void Updaterequirement Info(String rno, String pname, String mname) { -return requirementID; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) + public boolean match( int mx, int my) { -this. changedAttribute = changedAttribute; +return true; } - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) + public int GetX() { -this. fromAttribute = fromAttribute; +return x; } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) + public int GetY() { -this. projectName = projectName; +return y; } - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; + public Color GetC() +{ +return c; } - public void setToAttribute(String toAttribute) + public String GetReqno() { -this. toAttribute = toAttribute; +return requirement No; } - public String createKey() + public String GetProject() { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +return ProjectName; } - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - -public int hashCode() + public String GetModule() { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall receive event messages when a requirement changes.,127,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall receive event messages when a requirement changes.,127,0 -"58 ""Subscribed Model - -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; - -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s - -public String GetSubscriberName() { return SubscriberName;} - -public String GetSubscriberReqno() { return SubscriberReqno;} - -public String GetSubscriberModule() { return SubscriberModule;} - -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +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 "82 ""Tokenizer @@ -46527,245 +44003,57 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The prototype system shall utilize a driver to trigger events.,120,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - - -//Check if a subscription exists - public boolean CheckSubscription(String str) - { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - - -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - - -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models - - - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack - - -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { +",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 - socket = new Socket ( ip , Port No ); +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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get +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) { - new Speculate Gui (); - }",46,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; +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; } @@ -46774,7 +44062,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -46783,10 +44072,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -46804,7 +44095,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -46828,102 +44120,175 @@ this. name = name; */ public void setValue( double value) { this. value = value; - }"" -",73,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"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 +* Returns the speculateValue. +* @return double */ - public String getId() { -return id; + public double getSpeculateValue() { +return speculateValue; } /** -* Returns the logic. -* @return String +* Sets the speculateValue. +* @param speculateValue The speculateValue to set */ - public String getLogic() { -return logic; + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } /** -* Returns the name. +* Returns the type. * @return String */ - public String getName() { -return name; + public String getType() { +return type; } + /** -* Returns the value. -* @return double +* Sets the type. +* @param type The type to set */ - public double getValue() { -return value; + public void setType(String type) { +this. type = type; } /** -* Sets the id. -* @param id The id to set +* Returns the project_ path. +* @return String */ - public void setId(String id) { -this. id = id; + public String getProject_ path() { +return project_ path; } - ** -* Sets the logic. -* @param logic The logic to set + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set */ - public void setLogic(String logic) { -this. logic = logic; + 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; +} - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; +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 +"92 ""New Model + +public NewModel(EBT em) +{ +super( em); } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include merging requirements.,126,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 @@ -46951,344 +44316,306 @@ StringBuffer temp = new StringBuffer(); int MergeCount = -1; thisEvent. append(""""Merge|""""); for ( int i = 0; i < EventSha"" -",90,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); - } +",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 +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -// 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 + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"75 ""Driver -public StringBuffer GenerateEvent() +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } - // 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 String toString() { - setTitle(""""EventsProcessor""""); +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } -addWindowListener( new WindowAdapter() -{ + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -Notification +return valueFrom; + } -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try + public double getValueTo() { -Notification_Event nEvt1 = (Notificati +return valueTo; + } -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -N +this. id = id; + } -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +this. name = name; + } -void DeleteRelatedEvents() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +this. valueFrom = valueFrom; + } - m_Deleterequirement List. remove(0); + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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;/ -void AddSubscription(String SubscriberName, Requirement requirement ) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +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 -void UpdateDisplayList() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - // 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 + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + public void Dispatch -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"49 ""Constraints Description + public String getErrorMessage() + { + return errMsg; + } -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 boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"50 ""Driver Description - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +private String projectName = null; + private String modulePath = null; + private String requirementID = null; - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + 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 String get Description () { - return this . description ; - } +this. projectName = projec - public String get Logic () { - return this . logic ; +public String getChangedAttribute() + { +return changedAttribute; } - public String get Module Path () { - return this . module Path ; + public String getDescription() + { +return description; } - public String get Project Name () { - return this . project Name ; + public String getFromAttribute() + { +return fromAttribute; } - public String get Requirement ID () { - return this . requirement ID ; + public String getModulePath() + { +return modulePath; } - public String get Units () { - return this . units ; + public String getProjectName() + { +return projectName; } - public String get Value () { - return this . value ; + public String getRequirementID() + { +return requirementID; } - public void set Description ( String description ) { - this . description = description ; + public String getToAttribute() + { +return toAttribute; } - public void set Logic ( String logic ) { - this . logic = logic ; + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; + public void setDescription(String description) + { +this. description = description; } - public void set Project Name ( String project Name ) { - this . project Name = project Name ; + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; } - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; } - public void set Units ( String units ) { - this . units = units ; + public void setProjectName(String projectName) + { +this. projectName = projectName; } - public void set Value ( String units ) { - this . value = units ; + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; } - public String get Impacted Constraint () { - return this . impacted Constraint ; + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); } - public String get Attribute () { - return this . attribute ; - } - - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - - public String get Performance Model Name () { - return this . performance Model Name ; - } - - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} + 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"""" -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { - 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 + 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) @@ -47313,410 +44640,292 @@ StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""""Obsolete|0|""""); thisEvent. append( new Date(). toString()+""""|""""); ebs = (EBShape)EventShapes. e"" -",93,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - +",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 -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 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 Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +// constructor +public Notification_Event() { + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +// 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 static class Token + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -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 { + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +// 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 -/** - * 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 + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"62 ""Call Back -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -/** - * 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 parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** - * 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 pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = 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 void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; + public void createExecuteString() + { -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) -{ -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +public void parseImpactReport(String str) + { -public String GetSubscriberModule() { return SubscriberModule;} +Connection conn = null; -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} +Statement stmt = null; -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"53 ""Performance Model +Vector constraintsVector = null; +Vector driversVector = null; -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +ConstraintsDescription constraint = null; - private long queryID = 0; +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 - public static int count = 0; +String id; + String name; + double value; + String logic; - 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(); +this. value = value; +this. logic = logic; } - public Vector getConstraints() - { -return constraintVector; + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public Vector getDrivers() - { -return driverVector; + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public String getName() - { + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { return name; } - public void setName(String name) - { -this. name = name; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public void addConstraint(ConstraintsDescription constraint) + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"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. constraintVector. add( constraint); + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; } - public boolean containsConstraint(ConstraintsDescription constraint) + public String getDescription() { -return this. constraintVector. contains( constraint); +return description; } - public void removeConstraint(ConstraintsDescription constraint) + public String getFromAttribute() { -this. constraintVector. remove( constraint); +return fromAttribute; } - public DriverDescription getDriver(DriverDescription driver) + public String getModulePath() { -DriverDescription dd = null; -for ( int i = 0; i < this. driverVector. size(); i++) -{ - dd = (DriverDescription) this. driverVector. get( i) +return modulePath; + } - public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + public String getProjectName() { -ConstraintsDescription cd = null; -for ( int i = 0; i < this. constraintVector. size(); i++) -{ - cd = (ConstraintsDescription) this +return projectName; + } - public long getQueryID() + public String getRequirementID() { -return this. queryID; +return requirementID; } - public void setQueryID( long id) + public String getToAttribute() { -this. queryID = id; +return toAttribute; } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w - - -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - - -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; - - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin - - -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { - -this. projectName = projec - -public String getChangedAttribute() - { -return changedAttribute; - } - - public String getDescription() - { -return description; - } - - public String getFromAttribute() - { -return fromAttribute; - } - - public String getModulePath() - { -return modulePath; - } - - public String getProjectName() - { -return projectName; - } - - public String getRequirementID() - { -return requirementID; - } - - public String getToAttribute() - { -return toAttribute; - } - - public void setChangedAttribute(String changedAttribute) + public void setChangedAttribute(String changedAttribute) { this. changedAttribute = changedAttribute; } @@ -47787,500 +44996,253 @@ if ( hashCode == 0) result = 37 * result + this. projectName. hashCode(); result = 37 * result + this. modulePath. hashCode(); result = 37 "" -",50,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - - -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} - - -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button - - -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} - -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - +",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 - 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 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 -// 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 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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) +public Vector get Values From Data Base () { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -for ( int i = 0"" -",57,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"77 ""Model Driver + if ( server . is Connected () ) + { + Buffered R -String msg=""""""""; -public ModelDriver(String text) + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -this. msg = text; -init(); - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"66 ""Config Dialog -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +"65 ""About Dialog +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + // 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""""); -// 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 +addWindowListener( new WindowAdapter() +{ -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); } -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The subscribermanager shall restore the executable model to its prior state.,119,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - EventServerThread(ServerSocket ss) +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { +Notification - while( true) + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { +if (! listModel. isEmpty()) +{ + int index =0; try { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +Notification_Event nEvt1 = (Notificati -public String getNextID() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -try +int index = eventList. getSelectedIndex(); +if ( index != -1) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - + try + { +N -public String searchDate() +void DeleteEvent(String SubscriberName, String EventID) { -String dateString = new String(); -Vector dateVector = new Vector(); try { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -public String searchQueryID(String date) +void DeleteRelatedEvents() { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +while ( m_Deleterequirement List. size()!=0) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); - 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) +void AddSubscription(String SubscriberName, Requirement requirement ) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { + // 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 ("""" Search Result GUI """"); - container = get Content Pane (); - set Size ( 800 , 250 ); +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 - panel = new JPanel (); +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 - panel . set Layout ( null ); - 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 () - { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { - - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - - pair Vector = new Vector (); - - query String Combo . remove All Items (); - - query String Combo . add Item ("""" Select Query String """"); - - Socket server ; - String line = new String (); - - - // Select Actions - - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The prototype system shall utilize a driver to trigger events.,120,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() -{ -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include modifying a requirement.,124,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null - - - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // - - -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - - -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - - -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() - { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - - -public void parseImpactReport(String str) +public String toString() { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } - - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +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; } @@ -48289,7 +45251,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -48298,10 +45261,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -48319,7 +45284,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -48343,1390 +45309,1577 @@ this. name = name; */ public void setValue( double value) { this. value = value; - }"" -",73,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"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 +* Returns the speculateValue. +* @return double */ - public String getId() - { -return id; + public double getSpeculateValue() { +return speculateValue; } /** -* Returns the name. -* @return String +* Sets the speculateValue. +* @param speculateValue The speculateValue to set */ - public String getName() - { -return name; + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } /** -* Returns the value. -* @return double +* Returns the type. +* @return String */ - public double getValueFrom() - { -return valueFrom; + public String getType() { +return type; } - public double getValueTo() - { -return valueTo; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } /** -* Sets the id. -* @param id The id to set +* Returns the project_ path. +* @return String */ - public void setId(String id) - { -this. id = id; + public String getProject_ path() { +return project_ path; } - ** -* Sets the name. -* @param name The name to set + /** +* Sets the project_ path. +* @param project_ path The project_ path to set */ - public void setName(String name) - { -this. name = name; - } + 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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -this. valueFrom = valueFrom; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - public void setValueTo( double value) + public void ParseEvent(String TextLine) { -this. valueTo = valueTo; - }"" -",75,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"62 ""Call Back +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -private Hash table requirementDescTable = new Hash table(); +// 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 Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} -public void identifyPerformanceModels() +public Object clone() throws CloneNotSupportedException { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -public void pullInformationFromDoors() + public void ParseEvent(String TextLine) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function -public void insertValuesInDataBase() + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - public void createExecuteString() - { +if ( m_Eve -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +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 -public void parseImpactReport(String str) +public MergeModel(EBT em) { +super( em); + MinimumNoRects = 3; + } -Connection conn = null; -Statement stmt = null; + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 +"79 ""performance model Handler -int driverLoop"" -",62,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include adding new requirements.,121,0 -"73 ""Constraints +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -String id; - String name; - double value; - String logic; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; + performance model Handler(String msg) + { +this. strES = msg; } - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - /** -* Returns the id. -* @return int -*/ - public String getId() { -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; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); } - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + 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 + +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 ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String get Description () { + return this . description ; } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public String get Logic () { + return this . logic ; } + public String get Module Path () { + return this . module Path ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"85 ""Decompose Model + public String get Units () { + return this . units ; + } + public String get Value () { + return this . value ; + } -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + 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 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"63 ""Doors Thread + public void set Units ( String units ) { + this . units = units ; + } -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + public void set Value ( String units ) { + this . value = units ; + } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - public void run() - { + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"70 ""Notification Processing + public String get Performance Model Name () { + return this . performance Model Name ; + } -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } - // database and eventserver information - S + public String to String () { - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -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 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 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 +"47 ""Impact Report -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) - { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - private void saveMenuItemActionPerformed (ActionEvent evt) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + super ("""" Search Result GUI """"); - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); - } + container = get Content Pane (); + set Size ( 800 , 250 ); - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); - } + panel = new JPanel (); - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + + public static void main ( String [] args ) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 + Impact Report im = new Impact Report (); -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); } -void UpdateDisplayList() + public Vector search Date () { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + + 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 ) { - "" -",70,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + pair Vector = new Vector (); - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + query String Combo . remove All Items (); -panel = new JPanel(); + query String Combo . add Item ("""" Select Query String """"); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + Socket server ; + String line = new String (); -return panel; - }"" -",51,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; + // Select Actions - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { + public void action Performed ( Action Event e ) + { - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +public void action Performed ( Action Event e ) { -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . 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) + public void impact Report ( String id ) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"89 ""Event Line -protected int top, left, right, bottom; + // super ("""" Impact Report """"); + container = get Content Pane (); -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + set Size ( 1020 , 740 ); + this . query ID = id ; -public int GetT() { return top;} + System . out . println ("""" Impact Report Constructor ..... ID """" + -public int GetL() { return left;} -public int GetR() { return right;} + public Vector get Constraint From Data Base () + { -public int GetB() { return bottom;}"" -",89,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"60 ""Thread Pool + Vector v = new Vector (); -/** -* 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); + Socket server ; + String line = new String (); -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + + + public Vector get Driver From Data Base () { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - - - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) -{ -super( em); - } + Vector v = new Vector (); + Socket server ; + String line = new 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 + 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 StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall immediately process speculative events.,116,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + //@param argsNo arguments are used. + public static void main(String args[]) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo - -// finds the subscribers for this requirement - public void IdentifySubscribers() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + 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 - + 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -String sName, sReqno, sModule, sKey1, sKey2; -try +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - 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 +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} - public String getErrorMessage() - { - return errMsg; - } +public String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -for ( int i = 0"" -",57,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"89 ""Event Line +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 -protected int top, left, right, bottom; +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 EventLine ( int t, int l, int r, int b) +private static class Precedence { -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer -public int GetL() { return left;} +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ -public int GetR() { return right;} +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public int GetB() { return bottom;}"" -",89,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"89 ""Event Line -protected int top, left, right, bottom; +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 EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; +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 int GetT() { return top;} +/** + * 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 int GetL() { return left;} +/** + * Public routine that performs the evaluation. + * Examine thepostfix machine to see if a single result is + * left and if so, return it; otherwise print error. + * @return the result. +private Stack opStack; // Operator stack for conversion +private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result +private StringTokenizer str; // StringTokenizer stream, conte -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"75 ""Driver +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -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; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - 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; - } +/** + * 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 name. -* @return String -*/ - public String getName() - { -return name; - } +/* + * topAndPop the postfix machine stack; return the result. + * If the stack is empty, print an error message. + */ +private double getTop( ) { // change to support double + System. out. println(""""INSIDE GET TOP /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } - + * 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 double getValueTo() - { -return valueTo; - } +/** + * 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; - } - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } +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 +String msg=""""""""; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public ModelDriver(String text) { -this. valueFrom = valueFrom; +this. msg = text; +init(); } - public void setValueTo( double value) + public void init() { -this. valueTo = valueTo; - }"" -",75,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The prototype system shall utilize a driver to trigger events.,120,0 -"47 ""Impact Report +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 -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +private Hash table requirementDescTable = new Hash table(); - private JPanel driver Inner Panel = null ; + private Hash table constraintDescTable = new Hash table(); - private JPanel impact Panel = null ; - private JPanel impact Inner P + private Hash table performanceModelTable = new Hash table(); - public Impact Report () - { + private PerformanceModel performance model= null - super ("""" Search Result GUI """"); - container = get Content Pane (); + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - set Size ( 800 , 250 ); - panel = new JPanel (); +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - public static void main ( String [] args ) +public void insertValuesInDataBase() { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - Impact Report im = new Impact Report (); - - } - public Vector search Date () + public void createExecuteString() { - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); +public void parseImpactReport(String str) + { - query String Combo . remove All Items (); +Connection conn = null; - query String Combo . add Item ("""" Select Query String """"); +Statement stmt = null; - Socket server ; - String line = new String (); +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - // Select Actions +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 void action Performed ( Action Event e ) - { +public RefineModel(EBT em) +{ +super( em); + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - // Button Actions +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 +"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 action Performed ( Action Event e ) { +public Requirement() +{ +} - if ( submit Button == e . get Source ()) { +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + 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 ( pair - . get +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 +"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() + { - public void impact Report ( String id ) + while( true) + { + try { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - // 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 () +public String getNextID() { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - Vector v = new Vector (); - Socket server ; - String line = new String (); +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - try - { - server = new Socket ( server IP , 1701 ); +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - if ( server . is Connected () ) - { - Buffered + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - public Vector get Driver 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: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"84 ""White Board Execution Graph +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member +public void mouseExited( java. awt. event.MouseEvente){} -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const -public 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 mousePressed( java. awt. event.MouseEvente){} +public void mouseReleased( java. awt. event.MouseEvente){} - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +public void mouseEntered( java. awt. event.MouseEvente){} +public void paint(Graphics g) {} - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target +public void update(Graphics g) {} + public JSplitPane getSplitPane() +{ +return splitPane; +} - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"52 ""Pair +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 -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 Vector getConstraints() + { +return constraintVector; } - public String getQueryID() { -return this. queryID; + public Vector getDrivers() + { +return driverVector; } - public String getQueryString() { -return this. queryString; + public String getName() + { +return name; } - public void setQueryID(String queryID) { -this. queryID = queryID ; + public void setName(String name) + { +this. name = name; } - public void setQueryString(String queryString) { -this. queryString = queryString; + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } - }"" -",52,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"67 ""Event Detail Dialog + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } -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 containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) { + dd = (DriverDescription) this. driverVector. get( i) -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + cd = (ConstraintsDescription) this + public long getQueryID() + { +return this. queryID; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + public void setQueryID( long id) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +this. queryID = id; + } + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"49 ""Constraints Description -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +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 LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"71 ""Requirement + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -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 String get Description () { + return this . description ; } + public String get Logic () { + return this . 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: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"private JPanel center Panel = null ; + public String get Module Path () { + return this . 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 String get Project Name () { + return this . project Name ; + } - // Speculate Gui + public String get Requirement ID () { + return this . requirement ID ; + } - public Speculate Gui () - { + public String get Units () { + return this . units ; + } - super ("" Speculate GUI ""); + public String get Value () { + return this . value ; + } - container = get Content Pane (); + public void set Description ( String description ) { + this . description = description ; + } - set Size ( 800 , 600 ); + public void set Logic ( String logic ) { + this . logic = logic ; + } - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver + 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 ; + } - // Submit Listener + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } - public void action Performed ( Action Event e ) { + public void set Units ( String units ) { + this . units = units ; + } - if ( e . get Source () == submit Button ) { + public void set Value ( String units ) { + this . value = units ; + } - send Query TO Server (); + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } - if ( e . get Source () == fetch Button ) { + public String get Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } - System . out . println ("" Fetch Button Pressed + 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 ; + } - void send Query TO Server () - { + public String to String () { - String ip = this . event Server IP ; - int Port No = 1701 ; + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - Socket socket ; - try { - socket = new Socket ( ip , Port No ); +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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () - { +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 - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +private String server IP = """" local host """"; + private JPanel center Panel = null ; - String [] attribute = { "" Value "", "" Attribute "" }; + private JPanel driver Panel = new JPanel (); - String project Name = this . proj Name Text . get + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P - public static void main ( String [] args ) + public Impact Report () { - new Speculate Gui (); - }",46,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A user shall register as a subscriber.,103,0 -"93 ""Obsolete Model + 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 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 Vector search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public StringBuffer GenerateEvent() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"54 ""eventserver -public static void (String args[]) + 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 ) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + + // 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 () { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) + + 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 () { -p -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"84 ""White Board Execution Graph + Vector v = new Vector (); -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + 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. + */ +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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} -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 +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; -public void 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 + /** + * 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 double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + /** + * 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 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 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 double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { - 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. projectName = projec +public String getChangedAttribute() + { +return changedAttribute; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String getDescription() + { +return description; + } + public String getFromAttribute() + { +return fromAttribute; + } -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 + 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 "75 ""Driver String id; @@ -49818,24 +46971,38 @@ this. valueFrom = valueFrom; { this. valueTo = valueTo; }"" -",75,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"54 ""eventserver +",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 -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 SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 =""""""""; @@ -49867,8 +47034,9 @@ public void ParseRequirement(String TextLine) LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); m_Project=LineSt. "" -",71,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 +",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 @@ -49960,618 +47128,682 @@ JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); mainframe. addWindowListener( new WindowAdapter() { public void windowClosing(Wind"" -",87,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Only registered subscribers shall be allowed to establish traces.,102,0 -"74 ""database - +",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 +"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() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System -public void getTrackVariableName() + // 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 getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 +public ModifyModel(EBT em) +{ +super( em); + } -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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - 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 + 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -String sName, sReqno, sModule, sKey1, sKey2; -try + +public EBT(Frame f) { - System. o +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - // 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 up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } - public String getErrorMessage() + public boolean mouseDown( java. awt.Evente, int x, int y) { - return errMsg; + return true; } - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } -for ( int i = 0"" -",57,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include adding new requirements.,121,0 -"51 ""Driver Inner Panel + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +public void mouseExited( java. awt. event.MouseEvente){} -panel = new JPanel(); -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { +public void mousePressed( java. awt. event.MouseEvente){} -return panel; - }"" -",51,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"85 ""Decompose Model +public void mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } +public void paint(Graphics g) {} +public void update(Graphics g) {} - // Construct Visual model for Merge Event -public void BuildEvent() + public JSplitPane getSplitPane() { - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +return splitPane; +} +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -public StringBuffer GenerateEvent() +private class ValueReporter implements ListSelectionListener { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"84 ""White Board Execution Graph +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall send the customized message to each impacted executable model.,136,0 +"54 ""eventserver - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"77 ""Model Driver +String msg=""""""""; - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +public ModelDriver(String text) + { +this. msg = text; +init(); + } -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 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 +"47 ""Impact Report +private String server IP = """" local host """"; + private JPanel center Panel = null ; -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const + private JPanel driver Panel = new JPanel (); -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 JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner 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 Impact Report () + { + super ("""" Search Result GUI """"); - 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 ( 800 , 250 ); - 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 + panel = new JPanel (); + panel . set Layout ( null ); -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + this . server IP = + JOption Pane + . show In -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"94 ""Refine Model + public static void main ( String [] args ) + { -public RefineModel(EBT em) -{ -super( em); - } + Impact Report im = new Impact Report (); - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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); - } + public Vector search Date () + { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"65 ""About Dialog + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"80 ""Requirement + pair Vector = new Vector (); -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); -public Requirement() {// empty constructor + Socket server ; + String line = new String (); -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + // Select Actions + public void action Performed ( Action Event e ) + { - 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 ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include merging requirements.,126,0 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public void action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"83 ""Variable + for ( int i = 0 ; i < pair Vector . size (); i ++) { -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 + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - //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) + public void impact Report ( String id ) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this + // super ("""" 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 + container = get Content Pane (); + set Size ( 1020 , 740 ); + this . query ID = id ; -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + System . out . println ("""" Impact Report Constructor ..... ID """" + - /** -* Returns the id. -* @return int -*/ - public String getId() + public Vector get Constraint From Data Base () { -return id; - } + Vector v = new Vector (); - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } + Socket server ; + String line = new String (); - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } + try + { + server = new Socket ( server IP , 1701 ); + 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 () + { + Vector v = new Vector (); - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + Socket server ; + String line = new String (); + 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"" +",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= - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer + +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ + +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 /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + * 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 /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set + * 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. */ - 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The subscribermanager shall re execute the model using the speculative values.,117,0 -"69 ""Notification Event +public 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 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 showText(EBShape sh) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); + // 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(); } -public Object clone() throws CloneNotSupportedException +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() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void ParseEvent(String TextLine) + public void updateEvent(String str, String 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 +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall be able to delete subscriptions.,107,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A user shall register as a subscriber.,103,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,A user shall register as a subscriber.,103,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 + +//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 @@ -50647,252 +47879,113 @@ Vector driversVector = null; ConstraintsDescription constraint = null; int driverLoop"" -",62,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"66 ""Config Dialog +",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 ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; -private void closeDialog(WindowEvent evt) { + //@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 +"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 -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -private void cancelButtonActionPerformed (ActionEvent evt) { +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ setVisible ( false); -dispose (); +dispose (); } -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"74 ""database - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and +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 - /** - * 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 - - -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - - } - - public String getQueryID() { -return this. queryID; - } - - public String getQueryString() { -return this. queryString; - } - - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - - public void setQueryString(String queryString) { -this. queryString = queryString; - } - - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() -{ -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } - - - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +return name; + } /** @@ -50945,555 +48038,302 @@ this. valueFrom = valueFrom; { this. valueTo = valueTo; }"" -",75,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"88 ""Event Model - +",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 -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 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 EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +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 +"78 ""Notification Event +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim - public void ClearVectors() +// constructor +public Notification_Event() { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); } - -public void drawModel() -{ -repaint(); -} +// 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 drawModel(EBShape sh) + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} - + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} +// 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 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++) + //This method displays the contents of two array list to console +public void DisplayValues() { -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( + 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 +"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 BuildEvent(){} +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 - protected void AddLine( int t, int l, int r, int b) +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] { -EventLines. addElement( new EventLine( t, l, r, b)); -} + +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +private static class Token { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} +/** + * Find the next token, skipping blanks, and return it. + * For VALUE token, place the processed value in currentValue. + * Print error message if input is unrecognized. + */ +public Token getToken - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +/** + * 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 - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"63 ""Doors Thread -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - public void run() - { +/** + * 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 - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"85 ""Decompose Model +/* + * 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 DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + /** + * 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(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect +/** + * 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; +public 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 +"86 ""EB Shape -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 int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public String GetSubscriberReqno() { return SubscriberReqno;} -public String GetSubscriberModule() { return SubscriberModule;} +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"90 ""Merge Model + public void Updaterequirement Info(String rno, String pname, String mname) + { +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 int GetX() + { +return x; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"88 ""Event Model - - -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); - - - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add - - -public void getIP Server( String serverIP) + public int GetY() { -this. serverIP = serverIP; +return y; } - - 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++) + public Color GetC() { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +return 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 - -public void CheckNotifyStatus() + public String GetReqno() { -//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))); +return requirement No; } - else - { -Even - -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + public String GetProject() + { +return ProjectName; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - - - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - + public 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 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 - 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 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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -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 +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; @@ -51623,650 +48463,473 @@ if ( hashCode == 0) result = 37 * result + this. projectName. hashCode(); result = 37 * result + this. modulePath. hashCode(); result = 37 "" -",50,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +",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 - // 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 MergeModel(EBT em) { - setTitle(""""EventsProcessor""""); +super( em); + MinimumNoRects = 3; + } -addWindowListener( new WindowAdapter() + + // 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 windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +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; -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -// 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 getQueryID() { +return this. queryID; + } -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N + public String getQueryString() { +return this. queryString; + } -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 setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - m_Deleterequirement List. remove(0); + }"" +",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; -void AddSubscription(String SubscriberName, Requirement requirement ) - { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + + DOORsThread(ServerSocket ss) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req + theServer = ss; + count++; + taskNumber = count; + } -void UpdateDisplayList() + public void run() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) -{ - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + 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 +"91 ""Modify Model - // 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 ModifyModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + -private boolean Analyze_CheckSubscription(String str) +public StringBuffer GenerateEvent() { -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"95 ""Text Model +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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) + protected void paintComponent(Graphics g) { - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement +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; - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() +public String getNextID() + { +try { -repaint(); -} +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -protected void paintComponent(Graphics g) +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try { - super. paintComponent( g); + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -if (HideMsg == true) + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try { - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"82 ""Tokenizer + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try { -return currentLine; -} + 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); + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -return errors; +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -/** - * 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 StringBuffer GenerateEvent() { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"73 ""Constraints +String id; + String name; + double value; + String logic; - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -for( ; nextChar( ); result += ch ) + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } /** - * 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 +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 ) { } -} + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -private void skip + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"60 ""Thread Pool -/** -* The threads in the pool. + /** +* Sets the value. +* @param value The value to set */ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. + 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. */ -Collection assignments = new ArrayList(3); - + private int _ activeThreads = 0; -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface + /** +* 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. */ - pub + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - /** -* Get a new work assignment. -* -* @return A new assignment +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. */ - public synchronized Runnable getAssignment() + synchronized public void waitBegin() { try { - while ( ! assignments. iterator(). hasNext() ) + while ( !_ started ) { wait(); - Runnable r = (Runnable) assignments. + } +} catch ( InterruptedException e - /** -* Called to block the current thread until -* the thread pool has no more work. +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + synchronized public void workerBegin() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +_ activeThreads++; +_ started = true; +notify(); } -}"" -",60,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"77 ""Model Driver -String msg=""""""""; -public ModelDriver(String text) + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -this. msg = text; -init(); +_ activeThreads--; +notify(); } - public void init() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"50 ""Driver Description - -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +_ 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 ; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + public Speculate Gui () { -this. projectName = projec + super ("" Speculate GUI ""); -public String getChangedAttribute() - { -return changedAttribute; - } + container = get Content Pane (); - public String getDescription() - { -return description; - } + set Size ( 800 , 600 ); - public String getFromAttribute() - { -return fromAttribute; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String getModulePath() - { -return modulePath; - } - public String getProjectName() - { -return projectName; - } + // Submit Listener - public String getRequirementID() - { -return requirementID; - } + public void action Performed ( Action Event e ) { - public String getToAttribute() - { -return toAttribute; - } + if ( e . get Source () == submit Button ) { - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + send Query TO Server (); - public void setDescription(String description) - { -this. description = description; - } + } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } + if ( e . get Source () == fetch Button ) { - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } + System . out . println ("" Fetch Button Pressed - public void setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } - public void setToAttribute(String toAttribute) + void send Query TO Server () { -this. toAttribute = toAttribute; - } - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() - { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" - - -public int hashCode() - { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } - - - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { - public double getValueTo() - { -return valueTo; - } + socket = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) + public void pull Value From DOORS () { -this. id = id; - } - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) - { -this. name = name; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } + String project Name = this . proj Name Text . get - public void setValueTo( double value) + public static void main ( String [] args ) { -this. valueTo = valueTo; - }"" -",75,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 + 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 @@ -52338,233 +49001,216 @@ notify(); { _ activeThreads = 0; }"" -",59,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include merging requirements.,126,0 -"87 ""EBT +",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; -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); +public String getChangedAttribute() + { +return changedAttribute; } - - public boolean mouseDown( java. awt.Evente, int x, int y) + public String getDescription() { - return true; +return description; } - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public String getFromAttribute() + { +return fromAttribute; } - 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 String getModulePath() + { +return modulePath; + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + public String getProjectName() + { +return projectName; + } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + public String getRequirementID() { -switch(EventList. getSelectedIndex()) +return requirementID; + } -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 getToAttribute() + { +return toAttribute; + } -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall receive event messages when a requirement changes.,127,0 -"69 ""Notification Event + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } -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 setDescription(String description) + { +this. description = description; + } -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -public Object clone() throws CloneNotSupportedException + public void setProjectName(String projectName) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - public void ParseEvent(String TextLine) + public void setToAttribute(String toAttribute) { - 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. toAttribute = toAttribute; + } + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + 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() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void DisplayValues() + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The prototype system shall utilize a driver to trigger events.,120,0 -"90 ""Merge Model + 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;/ -public MergeModel(EBT em) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -super( em); - MinimumNoRects = 3; - } +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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -public StringBuffer GenerateEvent() +String sName, sReqno, sModule, sKey1, sKey2; +try { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"79 ""performance model Handler + System. o -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + public void Dispatch - performance model Handler(String msg) + public String getErrorMessage() { -this. strES = msg; + return errMsg; } - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); - - -//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 boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +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 +String msg=""""""""; - public void saveModel( int id) +public ModelDriver(String text) { -// save current model -database. saveCurrentModel( id); +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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 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 private String SubscriberName; @@ -52590,617 +49236,609 @@ public String GetSubscriberModule() { return SubscriberModule;} public String GetSubscriberKeyword1() { return SubscriberKeyword1;} public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"66 ""Config Dialog +",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 -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 +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 -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +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 - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +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, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target -// 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 double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"47 ""Impact Report +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -private String server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); +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 ; - private JPanel driver Inner Panel = null ; + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c - private JPanel impact Panel = null ; - private JPanel impact Inner P + // Speculate Gui - public Impact Report () + public Speculate Gui () { - super ("""" Search Result GUI """"); + super ("" Speculate GUI ""); container = get Content Pane (); - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); + set Size ( 800 , 600 ); - this . server IP = + this . event Server IP = JOption Pane - . show In - + . show Input Dialog ("" Please Enter the IP Address of eventserver - public static void main ( String [] args ) - { - Impact Report im = new Impact Report (); + // Submit Listener - } + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { - public Vector search Date () - { + send Query TO Server (); - 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 ( e . get Source () == fetch Button ) { - pair Vector = new Vector (); - query String Combo . remove All Items (); + System . out . println ("" Fetch Button Pressed - query String Combo . add Item ("""" Select Query String """"); - Socket server ; - String line = new String (); + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; - // Select Actions + Socket socket ; + try { - public void action Performed ( Action Event e ) - { + socket = new Socket ( ip , Port No ); - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + Output Stream os = socket . get Output Stream (); + Output Stream - // Button Actions + public void pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public void action Performed ( Action Event e ) { + String [] attribute = { "" Value "", "" Attribute "" }; - if ( submit Button == e . get Source ()) { + String project Name = this . proj Name Text . get - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 - if ( pair - . get +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 impact Report ( String id ) + performance model Handler(String msg) { +this. strES = msg; + } - // super ("""" Impact Report """"); + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); - container = get Content Pane (); - set Size ( 1020 , 740 ); +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - public Vector get Constraint From Data Base () + public void saveModel( int id) { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); +// save current model +database. saveCurrentModel( id); + } - try - { - server = new Socket ( server IP , 1701 ); + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () + //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. - Vector v = new Vector (); - Socket server ; - String line = new String (); +//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 - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,For speculative events; the eventserver shall construct a composite event message.,132,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +//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 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 String toString() { -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 temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + /** +* Returns the id. +* @return int +*/ + public String getId() { - -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 id; + } - public String getErrorMessage() + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { - return errMsg; +return logic; } - public boolean Contains(String ContextString, String SearchString) + /** +* Returns the name. +* @return String +*/ + public String getName() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +return name; + } -public Requirement() {// empty constructor + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"91 ""Modify Model -public ModifyModel(EBT em) -{ -super( em); + /** +* 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); -CurrentEvent = 4; -} + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include deleting a requirement.,125,0 -"77 ""Model Driver + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"private JPanel center Panel = null ; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } - 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 + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } - public Speculate Gui () - { - super ("" Speculate GUI ""); + /** +* 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 +"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 - - 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 () + /** + * 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 - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + /** +* 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 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () + /** +* 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 server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa - public static void main ( String [] args ) + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) { - new Speculate Gui (); - }",46,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall be able to construct speculative queries using a GUI.,115,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public void parseSpeculateInformation(String str) +public void solveStructureEquation() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -public void identifyPerformanceModels() +public void getTrackVariableName() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +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 pullInformationFromDoors() +public void setCalculatedValues() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +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 insertValuesInDataBase() + public Vector getImpactReport() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - +//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 +"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 createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +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 void parseImpactReport(String str) - { +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -Connection conn = null; -Statement stmt = 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 { -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} -int driverLoop"" -",62,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"92 ""New Model +/** + * 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 NewModel(EBT em) -{ -super( em); - } +/** + * 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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall immediately process speculative events.,116,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ + * 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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"80 ""Requirement +/** + * 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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 +"71 ""Requirement public String m_RequirementID =""""""""; public String m_Project =""""""""; @@ -53208,120 +49846,187 @@ public String m_ModulePath=""""""""; public String m_Content = """"""""; public String m_RegFlag = """"N""""; - -public Requirement() {// empty constructor - +public Requirement() +{ } -public Object clone() throws CloneNotSupportedException { +public Object clone() throws CloneNotSupportedException + { Requirement requirement= (Requirement) super. clone(); -return requirement ; +return requirement ; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { this. m_RequirementID = RequirementID; this. m_Project = Project; this. m_ModulePath - -public void ParseRequirement(String TextLine) { +public void ParseRequirement(String TextLine) + { StringTokenizer LineSt; LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall be able to construct speculative queries using a GUI.,115,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"79 ""performance model Handler +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 -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +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 commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +private static class Precedence +{ +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer - performance model Handler(String msg) - { -this. strES = msg; - } +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - public void messageParser() - { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -//Re-execut -public String generateReport() +private static class Token { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; +public Token( ) { this( EOL ); } +public Token( int t ) { this( t, 0 ); } +public Token( int t, double v ) { + System. out. println("""" INSIDE Token.Token()""""); + private static class EvalTokenizer { -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +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 saveModel( int id) - { -// save current model -database. saveCurrentModel( id); - } +/** + * 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 insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"84 ""White Board Execution Graph +/** + * 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. + + +/** + * Process an operator by taking two items off the postfix + * stack, applying the operator, and pushing the result. + * Print error if missing closing parenthesis or division by 0. + */ +private void binaryOp( int topOp/** + * Simple main to exercise Evaluator class. + */ + + + +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 + +//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(){ @@ -53363,8 +50068,7 @@ public double targetResponseTimeAfter(){ System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); targetResponse time = timeToBroadcastShapeAfter() + timeToBroadcastText() + w"" -",84,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall update related artifacts according to the information contained in the event messages.,138,0 +",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 @@ -53480,100 +50184,94 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"51 ""Driver Inner Panel - -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); - -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - -return panel; - }"" -",51,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"private JPanel center Panel = null ; +",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 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 final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - // Speculate Gui - public Speculate Gui () + //@param argsNo arguments are used. + public static void main(String args[]) { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 - 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 ) { +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - System . out . println ("" Fetch Button Pressed +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - void send Query TO Server () + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - String ip = this . event Server IP ; - int Port No = 1701 ; +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 - Socket socket ; - try { +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +public Requirement() {// empty constructor - public void pull Value From DOORS () - { +} - 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 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 +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 protected int top, left, right, bottom; @@ -53595,713 +50293,355 @@ public int GetL() { return left;} public int GetR() { return right;} public int GetB() { return bottom;}"" -",89,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"63 ""Doors Thread +",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; -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + // 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() +{ - DOORsThread(ServerSocket ss) + + 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) { - theServer = ss; - count++; - taskNumber = count; - } +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification - public void run() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try { +Notification_Event nEvt1 = (Notificati - while( true) + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ try { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"91 ""Modify Model +N -public ModifyModel(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); -CurrentEvent = 4; -} + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall be able to delete subscriptions.,107,0 -"58 ""Subscribed Model +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req -private 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) +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} + // 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 GetSubscriberModule() { return SubscriberModule;} -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall immediately process speculative events.,116,0 -"63 ""Doors Thread +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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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) +{ +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - public void run() - { - while( true) - { - try +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"71 ""Requirement +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); } -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"60 ""Thread Pool +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 +"47 ""Impact Report -/** -* 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 String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -/** -* 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 JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + public Impact Report () { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + super ("""" Search Result GUI """"); - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"83 ""Variable + container = get Content Pane (); -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 + set Size ( 800 , 250 ); + panel = new JPanel (); - //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 + panel . set Layout ( null ); + this . server IP = + JOption Pane + . show In -public String toString() + public static void main ( String [] args ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + Impact Report im = new Impact Report (); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public Vector search Date () { -return logic; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** -* Returns the name. -* @return String -*/ - public String getName() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -return name; - } + pair Vector = new Vector (); - /** -* 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; - } - + query String Combo . remove All Items (); - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + query String Combo . add Item ("""" Select Query String """"); + Socket server ; + String line = new String (); - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + // Select Actions - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + 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 project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + // Button Actions - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include adding new requirements.,121,0 -"78 ""Notification Event +public void action Performed ( Action Event e ) { -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim + if ( submit Button == e . get Source ()) { -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + for ( int i = 0 ; i < pair Vector . size (); i ++) { -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException - { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - 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) + public void impact Report ( 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 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; + // super ("""" Impact Report """"); - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + container = get Content Pane (); - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ + set Size ( 1020 , 740 ); + this . query ID = id ; -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. + System . out . println ("""" Impact Report Constructor ..... ID """" + -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public Vector get Constraint From Data Base () { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - + Vector v = new Vector (); - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"88 ""Event Model + Socket server ; + String line = new String (); -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); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered - 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) + public Vector get Driver From Data Base () { -this. serverIP = serverIP; - } - - - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + Vector v = new Vector (); -public void drawModel() -{ -repaint(); -} - + Socket server ; + String line = new String (); -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"92 ""New Model -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public NewModel(EBT em) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +super( em); } -} - - -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) + // Construct Visual model for Merge Event +public void BuildEvent() { -EventLines. addElement( new EventLine( t, l, r, b)); +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else - { -Even - - -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } - - - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method - - - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The prototype system shall utilize a driver to trigger events.,120,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - - - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo - -// finds the subscribers for this requirement - public void IdentifySubscribers() - { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi - - -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { - -String sName, sReqno, sModule, sKey1, sKey2; -try +public StringBuffer GenerateEvent() { - 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; - } - +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 boolean Contains(String ContextString, String SearchString) +public static void (String args[]) { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { - theServer = ss; - count++; - taskNumber = count; - } - - - 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"" -",63,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall restore the executable model to its prior state.,119,0 +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 @@ -54367,30 +50707,112 @@ return ProjectName; { return ModulePath; }"" -",86,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"94 ""Refine Model +",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 -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; -} - -public StringBuffer GenerateEvent() -{ +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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 +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 + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 =""""""""; @@ -54422,63 +50844,62 @@ public void ParseRequirement(String TextLine) LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); m_Project=LineSt. "" -",71,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"73 ""Constraints +",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 String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; this. name = name; -this. value = value; -this. logic = logic; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - /** * Returns the id. * @return int */ - public String getId() { + public String getId() + { return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - /** * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double */ - public double getValue() { -return value; + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; } @@ -54486,1650 +50907,1509 @@ 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - + public 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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)); - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} -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 +// 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 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 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 - 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 ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - 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 closeDialog(WindowEvent 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 +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"54 ""eventserver -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +public MergeModel(EBT em) { -p +super( em); + MinimumNoRects = 3; + } -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"67 ""Event Detail Dialog -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +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 -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + private JPanel driver Inner Panel = null ; + private JPanel impact Panel = null ; + private JPanel impact Inner P -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + public Impact Report () + { + super ("""" Search Result GUI """"); -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + container = get Content Pane (); + set Size ( 800 , 250 ); -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"78 ""Notification Event + panel = new JPanel (); -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 + panel . set Layout ( null ); -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + this . server IP = + JOption Pane + . show In -// end of class Notification_Event -public Object clone() throws CloneNotSupportedException + + public static void main ( String [] args ) { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n + Impact Report im = new Impact Report (); - public void ParseEvent(String TextLine) + } + + + public Vector search Date () { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat + pair Vector = new Vector (); + query String Combo . remove All Items (); - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"84 ""White Board Execution Graph + query String Combo . add Item ("""" Select Query String """"); -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + Socket server ; + String line = new String (); - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + // 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + // Button Actions -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 action Performed ( Action Event e ) { + if ( submit Button == e . get Source ()) { -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 ( int i = 0 ; i < pair Vector . size (); i ++) { -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + Pair pair = ( Pair ) pair Vector . get ( i ); + if ( pair + . get - 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 void impact Report ( String id ) + { + // super ("""" Impact Report """"); - 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 + container = get Content Pane (); + set Size ( 1020 , 740 ); -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + this . query ID = id ; + System . out . println ("""" Impact Report Constructor ..... ID """" + -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { - -panel = new JPanel(); + public Vector get Constraint From Data Base () + { -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + Vector v = new Vector (); -return panel; - }"" -",51,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"70 ""Notification Processing + Socket server ; + String line = new String (); -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - // database and eventserver information - S + try + { + server = new Socket ( server IP , 1701 ); - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + if ( server . is Connected () ) + { + Buffered -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try -public static void main(String args[]) + public Vector get Driver From Data Base () { -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 + Vector v = new Vector (); -// 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"""" + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered"" +",47,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 saveMenuItemActionPerformed (ActionEvent evt) - { -try +public ModifyModel(EBT em) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); +super( em); } - // 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()) + // Construct Visual model for Merge Event +public void BuildEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +public StringBuffer GenerateEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try + protected void paintComponent(Graphics g) { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); - +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 -/** -* 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - -private static class Precedence + // Construct Visual model for Merge Event +public void BuildEvent() { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] +public StringBuffer GenerateEvent() { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +protected int top, left, right, bottom; -private static class Token +public EventLine ( int t, int l, int r, int b) { -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; +top = t; +left = l; +right = r; +bottom = b; } -/** - * 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 +public int GetT() { return top;} +public int GetL() { return left;} -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System +public int GetR() { return right;} +public int GetB() { return bottom;}"" +",89,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +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 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 +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -/* - * 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 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 +"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 - /** - * 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 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 -/** - * 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 goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"private JPanel center Panel = null ; +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - private JLabel 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 + if ( server . is Connected () ) + { + Buffered R - // Speculate Gui - public Speculate Gui () + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { - super ("" Speculate GUI ""); + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - container = get Content Pane (); - set Size ( 800 , 600 ); +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 - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } - // Submit Listener - public void action Performed ( Action Event e ) { + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect - if ( e . get Source () == submit Button ) { - send Query TO Server (); - } +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 - if ( e . get Source () == fetch 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 - System . out . println ("" Fetch Button Pressed + //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. - void send Query TO Server () +//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 ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +//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 - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +public String toString() { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - String project Name = this . proj Name Text . get - - public static void main ( String [] args ) + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { - new Speculate Gui (); - }",46,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"66 ""Config Dialog +return logic; + } -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -// 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 id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"49 ""Constraints Description + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } - public String get Description () { - return this . description ; + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public void set Description ( String description ) { - this . description = description ; - } - public void set Logic ( String logic ) { - this . logic = logic ; - } + /** +* 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 +"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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"89 ""Event Line -protected int top, left, right, bottom; + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"94 ""Refine Model +public RefineModel(EBT em) +{ +super( em); + } -public EventLine ( int t, int l, int r, int b) + // Construct Visual model for Merge Event +public void BuildEvent() { -top = t; -left = l; -right = r; -bottom = b; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 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 +"60 ""Thread Pool -public int GetT() { return top;} +/** +* 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 GetL() { return left;} -public int GetR() { return right;} +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub -public int GetB() { return bottom;}"" -",89,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The user shall be able to delete subscriptions.,107,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall send the customized message to each impacted executable model.,136,0 -"private JPanel center Panel = null ; - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. - // Speculate Gui - public Speculate Gui () + /** +* 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 - super ("" Speculate GUI ""); +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - container = get Content Pane (); + // database and eventserver information + S - set Size ( 800 , 600 ); + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - // Submit Listener +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 action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { +// 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"""" - send Query TO Server (); - } - if ( e . get Source () == fetch Button ) { + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - System . out . println ("" Fetch Button Pressed + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } - void send Query TO Server () + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { +openEventsMenuItemActionPerformed( evt); + } - String ip = this . event Server IP ; - int Port No = 1701 ; + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - Socket socket ; - try { - socket = new Socket ( ip , Port No ); + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { +new AboutDialog ( this, true). show(); + } - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - String [] attribute = { "" Value "", "" Attribute "" }; +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 - String project Name = this . proj Name Text . get +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"64 ""DOORs Thread Pool +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +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 - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"82 ""Tokenizer +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. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) + public EventModel(EBT e) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; + } + + + public void ClearVectors() { -return currentLine; +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +public void drawModel() { -return errors; +repaint(); } -/** - * 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 drawModel(EBShape sh) { +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) +private void ClearData() { -return Character. isJavaIdentifierPart( ch ); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) +public void Clicked ( int x, int y) { -String result = """""""" + ch; +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) +{ + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -for( ; nextChar( ); result += ch ) +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 ((((( - /** - * 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 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( ) + protected void AddLine( int t, int l, int r, int b) { -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } +EventLines. addElement( new EventLine( t, l, r, b)); } -/** - * 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 +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 -/** - * 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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -private void skip + + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"72 ""Balance /** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. + * Symbol represents what will be placed on the stack. */ -private void processSlash( ) +private static class Symbol { -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"78 ""Notification Event +public chartoken; +public int theLine; -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 Symbol( char tok, int line ) +{ +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -// constructor -public Notification_Event() + +public Balance( Reader inStream ) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +errors = 0; +tok = new Tokenizer( inStream ); } -// 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 + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; - public void ParseEvent(String TextLine) - { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo +if( opSym. token == '(' && clSym. token != ')' || -// 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 + /** + * 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 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 - //This method displays the contents of two array list to console -public void DisplayValues() +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public Requirement() {// empty constructor +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +private void 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 -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,For speculative events; the eventserver shall construct a composite event message.,132,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,For speculative events; the eventserver shall construct a composite event message.,132,0 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +private Hash table requirementDescTable = new Hash table(); - // database and eventserver information - S + private Hash table constraintDescTable = new Hash table(); - public Notification_Processing() + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) + +public void identifyPerformanceModels() { -try +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -public static void main(String args[]) +public void pullInformationFromDoors() { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void insertValuesInDataBase() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - private void saveMenuItemActionPerformed (ActionEvent evt) + public void createExecuteString() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +public void parseImpactReport(String str) { -exitApplication(); - } +Connection conn = null; - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); - } +Statement stmt = null; - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +Vector constraintsVector = null; +Vector driversVector = null; +ConstraintsDescription constraint = null; - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +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) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + public boolean mouseDown( java. awt.Evente, int x, int y) { - "" -",70,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"94 ""Refine Model + return true; + } -public RefineModel(EBT em) + + public boolean mouseUp( java. awt.Evente, int x, int y) { -super( em); +return true; } - // Construct Visual model for Merge Event -public void BuildEvent() + public void mouseClicked( java. awt. event.MouseEvente) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; +VisualPanel.Clicked( e. getX(), e. getY()); } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - - - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { +public void mouseExited( java. awt. event.MouseEvente){} - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { +public void mousePressed( java. awt. event.MouseEvente){} - socket = new Socket ( ip , Port No ); +public void mouseReleased( java. awt. event.MouseEvente){} - Output Stream os = socket . get Output Stream (); - Output Stream +public void mouseEntered( java. awt. event.MouseEvente){} - public void pull Value From DOORS () - { +public void paint(Graphics g) {} - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +public void update(Graphics g) {} - String [] attribute = { "" Value "", "" Attribute "" }; + public JSplitPane getSplitPane() +{ +return splitPane; +} - String project Name = this . proj Name Text . get +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} - public static void main ( String [] args ) +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { - new Speculate Gui (); - }",46,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - +switch(EventList. getSelectedIndex()) -private static class Precedence +public void RedrawAll(EBShape sh) { -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[ ] +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) { +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token +mainframe. addWindowListener( new WindowAdapter() { -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - +public 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 EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 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 + //@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 /** - * 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( 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 - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value +private 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 () + public void Updaterequirement Info(String rno, String pname, String mname) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + public boolean match( int mx, int my) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +return true; + } -public JPanel get Panel () + public int GetX() { - return panel ; - }"" -",48,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +return x; + } -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + public int GetY() + { +return y; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + public Color GetC() { -owner = o; -} +return c; + } + public String GetReqno() + { +return requirement No; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + public String GetProject() + { +return ProjectName; + } -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 + + 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 private String projectName = null; @@ -56259,1000 +52539,913 @@ if ( hashCode == 0) result = 37 * result + this. projectName. hashCode(); result = 37 * result + this. modulePath. hashCode(); result = 37 "" -",50,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"56 ""Event Parser +",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;/ -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - public void updateEvent(String str, String ID) +// 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 -public void impactReport(String str) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -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 + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - -public Vector get Values From Data Base () + /** +* Returns the id. +* @return int +*/ + public String getId() { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +return id; + } - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + /** +* Returns the name. +* @return String +*/ + public String getName() { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +return name; + } -public JPanel get Panel () + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { - return panel ; - }"" -",48,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"52 ""Pair - -private String queryID; - private String queryString; +return valueFrom; + } - public Pair(String queryID, String queryString) { + public double getValueTo() + { +return valueTo; + } -this. queryID = queryID; -this. queryString = queryString; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; } - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } - public void setQueryString(String queryString) { -this. queryString = queryString; + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - + public void setValueTo( double value) + { +this. valueTo = valueTo; }"" -",52,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"92 ""New Model +",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 -public NewModel(EBT em) +public ObsoleteModel(EBT em) { super( em); } - // Construct Visual model for Merge Event +// Construct Visual model for Merge Event public void BuildEvent() { -ClearVectors(); + ClearVectors(); AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve public StringBuffer GenerateEvent() -{ + { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall be able to delete subscriptions.,107,0 -"63 ""Doors Thread +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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - public void run() - { - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"65 ""About Dialog + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include deleting a requirement.,125,0 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - } + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ - public String get Description () { - return this . description ; - } + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; - } +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 - public void set Description ( String description ) { - this . description = description ; - } +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + //@param argsNo arguments are used. + public static void main(String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for"" +",64,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"85 ""Decompose Model - 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 DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - public void set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } + // 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 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 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 - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . 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 void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -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 +/** + * 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 int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall restore the executable model to its prior state.,119,0 -"58 ""Subscribed Model -private String SubscriberName; -private String SubscriberReqno; -private String SubscriberModule; -private String SubscriberKeyword1; -private String SubscriberKeyword2; -public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -SubscriberName = sn; -SubscriberReqno = sr; -SubscriberModule = sm; -SubscriberKeyword1 = sk1; -SubscriberKeyword2 = s +return Character. isJavaIdentifierPart( ch ); +} -public String GetSubscriberName() { return SubscriberName;} -public String GetSubscriberReqno() { return SubscriberReqno;} +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; -public String GetSubscriberModule() { return SubscriberModule;} +for( ; nextChar( ); result += ch ) -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } + /** + * 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 - // 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); -AddArrow(35,97,59,97); -CurrentEvent = 0; +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include merging requirements.,126,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall be able to delete subscriptions.,107,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +/** + * 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +private void skip -private void okButtonActionPerformed (ActionEvent evt) +/** + * 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( ) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - - -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +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 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 void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + // Speculate Gui + public Speculate Gui () + { -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall be able to construct speculative queries using a GUI.,115,0 -"51 ""Driver Inner Panel + super ("" Speculate GUI ""); -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + container = get Content Pane (); - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + set Size ( 800 , 600 ); -panel = new JPanel(); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Only registered subscribers shall be allowed to establish traces.,102,0 -"65 ""About Dialog + // Submit Listener -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"95 ""Text Model + public void action Performed ( Action Event e ) { -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + if ( e . get Source () == submit Button ) { -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 + send Query TO Server (); + } - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + if ( e . get Source () == fetch Button ) { -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(); -} + System . out . println ("" Fetch Button Pressed -public void drawModel() -{ -repaint(); -} + void send Query TO Server () + { -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); + String ip = this . event Server IP ; + int Port No = 1701 ; -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include deleting a requirement.,125,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"71 ""Requirement + Socket socket ; + try { -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + socket = new Socket ( ip , Port No ); -public Requirement() + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 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 { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public void ParseEvent(String TextLine) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -public void ParseRequirement(String TextLine) + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"49 ""Constraints Description +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -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 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 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 ; +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); - } + public EventModel(EBT e) +{ +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add - public String get Description () { - return this . description ; - } - public String get Logic () { - return this . logic ; +public void getIP Server( String serverIP) + { +this. serverIP = serverIP; } - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - public String get Requirement ID () { - return this . requirement ID ; - } - public String get Units () { - return this . units ; - } +public void drawModel() +{ +repaint(); +} - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public void set Logic ( String logic ) { - this . logic = logic ; - } - public void set Module Path ( String module Path ) { - this . module Path = module Path ; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - 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 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 Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } +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 get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + protected void BuildEvent(){} - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - 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 ; +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 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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -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() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"74 ""database + 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 -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; +String id; + String name; + double value; + String logic; - 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 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 logic. +* @return String */ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect + public String getLogic() { +return 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 + /** +* Returns the name. +* @return String */ - public void injectVa + public String getName() { +return 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 +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -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 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 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 - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + /** +* 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 -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader -private void okButtonActionPerformed (ActionEvent evt) +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +return currentLine; +} -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) { -setVisible ( false); -dispose (); +return errors; } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"62 ""Call Back + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} -private Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; - private Hash table performanceModelTable = new Hash table(); +for( ; nextChar( ); result += ch ) - 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; // + /** + * 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 identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +/** + * 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 pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = 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 void skip - public void createExecuteString() - { +/** + * 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 -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 a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +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 @@ -57368,848 +53561,999 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include deleting a requirement.,125,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"90 ""Merge Model +",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 +"61 ""Worker Thread +/** +* True if this thread is currently processing. + */ +public boolean busy; -public MergeModel(EBT em) - { -super( em); - MinimumNoRects = 3; - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - // Construct Visual model for Merge Event -public void BuildEvent() +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +owner = o; +} -public StringBuffer GenerateEvent() +/** + * Scan for and execute tasks. + */ +public void run() { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"77 ""Model Driver +Runnable target = null; -String msg=""""""""; +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 +"63 ""Doors Thread -public ModelDriver(String text) - { -this. msg = text; -init(); - } +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - public void init() + DOORsThread(ServerSocket ss) { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall receive event messages when a requirement changes.,127,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall send the customized message to each impacted executable model.,136,0 -"87 ""EBT + theServer = ss; + count++; + taskNumber = count; + } -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"93 ""Obsolete Model -public EBT(Frame f) +public ObsoleteModel(EBT em) { -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +super( em); + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +// Construct Visual model for Merge Event +public void BuildEvent() { -WorkArea. showText( sh); - } + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve - public boolean mouseDown( java. awt.Evente, int x, int y) +public StringBuffer GenerateEvent() { - return true; - } +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 +protected int top, left, right, bottom; - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) +public EventLine ( int t, int l, int r, int b) { -VisualPanel.Clicked( e. getX(), e. getY()); +top = t; +left = l; +right = r; +bottom = b; } -public void mouseExited( java. awt. event.MouseEvente){} - +public int GetT() { return top;} -public void mousePressed( java. awt. event.MouseEvente){} +public int GetL() { return left;} -public void mouseReleased( java. awt. event.MouseEvente){} +public int GetR() { return right;} -public void mouseEntered( java. awt. event.MouseEvente){} +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 paint(Graphics g) {} +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 update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} + 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; + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + /** +* Returns the name. +* @return String +*/ + public String getName() { -switch(EventList. getSelectedIndex()) +return name; + } -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"92 ""New Model + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -public NewModel(EBT em) -{ -super( em); + + public double getValueTo() + { +return valueTo; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} + /** +* 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(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"66 ""Config Dialog + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + 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 -// 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 DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol + // Construct Visual model for Merge Event +public void BuildEvent() { -public chartoken; -public int theLine; + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ -public Balance( Reader inStream ) +public StringBuffer GenerateEvent() { -errors = 0; -tok = new Tokenizer( inStream ); -} +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 +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; + } -/** - * 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 temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"50 ""Driver Description +* Returns the name. +* @return String +*/ + public String getName() + { +return 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 + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() + { +return valueFrom; + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) + public double getValueTo() { +return valueTo; + } -this. projectName = projec -public String getChangedAttribute() + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -return changedAttribute; +this. id = id; } - public String getDescription() + + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -return description; +this. name = name; } - public String getFromAttribute() + + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -return fromAttribute; +this. valueFrom = valueFrom; } - public String getModulePath() + + public void setValueTo( double value) { -return modulePath; - } +this. valueTo = valueTo; + }"" +",75,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 - public String getProjectName() +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 projectName; +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); } - public String getRequirementID() + public Vector getConstraints() { -return requirementID; +return constraintVector; } - public String getToAttribute() + public Vector getDrivers() { -return toAttribute; +return driverVector; } - public void setChangedAttribute(String changedAttribute) + public String getName() { -this. changedAttribute = changedAttribute; +return name; } - public void setDescription(String description) + public void setName(String name) { -this. description = description; +this. name = name; } - public void setFromAttribute(String fromAttribute) + public void addDriver(DriverDescription driver) { -this. fromAttribute = fromAttribute; +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); } - public void setModulePath(String modulePath) + public void removeDriver(DriverDescription driver) { -this. modulePath = modulePath; +this. driverVector. remove( driver); } - public void setProjectName(String projectName) + public boolean containsDriver(DriverDescription driver) { -this. projectName = projectName; +return this. driverVector. contains( driver); } - public void setRequirementID(String requirementID) + public void addConstraint(ConstraintsDescription constraint) { -this. requirementID = requirementID; +this. constraintVector. add( constraint); } - public void setToAttribute(String toAttribute) + public boolean containsConstraint(ConstraintsDescription constraint) { -this. toAttribute = toAttribute; +return this. constraintVector. contains( constraint); } - public String createKey() + public void removeConstraint(ConstraintsDescription constraint) { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +this. constraintVector. remove( constraint); } - public boolean equals(Object o) + public DriverDescription getDriver(DriverDescription driver) { -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) { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" + public long getQueryID() + { +return this. queryID; + } + public void setQueryID( long id) + { +this. queryID = id; + } -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Only registered subscribers shall be allowed to establish traces.,102,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The subscribermanager shall restore the executable model to its prior state.,119,0 -"80 ""Requirement +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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -public Requirement() {// empty constructor + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - 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 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 ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"82 ""Tokenizer +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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + 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 -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ + public double 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() - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} +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 -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; +String id; + String name; + double value; + String logic; -for( ; nextChar( ); result += ch ) + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -// constructor -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -// 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 name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } - 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 + /** +* 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 -// 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 queryID; + private String queryString; + public Pair(String queryID, String queryString) { - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include deleting a requirement.,125,0 -"70 ""Notification Processing +this. queryID = queryID; +this. queryString = queryString; -// 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 getQueryID() { +return this. queryID; + } - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + public String getQueryString() { +return this. queryString; + } -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } -public static void main(String args[]) - { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ 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"""" + }"" +",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 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; + /** +* 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 void saveMenuItemActionPerformed (ActionEvent evt) + synchronized public void waitDone() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { -exitApplication(); +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -openEventsMenuItemActionPerformed( evt); +_ activeThreads++; +_ started = true; +notify(); } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +_ activeThreads--; +notify(); + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +_ 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 +"81 ""subscribermanager +Socket aSocket; + int ID; + String EventLog; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } + Connection conn; + ResultSet rs; + Statement stmt; + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -void UpdateDisplayList() + // 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()) - { - "" -",70,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Each artifact shall be placed under the control of a subscribermanager,106,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer - - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String - performance model Handler(String msg) +} +public void sendImpactReportToEventServer(String text) { -this. strES = msg; - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public void messageParser() + +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -//Re-execut -public String generateReport() -{ - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"64 ""DOORs Thread Pool -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +public final static int defaultPort = 2347; + ServerSocket theServer; + // static int numberOfThreads = 3; - public void saveModel( int id) + //@param argsNo arguments are used. + public static void main(String args[]) { -// save current model -database. saveCurrentModel( id); - } +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 +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"62 ""Call Back + //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 Hash table requirementDescTable = new Hash table(); +//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 Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); +//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 PerformanceModel performance model= null - public void parseSpeculateInformation(String str) +public String toString() { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path -public void identifyPerformanceModels() + /** +* Returns the id. +* @return int +*/ + public String getId() { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +return id; + } -public void pullInformationFromDoors() + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +return logic; + } -public void insertValuesInDataBase() + /** +* Returns the name. +* @return String +*/ + public String getName() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - +return name; + } - public void createExecuteString() - { + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -public void parseImpactReport(String str) - { -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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - private long queryID = 0; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public static int count = 0; + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"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) { @@ -58310,59 +54654,409 @@ return """"performance modelName = """" + """"\ n"""" + """"Constraints = """" + this."" -",53,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall be able to delete subscriptions.,107,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall re execute the model using the speculative values.,117,0 -"83 ""Variable +",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 -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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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; + + // 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) { -this. id = id; -this. type = type; -this. + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + + 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) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ +// 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"67 ""Event Detail Dialog + +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p + + +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + + +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} + + +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide + + +private void RightListClicked(MouseEvent e){ + if (!RightList. isSelectionEmpty()) { + int index = RightList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_RightS"" +",67,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } + + + public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ this. id = id; -this. type = type; this. name = name; this. value = value; -this. logic - +this. logic = logic; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } /** * Returns the id. * @return int */ - public String getId() - { + public String getId() { return id; } @@ -58371,8 +55065,7 @@ return id; * Returns the logic. * @return String */ - public String getLogic() - { + public String getLogic() { return logic; } @@ -58381,12 +55074,10 @@ return logic; * Returns the name. * @return String */ - public String getName() - { + public String getName() { return name; } - /** * Returns the value. * @return double @@ -58404,8 +55095,7 @@ return value; this. id = id; } - - /** + ** * Sets the logic. * @param logic The logic to set */ @@ -58429,74 +55119,18 @@ this. name = name; */ 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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +private Hash table requirementDescTable = new Hash table(); - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } - - - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } - - - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } - - - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null + private PerformanceModel performance model= null public void parseSpeculateInformation(String str) @@ -58562,228 +55196,148 @@ Vector driversVector = null; ConstraintsDescription constraint = null; int driverLoop"" -",62,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"64 ""DOORs Thread Pool +",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 +"47 ""Impact Report -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +private String server IP = """" local host """"; + private JPanel center Panel = null ; + + private JPanel driver Panel = new JPanel (); + private JPanel driver Inner Panel = null ; - //@param argsNo arguments are used. - public static void main(String args[]) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + + 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 ) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + Impact Report im = new Impact Report (); + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public Vector search 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; + 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 if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + pair Vector = new Vector (); + query String Combo . remove All Items (); - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"73 ""Constraints + query String Combo . add Item ("""" Select Query String """"); -String id; - String name; - double value; - String logic; + 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; - } + // Select Actions + public void action Performed ( Action Event e ) + { - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } +public void action Performed ( Action Event e ) { - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } + Pair pair = ( Pair ) pair Vector . get ( i ); - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } + if ( pair + . get - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + public void impact Report ( String id ) + { + // super ("""" Impact Report """"); - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + container = get Content Pane (); + set Size ( 1020 , 740 ); - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; + this . query ID = id ; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + System . out . println ("""" Impact Report Constructor ..... ID """" + -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public Vector get Constraint From Data Base () + { + Vector v = new Vector (); -/** - * 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; + Socket server ; + String line = new String (); - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall differentiate between evolutionary and speculative events.,130,0 + + 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 /** @@ -58852,1332 +55406,812 @@ for ( int i=0; i< threads. length; i++) { done. waitDone(); } }"" -",60,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +",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 +"66 ""Config Dialog +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); -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 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +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 void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall be able to delete subscriptions.,107,0 -"67 ""Event Detail Dialog -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p + 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); + } + 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 +"77 ""Model Driver -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"64 ""DOORs Thread Pool +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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +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 +public ModifyModel(EBT em) +{ +super( em); + } -public Requirement() {// empty constructor + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; } -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public StringBuffer GenerateEvent() { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + protected void paintComponent(Graphics g) { -return currentLine; -} +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; -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { +panel = new JPanel(); -/** - * 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( ) ) -{ +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 - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + // Speculate Gui + public Speculate Gui () + { -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + super ("" Speculate GUI ""); -for( ; nextChar( ); result += ch ) + 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 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 + // Submit Listener -/** - * 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 ) { + if ( e . get Source () == submit Button ) { -/** - * 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 + send Query TO Server (); + } -/** - * 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 () == fetch Button ) { -private void skip + System . out . println ("" Fetch Button Pressed -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall be able to delete subscriptions.,107,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"74 ""database + void send Query TO Server () + { -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + String ip = this . event Server IP ; + int Port No = 1701 ; - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + String [] attribute = { "" Value "", "" Attribute "" }; - /** -* 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 + String project Name = this . proj Name Text . 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 static void main ( String [] args ) { -conn = this. getConnect + 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; -/** -* 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) + DOORsThread(ServerSocket ss) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru + theServer = ss; + count++; + taskNumber = count; + } -public void solveStructureEquation() + public void run() { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - -public void getTrackVariableName() + while( true) { -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() + try { -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 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 Vector getImpactReport() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"60 ""Thread Pool - -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); - + setTitle(""""EventsProcessor""""); -/** -* 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++) +addWindowListener( new WindowAdapter() { -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -done. waitBegin(); -done. waitDone(); - } protected void finalize() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + 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 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null +Notification - public void parseSpeculateInformation(String str) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -public void identifyPerformanceModels() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N -public void pullInformationFromDoors() +void DeleteEvent(String SubscriberName, String EventID) { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -public void insertValuesInDataBase() +void DeleteRelatedEvents() { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(0); - public void createExecuteString() - { -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req -public void parseImpactReport(String str) +void UpdateDisplayList() { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -Connection conn = null; -Statement stmt = null; + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 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 -private String projectName = null; - private String modulePath = null; - private String requirementID = null; +private String queryID; + private String queryString; - private String description = null; // Description of the requirement. - private String changedArrtibute = null; - private Strin + public Pair(String queryID, String queryString) { -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { +this. queryID = queryID; +this. queryString = queryString; -this. projectName = projec + } -public String getChangedAttribute() - { -return changedAttribute; + public String getQueryID() { +return this. queryID; } - public String getDescription() - { -return description; + public String getQueryString() { +return this. queryString; } - 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 setQueryID(String queryID) { +this. queryID = queryID ; } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; + public void setQueryString(String queryString) { +this. queryString = queryString; } - public void setDescription(String description) - { -this. description = description; - } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } - public void setModulePath(String modulePath) - { -this. modulePath = modulePath; - } + }"" +",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 +"78 ""Notification Event - public void setProjectName(String projectName) - { -this. projectName = projectName; - } +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 setRequirementID(String requirementID) - { -this. requirementID = requirementID; - } +// constructor +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public void setToAttribute(String toAttribute) +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException { -this. toAttribute = toAttribute; - } +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); - } - public boolean equals(Object o) - { -if (!( o instance of DriverDescription)) - return false; -DriverDescription dd = (DriverDescription) o; -if ( dd. projectName. equalsIgnoreCase( this. projectName) - && ddpublic String toString() + public void ParseEvent(String TextLine) { - -String str = - """"\ nProject Name = """" -+ this. projectName -+ """"\ n"""" -+ """"Module Path = """" -+ this. modulePath -+ """"\ n"""" -+ """"Requirement ID = """" -+ this. requirementID -+ """"\ n"""" +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo -public int hashCode() +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"76 ""Evaluator +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat -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 + //This method displays the contents of two array list to console +public void DisplayValues() { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + 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 -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ +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 -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +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 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 { + //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 EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +//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 -/** - * 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 +//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 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 String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return 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 + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return 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. +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -/** - * 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; + } + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + /** +* 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Only registered subscribers shall be allowed to establish traces.,102,0 -"50 ""Driver Description +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } -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 type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } -public DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } -this. projectName = projec -public String getChangedAttribute() - { -return changedAttribute; - } + /** +* 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 String getDescription() +public static void (String args[]) { -return description; - } - - public String getFromAttribute() +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try { -return fromAttribute; - } - - public String getModulePath() + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) { -return modulePath; - } +p - public String getProjectName() - { -return projectName; - } +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 String getRequirementID() - { -return requirementID; +public ModifyModel(EBT em) +{ +super( em); } - public String getToAttribute() - { -return toAttribute; - } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public void setDescription(String description) - { -this. description = description; - } - public void setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - 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) + 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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"63 ""Doors Thread +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 -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; +private Connection conn; private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - -public String searchQueryID(String date) + //EventParser Constructor + // initializes the Database connection + public EventParser() { -Vector queryVector = new Vector(); -String searchQuery = new String(); try { Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public String getConstraintFromDataBase(String queryID) + public void updateEvent(String str, String ID) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public String getDriverFromDataBase(String queryID) +//Check if a subscription exists + public boolean CheckSubscription(String str) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Event types shall include adding new requirements.,121,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public Vector get Values From Data Base () +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + public void speculate(String str) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +System. out. println(""""Speculate""""); +CallBack -public JPanel get Panel () +public void impactReport(String str) { - return panel ; - }"" -",48,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} - -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - - -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl - - -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP - - - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. - - -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The subscribermanager shall re execute the model using the speculative values.,117,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ - -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -private void okButtonActionPerformed (ActionEvent evt) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -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 +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 @@ -60249,661 +56283,786 @@ notify(); { _ activeThreads = 0; }"" -",59,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol +",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 +"90 ""Merge Model + + +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() { -public chartoken; -public int theLine; + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -public Symbol( char tok, int line ) + +public StringBuffer GenerateEvent() { -token = /** +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 +"82 ""Tokenizer + + +/** * 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 != ')' || +return errors; +} - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence +/** + * 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 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[ ] +while( nextChar( ) ) { -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 -private static class Token + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) { -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; +return Character. isJavaIdentifierPart( ch ); } -/** - * 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. + * Return an identifier read from input stream + * First character is already read into ch */ -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 String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) -/** - * 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. + * 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. */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +public String getNe /** - * 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 + * 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 ) { } +} - /** - * Internal routine to compute x^ 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 static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. +private /** - * 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. + * 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: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"71 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - -public Requirement() +/** + * 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 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -public Object clone() throws CloneNotSupportedException +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public void updateEvent(String str, String ID) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); - } +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} +//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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"83 ""Variable -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public void speculate(String str) { -this. id = id; -this. type = type; -this. +System. out. println(""""Speculate""""); +CallBack -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) +public void impactReport(String str) { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this - +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -public String toString() + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; + public String get Description () { + return this . description ; } - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; + public String get Logic () { + return this . logic ; } + public String get Module Path () { + return this . module Path ; + } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public String get Project Name () { + return this . project Name ; } + public String get Requirement ID () { + return this . requirement ID ; + } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public String get Units () { + return this . units ; } + public String get Value () { + return this . value ; + } - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public void set Description ( String description ) { + this . description = description ; } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; + public void set Module Path ( String module Path ) { + this . module Path = module Path ; } + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; } + public void set Units ( String units ) { + this . units = units ; + } - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; + public void set Value ( String units ) { + this . value = units ; } + public String get Impacted Constraint () { + return this . impacted Constraint ; + } - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; } + public String get Attribute () { + return this . attribute ; + } - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; + public void set Attribute ( String attribute ) { + this . attribute = attribute ; } + public String get Performance Model Name () { + return this . performance Model Name ; + } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"80 ""Requirement +public 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 String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 -public Requirement() {// empty constructor +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Only registered subscribers shall be allowed to establish traces.,102,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"89 ""Event Line -protected int top, left, right, bottom; +public 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 EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ -public int GetT() { return top;} -public int GetL() { return left;} + 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 GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"83 ""Variable + 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 -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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"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() { -this. id = id; -this. type = type; -this. + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) + +public String getNextID() { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn -//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 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 toString() + public String getConstraintFromDataBase(String queryID) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j - /** -* Returns the id. -* @return int -*/ - public String getId() + public String getDriverFromDataBase(String queryID) { -return id; - } +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 + +private String server IP = """" local host """"; + private JPanel center Panel = null ; + private JPanel driver Panel = new JPanel (); - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + private JPanel driver Inner Panel = null ; + + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -return logic; - } + super ("""" Search Result GUI """"); - /** -* Returns the name. -* @return String -*/ - public String getName() + container = get Content Pane (); + + set Size ( 800 , 250 ); + + panel = new JPanel (); + + panel . set Layout ( null ); + + this . server IP = + JOption Pane + . show In + + + public static void main ( String [] args ) { -return name; - } + Impact Report im = new Impact Report (); - /** -* 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 search Date () + { + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + pair Vector = new Vector (); - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } + query String Combo . remove All Items (); + query String Combo . add Item ("""" Select Query String """"); - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } + Socket server ; + String line = new String (); - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + // Select Actions + public void action Performed ( Action Event e ) + { - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + // Button Actions - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public void action Performed ( Action Event e ) { - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + if ( submit Button == e . get Source ()) { + for ( int i = 0 ; i < pair Vector . size (); i ++) { - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"85 ""Decompose Model + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; } - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"64 ""DOORs Thread Pool + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - //@param argsNo arguments are used. - public static void main(String args[]) +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 + + +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) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() { - 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 +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 +"58 ""Subscribed Model + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 "76 ""Evaluator private static final int EOL = 0; @@ -61028,416 +57187,81 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"93 ""Obsolete Model +",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 ObsoleteModel(EBT em) -{ -super( em); - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth -// Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - - -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); - - - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } - - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} - - -public void mouseExited( java. awt. event.MouseEvente){} - - -public void mousePressed( java. awt. event.MouseEvente){} - -public void mouseReleased( java. awt. event.MouseEvente){} - -public void mouseEntered( java. awt. event.MouseEvente){} - -public void paint(Graphics g) {} - -public void update(Graphics g) {} - - public JSplitPane getSplitPane() -{ -return splitPane; -} - - -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} - -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) - { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"82 ""Tokenizer - - -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - - -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} - - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} - - -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ - - - - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} - - -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; - -for( ; nextChar( ); result += ch ) - - - - /** - * Return next identifier, skipping comments - * string constants, and character constants. - * Place identifier in currentIdNode. word and return false - * only if end of stream is reached. - */ -public String getNe - - -/** - * nextChar sets ch based on the next character in the input stream. - * putBackChar puts the character back onto the stream. - * It should only be used once after a nextChar. - * Both routines adjust currentLine if necess - private void putBackChar( ) -{ -if( ch == '\ n' ) -currentLine--; -try -{ in. unread( ( int) ch ); } -catch( IO Exception e ) { } -} - - -/** - * Precondition: We are about to process a comment; have already seen - * comment-start token - * Post condition: Stream will be set immediately after - * comment-ending token - */ -private - - -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ - -private void skip - - -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"48 ""Constraint Inner Panel +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member -private String 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 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 set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); + 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 ( server . is Connected () ) - { - Buffered R + 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 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 double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 +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 @@ -61553,288 +57377,393 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"90 ""Merge Model - +",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 -public MergeModel(EBT em) +public static void (String args[]) { -super( em); - MinimumNoRects = 3; - } +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"77 ""Model Driver +panel = new JPanel(); -String msg=""""""""; +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -public ModelDriver(String text) - { -this. msg = text; -init(); - } +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 + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - public void init() +public Object clone() throws CloneNotSupportedException { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - // 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { - setTitle(""""EventsProcessor""""); +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -addWindowListener( new WindowAdapter() +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 +"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 void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} +public String GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -Notification +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 +"70 ""Notification Processing -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index =0; - try - { -Notification_Event nEvt1 = (Notificati +// 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 -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) + public Notification_Processing() { -int index = eventList. getSelectedIndex(); -if ( index != -1) +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() { - try + public void windowClosing(WindowEvent evt) { -N +try -void DeleteEvent(String SubscriberName, String EventID) + +public static void main(String args[]) { try { - int i, j=-1; - for ( i=0; i< events. size(); i++) + 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) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" -void DeleteRelatedEvents() + + private void saveMenuItemActionPerformed (ActionEvent evt) { -while ( m_Deleterequirement List. size()!=0) +try { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - m_Deleterequirement List. remove(0); + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } -void AddSubscription(String SubscriberName, Requirement requirement ) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -String SubscriberDependency = """"Requirements""""; -String Message = """"ADD_SUBSCRIPTION""""+""""|""""; -Message += m_UserName + """"|""""; -Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; -Message += SubscriberName + """"|""""; -Message += requirement . m_RequirementID + """",""""; -Message += req +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -void UpdateDisplayList() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +if (! listModel. isEmpty()) { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 - // 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 +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } -private boolean Analyze_CheckSubscription(String str) +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try { -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"88 ""Event Model - + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"54 ""eventserver -protected Vector EventShapes = new Vector(); -protected Vector EventLines = new Vector(); -protected EB Shape ebs, ebs2; -protected EventLine mline; -protected Color ShapeColor = new Color (190,190,190); +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 - 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 drawModel() -{ -repaint(); -} + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +/** +* 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() +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { -for ( int i = 0; i < EventShapes. size(); i++) +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} +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 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 + /** +* 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 CheckNotifyStatus() + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 - protected void BuildEvent(){} +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); } -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 +// 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 getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +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 +"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() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 +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 private GridBagLayout grid bag; @@ -61884,382 +57813,200 @@ private void RightListClicked(MouseEvent e){ if (!RightList. isSelectionEmpty()) { int index = RightList. getSelectedIndex(); Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - - -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +",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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +public DecomposeModel(EBT em) { -WorkArea. showText( sh); +super( em); +MinimumNoRects = 3; } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; - } + // 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 mouseUp( java. awt.Evente, int x, int y) -{ -return true; - } - public void mouseClicked( java. awt. event.MouseEvente) +public StringBuffer GenerateEvent() { -VisualPanel.Clicked( e. getX(), e. getY()); -} - +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 -public void mouseExited( java. awt. event.MouseEvente){} +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; -public void mousePressed( java. awt. event.MouseEvente){} + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -public void mouseReleased( java. awt. event.MouseEvente){} + // 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 mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} +} +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 void update(Graphics g) {} - public JSplitPane getSplitPane() +// 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 splitPane; -} -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; +// 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 -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +protected int top, left, right, bottom; -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public EventLine ( int t, int l, int r, int b) { -owner = o; +top = t; +left = l; +right = r; +bottom = b; } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; - -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall re execute the model using the speculative values.,117,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P - - -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - - -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio - - -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - - // database and eventserver information - S - - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try - +public int GetT() { return top;} -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 int GetL() { return left;} +public int GetR() { return right;} -// 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 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 +private String queryID; + private String queryString; - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; - // 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 getQueryID() { +return this. queryID; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) - - - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); + public String getQueryString() { +return this. queryString; } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ + public void setQueryString(String queryString) { +this. queryString = queryString; + } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ 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 + }"" +",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; -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o +panel = new JPanel(); - // 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. +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public void Dispatch +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 String getErrorMessage() +public ModelDriver(String text) { - return errMsg; +this. msg = text; +init(); } - public boolean Contains(String ContextString, String SearchString) + public void init() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; - -for ( int i = 0"" -",57,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 +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 private static final int EOL = 0; @@ -62384,818 +58131,4133 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Each artifact shall be placed under the control of a subscribermanager,106,0 -"48 ""Constraint Inner Panel +",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 -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 () + public void Updaterequirement Info(String rno, String pname, String mname) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) + public boolean match( int mx, int my) { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d +return true; + } -public JPanel get Panel () + public int GetX() { - return panel ; - }"" -",48,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"53 ""Performance Model - -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; - - private long queryID = 0; +return x; + } - public static int count = 0; - public PerformanceModel(String name, long queryID) + public int GetY() { -this. name = name; -this. queryID = queryID; -this. driverVector = new Vector(); -this. constraintVector = new Vector(); +return y; } - public Vector getConstraints() - { -return constraintVector; + public Color GetC() +{ +return c; } - public Vector getDrivers() + public String GetReqno() { -return driverVector; +return requirement No; } - public String getName() + public String GetProject() { -return name; +return ProjectName; } - public void setName(String name) - { -this. name = name; - } - public void addDriver(DriverDescription driver) + public String GetModule() { -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); - } +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 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 DecomposeModel(EBT em) { - cd = (ConstraintsDescription) this - - public long getQueryID() - { -return this. queryID; - } - - public void setQueryID( long id) - { -this. queryID = id; +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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + // 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 -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 +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 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++ + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target + /** +* 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 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 +/** +* 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 double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + /** +* 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 double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) +public void getTrackVariableName() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -// finds the subscribers for this requirement - public void IdentifySubscribers() + +public void setCalculatedValues() { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi +System. out. println(""""Inside 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() + 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 -String sName, sReqno, sModule, sKey1, sKey2; -try +public ObsoleteModel(EBT em) { - System. o - - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - - public void Dispatch +super( em); + } - public String getErrorMessage() - { - return errMsg; - } +// 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 Contains(String ContextString, String SearchString) +public StringBuffer GenerateEvent() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +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 -for ( int i = 0"" -",57,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall send the customized message to each impacted executable model.,136,0 -"86 ""EB Shape +private String queryID; + private String queryString; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; + public Pair(String queryID, String queryString) { +this. queryID = queryID; +this. queryString = queryString; -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; } - - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); + public String getQueryID() { +return this. queryID; } - - public boolean match( int mx, int my) - { -return true; + public String getQueryString() { +return this. queryString; } + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - public int GetX() - { -return x; + public void setQueryString(String queryString) { +this. queryString = queryString; } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public int GetY() - { -return y; - } - public Color GetC() -{ -return c; - } + }"" +",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 +"76 ""Evaluator - public String GetReqno() - { -return requirement No; - } +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 GetProject() - { -return ProjectName; - } +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 GetModule() - { -return ModulePath; - }"" -",86,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"69 ""Notification Event +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ -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 +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public Notification_Event() + +private static class Token { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} +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 Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +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 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 +/** + * 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 ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"86 ""EB Shape + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +/** + * 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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +/* + * 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 Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } + /** + * Internal routine to compute x^ n. + */ +private static double pow( double x, double n ) { + System. out. println(""""INSIDE pow""""); +if( x == 0 ) { + if( n == 0 ){ +System. out. - public boolean match( int mx, int my) - { -return true; - } +/** + * 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 int GetX() - { -return x; - } - public int GetY() +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) { -return y; +this. strES = msg; } - public Color GetC() + 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() { -return c; - } + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; - public String GetReqno() - { -return requirement No; + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; } - public String GetProject() + + public void saveModel( int id) { -return ProjectName; +// save current model +database. saveCurrentModel( id); } - public String GetModule() - { -return ModulePath; + 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); }"" -",86,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"89 ""Event Line +",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 -protected int top, left, right, bottom; +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -public int GetT() { return top;} + /** + * 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 int GetL() { return left;} -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall be able to delete subscriptions.,107,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On registration a subscriber shall register itself under the control of a subscribermanager,104,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall be able to construct speculative queries using a GUI.,115,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; + /** +* 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 - // 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) + /** +* 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) { - setTitle(""""EventsProcessor""""); +conn = this. getConnect -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 - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + /** +* 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 -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try +public void solveStructureEquation() { -Notification +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +public void getTrackVariableName() { -if (! listModel. isEmpty()) -{ - int index =0; - try +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() { -Notification_Event nEvt1 = (Notificati +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 """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() { - try +} + +public Object clone() throws CloneNotSupportedException { -N +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -void DeleteEvent(String SubscriberName, String EventID) + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i + 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); + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) + // Construct Visual model for Merge Event +public void BuildEvent() { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - m_Deleterequirement List. remove(0); +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -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 + 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 +private Connection conn; + private ResultSet rs; + private Statement stmt; -void UpdateDisplayList() + //EventParser Constructor + // initializes the Database connection + public EventParser() { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +try { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - // 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 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) + { -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The eventserver shall receive event messages when a requirement changes.,127,0 -"77 ""Model Driver +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -String msg=""""""""; -public ModelDriver(String text) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -this. msg = text; -init(); - } +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - public void init() +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall be able to delete subscriptions.,107,0 -"49 ""Constraints Description +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models -private 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 speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) +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 +"69 ""Notification Event - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement 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() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} - public String get Description () { - return this . description ; - } +public Object clone() throws CloneNotSupportedException + { +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; - } + public void ParseEvent(String TextLine) + { + StringTokenizer LineSt; // Tokenizer for the line +int i=0; +LineSt = new StringTokenizer(TextLine, """"|""""); +m_SubscriberName = LineSt. nextToken// Set the other members before calling this function - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; - } + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); - public String get Units () { - return this . units ; - } +if ( m_Eve - public String get Value () { - return this . 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 attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 void set Description ( String description ) { - this . description = description ; - } +Socket aSocket; + int ID; + String EventLog; - public void set Logic ( String logic ) { - this . logic = logic ; - } + Connection conn; + ResultSet rs; + Statement stmt; - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public void set Project Name ( String project Name ) { - this . project Name = project 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 Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +} +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 void set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +// 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 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 ; - } + // 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 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 MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; } - public String to String () { - String str = - """"\ n Project Name = """" - + this . project Name + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public 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 + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"51 ""Driver Inner Panel + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"61 ""Worker Thread + +/** +* True if this thread is currently processing. + */ +public boolean busy; + +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; + + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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(); +} + +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"81 ""subscribermanager + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 + + + public static void main ( String [] args ) + { + + Impact Report im = new Impact Report (); + + } + + + public Vector search Date () + { + + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { + + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) + { + + pair Vector = new Vector (); + + query String Combo . remove All Items (); + + query String Combo . add Item ("""" Select Query String """"); + + Socket server ; + String line = new String (); + + + // Select Actions + + public void action Performed ( Action Event e ) + { + + if ( date Combo == ( JCombo Box ) e . get Source ()) + { + date = ( String ) date Combo . get Selected Item (); + search Query ID ( date ); + } + } + + // Button Actions + + +public void action Performed ( Action Event e ) { + + if ( submit Button == e . get Source ()) { + + for ( int i = 0 ; i < pair Vector . size (); i ++) { + + Pair pair = ( Pair ) pair Vector . get ( i ); + + if ( pair + . get + + + + public void impact Report ( String id ) + { + + // super ("""" Impact Report """"); + + container = get Content Pane (); + + set Size ( 1020 , 740 ); + + this . query ID = id ; + + System . out . println ("""" Impact Report Constructor ..... ID """" + + + + public Vector get Constraint From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered + + + + public Vector get Driver From Data Base () + { + + Vector v = new Vector (); + + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 + + + 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 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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; + } + + 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 void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"48 ""Constraint Inner Panel + +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel + + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value + + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + + } + + +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d + + +public JPanel get Panel () + { + return panel ; + }"" +",48,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"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 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 +"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 + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"86 ""EB Shape + + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; + + +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } + + + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } + + + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() +{ +return c; + } + + public String GetReqno() + { +return requirement No; + } + + public String GetProject() + { +return ProjectName; + } + + + public String GetModule() + { +return ModulePath; + }"" +",86,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,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 ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"74 ""database + + +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; + + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and + + + /** + * Construct a connection object. + * @param Returns an object of type Connection + */ + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo + + + + /** +* Returns GraphId as int +* @param graphName performance modelHandler calls this method with graphName +* as parameter, performance modelHandler parse the EventServer message and get the +* graphName +*/ + public int get + + + /** +* Copy data from one set of columns to other in table Variable +* @param graphId is the id of graph for which you want to save the +* current state of variables +*/ + public void saveCurrentModel( int graphId) + { +conn = this. getConnect + + +/** +* Injects new value into Variable table, using Data stored in +* Vector of Variable object +* @param graphId is the id of graph +* @param Vector var is the Vector that stores the Object of type Variable +*/ + public void injectVa + + /** +* this method will pick up the structure id from SPE Structure +* If DependentStructureId is 0 then select StructureID +* and invoke the executeStructure method on Selected +* StructureId +* Who Invokes this method: performance model // this method is about executing the structure + // based on StructureId find all the data related to given StructureId + // and using the equation in string format call the method equationParser. + //I am passing Vector that has all the data abou + public void solveStructure( int StructureId, Vector vr) + { +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"private JPanel center Panel = null ; + + private JLabel des Label = null ; + private JLabel change Label = null ; + private JLabel from Label = null ; + private JLabel to Label = null ; + private JText Area des Text = null ; + private JText Field c + + // Speculate Gui + + public Speculate Gui () + { + + super ("" Speculate GUI ""); + + container = get Content Pane (); + + set Size ( 800 , 600 ); + + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + + + // Submit Listener + + public void action Performed ( Action Event e ) { + + if ( e . get Source () == submit Button ) { + + send Query TO Server (); + + } + + if ( e . get Source () == fetch Button ) { + + + System . out . println ("" Fetch Button Pressed + + + void send Query TO Server () + { + + String ip = this . event Server IP ; + int Port No = 1701 ; + + Socket socket ; + try { + + socket = new Socket ( ip , Port No ); + + Output Stream os = socket . get Output Stream (); + Output Stream + + public void pull Value From DOORS () + { + + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + + String [] attribute = { "" Value "", "" Attribute "" }; + + String project Name = this . proj Name Text . get + + + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"95 ""Text Model + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 +"52 ""Pair + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"60 ""Thread Pool + +/** +* The threads in the pool. +*/ +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. +*/ +Collection assignments = new ArrayList(3); + + +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) +{ +threads = new WorkerThread[ size]; +for ( int i=0; i< threads. length; i++) +{ +thr +/** +* Add a task to the thread pool. Any class +* which implements the Runnable interface +* may be assigned. When this task runs, its +* run method will be called. +* +* @param r An object that implements the Runnable interface +*/ + pub + + + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. + + + /** +* Called to block the current thread until +* the thread pool has no more work. +*/ + public void complete() + { +done. waitBegin(); +done. waitDone(); + } protected void finalize() + { +done. reset(); +for ( int i=0; i< threads. length; i++) { + threads[ i]. interrupt(); + done. workerBegin(); + threads[ i]. destroy(); +} +done. waitDone(); + } +}"" +",60,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"53 ""Performance Model + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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); + } + + + // 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 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 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 + +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; + + // database and eventserver information + S + + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); + +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try + + +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No + + +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } + + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); + } + + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) + + + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); + } + + +void UpdateDisplayList() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) + { + "" +",70,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 +"68 ""Events Processor +// event list + private JList eventList; + private DefaultListModel listModel; + private ArrayList events; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"54 ""eventserver + +public static void (String args[]) + { +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +"82 ""Tokenizer + + +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader + + +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} + + +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} + + +/** + * Get the next opening or closing symbol. + * Return false if end of file. + * Skip past comments and character and string constants + */ +public char getNextOpenClose( ) +{ +while( nextChar( ) ) +{ + + + + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} + + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; + +for( ; nextChar( ); result += ch ) + + + + /** + * Return next identifier, skipping comments + * string constants, and character constants. + * Place identifier in currentIdNode. word and return false + * only if end of stream is reached. + */ +public String getNe + + +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} + + +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private + + +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ + +private void skip + + +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,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 + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 + + +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int Count = -1; +thisEvent. append(""""Decompose|""""); +for ( int i = 0; i < EventShapes"" +",85,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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 +"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"91 ""Modify Model + +public ModifyModel(EBT em) +{ +super( em); + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes + + + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); + }"" +",91,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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 @@ -63205,719 +62267,2607 @@ private String project Name = null ; + """"\ 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 boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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;/ + + + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo + +// finds the subscribers for this requirement + public void IdentifySubscribers() + { +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi + + +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { + +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o + + // Send messages to all subscribers listed in ActualSubscriber Vector +// Possible that a sort routine can be added later so that all notification to +// the same subscribermanager can be batched.This is not implemented yet. + + public void Dispatch + + + public String getErrorMessage() + { + return errMsg; + } + + + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; + +for ( int i = 0"" +",57,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +"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,The user shall update related artifacts according to the information contained in the event messages.,138,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 + + + /** +* 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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 + + +private Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +"94 ""Refine Model + +public RefineModel(EBT em) +{ +super( em); + } + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +"83 ""Variable + +String id = """"""""; // requirement id ex WB10 + String type= """"""""; // type of requirement ex Driver or Constraints + String name= """"""""; // requirement name which is same as variable name in graph + double value= 0.0; // value of variable + double speculat + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + { +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) + { +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this + + +//Constructor to Add constraints related members + Variable(String id, String type, String name, double value, String logic){ +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this. logic + + + +public String toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path + + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() + { +return name; + } + + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + + /** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + } + + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } + + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } + + + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; + } + + + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; + } + + + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; + } + + + /** +* Sets the project_ path. +* @param project_ path The project_ path to set +*/ + public void setProject_ path(String project_ path) { +this. project_ path = project_ path; + }"" +",83,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"55 ""eventserver Threadstatic private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; + + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { + + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P + + +public String getNextID() + { +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn + + +public String searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio + + +public String searchQueryID(String date) + { +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get + + + public String getConstraintFromDataBase(String queryID) + { +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) + { +String driverString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" jdbc "" +",55,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 + +private String projectName = null; + private String modulePath = null; + private String requirementID = null; + + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin + + +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { + +this. projectName = projec + +public String getChangedAttribute() + { +return changedAttribute; + } + + public String getDescription() + { +return description; + } + + public String getFromAttribute() + { +return fromAttribute; + } + + public String getModulePath() + { +return modulePath; + } + + public String getProjectName() + { +return projectName; + } + + public String getRequirementID() + { +return requirementID; + } + + public String getToAttribute() + { +return toAttribute; + } + + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } + + public void setDescription(String description) + { +this. description = description; + } + + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } + + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } + + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } + + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) + { +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() + { + +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"79 ""performance model Handler + +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer + + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String + + + performance model Handler(String msg) + { +this. strES = msg; + } + + public void messageParser() + { +System. out. println(""""INSIDE PARSER""""); +mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto +tempStr1 = mainSto. nextToken(); + + +//Re-execut +public String generateReport() +{ + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; + + +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } + + + public void saveModel( int id) + { +// save current model +database. saveCurrentModel( id); + } + + + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } + + public void execute( int id){ +// inject data into model +database. executeModel( id, variable); + }"" +",79,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 + +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; + + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d + + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() +{ + + + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} + + +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification + + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati + + +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N + +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i + + +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); + + + +void AddSubscription(String SubscriberName, Requirement requirement ) + { +String SubscriberDependency = """"Requirements""""; +String Message = """"ADD_SUBSCRIPTION""""+""""|""""; +Message += m_UserName + """"|""""; +Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement ) + { +String Message = """"REMOVE_SUBSCRIPTION""""+""""|""""; +Message += SubscriberName + """"|""""; +Message += requirement . m_RequirementID + """",""""; +Message += req + + +void UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri + + + // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response +private boolean Check_Subscription(String ip, + int PortNo, + String SubscriberName, + String Requirement // Takes an event string returned from the eventserver and +// extracts True or False response + + + +private boolean Analyze_CheckSubscription(String str) +{ +StringTokenizer tokens = new StringTokenizer( str,""""|""""); +String Messag"" +",68,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"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 +"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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,For speculative events; the eventserver shall construct a composite event message.,132,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ + +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} + + +/** + * Print an error message for unbalanced symbols. + * @return number of errors detected. + */ +public int checkBalance( ) +{ +char ch; +Symbol match = null; +Stack pendingTokens = new Stack( ); + private Tokenizer tok; +private int errors; + + + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) +{ +if( opSym. token == '(' && clSym. token != ')' || + + + /** + * main routine for balanced symbol checker. + * Slightly different from text. + * If no command line parameters, standard input is used. + * Otherwise, files in command line are used. + */ +public static void main( St"" +",72,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 Hash table requirementDescTable = new Hash table(); + + private Hash table constraintDescTable = new Hash table(); + + private Hash table performanceModelTable = new Hash table(); + + private PerformanceModel performance model= null + + + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // + + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu + + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 + + +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M + + +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); + + + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); + } + + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} + + +public void mouseExited( java. awt. event.MouseEvente){} + + +public void mousePressed( java. awt. event.MouseEvente){} + +public void mouseReleased( java. awt. event.MouseEvente){} + +public void mouseEntered( java. awt. event.MouseEvente){} + +public void paint(Graphics g) {} + +public void update(Graphics g) {} + + public JSplitPane getSplitPane() +{ +return splitPane; +} + + +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) + { +switch(EventList. getSelectedIndex()) + +public void RedrawAll(EBShape sh) +{ +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) +{ +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); + +mainframe. addWindowListener( new WindowAdapter() +{ +public void windowClosing(Wind"" +",87,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 + +private JLabel projectNameLabel = null; + private JLabel modulePathLabel = null; + private JLabel requirementIdLabel = null; + private JLabel desLabel = null; + private JLabel changeLabel = null; + private JLabel fromLabel = null; + + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { + +panel = new JPanel(); + +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { + +return panel; + }"" +",51,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 + +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + + private long queryID = 0; + + public static int count = 0; + + public PerformanceModel(String name, long queryID) + { +this. name = name; +this. queryID = queryID; +this. driverVector = new Vector(); +this. constraintVector = new Vector(); + } + + public Vector getConstraints() + { +return constraintVector; + } + + public Vector getDrivers() + { +return driverVector; + } + + public String getName() + { +return name; + } + + public void setName(String name) + { +this. name = name; + } + + public void addDriver(DriverDescription driver) + { +if ( driverVector. contains( driver)) +{ +} +else + this. driverVector. add( driver); + } + + public void removeDriver(DriverDescription driver) + { +this. driverVector. remove( driver); + } + + public boolean containsDriver(DriverDescription driver) + { +return this. driverVector. contains( driver); + } + + public void addConstraint(ConstraintsDescription constraint) + { +this. constraintVector. add( constraint); + } + + public boolean containsConstraint(ConstraintsDescription constraint) + { +return this. constraintVector. contains( constraint); + } + + public void removeConstraint(ConstraintsDescription constraint) + { +this. constraintVector. remove( constraint); + } + + public DriverDescription getDriver(DriverDescription driver) + { +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) + + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) + { +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) +{ + cd = (ConstraintsDescription) this + + public long getQueryID() + { +return this. queryID; + } + + public void setQueryID( long id) + { +this. queryID = id; + } + + public String toString() + { +return """"performance modelName = """" + + this. name + + """"\ n"""" + + """"Query ID = """" + + this. queryID + + """"\ n"""" + + """"Drivers = """" + + this. driverVector + + """"\ n"""" + + """"Constraints = """" + + this."" +",53,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"80 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + + +public Requirement() {// empty constructor + +} + +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 +"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 +"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 EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) +public StringBuffer GenerateEvent() { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +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 -// 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 +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -String sName, sReqno, sModule, sKey1, sKey2; + // 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 { - System. o - - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - - public void Dispatch - public String getErrorMessage() +} +public void sendImpactReportToEventServer(String text) { - return errMsg; - } +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public boolean Contains(String ContextString, String SearchString) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ -for ( int i = 0"" -",57,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -public Requirement() {// empty constructor +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= + public void run() + { + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P"" +",63,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 -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 { +QueryConnection conn=null; + ResultSet rs=null; + Statement stmt=null; + String mSQL=""""""""; -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} + Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() + Variable v;// create this object and -/** - * 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. + /** + * Construct a connection object. + * @param Returns an object of type Connection */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try +{ + Class. fo -/** - * 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 + /** +* 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 /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} +* 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 /** - * 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 +* 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 -/* - * 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 static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"85 ""Decompose Model + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 +String msg=""""""""; -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; +public ModelDriver(String text) + { +this. msg = text; +init(); } - // 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 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 +"79 ""performance model Handler -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"64 ""DOORs Thread Pool +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + performance model Handler(String msg) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"54 ""eventserver +this. strES = msg; + } -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) + public void messageParser() { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } +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() +//Re-execut +public String generateReport() { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall be able to delete subscriptions.,107,0 -"64 ""DOORs Thread Pool -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + public void saveModel( int id) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall restore the executable model to its prior state.,119,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - +// save current model +database. saveCurrentModel( id); + } -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} + public void insertData( int id){ +// inject data into model +database. injectVariables( id, variable); + } -// 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 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 +String id; + String name; + double value; + String logic; -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Only registered subscribers shall be allowed to establish traces.,102,0 -"87 ""EBT + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -public void mouseExited( java. awt. event.MouseEvente){} + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public void mousePressed( java. awt. event.MouseEvente){} + /** +* 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 mouseReleased( java. awt. event.MouseEvente){} +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 mouseEntered( java. awt. event.MouseEvente){} + 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 paint(Graphics g) {} -public void update(Graphics g) {} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - public JSplitPane getSplitPane() -{ -return splitPane; -} + } -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + if ( server . is Connected () ) + { + Buffered R + + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -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""""); + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"93 ""Obsolete Model -public ObsoleteModel(EBT em) +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 DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } -// Construct Visual model for Merge Event + // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + public StringBuffer GenerateEvent() - { +{ StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall receive event messages when a requirement changes.,127,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +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 - /** -* 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 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 - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + 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 -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -try { - while ( !_ started ) { -wait(); + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() +public Vector get Values From Data Base () { -_ activeThreads++; -_ started = true; -notify(); - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); + if ( server . is Connected () ) + { + Buffered R - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() + + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -_ activeThreads--; -notify(); - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() + +public JPanel get Panel () { -_ activeThreads = 0; + return panel ; }"" -",59,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Event types shall include deleting a requirement.,125,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Event types shall include merging requirements.,126,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"65 ""About Dialog +",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 AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +public Requirement() {// empty constructor -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** - * 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 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 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"86 ""EB Shape + // 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() + { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; +try +{ + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { -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 + "" +",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 String id; @@ -64009,614 +64959,191 @@ this. valueFrom = valueFrom; { this. valueTo = valueTo; }"" -",75,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } - - - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } - - - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - - - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; - } - - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } - - ** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } - - - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } - - - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - }"" -",73,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall immediately process speculative events.,116,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); - - private Hash table constraintDescTable = new Hash table(); - - private Hash table performanceModelTable = new Hash table(); - - private PerformanceModel performance model= null - - - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // - - -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu - - -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n - - -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; - - - - public void createExecuteString() - { - -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector - - -public void parseImpactReport(String str) - { - -Connection conn = null; - -Statement stmt = null; - -Vector constraintsVector = null; -Vector driversVector = null; - -ConstraintsDescription constraint = null; - -int driverLoop"" -",62,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) - { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - - -} -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - - -// run method will be execute from the main method when u say Thread. start() in main - public void run() - { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - - - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } - - - public void run() - { - - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"85 ""Decompose Model - - -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(20,20,1); -AddEventRect(60,70,1); -AddEventRect(60,120,1); -AddEventRect - - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} - -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - +",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 -/** - * 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) -{ -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall send the customized message to each impacted executable model.,136,0 -"80 ""Requirement +public 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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +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 Requirement() {// empty constructor -} +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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 Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"51 ""Driver Inner Panel + if ( server . is Connected () ) + { + Buffered R -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -panel = new JPanel(); + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; +public JPanel get Panel () + { + return panel ; }"" -",51,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"54 ""eventserver +",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 -public static void (String args[]) +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 { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis + + + public void ParseEvent(String TextLine) { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) + 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) { -p +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +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) @@ -64647,7 +65174,145 @@ thisEvent. append( new Date(). toString()+ """"|""""); 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 +",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 MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } + + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. +*/ + private int _ activeThreads = 0; + + /** +* This boolean keeps track of if +* the very first thread has started +* or not. This prevents this objec /** +* This method can be called to block +* the current thread until the ThreadPool +* is done. +*/ + + synchronized public void waitDone() + { +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException + +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() + { +try { + while ( !_ started ) { +wait(); + } +} catch ( InterruptedException e + + +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() + { +_ activeThreads++; +_ started = true; +notify(); + } + + + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } + + + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() + { +_ activeThreads = 0; + }"" +",59,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 String id = """"""""; // requirement id ex WB10 @@ -64819,64 +65484,143 @@ return project_ path; public void setProject_ path(String project_ path) { this. project_ path = project_ path; }"" -",83,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +",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 -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || + public String get Description () { + return this . description ; + } + public String get Logic () { + return 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A user shall register as a subscriber.,103,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Each artifact shall be placed under the control of a subscribermanager,106,0 + public String get Module Path () { + return this . module Path ; + } + + public String get Project Name () { + return this . project Name ; + } + + public String get Requirement ID () { + return this . requirement ID ; + } + + public String get Units () { + return this . units ; + } + + public String get Value () { + return this . value ; + } + + public void set Description ( String description ) { + this . description = description ; + } + + public void set Logic ( String logic ) { + this . logic = logic ; + } + + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } + + public void set Project Name ( String project Name ) { + this . project Name = project Name ; + } + + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } + + public void set Units ( String units ) { + this . units = units ; + } + + public void set Value ( String units ) { + this . value = units ; + } + + public String get Impacted Constraint () { + return this . impacted Constraint ; + } + + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + + public String get Attribute () { + return this . attribute ; + } + + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } + + public String get Performance Model Name () { + return this . performance Model Name ; + } + + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + + public String to String () { + + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" + + +public boolean equals ( Object o ) { + if (!( o instance of Constraints Description )) + return false ; + Constraints Description cd = ( Constraints Description ) o ; + if ( cd . project Name . equals Ignore Case ( this . project Na + + +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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; @@ -64926,587 +65670,425 @@ private void RightListClicked(MouseEvent e){ if (!RightList. isSelectionEmpty()) { int index = RightList. getSelectedIndex(); Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +",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; -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 EventLine ( int t, int l, int r, int b) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button - +top = t; +left = l; +right = r; +bottom = b; +} -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +public int GetT() { return top;} -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +public int GetL() { return left;} +public int GetR() { return right;} -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +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 void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include merging requirements.,126,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"77 ""Model Driver +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -String msg=""""""""; -public ModelDriver(String text) +public EBShape( int xpos, int ypos, Color col) { -this. msg = text; -init(); +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - public void init() + public void Updaterequirement Info(String rno, String pname, String mname) { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - - -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -// 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 boolean match( int mx, int my) + { +return true; + } -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + public int GetX() + { +return x; + } -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"69 ""Notification Event -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim + public int GetY() + { +return y; + } -public Notification_Event() + public Color GetC() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - +return c; + } -public Object clone() throws CloneNotSupportedException + public String GetReqno() { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - +return requirement No; + } - public void ParseEvent(String TextLine) + public String GetProject() { - 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 ProjectName; + } - public void ParseLeftAndRightLists(String LeftLine, String RightLine) + public String GetModule() { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"67 ""Event Detail Dialog +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 -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 aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + // constructor, this object will be created in the main method of these class + SubscriberListener() { } -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + // 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 { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) +} +public void sendImpactReportToEventServer(String text) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) +// 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 { -setVisible ( false); -dispose (); -} - -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"67 ""Event Detail Dialog + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +"88 ""Event Model -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 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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) + public EventModel(EBT e) { -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) +public void getIP Server( String serverIP) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +this. serverIP = serverIP; + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) + public void ClearVectors() { -setVisible ( false); -dispose (); +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public void drawModel() +{ +repaint(); +} -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"60 ""Thread Pool +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -/** -* 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(); -} -done. waitDone(); - } -}"" -",60,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"71 ""Requirement + protected void BuildEvent(){} -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -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 ; - } - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +Even -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,Event types shall include deleting a requirement.,125,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) -{ -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) + public StringBuffer GenerateEvent() { -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub - +return new StringBuffer("""" """"); + }// end of GenerateEvent method - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. + 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 +"89 ""Event Line - /** -* 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 int top, left, right, bottom; + + +public EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; } -done. waitDone(); - } -}"" -",60,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include adding new requirements.,121,0 -"75 ""Driver -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +public int GetT() { return top;} - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +public int GetL() { return left;} - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } +/** +* True if this thread is currently processing. + */ +public boolean busy; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - public double getValueTo() - { -return valueTo; - } +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + EventServerThread(ServerSocket ss) { -this. name = name; - } + 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 value. -* @param value The value to set -*/ - public void setValueFrom( double value) +public String getNextID() { -this. valueFrom = valueFrom; - } +try +{ +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - public void setValueTo( double value) +public String searchDate() { -this. valueTo = valueTo; - }"" -",75,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"56 ""Event Parser +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() +public String searchQueryID(String date) { +Vector queryVector = new Vector(); +String searchQuery = new String(); try { Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: + conn = DriverManager. get - public void updateEvent(String str, String ID) + public String getConstraintFromDataBase(String queryID) { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -//Check if a subscription exists - public boolean CheckSubscription(String str) + 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 -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - +protected int top, left, right, bottom; -//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 EventLine ( int t, int l, int r, int b) +{ +top = t; +left = l; +right = r; +bottom = b; +} -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models +public int GetT() { return top;} - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +public int GetL() { return left;} +public int GetR() { return right;} -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 +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 protected int top, left, right, bottom; @@ -65528,68 +66110,83 @@ public int GetL() { return left;} public int GetR() { return right;} public int GetB() { return bottom;}"" -",89,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include merging requirements.,126,0 -"95 ""Text Model +",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 -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 Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + private Hash table performanceModelTable = new Hash table(); -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + private PerformanceModel performance model= null -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} -public void drawModel() -{ -repaint(); -} + 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 paintComponent(Graphics g) -{ - super. paintComponent( g); +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 + +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n + + +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; + + + + public void createExecuteString() + { + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 "76 ""Evaluator private static final int EOL = 0; @@ -65714,169 +66311,307 @@ String str; BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); try { "" -",76,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"92 ""New Model +",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 -public NewModel(EBT em) -{ -super( em); +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; + + + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 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 receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"87 ""EBT +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + 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: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 ; + + 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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); - } + 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: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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; - public boolean mouseDown( java. awt.Evente, int x, int y) + /** +* 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() { - return true; +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 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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 +"56 ""Event Parser -public void mousePressed( java. awt. event.MouseEvente){} +private Connection conn; + private ResultSet rs; + private Statement stmt; -public void mouseReleased( java. awt. event.MouseEvente){} + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -public void mouseEntered( java. awt. event.MouseEvente){} -public void paint(Graphics g) {} + 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 update(Graphics g) {} - public JSplitPane getSplitPane() -{ -return splitPane; -} +//Check if a subscription exists + public boolean CheckSubscription(String str) + { +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { -switch(EventList. getSelectedIndex()) +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall receive event messages when a requirement changes.,127,0 -"85 ""Decompose Model +//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 DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack - // 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 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 +String msg=""""""""; +public ModelDriver(String text) + { +this. msg = text; +init(); + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall receive event messages when a requirement changes.,127,0 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,Event types shall include decomposing one requirement into two or more requirements.,122,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall be able to construct speculative queries using a GUI.,115,0 + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 ; @@ -66010,384 +66745,339 @@ 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: Delete subscriptions (2.2.3) 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); - +",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 EventModel(EBT e) +public NewModel(EBT em) { -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add - - -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; +super( em); } - public void ClearVectors() + // Construct Visual model for Merge Event +public void BuildEvent() { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -public void drawModel() +public StringBuffer GenerateEvent() { -repaint(); -} - +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 -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; } -} - - -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 void run() { -//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 + while( true) { -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 - + 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 - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +public ObsoleteModel(EBT em) { -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"90 ""Merge Model - - -public MergeModel(EBT em) - { super( em); - MinimumNoRects = 3; } - // Construct Visual model for Merge Event +// Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); -AddEventRect(90,220,1); - AddEventRect(20,20,1); -AddEventRect(20,70,1); -AddEvent +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"75 ""Driver - -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) - { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } - - - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } - - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } - - - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - - - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; - } - - - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } - - - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = 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 void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"94 ""Refine Model +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ -public RefineModel(EBT em) +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) { -super( em); - } +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button + - // Construct Visual model for Merge Event -public void BuildEvent() +private void okButtonActionPerformed (ActionEvent evt) { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public StringBuffer GenerateEvent() + +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"88 ""Event Model +setVisible ( false); +dispose (); +} -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 void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +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; -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - public void ClearVectors() +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +owner = o; } -public void drawModel() +/** + * Scan for and execute tasks. + */ +public void run() { -repaint(); -} - +Runnable target = null; -public void drawModel(EBShape sh) +do { -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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 +Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +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: Delete subscriptions (2.2.3) 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 -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) +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 { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else + 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) { -Even +conn = this. getConnect -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); - } +/** +* 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 StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include decomposing one requirement into two or more requirements.,122,0 +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 @@ -66503,324 +67193,246 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include merging requirements.,126,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; - - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () - { - - super ("""" Search Result GUI """"); - - container = get Content Pane (); - - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); - - this . server IP = - JOption Pane - . show In - +",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 - 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 (); - - query String Combo . add Item ("""" Select Query String """"); - - Socket server ; - String line = new String (); - - - // Select Actions - - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"61 ""Worker Thread + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Each artifact shall be placed under the control of a subscribermanager,106,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall receive event messages when a requirement changes.,127,0 -"80 ""Requirement -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -public Requirement() {// empty constructor + /** +* 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 -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 +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; + private Connection conn; + private Statement stmt; + private ResultSet rs; + private EventParser ep; + private int id; -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; + EventServerThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + ep = new EventParser(); + } public void run() + { - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and + while( true) + { + try + { +Socket client = theServer. accept(); +BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); +PrintWriter output = new P - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() +public String getNextID() { -System. out. println("""" in get Connection""""); -Connection connect=null; try { - Class. fo - +Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); +this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); +this. stmt = conn - /** -* 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 searchDate() + { +String dateString = new String(); +Vector dateVector = new Vector(); +try +{ + Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); + Connection conn = DriverManager. getConnectio - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) +public String searchQueryID(String date) { -conn = this. getConnect - +Vector queryVector = new Vector(); +String searchQuery = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get -/** -* 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 String getConstraintFromDataBase(String queryID) { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j -public void solveStructureEquation() + public String getDriverFromDataBase(String queryID) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System +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 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 Pair(String queryID, String queryString) { -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 +this. queryID = queryID; +this. queryString = queryString; + } - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The eventserver shall send the customized message to each impacted executable model.,136,0 + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 =""""""""; @@ -66851,405 +67463,433 @@ public void ParseRequirement(String TextLine) { LineSt = new StringTokenizer(TextLine, """",""""); m_RequirementID=LineSt. nextToken(); m_Project=Line"" -",80,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"76 ""Evaluator +",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 +"88 ""Event 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= +protected Vector EventShapes = new Vector(); +protected Vector EventLines = new Vector(); +protected EB Shape ebs, ebs2; +protected EventLine mline; +protected Color ShapeColor = new Color (190,190,190); -private static 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 EventModel(EBT e) { - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -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 getIP Server( String serverIP) + { +this. serverIP = serverIP; + } -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; + public void ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); } -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +public void drawModel() +{ +repaint(); } -/** - * 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. +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -/** - * 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 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 static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A user shall register as a subscriber.,103,0 -"84 ""White Board Execution Graph -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +public void CheckNotifyStatus() + { +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + protected void BuildEvent(){} + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else + { +Even -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ + protected void paintComponent(Graphics g) +{ +super. paintComponent( g); +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); + g. setC"" +",88,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 +private String queryID; + private String queryString; - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target + public Pair(String queryID, String queryString) { - 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. queryID = queryID; +this. queryString = queryString; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + public String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"93 ""Obsolete Model + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -public ObsoleteModel(EBT em) -{ -super( em); + 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(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + }"" +",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 StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -"68 ""Events Processor -// event list - private JList eventList; +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; 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) + // 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(); -} +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 """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) { -int index = eventList. getSelectedIndex(); -if ( index != -1) +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" + + + + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try { - try + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; + + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) { -Notification +exitApplication(); + } -// action for """"Open First Record"""" in popup menu + // 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 =0; - try - { -Notification_Event nEvt1 = (Notificati + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { -int index = eventList. getSelectedIndex(); -if ( index != -1) +if (! listModel. isEmpty()) { - try + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 + + +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -N +new AboutDialog ( this, true). show(); + } -void DeleteEvent(String SubscriberName, String EventID) + +void UpdateDisplayList() { +listModel. removeAllElements(); + String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; try { - int i, j=-1; - for ( i=0; i< events. size(); i++) + rs = stmt. executeQuery( mSQL); + while ( rs. next()) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i + "" +",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 + +/** +* 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); -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +/** +* A Done object that is /** + * The constructor. + * + * @param sizeHow many threads in the thread pool. + */ +public ThreadPool( int size) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); +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 - m_Deleterequirement List. remove(0); + /** +* Get a new work assignment. +* +* @return A new assignment +*/ + public synchronized Runnable getAssignment() + { +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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +"58 ""Subscribed Model +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s +public String GetSubscriberName() { return SubscriberName;} - // 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 GetSubscriberReqno() { return SubscriberReqno;} +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; +public 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 -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ + +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) + public boolean match( int mx, int my) + { +return true; + } + + + public int GetX() + { +return x; + } + + + public int GetY() + { +return y; + } + + public Color GetC() { -if( opSym. token == '(' && clSym. token != ')' || +return c; + } + + public String GetReqno() + { +return requirement No; + } + public String GetProject() + { +return ProjectName; + } - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,Event types shall include adding new requirements.,121,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The subscribermanager shall restore the executable model to its prior state.,119,0 + + 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 "53 ""Performance Model private String name = null; @@ -67359,627 +67999,787 @@ return """"performance modelName = """" + """"\ n"""" + """"Constraints = """" + this."" -",53,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Event types shall include modifying a requirement.,124,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Each artifact shall be placed under the control of a subscribermanager,106,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include adding new requirements.,121,0 -"79 ""performance model Handler +",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; -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); +addWindowListener( new WindowAdapter() +{ - performance model Handler(String msg) - { -this. strES = msg; - } - public void messageParser() + 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) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +Notification -//Re-execut -public String generateReport() +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + int index =0; + try + { +Notification_Event nEvt1 = (Notificati -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; - } +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N +void DeleteEvent(String SubscriberName, String EventID) + { +try +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i - public void saveModel( int id) + +void DeleteRelatedEvents() { -// save current model -database. saveCurrentModel( id); - } +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + m_Deleterequirement List. remove(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: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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) +void AddSubscription(String SubscriberName, Requirement requirement ) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; - } +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 toString() +void UpdateDisplayList() { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return 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 - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; - } - /** -* Returns the value. -* @return double +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. */ - public double getValueFrom() - { -return valueFrom; - } + 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 double getValueTo() + synchronized public void waitDone() { -return valueTo; +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) + synchronized public void waitBegin() { -this. id = id; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - ** -* Sets the name. -* @param name The name to set +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. */ - public void setName(String name) + synchronized public void workerBegin() { -this. name = name; +_ activeThreads++; +_ started = true; +notify(); } - ** -* Sets the value. -* @param value The value to set + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. */ - public void setValueFrom( double value) + synchronized public void workerEnd() { -this. valueFrom = valueFrom; +_ activeThreads--; +notify(); } - public void setValueTo( double value) + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -this. valueTo = valueTo; +_ activeThreads = 0; }"" -",75,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"94 ""Refine Model +",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 -public RefineModel(EBT em) -{ -super( em); - } +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include adding new requirements.,121,0 -"85 ""Decompose Model +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; } - // 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 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"84 ""White Board Execution Graph + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize + 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 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 getIP Server( String serverIP) + { +this. serverIP = serverIP; + } -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 ClearVectors() +{ +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} - 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 +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +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 +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +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 targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"47 ""Impact Report +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 server IP = """" local host """"; - private JPanel center Panel = null ; - private JPanel driver Panel = new JPanel (); + protected void BuildEvent(){} - private JPanel driver Inner Panel = null ; - private JPanel impact Panel = null ; - private JPanel impact Inner P + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} - public Impact Report () + +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 - super ("""" Search Result GUI """"); - container = get Content Pane (); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - set Size ( 800 , 250 ); - panel = new JPanel (); + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In + 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 +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 static void main ( String [] args ) - { + 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 - Impact Report im = new Impact Report (); + +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 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 + Buffered R -public void action Performed ( Action Event e ) { + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { - if ( submit Button == e . get Source ()) { + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +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 - 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 (); +this. projectName = projec - set Size ( 1020 , 740 ); +public String getChangedAttribute() + { +return changedAttribute; + } - this . query ID = id ; + public String getDescription() + { +return description; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + public String getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } - public Vector get Constraint From Data Base () + public String getProjectName() { +return projectName; + } - Vector v = new Vector (); + public String getRequirementID() + { +return requirementID; + } - Socket server ; - String line = new String (); + public String getToAttribute() + { +return toAttribute; + } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - try - { - server = new Socket ( server IP , 1701 ); + public void setDescription(String description) + { +this. description = description; + } - if ( server . is Connected () ) - { - Buffered + 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 Vector get Driver From Data Base () + public void setRequirementID(String requirementID) { +this. requirementID = requirementID; + } - Vector v = new Vector (); + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } - Socket server ; - String line = new String (); + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - try - { - server = new Socket ( server IP , 1701 ); + 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() + { - if ( server . is Connected () ) - { - Buffered"" -",47,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) +public int hashCode() { - setTitle(""""EventsProcessor""""); - -addWindowListener( new WindowAdapter() +int hashCode = 0; +if ( hashCode == 0) { + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Delete subscriptions (2.2.3) 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 ; - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) { -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 + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; + } -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try - { -N -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) - { -Notification_Event nEvt = (Notification_Event) events. get( i); -i + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) -{ - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + public String get Module Path () { + return this . module Path ; + } - m_Deleterequirement List. remove(0); + 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 ; + } -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 Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } -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 Logic ( String logic ) { + this . logic = logic ; + } + public void set Module Path ( String module Path ) { + this . module Path = module Path ; + } - // 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 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 ; + } -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"93 ""Obsolete Model + public void set Value ( String units ) { + this . value = units ; + } -public ObsoleteModel(EBT em) -{ -super( em); + public String get Impacted Constraint () { + return this . impacted Constraint ; } + public void set Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } -// 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 Attribute () { + return this . attribute ; + } + public void set Attribute ( String attribute ) { + this . attribute = attribute ; + } -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"91 ""Modify Model + public String get Performance Model Name () { + return this . performance Model Name ; + } -public ModifyModel(EBT em) -{ -super( em); + public void set Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; } + public String to String () { - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes +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 - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"51 ""Driver Inner Panel +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 +"60 ""Thread Pool -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 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 projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { -panel = new JPanel(); +/** +* 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 -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall immediately process speculative events.,116,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 + /** +* 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 "66 ""Config Dialog public ConfigDialog(Notification_Processing parent, boolean modal) { @@ -68011,116 +68811,174 @@ private JLabel DSN Label; private JTextField DSN; private JLabel EventServerIP Label; private JTextField EventSe"" -",66,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"61 ""Worker Thread +",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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) +public EBT(Frame f) { -owner = o; -} +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -/** - * Scan for and execute tasks. - */ -public void run() + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) { -Runnable target = null; +WorkArea. showText( sh); + } -do + + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } + + + public boolean mouseUp( java. awt.Evente, int x, int y) { -target = owner. getAssignment(); -if ( target!=null) +return true; + } + + public void mouseClicked( java. awt. event.MouseEvente) { - target. run(); - owner. done. worker"" -",61,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"69 ""Notification Event +VisualPanel.Clicked( e. getX(), e. getY()); +} -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 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() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +return splitPane; } -public Object clone() throws CloneNotSupportedException +public void valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener +{ +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +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 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 +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 ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +public DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } -if ( m_Eve -public void DisplayValues() + // Construct Visual model for Merge Event +public void BuildEvent() { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A user shall register as a subscriber.,103,0 -"75 ""Driver + 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 Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 + +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 + -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. @@ -68132,6 +68990,16 @@ return id; } + /** +* Returns the logic. +* @return String +*/ + public String getLogic() + { +return logic; + } + + /** * Returns the name. * @return String @@ -68146,15 +69014,8 @@ return name; * Returns the value. * @return double */ - public double getValueFrom() - { -return valueFrom; - } - - - public double getValueTo() - { -return valueTo; + public double getValue() { +return value; } @@ -68162,478 +69023,232 @@ 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; - }"" -",75,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"80 ""Requirement - -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; - - -public Requirement() {// empty constructor - -} - -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; + public void setValue( double value) { +this. value = value; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - - -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence -{ -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer - -public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration -private static Precedence [ ] precTable = new Precedence[ ] -{ - -new Precedence( 0, -1 ),// EOL -new Precedence( 0,0 ),// VALUE -new Precedence( 100 - - -private static class Token -{ -public Token( ) { this( EOL ); } -public Token( int t ) { this( t, 0 ); } -public Token( int t, double v ) { - System. out. println("""" INSIDE Token.Token()""""); - private static class EvalTokenizer { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} - -/** - * Find the next token, skipping blanks, and return it. - * For VALUE token, place the processed value in currentValue. - * Print error message if input is unrecognized. - */ -public Token getToken - -/** - * Construct an evaluator object. - * @param s the string containing the expression. - */ -public Evaluator( String s ) { -opStack = new Stack( ); -postfixStack = new Stack( ); -str = new StringTokeni // The only publicly visible routine - -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte - - -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System - - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} - - -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl - - -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. - - -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ - - - -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { - - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } - public String get Description () { - return this . description ; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement ID ; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public String get Units () { - return this . units ; - } - public String get Value () { - return this . value ; - } + /** +* 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 +"70 ""Notification Processing - public void set Description ( String description ) { - this . description = description ; - } +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - public void set Logic ( String logic ) { - this . logic = logic ; - } + // database and eventserver information + S - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - public void set Project Name ( String project Name ) { - this . project Name = project Name ; - } +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } +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 set Value ( String units ) { - this . value = units ; - } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +// 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 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 ; - } + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - 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 ; + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - +openEventsMenuItemActionPerformed( evt); + } - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"77 ""Model Driver +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -String msg=""""""""; -public ModelDriver(String text) +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) { -this. msg = text; -init(); +new AboutDialog ( this, true). show(); } - public void init() +void UpdateDisplayList() { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -"60 ""Thread Pool +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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 -/** -* 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); +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; -/** -* 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 + DOORsThread(ServerSocket ss) + { + theServer = ss; + count++; + taskNumber = count; + } - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() + 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: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 +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 @@ -68689,2220 +69304,2663 @@ database. injectVariables( id, variable); // inject data into model database. executeModel( id, variable); }"" -",79,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"82 ""Tokenizer - +",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 -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) +public RefineModel(EBT em) { -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader - +super( em); + } -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) + // Construct Visual model for Merge Event +public void BuildEvent() { -return currentLine; + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; } - -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) +public StringBuffer GenerateEvent() { -return errors; -} +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 -/** - * 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( ) ) -{ +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 /** - * Return true if ch can be part of a Java identifier + * Construct a connection object. + * @param Returns an object of type Connection */ -private static final boolean isIdChar( char ch ) + public Connection getConnection() + { +System. out. println("""" in get Connection""""); +Connection connect=null; +try { -return Character. isJavaIdentifierPart( ch ); -} - + Class. fo -/** - * 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 /** - * 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 + + +public void solveStructureEquation() + { +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System + + +public void getTrackVariableName() + { +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse + + +public void setCalculatedValues() + { +System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); +// and at matching location put the calculated values +System. out. println("""" enter calcValue // this method creates the token for each variable name in the string + // and store that variable into vector + // it also creates the vector called varValues + // varValues has values of each variable stored in varName + //So equation has variable n + + public Vector getImpactReport() + { +//This SPE Graph works on the assumption that each model tracks +// the effect of changes on one variable +Vector report = new Vector(); +report. add( trackVariableName); +report. add(Stri"" +",74,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +"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. */ +public ThreadPool owner; -private void skip + +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} /** - * 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. + * Scan for and execute tasks. */ -private void processSlash( ) +public void run() { -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A user shall register as a subscriber.,103,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"91 ""Modify Model +Runnable target = null; -public ModifyModel(EBT em) +do { -super( em); - } +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 + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p + +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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; - // Construct Visual model for Merge Event -public void BuildEvent() + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try { - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; + + } +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -public StringBuffer GenerateEvent() +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall send the customized message to each impacted executable model.,136,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; + // 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 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() { + +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 + +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 ) { - super ("""" Search Result GUI """"); + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; - container = get Content Pane (); + } - set Size ( 800 , 250 ); - panel = new JPanel (); + 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 ; + } - panel . set Layout ( null ); + public String get Performance Model Name () { + return this . performance Model Name ; + } - this . server IP = - JOption Pane - . show In + 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 ) - { + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" - Impact Report im = new Impact Report (); - } +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 Vector search Date () - { +public int hash Code () { + int hash Code = 0 ; + if ( hash Code == 0 ) { + int result = 17 ; + result = 37 * result + this . project Name . hash Code (); + result = 37 * result + this . module Path . hash Code (); + result = 37 * "" +",49,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver 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 - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +private String queryID; + private String queryString; - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - pair Vector = new Vector (); + public Pair(String queryID, String queryString) { - query String Combo . remove All Items (); +this. queryID = queryID; +this. queryString = queryString; - query String Combo . add Item ("""" Select Query String """"); + } - Socket server ; - String line = new String (); + public String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } - // Select Actions + public void setQueryID(String queryID) { +this. queryID = queryID ; + } - public void action Performed ( Action Event e ) - { + public void setQueryString(String queryString) { +this. queryString = queryString; + } - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - // Button Actions + }"" +",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 void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - if ( pair - . get + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public void impact Report ( String id ) + public boolean match( int mx, int my) { +return true; + } - // super ("""" Impact Report """"); - container = get Content Pane (); + public int GetX() + { +return x; + } - set Size ( 1020 , 740 ); - this . query ID = id ; + public int GetY() + { +return y; + } - System . out . println ("""" Impact Report Constructor ..... ID """" + + public Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } - public Vector get Constraint From Data Base () + public String GetProject() { +return ProjectName; + } - Vector v = new Vector (); - Socket server ; - String line = new String (); + public String GetModule() + { +return ModulePath; + }"" +",86,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +"70 ""Notification Processing +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; - try - { - server = new Socket ( server IP , 1701 ); + // database and eventserver information + S - if ( server . is Connected () ) - { - Buffered + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - public Vector get Driver From Data Base () +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 - Vector v = new Vector (); - Socket server ; - String line = new String (); +// 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"""" - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"79 ""performance model Handler -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String + + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); + } - performance model Handler(String msg) + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -this. strES = msg; +openEventsMenuItemActionPerformed( evt); } - public void messageParser() + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) { -System. out. println(""""INSIDE PARSER""""); -mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto -tempStr1 = mainSto. nextToken(); +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) -//Re-execut -public String generateReport() + // action for """" double click on Subscriber List"""" + private void doubleClickSubscriberList (MouseEvent evt) + { +if (! listModel. isEmpty()) { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; + int index = SubscriberList. getSelectedIndex(); + if ( index != -1 -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; +// action for """"About"""" + private void aboutMenuItemActionPerformed (ActionEvent evt) + { +new AboutDialog ( this, true). show(); } - public void saveModel( int id) +void UpdateDisplayList() { -// save current model -database. saveCurrentModel( id); - } - +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 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); +public ObsoleteModel(EBT em) +{ +super( em); } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - -private static class Precedence +// Construct Visual model for Merge Event +public void BuildEvent() { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -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 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 +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 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 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 EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +// 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 -/** - * 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 +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { -/** - * Public routine that performs the evaluation. - * Examine thepostfix machine to see if a single result is - * left and if so, return it; otherwise print error. - * @return the result. -private Stack opStack; // Operator stack for conversion -private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result -private StringTokenizer str; // StringTokenizer stream, conte +String 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. -/** - * Internal method that hides type-casting. - * Changed the method to support double - */ -private double postFixTopAndPop( ) { - System. out. println(""""INSIDE postFixTopAndPop method""""); - System + public void Dispatch - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public String getErrorMessage() + { + return errMsg; + } -/** - * 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 boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps 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 -/* - * 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 DecomposeModel(EBT em) +{ +super( em); +MinimumNoRects = 3; + } - /** - * 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(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -/** - * 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +// member variables for menu + private JMenuBar menuBar; + // subscriber list + private JList SubscriberList; + private DefaultListModel listModel; + // popup menu + private JPopupMenu popup; -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Event types shall include merging requirements.,126,0 -"73 ""Constraints + // database and eventserver information + S -String id; - String name; - double value; - String logic; + public Notification_Processing() + { +setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +addWindowListener( new WindowAdapter() +{ + public void windowClosing(WindowEvent evt) + { +try - Constraints(String id, String name, double value, String logic){ -this. id = id; -this. name = name; -this. value = value; -this. logic = logic; - } +public static void main(String args[]) + { +try +{ + Notification_Processing mainFrame = new Notification_Processing(); + mainFrame. setSize(600, 400); + mainFrame. setLocation(100, 100); + mainFrame. void exitApplication() +{ +try +{ +int reply = JOptionPane. showConfirmDialog( this, +""""Do you really want to exit?"""", +""""No - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; - } +// action for """"Open log database"""" + private void openMenuItemActionPerformed (ActionEvent evt) + { +new ConfigDialog( this, true). show(); + if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - /** -* Returns the id. -* @return int -*/ - public String getId() { -return id; - } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } + private void saveMenuItemActionPerformed (ActionEvent evt) + { +try +{ + m_ conn. close(); + m_DSN=""""""""; + m_EventServerIP=""""""""; + m_EventServerPort=""""""""; - /** -* Returns the name. -* @return String -*/ - public String getName() { -return name; + // action for """" exit"""" + private void exitMenuItemActionPerformed (ActionEvent evt) + { +exitApplication(); } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + + // action for """"Open Events"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) + { +openEventsMenuItemActionPerformed( evt); } + // action for """"Open Events"""" + private void openEventsMenuItemActionPerformed (ActionEvent evt) + { +if (! listModel. isEmpty()) +{ + int index = SubscriberList. getSelectedIndex(); + if ( index != -1) - /** -* Sets the 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; - } + // 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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"83 ""Variable +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 -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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed 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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -//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 Requirement() {// empty constructor -//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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + 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 - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer - /** -* Returns the logic. -* @return String -*/ - public String getLogic() - { -return logic; - } + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String - /** -* Returns the name. -* @return String -*/ - public String getName() + performance model Handler(String msg) { -return name; +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(); - /** -* 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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates 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 - /** -* Sets the value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +private Hash table requirementDescTable = new Hash table(); - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } + private Hash table constraintDescTable = new Hash table(); + private Hash table performanceModelTable = new Hash table(); - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + private PerformanceModel performance model= null - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + 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 type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) + public void createExecuteString() { -this. id = id; -this. type = type; -this. +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -//Constructor to Add driver related members - Variable(String id, String type, String name, double value, double speculateValue) - { -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this +public void parseImpactReport(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 +Connection conn = null; +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +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 - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; +public Requirement() +{ +} - /** -* Returns the logic. -* @return String -*/ - public String getLogic() +public Object clone() throws CloneNotSupportedException { -return logic; +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 +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"60 ""Thread Pool - /** -* Returns the value. -* @return double +/** +* The threads in the pool. */ - public double getValue() { -return value; - } - - - /** -* Sets the id. -* @param id The id to set +protected Thread threads[] = null; +/** +* The backlog of assignments, which are waiting +* for the thread pool. */ - public void setId(String id) { -this. id = id; - } +Collection assignments = new ArrayList(3); - /** -* Sets the logic. -* @param logic The logic 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 setLogic(String logic) { -this. logic = logic; - } + pub /** -* Sets the name. -* @param name The name to set +* Get a new work assignment. +* +* @return A new assignment */ - public void setName(String name) { -this. name = name; - } + public synchronized Runnable getAssignment() + { +try { + while ( ! assignments. iterator(). hasNext() ) +wait(); + Runnable r = (Runnable) assignments. /** -* Sets the value. -* @param value The value to set +* Called to block the current thread until +* the thread pool has no more work. */ - public void setValue( double value) { -this. value = 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: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 - - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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() {// empty constructor +} - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +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 - /** -* Sets the project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"93 ""Obsolete Model +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 ObsoleteModel(EBT em) + + 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); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +EventShapes. removeAllElements(); +EventLines. removeAllElements(); +} -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The prototype system shall utilize a driver to trigger events.,120,0 -"70 ""Notification Processing +public void drawModel() +{ +repaint(); +} -// 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 void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); -addWindowListener( new WindowAdapter() +private void ClearData() { - public void windowClosing(WindowEvent evt) - { -try +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); + } +} -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 Clicked ( int x, int y) { -try +int Hit = 0; +for ( int i = 0; i < EventShapes. size(); i++) { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public void CheckNotifyStatus() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +//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(){} - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try + protected void AddLine( int t, int l, int r, int b) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +EventLines. addElement( new EventLine( t, l, r, b)); +} - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); +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 - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -openEventsMenuItemActionPerformed( evt); +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) + + public StringBuffer GenerateEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +return new StringBuffer("""" """"); + }// end of GenerateEvent method - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) + protected void paintComponent(Graphics g) { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +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 +/** +* True if this thread is currently processing. + */ +public boolean busy; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) { - rs = stmt. executeQuery( mSQL); - while ( rs. next()) - { - "" -",70,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"92 ""New Model +owner = o; +} -public NewModel(EBT em) + +/** + * Scan for and execute tasks. + */ +public void run() { -super( em); +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 +"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; } - // 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: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall be able to construct speculative queries using a GUI.,115,0 -"86 ""EB Shape +repaint(); +} -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +public void drawModel(EBShape sh) +{ +EventShapes. setElementAt( sh, ESCursor); +repaint(); +} -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +private void ClearData() +{ +for ( int i = 0; i < EventShapes. size(); i++) +{ +ebs = (EBShape)EventShapes. elementAt( i); +ebs.Updaterequirement Info("""""""","""""""",""""""""); } +} - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +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 match( int mx, int my) +public void CheckNotifyStatus() { -return true; - } - +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( - public int GetX() - { -return x; - } + protected void BuildEvent(){} - public int GetY() - { -return y; - } - public Color GetC() + protected void AddLine( int t, int l, int r, int b) { -return c; - } +EventLines. addElement( new EventLine( t, l, r, b)); +} - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; +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 GetModule() - { -return ModulePath; - }"" -",86,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The subscribermanager shall restore the executable model to its prior state.,119,0 -"64 ""DOORs Thread Pool +public String getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; + 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 - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -panel = new JPanel(); + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall restore the executable model to its prior state.,119,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"87 ""EBT +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M +public String getChangedAttribute() + { +return changedAttribute; + } + public String getDescription() + { +return description; + } -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); + public String getFromAttribute() + { +return fromAttribute; + } + public String getModulePath() + { +return modulePath; + } - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); + public String getProjectName() + { +return projectName; } + public String getRequirementID() + { +return requirementID; + } - public boolean mouseDown( java. awt.Evente, int x, int y) + public String getToAttribute() { - return true; +return toAttribute; } + public void setChangedAttribute(String changedAttribute) + { +this. changedAttribute = changedAttribute; + } - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public void setDescription(String description) + { +this. description = description; } - public void mouseClicked( java. awt. event.MouseEvente) -{ -VisualPanel.Clicked( e. getX(), e. getY()); -} + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } -public void mouseExited( java. awt. event.MouseEvente){} + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } -public void mousePressed( java. awt. event.MouseEvente){} + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public void mouseReleased( java. awt. event.MouseEvente){} + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } -public void mouseEntered( java. awt. event.MouseEvente){} + 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 paint(Graphics g) {} +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" -public void update(Graphics g) {} - public JSplitPane getSplitPane() +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) { -return splitPane; -} - + 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; -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} + /** +* 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 class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + synchronized public void waitDone() { -switch(EventList. getSelectedIndex()) +try { + while ( _ activeThreads>0 ) { +wait(); + } +} catch ( InterruptedException -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); +/** +* 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 -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"47 ""Impact Report -private String server IP = """" local host """"; - private JPanel center Panel = null ; +/** +* 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 driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { +_ activeThreads = 0; + }"" +",59,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 +"57 ""Event Notifier +// Variables to process the requirement + private String requirement No;//Requirement No. + private String ProjName; //Project name + private String ModPath;//Modular path + private String requirement Text;/ - super ("""" Search Result GUI """"); - container = get Content Pane (); + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) + { +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - set Size ( 800 , 250 ); +// 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 - panel = new JPanel (); - panel . set Layout ( null ); +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - this . server IP = - JOption Pane - . show In +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 static void main ( String [] args ) - { + public void Dispatch - Impact Report im = new Impact Report (); + public String getErrorMessage() + { + return errMsg; } - public Vector search Date () + public boolean Contains(String ContextString, String SearchString) { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { +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 - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) +String msg=""""""""; + +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: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 - query String Combo . add Item ("""" Select Query String """"); +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 (); +} - // Select Actions - public void action Performed ( Action Event e ) - { +// 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 - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - // Button Actions +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 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 -public void action Performed ( Action Event e ) { - if ( submit Button == e . get Source ()) { +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - if ( pair - . get +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} - public void impact Report ( String 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( ) ) +{ - // super ("""" Impact Report """"); - container = get Content Pane (); - set Size ( 1020 , 740 ); + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - public Vector get Constraint From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new 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 - try - { - server = new Socket ( server IP , 1701 ); +/** + * nextChar sets ch based on the next character in the input stream. + * putBackChar puts the character back onto the stream. + * It should only be used once after a nextChar. + * Both routines adjust currentLine if necess + private void putBackChar( ) +{ +if( ch == '\ n' ) +currentLine--; +try +{ in. unread( ( int) ch ); } +catch( IO Exception e ) { } +} - if ( server . is Connected () ) - { - Buffered +/** + * Precondition: We are about to process a comment; have already seen + * comment-start token + * Post condition: Stream will be set immediately after + * comment-ending token + */ +private - public Vector get Driver From Data Base () - { +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ - Vector v = new Vector (); +private void skip - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); +/** + * After the opening slash is seen deal with next character. + * If it is a comment starter, process it; otherwise put back + * the next character if it is not a new line. + */ +private void processSlash( ) +{ +ifpublic static final int SLASH_SLASH = 0; +public static final int SLASH_STAR= 1; +private PushbackReader in;// The input stream +private char ch;// Current character +private int currentLine;//"" +",82,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"91 ""Modify Model +String id; + String name; + double value; + String logic; -public ModifyModel(EBT em) -{ -super( em); + + 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(60,80,1); -CurrentEvent = 4; -} + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. + /** +* Returns the logic. +* @return String */ - private int _ activeThreads = 0; + public String getLogic() { +return logic; + } + /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. +* Returns the name. +* @return String */ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public String getName() { +return name; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + /** +* Returns the value. +* @return double */ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); + public double getValue() { +return value; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Sets the id. +* @param id The id to set */ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); + 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; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Sets the name. +* @param name The name to set */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public void setName(String name) { +this. name = name; } /** -* Called to reset this object to -* its initial state. +* Sets the value. +* @param value The value to set */ - synchronized public void reset() - { -_ activeThreads = 0; + public void setValue( double value) { +this. value = value; }"" -",59,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"65 ""About Dialog - -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"62 ""Call Back - - -private Hash table requirementDescTable = new Hash table(); +",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 - private Hash table constraintDescTable = new Hash table(); - private Hash table performanceModelTable = new Hash table(); +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - private PerformanceModel performance model= null +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = null; // +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -public void identifyPerformanceModels() - { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu +/** + * 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 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; + /** + * 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; - public void createExecuteString() - { +for( ; nextChar( ); result += ch ) -Connection conn = null; -Statement stmt = null; -ResultSet rs = null; -StringBuffer sb = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector -public void parseImpactReport(String str) - { + /** + * Return 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 -Connection conn = null; -Statement stmt = 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 ) { } +} -Vector constraintsVector = null; -Vector driversVector = null; -ConstraintsDescription constraint = 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 -int driverLoop"" -",62,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"65 ""About Dialog -public AboutDialog(JFrame parent, boolean modal) { - super ( parent, modal); - getContentPane (). setLayout ( new BorderLayout ()); - setTitle (""""About""""); - setName ("""" aboutDialog""""); - - private JTextArea text;"" -",65,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 -"67 ""Event Detail Dialog +/** + * Precondition: We are about to process a quote; have already seen + * beginning quote. + * Post condition: Stream will be set immediately after + * matching quote + */ -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +private void skip -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +/** + * 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 +"48 ""Constraint Inner Panel -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" 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 okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + if ( server . is Connected () ) + { + Buffered R -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"64 ""DOORs Thread Pool + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - //@param argsNo arguments are used. - public static void main(String args[]) +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 + +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 -"69 ""Notification Event + for( int i=0; i<4; i++) + { +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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"94 ""Refine Model -public Notification_Event() +public RefineModel(EBT em) { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - - -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - 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 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 - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +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: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 +return currentLine; +} + /** -* 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: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"51 ""Driver Inner Panel -private JLabel projectNameLabel = null; - private JLabel modulePathLabel = null; - private JLabel requirementIdLabel = null; - private JLabel desLabel = null; - private JLabel changeLabel = null; - private JLabel fromLabel = null; - String projectName, -String modulePath, -String requirementID, -String description, -String changeAttribute, -String fromValue, -String toValue) { +/** + * 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. setBackground(Color.LIGHTpublic JPanel createPanel() { -return panel; - }"" -",51,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"83 ""Variable -String id = """"""""; // requirement id ex WB10 - String type= """"""""; // type of requirement ex Driver or Constraints - String name= """"""""; // requirement name which is same as variable name in graph - double value= 0.0; // value of variable - double speculat + /** + * 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() +/** + * 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 +"54 ""eventserver + +public static void (String args[]) { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +ThreadPool pool = new ThreadPool(1); + int port = defaultPort; + try + { + ServerSocket ss = new ServerSocket( port); + for( int i=0; i<4; i++) + { +p +public final static int defaultPort = 1701; + ServerSocket theServer;"" +",54,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: 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 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } +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: Delete subscriptions (2.2.3) 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 - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); - /** -* Sets the type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +// 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 project_ path. -* @param project_ path The project_ path to set -*/ - public void setProject_ path(String project_ path) { -this. project_ path = project_ path; - }"" -",83,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"93 ""Obsolete Model +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} -public ObsoleteModel(EBT em) -{ -super( em); - } +// 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 -// 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 int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; -public StringBuffer GenerateEvent() +public EBShape( int xpos, int ypos, Color col) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"79 ""performance model Handler + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } -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 boolean match( int mx, int my) + { +return true; + } - performance model Handler(String msg) + public int GetX() { -this. strES = msg; +return x; } - 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 GetY() + { +return y; + } -//Re-execut -public String generateReport() + public Color GetC() { - System. out. println(""""INSIDE generateReport""""); - mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto - /* -""""ImpactReport|1015818161020| int grId; - - -public int getId(){ - // get GraphId - System. out. println(""""database start""""); - int grId = database. getGraphId( modelName); - return grId; +return c; } - - public void saveModel( int id) + public String GetReqno() { -// save current model -database. saveCurrentModel( id); +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: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() + public String GetModule() { +return ModulePath; + }"" +",86,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"89 ""Event Line - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +protected int top, left, right, bottom; -public String getNextID() - { -try +public EventLine ( int t, int l, int r, int b) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +top = t; +left = l; +right = r; +bottom = b; +} -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio +public int GetT() { return top;} +public int GetL() { return left;} -public String searchQueryID(String date) - { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get +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 - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +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 getDriverFromDataBase(String queryID) +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"80 ""Requirement + 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() {// empty constructor +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 Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String 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 + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -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 +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 "53 ""Performance Model private String name = null; @@ -71012,380 +72070,381 @@ return """"performance modelName = """" + """"\ n"""" + """"Constraints = """" + this."" -",53,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - +",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 - 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 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 -// 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 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); -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) +public Vector get Values From Data Base () { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); -for ( int i = 0"" -",57,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,Event types shall include merging requirements.,126,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The prototype system shall utilize a driver to trigger events.,120,0 -"85 ""Decompose Model + if ( server . is Connected () ) + { + Buffered R -public DecomposeModel(EBT em) -{ -super( em); -MinimumNoRects = 3; - } + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - // 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: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior 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 -public StringBuffer GenerateEvent() +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) { -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int Count = -1; -thisEvent. append(""""Decompose|""""); -for ( int i = 0; i < EventShapes"" -",85,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,Event types shall include adding new requirements.,121,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include deleting a requirement.,125,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - container = get Content Pane (); - set Size ( 800 , 600 ); +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,The user shall be able to delete subscriptions.,107,0 -"71 ""Requirement +/** + * 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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +public DecomposeModel(EBT em) { -} - -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +super( em); +MinimumNoRects = 3; } - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath - -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"81 ""subscribermanager + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -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 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; - // 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 Symbol( char tok, int line ) { +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); } -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 +/** + * 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; - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) - { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"76 ""Evaluator - -private static final int EOL = 0; -private static final int VALUE = 1; -private static final int OPAREN= 2; -private static final int CPAREN= 3; -private static final int EXP = 4; -private static final int MULT= - - -private static class Precedence + /** + * Print an error message if clSym does not match opSym. + * Update errors. + */ +private void checkMatch( Symbol opSym, Symbol clSym ) { -public int inputSymbol; // refers to the precedence level of operator -public int topOfStack; // stores the operator in the form of integer +if( opSym. token == '(' && clSym. token != ')' || -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 + /** + * 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 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 { - - -public EvalTokenizer( StringTokenizer is ) { - System. out. println(""""INSIDE EvalTokenizer""""); - str = is; -} +super( em); +MinimumNoRects = 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 -/** - * 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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect -/** - * 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 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 +private String server IP = """" local host """"; + private JLabel performance Model Label = null ; + private JLabel project Name Label = null ; + private JLabel module Path Label = null ; + private JLabel requirement Id Label = null ; + private JLabel - /** - * Another internal method that hides type-casting. - */ -private int opStackTop( ) { -return ( (Integer) ( opStack. peek( ) ) ). intValue( ); -} + public Constraint Inner Panel ( + String performance Model Name , + String project Name , + String module Path , + String requirement Id , + String description , + String logic , + String units , + String value , + String impacted Value -/** - * After a token is read, use operator precedence parsing - * approach to process it; missing opening parentheses - * are detected here. - */ -private void processToken( Token lastToken ) { -System. out. printl +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) + { + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } -/* - * topAndPop the postfix machine stack; return the result. - * If the stack is empty, print an error message. - */ -private double getTop( ) { // change to support double - System. out. println(""""INSIDE GET TOP +public Vector get Values From Data Base () + { + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - /** - * Internal routine to compute x^ n. - */ -private static double pow( double x, double n ) { - System. out. println(""""INSIDE pow""""); -if( x == 0 ) { - if( n == 0 ){ -System. out. + if ( server . is Connected () ) + { + Buffered R -/** - * Process an operator by taking two items off the postfix - * stack, applying the operator, and pushing the result. - * Print error if missing closing parenthesis or division by 0. - */ -private void binaryOp( int topOp/** - * Simple main to exercise Evaluator class. - */ + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) + { + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d -public static void main( String [ ] args ) { -String str; -BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); -try { - "" -",76,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall update related artifacts according to the information contained in the event messages.,138,0 +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 private String projectName = null; @@ -71515,807 +72574,856 @@ if ( hashCode == 0) result = 37 * result + this. projectName. hashCode(); result = 37 * result + this. modulePath. hashCode(); result = 37 "" -",50,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"83 ""Variable +",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 -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 NewModel(EBT em) +{ +super( em); + } - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) - { -this. id = id; -this. type = type; -this. + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -//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 StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"80 ""Requirement +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"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 Requirement() {// empty constructor +} -public String toString() - { -String temp; -temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + - """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - /** -* Returns the id. -* @return int -*/ - public String getId() + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + + +public void ParseRequirement(String TextLine) { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=Line"" +",80,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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; + + +public EBShape( int xpos, int ypos, Color col) { -return id; +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() + public void Updaterequirement Info(String rno, String pname, String mname) { -return logic; +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); } - /** -* Returns the name. -* @return String -*/ - public String getName() + public boolean match( int mx, int my) { -return name; +return true; } - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; + public int GetX() + { +return x; } - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; + public int GetY() + { +return y; } - - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; + public Color GetC() +{ +return c; } + 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; + }"" +",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 - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - /** -* Sets the speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null - /** -* Returns the type. -* @return String -*/ - public String getType() { -return type; - } + + 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 type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - /** -* Returns the project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = 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: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -private String queryID; - private String queryString; - public Pair(String queryID, String queryString) { + public void createExecuteString() + { -this. queryID = queryID; -this. queryString = queryString; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector + + +public void parseImpactReport(String str) + { + +Connection conn = null; + +Statement stmt = null; + +Vector constraintsVector = null; +Vector driversVector = null; + +ConstraintsDescription constraint = null; + +int driverLoop"" +",62,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 +"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 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -"93 ""Obsolete Model +public 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 -public ObsoleteModel(EBT em) +public NewModel(EBT em) { super( em); } -// Construct Visual model for Merge Event + // Construct Visual model for Merge Event public void BuildEvent() { - ClearVectors(); +ClearVectors(); AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +AddArrow(35,97,59,97); +CurrentEvent = 0; +} public StringBuffer GenerateEvent() - { +{ StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"89 ""Event Line +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 -protected int top, left, right, bottom; +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 EventLine ( int t, int l, int r, int b) +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) { -top = t; -left = l; -right = r; -bottom = b; -} +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public int GetT() { return top;} -public int GetL() { return left;} +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) + { +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ -public int GetR() { return right;} -public int GetB() { return bottom;}"" -",89,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Only registered subscribers shall be allowed to establish traces.,102,0 -"77 ""Model Driver +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} -String msg=""""""""; -public ModelDriver(String text) - { -this. msg = text; -init(); - } +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - public void init() - { -System. out. println(""""MODEL DRIVER CLASS 1/10""""); -performance modelHandler pmh = new performance modelHandler( msg); -System. out. println(""""MODEL DRIVER CLASS 2/10""""); - pmh. messageParser"" -",77,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"75 ""Driver +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 -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 NewModel(EBT em) +{ +super( em); } - public String toString() - { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } +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 +"92 ""New Model - /** -* Returns the name. -* @return String -*/ - public String getName() - { -return name; +public NewModel(EBT em) +{ +super( em); } - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() - { -return valueFrom; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} - public double getValueTo() - { -return valueTo; +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 +Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for 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 + +public RefineModel(EBT em) +{ +super( em); } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} - /** -* 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(""""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 +static private int count = 0; + private int taskNumber; + protected Done done; + ServerSocket theServer; + private Connection conn; + private Statement stmt; + private ResultSet rs; - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) + + DOORsThread(ServerSocket ss) { -this. name = name; + theServer = ss; + count++; + taskNumber = count; } - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) + public void run() { -this. valueFrom = valueFrom; + + 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); } - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"81 ""subscribermanager +// 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 aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; +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; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try + setTitle(""""EventsProcessor""""); + +addWindowListener( new WindowAdapter() { + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); } -public void sendImpactReportToEventServer(String text) - { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. -// run method will be execute from the main method when u say Thread. start() in main - public void run() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try +int index = eventList. getSelectedIndex(); +if ( index != -1) { + try + { +Notification - - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ +if (! listModel. isEmpty()) +{ + int index =0; + try + { +Notification_Event nEvt1 = (Notificati - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try + { +N -// finds the subscribers for this requirement - public void IdentifySubscribers() +void DeleteEvent(String SubscriberName, String EventID) { -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 +{ + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() +void DeleteRelatedEvents() { - -String sName, sReqno, sModule, sKey1, sKey2; -try +while ( m_Deleterequirement List. size()!=0) { - System. o + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - // 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. + m_Deleterequirement List. remove(0); - public void Dispatch - public String getErrorMessage() +void AddSubscription(String SubscriberName, Requirement requirement ) { - return errMsg; - } +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 boolean Contains(String ContextString, String SearchString) +void UpdateDisplayList() { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -for ( int i = 0"" -",57,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"63 ""Doors Thread -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; + // 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 - DOORsThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - } +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 +Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 ; - public void run() - { + 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 - while( true) - { - try + // Speculate Gui + + public Speculate Gui () { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"82 ""Tokenizer + super ("" Speculate GUI ""); + + container = get Content Pane (); -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + set Size ( 800 , 600 ); + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + // Submit Listener -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public void action Performed ( Action Event e ) { + if ( e . get Source () == submit Button ) { -/** - * Get the next opening or closing symbol. - * Return false if end of file. - * Skip past comments and character and string constants - */ -public char getNextOpenClose( ) -{ -while( nextChar( ) ) -{ + send Query TO Server (); + } + if ( e . get Source () == fetch Button ) { - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + System . out . println ("" Fetch Button Pressed -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; -for( ; nextChar( ); result += ch ) + void send Query TO Server () + { + String ip = this . event Server IP ; + int Port No = 1701 ; + Socket socket ; + try { - /** - * 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 = new Socket ( ip , Port No ); + Output Stream os = socket . get Output Stream (); + Output Stream -/** - * 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 pull Value From DOORS () + { + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -/** - * 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 [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get -/** - * 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 ) + { + 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 -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"60 ""Thread Pool +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: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,A user shall register as a subscriber.,103,0 -"56 ""Event Parser +conn = this. getConnect -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() +/** +* 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) { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: +System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); +Connection conn1 = this. getConnection(); +System. out. println("""" in solveStru - public void updateEvent(String str, String ID) +public void solveStructureEquation() { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; +System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); +//Based on that result find out the equation and replace the name by its value +System -//Check if a subscription exists - public boolean CheckSubscription(String str) +public void getTrackVariableName() { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next +System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); +//This will get the variable name from SPE Graph and find the same name in variable +// and inse -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) +public void setCalculatedValues() { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag +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 -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) + public Vector getImpactReport() { -// 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 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 + +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 speculate(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) { -System. out. println(""""Speculate""""); -CallBack +this. id = id; +this. type = type; +this. -public void impactReport(String str) +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"73 ""Constraints - -String id; - String name; - double value; - String logic; +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; } @@ -72324,7 +73432,8 @@ return id; * Returns the logic. * @return String */ - public String getLogic() { + public String getLogic() + { return logic; } @@ -72333,10 +73442,12 @@ return logic; * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double @@ -72354,7 +73465,8 @@ return value; this. id = id; } - ** + + /** * Sets the logic. * @param logic The logic to set */ @@ -72378,1660 +73490,1611 @@ this. name = name; */ public void setValue( double value) { this. value = value; - }"" -",73,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The prototype system shall utilize a driver to trigger events.,120,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The eventserver shall receive event messages when a requirement changes.,127,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; + } - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) - { + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set +*/ + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; + } - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + /** +* Returns the type. +* @return String +*/ + public String getType() { +return type; } - public String get Description () { - return this . description ; + /** +* Sets the type. +* @param type The type to set +*/ + public void setType(String type) { +this. type = type; } - public String get Logic () { - return this . logic ; - } - public String get Module Path () { - return this . module Path ; + /** +* Returns the project_ path. +* @return String +*/ + public String getProject_ path() { +return project_ path; } - public String get Project Name () { - return this . project Name ; - } - public String get Requirement ID () { - return this . requirement 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 +"76 ""Evaluator - public String get Units () { - return this . units ; - } +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 get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } +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 set Logic ( String logic ) { - this . logic = logic ; - } +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ - public void set Module Path ( String module Path ) { - this . module Path = module Path ; - } +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 - 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 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 set Units ( String units ) { - this . units = units ; - } - public void set Value ( String units ) { - this . value = units ; - } +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public String get Impacted Constraint () { - return this . impacted Constraint ; - } +/** + * 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 set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted 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 String get Attribute () { - return this . attribute ; - } +/** + * 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 Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model 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 Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } - public String to String () { + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ 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 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 +/* + * 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 hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"62 ""Call Back + /** + * 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 Hash table requirementDescTable = new Hash table(); - private Hash table constraintDescTable = new Hash table(); +/** + * 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 Hash table performanceModelTable = new Hash table(); - private PerformanceModel performance model= null +public static void main( String [ ] args ) { +String str; +BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) ); +try { + "" +",76,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 +"private JPanel center Panel = null ; - public void parseSpeculateInformation(String str) - { -System. out. println(""""Received String = """" + str); -Connection conn = null; -Statement stmt = null; -DriverDescription dd = null; -String eventType = 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 identifyPerformanceModels() + public Speculate Gui () { -Connection conn = null; -ResultSet rs = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Enumeration subscriberTableEnumeration = nu + super ("" Speculate GUI ""); -public void pullInformationFromDoors() - { -String serverIP = """"140.192.37.150""""; -String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; -String subscriberName = null; -Vector constraints = n + container = get Content Pane (); + set Size ( 800 , 600 ); -public void insertValuesInDataBase() - { -Connection conn = null; -Statement stmt = null; -String subscriberName = null; -DriverDescription dd = null; -Vector driverVector = null; -ConstraintsDescription cd = null; + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver + // Submit Listener - 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 ( e . get Source () == submit Button ) { + send Query TO Server (); -public void parseImpactReport(String str) - { + } -Connection conn = null; + if ( e . get Source () == fetch Button ) { -Statement stmt = null; -Vector constraintsVector = null; -Vector driversVector = null; + System . out . println ("" Fetch Button Pressed -ConstraintsDescription constraint = null; -int driverLoop"" -",62,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"95 ""Text Model + void send Query TO Server () + { -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p + String ip = this . event Server IP ; + int Port No = 1701 ; -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 + Socket socket ; + try { + socket = new Socket ( ip , Port No ); - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set + Output Stream os = socket . get Output Stream (); + Output Stream -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi + public void pull Value From DOORS () + { -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; -public void drawModel() -{ -repaint(); -} + String [] attribute = { "" Value "", "" Attribute "" }; + String project Name = this . proj Name Text . get -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"78 ""Notification Event + public static void main ( String [] args ) + { + new Speculate Gui (); + }",46,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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_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 m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -// constructor -public Notification_Event() +public Requirement() { - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); } -// end of class Notification_Event public Object clone() throws CloneNotSupportedException { -// create new object with the same type -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - n +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - public void ParseEvent(String TextLine) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -String msg = TextLine; -if( msg. startsWith(""""Re-execute"""") ) -{ - ModelDriver md = new ModelDriver( msg ); - md. init(); -//ToDo: -// divert all the calls fo - +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -// Set the other members before calling this function - public void ParseLeftAndRightLists(String LeftLine, String RightLine) +public void ParseRequirement(String TextLine) { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -if ( m_Eve //Comment Added by Amit Uchat - - + 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 +"72 ""Balance +/** + * Symbol represents what will be placed on the stack. + */ +private static class Symbol +{ +public chartoken; +public int theLine; - //This method displays the contents of two array list to console -public void DisplayValues() +public Symbol( char tok, int line ) { - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The subscribermanager shall restore the executable model to its prior state.,119,0 -"56 ""Event Parser +token = /** + * Constructor. + * @param inStream the stream containing a program. + */ -private Connection conn; - private ResultSet rs; - private Statement stmt; - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try +public Balance( Reader inStream ) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - +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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 -//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 EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button -public void impactReport(String str) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"47 ""Impact Report - -private String server IP = """" local host """"; - private JPanel center Panel = null ; +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - private JPanel driver Panel = new JPanel (); - private JPanel driver Inner Panel = null ; +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - private JPanel impact Panel = null ; - private JPanel impact Inner P - public Impact Report () - { +private void LeftListClicked(MouseEvent e){ + if (!LeftList. isSelectionEmpty()) { + int index = LeftList. getSelectedIndex(); + Requirement requirement= (Requirement) m_Evt. m_LeftSide - super ("""" Search Result GUI """"); - container = get Content Pane (); +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 - set Size ( 800 , 250 ); +/** +* True if this thread is currently processing. + */ +public boolean busy; - panel = new JPanel (); +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - panel . set Layout ( null ); - this . server IP = - JOption Pane - . show In +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - public static void main ( String [] args ) - { +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - Impact Report im = new Impact Report (); +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 Vector search Date () +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - pair Vector = new Vector (); +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;/ - query String Combo . remove All Items (); - query String Combo . add Item ("""" Select Query String """"); + 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 - Socket server ; - String line = new String (); +// 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 - // Select Actions +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - public void action Performed ( Action Event e ) - { +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } + // 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. - // Button Actions + public void Dispatch -public void action Performed ( Action Event e ) { + public String getErrorMessage() + { + return errMsg; + } - if ( submit Button == e . get Source ()) { - for ( int i = 0 ; i < pair Vector . size (); i ++) { + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - Pair pair = ( Pair ) pair Vector . get ( i ); +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 +"62 ""Call Back - if ( pair - . get +private Hash table requirementDescTable = new Hash table(); + private Hash table constraintDescTable = new Hash table(); - public void impact Report ( String id ) - { + private Hash table performanceModelTable = new Hash table(); - // super ("""" Impact Report """"); + private PerformanceModel performance model= null - container = get Content Pane (); - set Size ( 1020 , 740 ); + public void parseSpeculateInformation(String str) + { +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - this . query ID = id ; - System . out . println ("""" Impact Report Constructor ..... ID """" + +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - public Vector get Constraint From Data Base () +public void pullInformationFromDoors() { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - Vector v = new Vector (); - Socket server ; - String line = new String (); +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered + public void createExecuteString() + { +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - public Vector get Driver From Data Base () +public void parseImpactReport(String str) { - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); +Connection conn = null; - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The eventserver shall receive event messages when a requirement changes.,127,0 -"private JPanel center Panel = null ; +Statement stmt = null; - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c +Vector constraintsVector = null; +Vector driversVector = null; - // Speculate Gui +ConstraintsDescription constraint = null; - public Speculate Gui () - { +int driverLoop"" +",62,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance 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 - super ("" Speculate GUI ""); - container = get Content Pane (); +private int x, y; + private String requirement No; + private String ProjectName, ModulePath; +private Color c; - set Size ( 800 , 600 ); - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver +public EBShape( int xpos, int ypos, Color col) + { +x = xpos; +y = ypos; +c = col; +requirement No = """"""""; +ProjectName = """"""""; +ModulePath = """"""""; + } - // Submit Listener + public void Updaterequirement Info(String rno, String pname, String mname) + { +requirement No = rno. trim(); +ProjectName = pname. trim(); +ModulePath = mname. trim(); + } - public void action Performed ( Action Event e ) { - if ( e . get Source () == submit Button ) { + public boolean match( int mx, int my) + { +return true; + } - send Query TO Server (); - } + public int GetX() + { +return x; + } - if ( e . get Source () == fetch Button ) { + public int GetY() + { +return y; + } - System . out . println ("" Fetch Button Pressed + public Color GetC() +{ +return c; + } + public String GetReqno() + { +return requirement No; + } - void send Query TO Server () + public String GetProject() { +return ProjectName; + } - String ip = this . event Server IP ; - int Port No = 1701 ; - Socket socket ; - try { + 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 - socket = new Socket ( ip , Port No ); - Output Stream os = socket . get Output Stream (); - Output Stream +private JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public void pull Value From DOORS () - { - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; +public EBT(Frame f) +{ +FrameParent = f; +CurrentEvent = -1; +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); - String [] attribute = { "" Value "", "" Attribute "" }; - String project Name = this . proj Name Text . get + // 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) { - new Speculate Gui (); - }",46,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"52 ""Pair + return true; + } -private String queryID; - private String queryString; + public boolean mouseUp( java. awt.Evente, int x, int y) +{ +return true; + } - public Pair(String queryID, String queryString) { + public void mouseClicked( java. awt. event.MouseEvente) +{ +VisualPanel.Clicked( e. getX(), e. getY()); +} -this. queryID = queryID; -this. queryString = queryString; - } +public void mouseExited( java. awt. event.MouseEvente){} - public String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +public void mousePressed( java. awt. event.MouseEvente){} - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +public void mouseReleased( java. awt. event.MouseEvente){} - public void setQueryString(String queryString) { -this. queryString = queryString; - } +public void mouseEntered( java. awt. event.MouseEvente){} - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +public void paint(Graphics g) {} +public void update(Graphics g) {} - }"" -",52,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall be able to delete subscriptions.,107,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The user shall be able to construct speculative queries using a GUI.,115,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include deleting a requirement.,125,0 -"60 ""Thread Pool + public JSplitPane getSplitPane() +{ +return splitPane; +} -/** -* 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 valueChanged(ListSelectionEvent e) +{ +if ( e. getValueIsAdjusting()) +return; +} -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) +private class ValueReporter implements ListSelectionListener { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +public void valueChanged(ListSelectionEvent event) { -thr -/** -* Add a task to the thread pool. Any class -* which implements the Runnable interface -* may be assigned. When this task runs, its -* run method will be called. -* -* @param r An object that implements the Runnable interface -*/ - pub + if (! 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""""); - /** -* Get a new work assignment. -* -* @return A new assignment +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 +"59 ""Done /** +* The number of Worker object +* threads that are currently working +* on something. */ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - + private int _ activeThreads = 0; /** -* Called to block the current thread until -* the thread pool has no more work. +* 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 complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + + synchronized public void waitDone() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +try { + while ( _ activeThreads>0 ) { +wait(); } -}"" -",60,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"63 ""Doors Thread - -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; - +} catch ( InterruptedException - DOORsThread(ServerSocket ss) +/** +* Called to wait for the first thread to +* start. Once this method returns the +* process has begun. +*/ + synchronized public void waitBegin() { - theServer = ss; - count++; - taskNumber = count; +try { + while ( !_ started ) { +wait(); } +} catch ( InterruptedException e - public void run() - { - - while( true) - { - try +/** +* Called by a Worker object +* to indicate that it has begun +* working on a workload. +*/ + synchronized public void workerBegin() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"93 ""Obsolete Model - -public ObsoleteModel(EBT em) -{ -super( em); +_ activeThreads++; +_ started = true; +notify(); } -// Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve + /** +* Called by a Worker object to +* indicate that it has completed a +* workload. +*/ + synchronized public void workerEnd() + { +_ activeThreads--; +notify(); + } -public StringBuffer GenerateEvent() + /** +* Called to reset this object to +* its initial state. +*/ + synchronized public void reset() { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The subscribermanager shall immediately process speculative events.,116,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,Event types shall include deleting a requirement.,125,0 -"72 ""Balance +_ 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 + /** - * 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 != ')' || +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""""; - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"78 ""Notification Event -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim +public Requirement() {// empty constructor -// 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 Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } - 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 ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -// 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 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 - //This method displays the contents of two array list to console -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" "" -",78,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,0 -"74 ""database + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor -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 toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - /** - * 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 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++ - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; 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) - { -conn = this. getConnect + 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 -/** -* 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 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 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 double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -public void solveStructureEquation() + +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 + +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) { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ -public void getTrackVariableName() +} +public void sendImpactReportToEventServer(String text) { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. -public void setCalculatedValues() +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -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 +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - public Vector getImpactReport() + + // set up for reading the byte data in to characte // start of class from here + 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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"53 ""Performance Model +// 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 -private String name = null; - private Vector driverVector = null; - private Vector constraintVector = null; +public AboutDialog(JFrame parent, boolean modal) { + super ( parent, modal); + getContentPane (). setLayout ( new BorderLayout ()); + setTitle (""""About""""); + setName ("""" aboutDialog""""); + + private JTextArea text;"" +",65,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 - 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(); +this. value = value; +this. logic = logic; } - public Vector getConstraints() - { -return constraintVector; - } - public Vector getDrivers() - { -return driverVector; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public String getName() - { -return name; - } - public void setName(String name) - { -this. name = name; + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public void addDriver(DriverDescription driver) - { -if ( driverVector. contains( driver)) -{ -} -else - this. driverVector. add( driver); - } - public void removeDriver(DriverDescription driver) - { -this. driverVector. remove( driver); + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public boolean containsDriver(DriverDescription driver) - { -return this. driverVector. contains( driver); - } - public void addConstraint(ConstraintsDescription constraint) - { -this. constraintVector. add( constraint); + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public boolean containsConstraint(ConstraintsDescription constraint) - { -return this. constraintVector. contains( constraint); + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - 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) + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } - 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 name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; } - public void setQueryID( long id) - { -this. queryID = id; - } - public String toString() - { -return """"performance modelName = """" - + this. name - + """"\ n"""" - + """"Query ID = """" - + this. queryID - + """"\ n"""" - + """"Drivers = """" - + this. driverVector - + """"\ n"""" - + """"Constraints = """" - + this."" -",53,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,113,0 -"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"48 ""Constraint Inner Panel + /** +* 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 -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel +private Connection conn; + private ResultSet rs; + private Statement stmt; - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) + public void updateEvent(String str, String ID) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -public Vector get Values From Data Base () +//Check if a subscription exists + public boolean CheckSubscription(String str) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - if ( server . is Connected () ) - { - Buffered R +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) +//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 - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + +//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 JPanel get Panel () + public void speculate(String str) { - return panel ; - }"" -",48,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"54 ""eventserver +System. out. println(""""Speculate""""); +CallBack -public static void (String args[]) + +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 registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber 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 + + + //General Constructor to initialize all the members + Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +this. id = id; +this. type = type; +this. + + +//Constructor to Add driver related members + Variable(String id, String type, String name, double value, double speculateValue) { -p +this. id = id; +this. type = type; +this. name = name; +this. value = value; +this -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Event types shall include adding new requirements.,121,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); +//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 -/** -* 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 toString() + { +String temp; +temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value + + """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path /** -* Get a new work assignment. -* -* @return A new assignment +* Returns the id. +* @return int */ - public synchronized Runnable getAssignment() + public String getId() { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. +return id; + } /** -* Called to block the current thread until -* the thread pool has no more work. +* Returns the logic. +* @return String */ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() + public String getLogic() { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); +return logic; } -}"" -",60,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall restore the executable model to its prior state.,119,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; - //@param argsNo arguments are used. - public static void main(String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try + /** +* Returns the name. +* @return String +*/ + public String getName() { - ServerSocket ss = new ServerSocket( port); - for"" -",64,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +return name; + } -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return 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; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = 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: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. +* Sets the name. +* @param name The name to set */ - private int _ activeThreads = 0; + public void setName(String name) { +this. name = name; + } + /** -* 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 value. +* @param value The value to set */ + public void setValue( double value) { +this. value = value; + } - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + + /** +* Returns the speculateValue. +* @return double +*/ + public double getSpeculateValue() { +return speculateValue; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Sets the speculateValue. +* @param speculateValue The speculateValue to set */ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); + public void setSpeculateValue( double speculateValue) { +this. speculateValue = speculateValue; } -} catch ( InterruptedException e -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + /** +* Returns the type. +* @return String */ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); + public String getType() { +return type; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Sets the type. +* @param type The type to set */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public void setType(String type) { +this. type = type; } /** -* Called to reset this object to -* its initial state. +* Returns the project_ path. +* @return String */ - synchronized public void reset() - { -_ activeThreads = 0; + 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; }"" -",59,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"84 ""White Board Execution Graph +",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 -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor + // 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 String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +} +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 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 +// 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 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++ + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 + +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 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 toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - 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; + } + + + /** +* 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; + } - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; + } -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) + { +this. valueFrom = valueFrom; + } -public double targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"88 ""Event Model + public void setValueTo( double value) + { +this. valueTo = valueTo; + }"" +",75,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts 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 -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 JSplitPane splitPane; +private JSplitPane splitPane2; +private Frame FrameParent; +private JPanel MenuPanel; +private TextModel WorkArea; +private EventModel VisualPanel; +private MergeModel M - public EventModel(EBT e) +public EBT(Frame f) { -ebt = e; +FrameParent = f; CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +this. serverIP = + JOptionPane +. showInputDialog(""""Please Enter the IP Address of eventserver"""") +. trim(); -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; + // Set up JList Selection wid + public void getrequirement Text(EBShape sh) +{ +WorkArea. showText( sh); } - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); -} + public boolean mouseDown( java. awt.Evente, int x, int y) + { + return true; + } -public void drawModel() + public boolean mouseUp( java. awt.Evente, int x, int y) { -repaint(); -} - +return true; + } -public void drawModel(EBShape sh) + public void mouseClicked( java. awt. event.MouseEvente) { -EventShapes. setElementAt( sh, ESCursor); -repaint(); +VisualPanel.Clicked( e. getX(), e. getY()); } -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); - } -} - +public void mouseExited( java. awt. event.MouseEvente){} -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 mousePressed( java. awt. event.MouseEvente){} -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 mouseReleased( java. awt. event.MouseEvente){} +public void mouseEntered( java. awt. event.MouseEvente){} - protected void BuildEvent(){} +public void paint(Graphics g) {} +public void update(Graphics g) {} - protected void AddLine( int t, int l, int r, int b) + public JSplitPane getSplitPane() { -EventLines. addElement( new EventLine( t, l, r, b)); +return splitPane; } -protected void AddEventRect( int x, int y, int colorStatus) +public void valueChanged(ListSelectionEvent e) { -if ( colorStatus == 1) +if ( e. getValueIsAdjusting()) +return; +} + +private class ValueReporter implements ListSelectionListener { - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); - } - else +public void valueChanged(ListSelectionEvent event) +{ + if (! event. getValueIsAdjusting()) { -Even - +switch(EventList. getSelectedIndex()) -public String getrequirement Text(String r, String p, String m) +public void RedrawAll(EBShape sh) { -return new String(""""requirementwill go here""""); - } - - - public StringBuffer GenerateEvent() +VisualPanel. drawModel( sh); +VisualPanel.CheckNotifyStatus(); +} +public static void main(String s[]) { -return new StringBuffer("""" """"); - }// end of GenerateEvent method - +JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) +mainframe. addWindowListener( new WindowAdapter() { -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 +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 private String server IP = """" local host """"; @@ -74115,682 +75178,303 @@ public void action Performed ( Action Event e ) { for ( int i = 0 ; i < pair Vector . size (); i ++) { - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try -{ - Class. fo - - - - /** -* Returns GraphId as int -* @param graphName performance modelHandler calls this method with graphName -* as parameter, performance modelHandler parse the EventServer message and get the -* graphName -*/ - public int get - - - /** -* Copy data from one set of columns to other in table Variable -* @param graphId is the id of graph for which you want to save the -* current state of variables -*/ - public void saveCurrentModel( int graphId) - { -conn = this. getConnect - - -/** -* Injects new value into Variable table, using Data stored in -* Vector of Variable object -* @param graphId is the id of graph -* @param Vector var is the Vector that stores the Object of type Variable -*/ - public void injectVa - - /** -* this method will pick up the structure id from SPE Structure -* If DependentStructureId is 0 then select StructureID -* and invoke the executeStructure method on Selected -* StructureId -* Who Invokes this method: performance model // this method is about executing the structure - // based on StructureId find all the data related to given StructureId - // and using the equation in string format call the method equationParser. - //I am passing Vector that has all the data abou - public void solveStructure( int StructureId, Vector vr) - { -System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&""""); -Connection conn1 = this. getConnection(); -System. out. println("""" in solveStru - - -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System - - -public void getTrackVariableName() - { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - - -public void setCalculatedValues() - { -System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>""""); -// and at matching location put the calculated values -System. out. println("""" enter calcValue // this method creates the token for each variable name in the string - // and store that variable into vector - // it also creates the vector called varValues - // varValues has values of each variable stored in varName - //So equation has variable n - - - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"91 ""Modify Model - -public ModifyModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -"94 ""Refine Model - -public RefineModel(EBT em) -{ -super( em); - } - - // Construct Visual model for Merge Event -public void BuildEvent() -{ - ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 3; -} - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall receive event messages when a requirement changes.,127,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,Event types shall include modifying a requirement.,124,0 -"48 ""Constraint Inner Panel - -private String server IP = """" local host """"; - private JLabel performance Model Label = null ; - private JLabel project Name Label = null ; - private JLabel module Path Label = null ; - private JLabel requirement Id Label = null ; - private JLabel - - public Constraint Inner Panel ( - String performance Model Name , - String project Name , - String module Path , - String requirement Id , - String description , - String logic , - String units , - String value , - String impacted Value - - -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) - { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - - } - - -public Vector get Values From Data Base () - { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R - - - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String logic ) - { - - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d - - -public JPanel get Panel () - { - return panel ; - }"" -",48,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"95 ""Text Model - -private int CurrentEvent; -private EBT ebt; -private JLabel lblrequirement No, lblProject, lblModulePath; -private JTextField txtrequirement No, txtProject, txtModulePath; -private boolean HideMsg; -p - -public TextModel(EBT e) -{ - // System. out. println(""""Trying to create text box""""); -ebt = e; -CurrentEvent = -1; -// setForeground( new Color ( 255,255,255) ); - lblrequirement No = new JLabel(""""requirement - - - public void showText(EBShape sh) -{ - // Hide message in bottom box. - HideMsg = true; - repaint(); -lblProject. setVisible( true); -lblrequirement No. setVisible( true); -lblModulePath. set - -public void HideText() -{ -lblProject. setVisible( false); -lblrequirement No. setVisible( false); -lblModulePath. setVisible( false); -txtProject. setVisible( false); -txtrequirement No. setVisi - -public void ShowInfo( int CE) -{ -CurrentEvent = CE; -HideMsg = false; -HideText(); - repaint(); -} - -public void drawModel() -{ -repaint(); -} - - -protected void paintComponent(Graphics g) -{ - super. paintComponent( g); - -if (HideMsg == true) -{ - g. drawString("""" """",20,25); - g. drawString("""" """",20,40); - g. drawString("""" """",20,55 "" -",95,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + Pair pair = ( Pair ) pair Vector . get ( i ); - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; + if ( pair + . get - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + + public void impact Report ( String id ) { - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; + // super ("""" Impact Report """"); - } + container = get Content Pane (); + set Size ( 1020 , 740 ); - public String get Description () { - return this . description ; - } + this . query ID = id ; - public String get Logic () { - return this . logic ; - } + System . out . println ("""" Impact Report Constructor ..... ID """" + - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } + public Vector get Constraint From Data Base () + { - public String get Requirement ID () { - return this . requirement ID ; - } + Vector v = new Vector (); - public String get Units () { - return this . units ; - } + Socket server ; + String line = new String (); - public String get Value () { - return this . value ; - } - public void set Description ( String description ) { - this . description = description ; - } + try + { + server = new Socket ( server IP , 1701 ); - public void set Logic ( String logic ) { - this . logic = logic ; - } + if ( server . is Connected () ) + { + Buffered - 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 Vector get Driver From Data Base () + { - public void set Units ( String units ) { - this . units = units ; - } + Vector v = new Vector (); - public void set Value ( String units ) { - this . value = units ; - } + Socket server ; + String line = new String (); - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + try + { + server = new Socket ( server IP , 1701 ); - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + 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 - public String get Attribute () { - return this . attribute ; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - 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 String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize -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 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 hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,The subscribermanager shall immediately process speculative events.,116,0 -"80 ""Requirement +public 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_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"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++ -public Requirement() {// empty constructor + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ -} -public Object clone() throws CloneNotSupportedException { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w -public void ParseRequirement(String TextLine) { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=Line"" -",80,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than 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 +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() -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 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 - //General Constructor to initialize all the members - Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) +public MergeModel(EBT em) { -this. id = id; -this. type = type; -this. +super( em); + MinimumNoRects = 3; + } -//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 + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -//Constructor to Add constraints related members - Variable(String id, String type, String name, double value, String logic){ -this. id = id; -this. type = type; -this. name = name; -this. value = value; -this. logic +public StringBuffer GenerateEvent() +{ +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 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() + // 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 logic; + return errMsg; } - /** -* Returns the name. -* @return String -*/ - public String getName() + public boolean Contains(String ContextString, String SearchString) { -return name; - } +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; +for ( int i = 0"" +",57,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 +"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes 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 - /** -* Returns the value. -* @return double -*/ - public double getValue() { -return value; - } +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) { -this. id = id; - } + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor - /** -* Sets the logic. -* @param logic The logic to set -*/ - public void setLogic(String logic) { -this. logic = logic; - } + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize - /** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) { -this. name = name; - } +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 value. -* @param value The value to set -*/ - public void setValue( double value) { -this. value = value; - } +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const - /** -* Returns the speculateValue. -* @return double -*/ - public double getSpeculateValue() { -return speculateValue; - } +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 speculateValue. -* @param speculateValue The speculateValue to set -*/ - public void setSpeculateValue( double speculateValue) { -this. speculateValue = speculateValue; - } + 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 type. -* @return String -*/ - public String getType() { -return type; - } + 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 type. -* @param type The type to set -*/ - public void setType(String type) { -this. type = type; - } + 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 project_ path. -* @return String -*/ - public String getProject_ path() { -return project_ path; - } +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() - /** -* 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 +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; @@ -74844,72 +75528,28 @@ public String searchQueryID(String date) Vector queryVector = new Vector(); String searchQuery = new String(); try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get - - - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j - - - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"92 ""New Model - -public NewModel(EBT em) -{ -super( em); - } - - - // Construct Visual model for Merge Event -public void BuildEvent() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; -} - - -public StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,For speculative events; the eventserver shall construct a composite event message.,132,0 -"64 ""DOORs Thread Pool - -public final static int defaultPort = 2347; - ServerSocket theServer; - // static int numberOfThreads = 3; +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. get - //@param argsNo arguments are used. - public static void main(String args[]) + public String getConstraintFromDataBase(String queryID) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +String ConstString = new String(); +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + conn = DriverManager. getConnection("""" j + + + public String getDriverFromDataBase(String queryID) { - 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 +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 @@ -75025,871 +75665,686 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,The user shall be able to construct speculative queries using a GUI.,115,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +",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 +"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 Updaterequirement Info(String rno, String pname, String mname) + public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } - +requirement No = rno;//Requirement number +ProjName = proj;// project name +ModPath = mo - public boolean match( int mx, int my) +// finds the subscribers for this requirement + public void IdentifySubscribers() { -return true; - } +String mSQL; +// Create an SQL statement that will limit the selection as much as possible +// If a subscription is to a specific requirement - check for requi - public int GetX() +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() { -return x; - } +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - public int GetY() - { -return y; - } + // 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 Color GetC() -{ -return c; - } + public void Dispatch - public String GetReqno() - { -return requirement No; - } - public String GetProject() + public String getErrorMessage() { -return ProjectName; + return errMsg; } - public String GetModule() + public boolean Contains(String ContextString, String SearchString) { -return ModulePath; - }"" -",86,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - /** -* 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. -*/ +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 - 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: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; - - - public Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + public double getValueFrom() { - - 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 ; +return valueFrom; } - public String get Impacted Constraint () { - return this . impacted Constraint ; - } - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; + public double getValueTo() + { +return valueTo; } - public String get Attribute () { - return this . attribute ; - } - public void set Attribute ( String attribute ) { - this . attribute = attribute ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) + { +this. id = id; } - public String get Performance Model Name () { - return this . performance Model Name ; - } - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) + { +this. name = name; } - public String to String () { - - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" - - -public boolean equals ( Object o ) { - if (!( o instance of Constraints Description )) - return false ; - Constraints Description cd = ( Constraints Description ) o ; - if ( cd . project Name . equals Ignore Case ( this . project Na - - -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -"90 ""Merge Model - -public MergeModel(EBT em) + ** +* 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 StringBuffer GenerateEvent() -{ -StringBuffer thisEvent = new StringBuffer(); -StringBuffer temp = new StringBuffer(); -int MergeCount = -1; -thisEvent. append(""""Merge|""""); -for ( int i = 0; i < EventSha"" -",90,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"63 ""Doors Thread + 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 +"56 ""Event Parser -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; +private Connection conn; private ResultSet rs; + private Statement stmt; - - DOORsThread(ServerSocket ss) + //EventParser Constructor + // initializes the Database connection + public EventParser() { - theServer = ss; - count++; - taskNumber = count; - } - +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: - public void run() - { - while( true) - { - try + public void updateEvent(String str, String ID) { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - - } - - public String getQueryID() { -return this. queryID; - } +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +//Check if a subscription exists + public boolean CheckSubscription(String str) + { - public void setQueryString(String queryString) { -this. queryString = queryString; - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; +//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 - }"" -",52,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"70 ""Notification Processing -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; +//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 - // database and eventserver information - S - public Notification_Processing() + public void speculate(String str) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +System. out. println(""""Speculate""""); +CallBack -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try +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 -public static void main(String args[]) +String id; + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; +this. name = name; + } -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) + public String toString() { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; + } + /** +* Returns the id. +* @return int +*/ + public String getId() + { +return id; + } - private void saveMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the name. +* @return String +*/ + public String getName() { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +return name; + } - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) + /** +* Returns the value. +* @return double +*/ + public double getValueFrom() { -exitApplication(); +return valueFrom; } - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) + public double getValueTo() { -openEventsMenuItemActionPerformed( evt); +return valueTo; } - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +this. id = id; + } - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) + ** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +this. name = name; + } -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + ** +* Sets the value. +* @param value The value to set +*/ + public void setValueFrom( double value) { -new AboutDialog ( this, true). show(); +this. valueFrom = valueFrom; } -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) + public void setValueTo( double value) { - "" -",70,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"67 ""Event Detail Dialog +this. valueTo = valueTo; + }"" +",75,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +"62 ""Call Back -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p +private Hash table requirementDescTable = new Hash table(); -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ + private Hash table constraintDescTable = new Hash table(); -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + private Hash table performanceModelTable = new Hash table(); + private PerformanceModel performance model= null -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) + + public void parseSpeculateInformation(String str) { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} +public void identifyPerformanceModels() + { +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide +public void pullInformationFromDoors() + { +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -"64 ""DOORs Thread Pool +public void insertValuesInDataBase() + { +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -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 + public void createExecuteString() { - ServerSocket ss = new ServerSocket( port); - for"" -",64,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,134,0 -"63 ""Doors Thread -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector - DOORsThread(ServerSocket ss) +public void parseImpactReport(String str) { - theServer = ss; - count++; - taskNumber = count; - } +Connection conn = null; - public void run() - { +Statement stmt = null; - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,A subscribermanager shall manage traces for one or more artifacts.,112,0 -"52 ""Pair +Vector constraintsVector = null; +Vector driversVector = null; -private String queryID; - private String queryString; +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 Pair(String queryID, String queryString) { -this. queryID = queryID; -this. queryString = queryString; + 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 String getQueryID() { -return this. queryID; - } - public String getQueryString() { -return this. queryString; - } +//Reads the result from IdentifySubscribers method selection + // and adds each result into ActualSubscribers Vector. + void ProcessResultSet() + { - public void setQueryID(String queryID) { -this. queryID = queryID ; - } +String sName, sReqno, sModule, sKey1, sKey2; +try +{ + System. o - public void setQueryString(String queryString) { -this. queryString = 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 String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; + public void Dispatch - }"" -",52,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"81 ""subscribermanager + public String getErrorMessage() + { + return errMsg; + } -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - Statement stmt; + public boolean Contains(String ContextString, String SearchString) + { +int cLen = ContextString. length(); +int sLen = SearchString. length(); +if (SearchString. length() == 0) + return false; - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +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 - // 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 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 sendImpactReportToEventServer(String text) +public Object clone() throws CloneNotSupportedException { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public void ParseEvent(String TextLine) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - + 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 up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"93 ""Obsolete Model +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -public ObsoleteModel(EBT em) +if ( m_Eve + +public void DisplayValues() { -super( em); - } + 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= -// Construct Visual model for Merge Event -public void BuildEvent() +private static class Precedence { - ClearVectors(); -AddEventRect(60,80,1); -AddLine(60,60,225,135); -AddLine(60,135,225,60); -CurrentEve +public int inputSymbol; // refers to the precedence level of operator +public int topOfStack; // stores the operator in the form of integer +public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration +private static Precedence [ ] precTable = new Precedence[ ] +{ -public StringBuffer GenerateEvent() - { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Obsolete|0|""""); -thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. e"" -",93,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Event types shall include merging requirements.,126,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The user shall be able to delete subscriptions.,107,0 -"71 ""Requirement +new Precedence( 0, -1 ),// EOL +new Precedence( 0,0 ),// VALUE +new Precedence( 100 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; -public Requirement() +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 Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +public EvalTokenizer( StringTokenizer is ) { + System. out. println(""""INSIDE EvalTokenizer""""); + str = is; +} - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_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 -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,The subscribermanager shall immediately process speculative events.,116,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall send the customized message to each impacted executable model.,136,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -"71 ""Requirement +/** + * 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 m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"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 Requirement() -{ -} -public Object clone() throws CloneNotSupportedException - { -Requirement requirement= (Requirement) super. clone(); -return requirement ; - } +/** + * Internal method that hides type-casting. + * Changed the method to support double + */ +private double postFixTopAndPop( ) { + System. out. println(""""INSIDE postFixTopAndPop method""""); + System - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) - { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath + /** + * Another internal method that hides type-casting. + */ +private int opStackTop( ) { +return ( (Integer) ( opStack. peek( ) ) ). intValue( ); +} -public void ParseRequirement(String TextLine) - { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"86 ""EB Shape + +/** + * 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 int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +/* + * 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 EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + /** + * 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 Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +/** + * 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 match( int mx, int my) - { -return true; - } +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 int GetX() - { -return x; +public ModifyModel(EBT em) +{ +super( em); } - public int GetY() - { -return y; - } - - public Color GetC() + // Construct Visual model for Merge Event +public void BuildEvent() { -return c; - } + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; - } +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes - public String GetModule() - { -return ModulePath; + protected void paintComponent(Graphics g) +{ +g. drawString(""""TESTING MODIFY"""",5,5); +super. paintComponent( g); }"" -",86,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"80 ""Requirement +",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 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: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The 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 void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 "82 ""Tokenizer @@ -76013,32 +76468,7 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"89 ""Event Line - -protected int top, left, right, bottom; - - -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The eventserver shall receive event messages when a requirement changes.,127,0 +",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 NewModel(EBT em) @@ -76063,7 +76493,223 @@ 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 +",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 + +private String queryID; + private String queryString; + + + public Pair(String queryID, String queryString) { + +this. queryID = queryID; +this. queryString = queryString; + + } + + public String getQueryID() { +return this. queryID; + } + + public String getQueryString() { +return this. queryString; + } + + public void setQueryID(String queryID) { +this. queryID = queryID ; + } + + public void setQueryString(String queryString) { +this. queryString = queryString; + } + + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; + + + }"" +",52,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends 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 + +Socket aSocket; + int ID; + String EventLog; + + Connection conn; + ResultSet rs; + Statement stmt; + + // constructor, this object will be created in the main method of these class + SubscriberListener() { } + + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) + { + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try +{ + + +} +public void sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. + + +// run method will be execute from the main method when u say Thread. start() in main + public void run() + { +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ + + + + // set up for reading the byte data in to characte // start of class from here + public static void main(String[] args) + { +// default port number +int port = 1705; +// the message coming from eventserver +String LogName = """"EventLog""""; +//LogName is the database name used to log t"" +",81,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"73 ""Constraints + +String id; + String name; + double value; + String logic; + + + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } + + + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; + } + + + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; + } + + + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } + + + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; + } + + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; + } + + + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; + } + + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; + } + + + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } + + + /** +* Sets the value. +* @param value The value to set +*/ + public void setValue( double value) { +this. value = value; + }"" +",73,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +"71 ""Requirement + +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; + +public Requirement() +{ +} + +public Object clone() throws CloneNotSupportedException + { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } + + + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath + +public void ParseRequirement(String TextLine) + { + StringTokenizer LineSt; +LineSt = new StringTokenizer(TextLine, """",""""); +m_RequirementID=LineSt. nextToken(); +m_Project=LineSt. "" +",71,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 "56 ""Event Parser private Connection conn; @@ -76131,239 +76777,106 @@ public void impactReport(String str) CallBack cb = new CallBack(); cb. parseImpactReport( str); }// end impactReport()"" -",56,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e - - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ - - - public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo - -// finds the subscribers for this requirement - public void IdentifySubscribers() - { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi - - -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { - -String sName, sReqno, sModule, sKey1, sKey2; -try -{ - System. o - - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - - public void Dispatch - - - public String getErrorMessage() - { - return errMsg; - } - - - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; +",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 -for ( int i = 0"" -",57,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"61 ""Worker Thread +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -/** -* True if this thread is currently processing. - */ -public boolean busy; +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +public String GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} +public String GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber 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 -do -{ -target = owner. getAssignment(); -if ( target!=null) +private Connection conn; + private ResultSet rs; + private Statement stmt; + + //EventParser Constructor + // initializes the Database connection + public EventParser() + { +try { - target. run(); - owner. done. worker"" -",61,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"48 ""Constraint Inner Panel + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -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 updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -private void set goal Label Values ( - String attribute , - String logic , - String value , - String units ) +//Check if a subscription exists + public boolean CheckSubscription(String str) { - goal Label . set Text ( - """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); - } +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next -public Vector get Values From Data Base () +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) { - Vector v = new Vector (); - Socket server ; - String line = new String (); - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered R +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag - private void set impacted Label Value ( - String attribute , - String value , - String impacted Value , - String units , - String 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 - if ( impacted Value ! = null ) - { - double value 1 = Double . parse Double ( value ); - d + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -public JPanel get Panel () +public void impactReport(String str) { - 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 +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 @@ -76429,85 +76942,59 @@ return ProjectName; { return ModulePath; }"" -",86,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"89 ""Event Line - -protected int top, left, right, bottom; - - -public EventLine ( int t, int l, int r, int b) -{ -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} - -public int GetB() { return bottom;}"" -",89,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"79 ""performance model Handler - -String strES; // string received from eventserver - String impactReport;// string to be send to eventServer +",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 - String commandStr; // represent the command ex. execute, re - execute etc - String eventId;// refers to the eventId - String +Socket aSocket; + int ID; + String EventLog; + Connection conn; + ResultSet rs; + Statement stmt; - performance model Handler(String msg) - { -this. strES = msg; - } + // constructor, this object will be created in the main method of these class + SubscriberListener() { } - public void messageParser() + // constructor, this object will be created in the main method of these class + SubscriberListener(Socket socket, int ID, String ELog) { -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() + this. aSocket = socket; +this.ID = ID; +this.EventLog = ELog; +try { - 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 sendImpactReportToEventServer(String text) + { +//String impactReport = text; +System. out. println(""""WOW IN SEND REPORT""""); +System. out. println(""""The IR = """"+ text); +String serverIP = """"140. - public void saveModel( int id) +// run method will be execute from the main method when u say Thread. start() in main + public void run() { -// save current model -database. saveCurrentModel( id); - } +System. out. println(""""Inside Run method""""); +String str=""""""""; +try +{ - public void insertData( int id){ -// inject data into model -database. injectVariables( id, variable); - } - public void execute( int id){ -// inject data into model -database. executeModel( id, variable); - }"" -",79,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 + // 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 "68 ""Events Processor // event list private JList eventList; @@ -76623,269 +77110,287 @@ private boolean Analyze_CheckSubscription(String str) { StringTokenizer tokens = new StringTokenizer( str,""""|""""); String Messag"" -",68,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"84 ""White Board Execution Graph +",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 -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth +/** + * Constructor. + * @param inStream the stream containing a program. + */ +public Tokenizer( Reader inStream ) +{ +errors = 0; +ch = '\0'; +currentLine = 1; +in = new PushbackReader - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor +/** + * Gets current line number. + * @return current line number. + */ +public int getLineNumber( ) +{ +return currentLine; +} - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize +/** + * Gets error count. + * @return error count. + */ +public int getErrorCount( ) +{ +return errors; +} -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 +/** + * 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 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++ + /** + * Return true if ch can be part of a Java identifier + */ +private static final boolean isIdChar( char ch ) +{ +return Character. isJavaIdentifierPart( ch ); +} - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ +/** + * Return an identifier read from input stream + * First character is already read into ch + */ +private String getRemainingString( ) +{ +String result = """""""" + ch; +for( ; nextChar( ); result += ch ) - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - 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 + /** + * 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 targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +/** + * 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 targetResponseTimeAfter(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); -targetResponse time = timeToBroadcastShapeAfter() + -timeToBroadcastText() + w"" -",84,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -"50 ""Driver Description +/** + * 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 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 +/** + * 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 DriverDescription( -String projectName, -String modulePath, -String requirementID, -String description, -String changedAttribute, -String fromAttribute, -String toAttribute) - { -this. projectName = projec +/** + * 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 String getChangedAttribute() - { -return changedAttribute; - } +/** +* True if this thread is currently processing. + */ +public boolean busy; - public String getDescription() - { -return description; - } +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; - public String getFromAttribute() - { -return fromAttribute; - } - public String getModulePath() - { -return modulePath; - } +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} - public String getProjectName() - { -return projectName; - } - public String getRequirementID() - { -return requirementID; - } +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; - public String getToAttribute() - { -return toAttribute; +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 +Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 + +public NewModel(EBT em) +{ +super( em); } - public void setChangedAttribute(String changedAttribute) - { -this. changedAttribute = changedAttribute; - } - public void setDescription(String description) - { -this. description = description; - } + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""New|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); +ebs = (EBShape)EventShapes. elem"" +",92,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +"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 setFromAttribute(String fromAttribute) - { -this. fromAttribute = fromAttribute; - } +public Requirement() +{ +} - public void setModulePath(String modulePath) +public Object clone() throws CloneNotSupportedException { -this. modulePath = modulePath; +Requirement requirement= (Requirement) super. clone(); +return requirement ; } - public void setProjectName(String projectName) - { -this. projectName = projectName; - } - public void setRequirementID(String requirementID) + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -this. requirementID = requirementID; - } +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath - public void setToAttribute(String toAttribute) +public void ParseRequirement(String TextLine) { -this. toAttribute = toAttribute; - } + 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 +"93 ""Obsolete Model - public String createKey() - { -String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; -return key. toLowerCase(); +public ObsoleteModel(EBT em) +{ +super( em); } - 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"""" +// 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 hashCode() +public StringBuffer GenerateEvent() { -int hashCode = 0; -if ( hashCode == 0) -{ - int result = 17; - result = 37 * result + this. projectName. hashCode(); - result = 37 * result + this. modulePath. hashCode(); - result = 37 "" -",50,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ +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 +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; -public Balance( Reader inStream ) +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) { -errors = 0; -tok = new Tokenizer( inStream ); -} - +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s -/** - * 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 GetSubscriberName() { return SubscriberName;} +public String GetSubscriberReqno() { return SubscriberReqno;} - /** - * 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 GetSubscriberModule() { return SubscriberModule;} +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,Event types shall include refining one requirement by adding an additional requirement to the existing one.,123,0 -"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,The user shall update related artifacts according to the information contained in the event messages.,138,0 +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 @@ -77001,875 +77506,549 @@ for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"" -",88,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"87 ""EBT +",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 +private String projectName = null; + private String modulePath = null; + private String requirementID = null; -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M + private String description = null; // Description of the requirement. + private String changedArrtibute = null; + private Strin -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); +public DriverDescription( +String projectName, +String modulePath, +String requirementID, +String description, +String changedAttribute, +String fromAttribute, +String toAttribute) + { +this. projectName = projec - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) -{ -WorkArea. showText( sh); +public String getChangedAttribute() + { +return changedAttribute; } - - public boolean mouseDown( java. awt.Evente, int x, int y) + public String getDescription() { - return true; +return description; } - - public boolean mouseUp( java. awt.Evente, int x, int y) -{ -return true; + public String getFromAttribute() + { +return fromAttribute; } - 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()) + public String getModulePath() { -switch(EventList. getSelectedIndex()) - -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); - -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"81 ""subscribermanager - -Socket aSocket; - int ID; - String EventLog; - - Connection conn; - ResultSet rs; - Statement stmt; - - // constructor, this object will be created in the main method of these class - SubscriberListener() { } +return modulePath; + } - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + public String getProjectName() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; -try -{ - +return projectName; + } -} -public void sendImpactReportToEventServer(String text) + public String getRequirementID() { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. - +return requirementID; + } -// run method will be execute from the main method when u say Thread. start() in main - public void run() + public String getToAttribute() { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ - - +return toAttribute; + } - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) + public void setChangedAttribute(String changedAttribute) { -// default port number -int port = 1705; -// the message coming from eventserver -String LogName = """"EventLog""""; -//LogName is the database name used to log t"" -",81,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -"66 ""Config Dialog - -public ConfigDialog(Notification_Processing parent, boolean modal) { -super ( parent, modal); - setTitle(""""Config Dialog Box""""); - getContentPane (). setLayout ( new GridLayout(5,2)); - - -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} - - -// event listener for """"Ok"""" button -private void okButtonActionPerformed (ActionEvent evt) { - if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button - - -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} - -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui +this. changedAttribute = changedAttribute; + } - public Speculate Gui () + public void setDescription(String description) { +this. description = description; + } - 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 ) { + public void setFromAttribute(String fromAttribute) + { +this. fromAttribute = fromAttribute; + } + public void setModulePath(String modulePath) + { +this. modulePath = modulePath; + } - System . out . println ("" Fetch Button Pressed + public void setProjectName(String projectName) + { +this. projectName = projectName; + } + public void setRequirementID(String requirementID) + { +this. requirementID = requirementID; + } - void send Query TO Server () + public void setToAttribute(String toAttribute) { +this. toAttribute = toAttribute; + } - String ip = this . event Server IP ; - int Port No = 1701 ; + public String createKey() + { +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } - Socket socket ; - try { + 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() + { - socket = new Socket ( ip , Port No ); +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" - Output Stream os = socket . get Output Stream (); - Output Stream - public void pull Value From DOORS () +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; - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - String [] attribute = { "" Value "", "" Attribute "" }; + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) + { + setTitle(""""EventsProcessor""""); - String project Name = this . proj Name Text . get +addWindowListener( new WindowAdapter() +{ - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; + public void windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - 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() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) + { +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { +Notification - while( true) + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { +if (! listModel. isEmpty()) +{ + int index =0; try { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P +Notification_Event nEvt1 = (Notificati -public String getNextID() +/ action for """"View Current Record"""" in popup menu + private void popupViewActionPerformed (ActionEvent evt) { -try +int index = eventList. getSelectedIndex(); +if ( index != -1) { -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn - + try + { +N -public String searchDate() +void DeleteEvent(String SubscriberName, String EventID) { -String dateString = new String(); -Vector dateVector = new Vector(); try { - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + int i, j=-1; + for ( i=0; i< events. size(); i++) + { +Notification_Event nEvt = (Notification_Event) events. get( i); +i -public String searchQueryID(String date) +void DeleteRelatedEvents() { -Vector queryVector = new Vector(); -String searchQuery = new String(); -try +while ( m_Deleterequirement List. size()!=0) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. get + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); + + m_Deleterequirement List. remove(0); - public String getConstraintFromDataBase(String queryID) + +void AddSubscription(String SubscriberName, Requirement requirement ) { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j +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 getDriverFromDataBase(String queryID) +void UpdateDisplayList() { -String driverString = new String(); -try +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) { - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -"81 ""subscribermanager + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -Socket aSocket; - int ID; - String EventLog; - Connection conn; - ResultSet rs; - 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 - // constructor, this object will be created in the main method of these class - SubscriberListener() { } - // constructor, this object will be created in the main method of these class - SubscriberListener(Socket socket, int ID, String ELog) + +private 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; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { - this. aSocket = socket; -this.ID = ID; -this.EventLog = ELog; try { + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: -} -public void sendImpactReportToEventServer(String text) + public void updateEvent(String str, String ID) { -//String impactReport = text; -System. out. println(""""WOW IN SEND REPORT""""); -System. out. println(""""The IR = """"+ text); -String serverIP = """"140. +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; -// run method will be execute from the main method when u say Thread. start() in main - public void run() +//Check if a subscription exists + public boolean CheckSubscription(String str) { -System. out. println(""""Inside Run method""""); -String str=""""""""; -try -{ +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next - // set up for reading the byte data in to characte // start of class from here - public static void main(String[] args) +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, 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: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 -"61 ""Worker Thread +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +//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 -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; +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 -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"89 ""Event Line -protected int top, left, right, bottom; +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 EventLine ( int t, int l, int r, int b) + public EventModel(EBT e) { -top = t; -left = l; -right = r; -bottom = b; -} - - -public int GetT() { return top;} - -public int GetL() { return left;} - -public int GetR() { return right;} +ebt = e; +CurrentEvent = -1; +NotifyButton = new JButton(""""Notify""""); +setLayout( null); +NotifyButton. setBounds(305,265,80,25); +MinimumNoRects = 1; +add -public int GetB() { return bottom;}"" -",89,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"92 ""New Model -public NewModel(EBT em) -{ -super( em); +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() -{ -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -"92 ""New Model - -public NewModel(EBT em) +public void drawModel() { -super( em); - } +repaint(); +} - // Construct Visual model for Merge Event -public void BuildEvent() +public void drawModel(EBShape sh) { -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; +EventShapes. setElementAt( sh, ESCursor); +repaint(); } -public StringBuffer GenerateEvent() +private void ClearData() { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"92 ""New Model - -public NewModel(EBT em) +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() -{ -ClearVectors(); -AddEventRect(60,80,1); -AddArrow(35,97,59,97); -CurrentEvent = 0; } -public StringBuffer GenerateEvent() +public void Clicked ( int x, int y) { -StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""New|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); -ebs = (EBShape)EventShapes. elem"" -",92,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -"74 ""database - - -QueryConnection conn=null; - ResultSet rs=null; - Statement stmt=null; - String mSQL=""""""""; - - Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure() - Variable v;// create this object and - - - /** - * Construct a connection object. - * @param Returns an object of type Connection - */ - public Connection getConnection() - { -System. out. println("""" in get Connection""""); -Connection connect=null; -try +int Hit = 0; +for ( int i = 0; i < EventShapes. 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 + ebs = (EBShape)EventShapes. elementAt( i); +if (( x >= ebs.GetX() && ( x <= ebs - /** -* 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 CheckNotifyStatus() { -conn = this. getConnect - +//Check if Minimum Standards have been met. +int j = 0; +for ( j = 0; j < MinimumNoRects; j++) +{ +ebs2 = (EBShape)EventShapes. elementAt( j); + if ((((( -/** -* 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 + protected void BuildEvent(){} -public void solveStructureEquation() - { -System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%""""); -//Based on that result find out the equation and replace the name by its value -System + protected void AddLine( int t, int l, int r, int b) +{ +EventLines. addElement( new EventLine( t, l, r, b)); +} -public void getTrackVariableName() +protected void AddEventRect( int x, int y, int colorStatus) +{ +if ( colorStatus == 1) +{ + EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + } + else { -System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$""""); -//This will get the variable name from SPE Graph and find the same name in variable -// and inse - +Even -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 getrequirement Text(String r, String p, String m) +{ +return new String(""""requirementwill go here""""); + } - public Vector getImpactReport() - { -//This SPE Graph works on the assumption that each model tracks -// the effect of changes on one variable -Vector report = new Vector(); -report. add( trackVariableName); -report. add(Stri"" -",74,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -"60 ""Thread Pool -/** -* The threads in the pool. -*/ -protected Thread threads[] = null; -/** -* The backlog of assignments, which are waiting -* for the thread pool. -*/ -Collection assignments = new ArrayList(3); + public StringBuffer GenerateEvent() +{ +return new StringBuffer("""" """"); + }// end of GenerateEvent method -/** -* A Done object that is /** - * The constructor. - * - * @param sizeHow many threads in the thread pool. - */ -public ThreadPool( int size) + protected void paintComponent(Graphics g) { -threads = new WorkerThread[ size]; -for ( int i=0; i< threads. length; i++) +super. paintComponent( g); +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 - - - /** -* Get a new work assignment. -* -* @return A new assignment -*/ - public synchronized Runnable getAssignment() - { -try { - while ( ! assignments. iterator(). hasNext() ) -wait(); - Runnable r = (Runnable) assignments. - - - /** -* Called to block the current thread until -* the thread pool has no more work. -*/ - public void complete() - { -done. waitBegin(); -done. waitDone(); - } protected void finalize() - { -done. reset(); -for ( int i=0; i< threads. length; i++) { - threads[ i]. interrupt(); - done. workerBegin(); - threads[ i]. destroy(); -} -done. waitDone(); - } -}"" -",60,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,The user shall update related artifacts according to the information contained in the event messages.,138,0 -"86 ""EB Shape - +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 -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +private String name = null; + private Vector driverVector = null; + private Vector constraintVector = null; + private long queryID = 0; -public EBShape( int xpos, int ypos, Color col) + public static int count = 0; + + 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() - { -return ModulePath; - }"" -",86,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) + public void addConstraint(ConstraintsDescription constraint) { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; +this. constraintVector. add( constraint); } - - public void Updaterequirement Info(String rno, String pname, String mname) + public boolean containsConstraint(ConstraintsDescription constraint) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); +return this. constraintVector. contains( constraint); } - - public boolean match( int mx, int my) + public void removeConstraint(ConstraintsDescription constraint) { -return true; +this. constraintVector. remove( constraint); } - - public int GetX() + public DriverDescription getDriver(DriverDescription driver) { -return x; - } - +DriverDescription dd = null; +for ( int i = 0; i < this. driverVector. size(); i++) +{ + dd = (DriverDescription) this. driverVector. get( i) - public int GetY() + public ConstraintsDescription getConstraint(ConstraintsDescription constraint) { -return y; - } - - public Color GetC() +ConstraintsDescription cd = null; +for ( int i = 0; i < this. constraintVector. size(); i++) { -return c; - } + cd = (ConstraintsDescription) this - public String GetReqno() + public long getQueryID() { -return requirement No; +return this. queryID; } - public String GetProject() + public void setQueryID( long id) { -return ProjectName; +this. queryID = id; } - - public String GetModule() + public String toString() { -return ModulePath; - }"" -",86,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,Event types shall include modifying a requirement.,124,0 -"72 ""Balance -/** - * Symbol represents what will be placed on the stack. - */ -private static class Symbol -{ -public chartoken; -public int theLine; - -public Symbol( char tok, int line ) -{ -token = /** - * Constructor. - * @param inStream the stream containing a program. - */ - - -public Balance( Reader inStream ) -{ -errors = 0; -tok = new Tokenizer( inStream ); -} - - -/** - * Print an error message for unbalanced symbols. - * @return number of errors detected. - */ -public int checkBalance( ) -{ -char ch; -Symbol match = null; -Stack pendingTokens = new Stack( ); - private Tokenizer tok; -private int errors; - - - /** - * Print an error message if clSym does not match opSym. - * Update errors. - */ -private void checkMatch( Symbol opSym, Symbol clSym ) -{ -if( opSym. token == '(' && clSym. token != ')' || - - - /** - * main routine for balanced symbol checker. - * Slightly different from text. - * If no command line parameters, standard input is used. - * Otherwise, files in command line are used. - */ -public static void main( St"" -",72,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 +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; @@ -77895,7 +78074,7 @@ public String GetSubscriberModule() { return SubscriberModule;} public String GetSubscriberKeyword1() { return SubscriberKeyword1;} public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 +",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 @@ -78019,23 +78198,71 @@ public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"" -",82,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -"54 ""eventserver +",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 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 ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 + + +public MergeModel(EBT em) { -p +super( em); + MinimumNoRects = 3; + } -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 + + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent + + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +StringBuffer temp = new StringBuffer(); +int MergeCount = -1; +thisEvent. append(""""Merge|""""); +for ( int i = 0; i < EventSha"" +",90,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 +Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of 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 String msg=""""""""; @@ -78053,7 +78280,9 @@ 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 +",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) @@ -78084,97 +78313,344 @@ thisEvent. append( new Date(). toString()+ """"|""""); g. drawString(""""TESTING MODIFY"""",5,5); super. paintComponent( g); }"" -",91,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"71 ""Requirement +",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 -public String m_RequirementID =""""""""; -public String m_Project =""""""""; -public String m_ModulePath=""""""""; -public String m_Content = """"""""; -public String m_RegFlag = """"N""""; +public RefineModel(EBT em) +{ +super( em); + } -public Requirement() + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() +{ +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Refine|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. el"" +",94,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +"93 ""Obsolete Model + +public ObsoleteModel(EBT em) +{ +super( em); + } + + +// Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + + +public StringBuffer GenerateEvent() + { +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Obsolete|0|""""); +thisEvent. append( new Date(). toString()+""""|""""); +ebs = (EBShape)EventShapes. e"" +",93,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 +Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager 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 + +//Driver data members + double avgShapeSize_Original; + double avgShapeSize_Speculate; + // constraints data members + double avgTextSize; + double writeTime; + double noShapes; + double noTextItems; + double bandWidth + + + public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ +this. driver = driver; +this. constraints = constraints; + }// end of constructor + + + + public String toString(){ + String result; + result = """" avgShapeSize_Original = """" + avgShapeSize_Original + +"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + +"""",\ navgTextSize = """" + avgTextSize + + +public void injectDrivers(){ +System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); +//To Do: Run for loop for more then one drivers +//To Do: have a case insensitive check for driver name and then populate the data member + + +public void injectConstraints(){ +System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); +//To Do: have a case insensitive check for constraints name and then populate the data member +//System. out. println( const + +public double timeToBroadcastShapeBefore(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++ + + + public double timeToBroadcastShapeAfter(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noShapes; i++){ + + + public double timeToBroadcastText(){ +System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); +double targetResponse time_ temp = 0.00; + for( int i=0; i< noTextItems; i++){ + target + + + public double writeTime(){ +System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); +System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); +System. out. println(""""\ t\ t\ tLEAVING w + + +public double targetResponseTimeBefore(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); +targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() + + +public double targetResponseTimeAfter(){ +System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); +targetResponse time = timeToBroadcastShapeAfter() + +timeToBroadcastText() + w"" +",84,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 +"66 ""Config Dialog + +public ConfigDialog(Notification_Processing parent, boolean modal) { +super ( parent, modal); + setTitle(""""Config Dialog Box""""); + getContentPane (). setLayout ( new GridLayout(5,2)); + + +private void closeDialog(WindowEvent evt) { +setVisible ( false); +dispose (); +} + + +// event listener for """"Ok"""" button +private void okButtonActionPerformed (ActionEvent evt) { + if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button + + +private void cancelButtonActionPerformed (ActionEvent evt) { +setVisible ( false); +dispose (); +} + +// configuration entries +private JLabel UserNameLabel; +private JTextField UserName; +private JLabel DSN Label; +private JTextField DSN; +private JLabel EventServerIP Label; +private JTextField EventSe"" +",66,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 +"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 Object clone() throws CloneNotSupportedException +// end of class Notification_Event +public Object clone() throws CloneNotSupportedException + { +// create new object with the same type +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + n + + + public void ParseEvent(String TextLine) + { +String msg = TextLine; +if( msg. startsWith(""""Re-execute"""") ) +{ + ModelDriver md = new ModelDriver( msg ); + md. init(); +//ToDo: +// divert all the calls fo + + +// Set the other members before calling this function + public void ParseLeftAndRightLists(String LeftLine, String RightLine) + { +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +if ( m_Eve //Comment Added by Amit Uchat + + + + //This method displays the contents of two array list to console +public void DisplayValues() +{ + System. out. println(""""\ r\ nValues of the event:\ r\ n""""); + System. out. println("""" "" +",78,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 + +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() { -Requirement requirement= (Requirement) super. clone(); -return requirement ; +return description; } - - public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) + public String getFromAttribute() { -this. m_RequirementID = RequirementID; -this. m_Project = Project; -this. m_ModulePath +return fromAttribute; + } -public void ParseRequirement(String TextLine) + public String getModulePath() { - StringTokenizer LineSt; -LineSt = new StringTokenizer(TextLine, """",""""); -m_RequirementID=LineSt. nextToken(); -m_Project=LineSt. "" -",71,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"52 ""Pair - -private String queryID; - private String queryString; - +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: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,118,0 -"54 ""eventserver + public void setToAttribute(String toAttribute) + { +this. toAttribute = toAttribute; + } -public static void (String args[]) + public String createKey() { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try +String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID; +return key. toLowerCase(); + } + + public boolean equals(Object o) { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) +if (!( o instance of DriverDescription)) + return false; +DriverDescription dd = (DriverDescription) o; +if ( dd. projectName. equalsIgnoreCase( this. projectName) + && ddpublic String toString() { -p -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 +String str = + """"\ nProject Name = """" ++ this. projectName ++ """"\ n"""" ++ """"Module Path = """" ++ this. modulePath ++ """"\ n"""" ++ """"Requirement ID = """" ++ this. requirementID ++ """"\ n"""" + + +public int hashCode() + { +int hashCode = 0; +if ( hashCode == 0) +{ + int result = 17; + result = 37 * result + this. projectName. hashCode(); + result = 37 * result + this. modulePath. hashCode(); + result = 37 "" +",50,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 "93 ""Obsolete Model public ObsoleteModel(EBT em) @@ -78199,8 +78675,8 @@ StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""""Obsolete|0|""""); thisEvent. append( new Date(). toString()+""""|""""); ebs = (EBShape)EventShapes. e"" -",93,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall be able to delete subscriptions.,107,0 +",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; @@ -78275,82 +78751,25 @@ try { Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,100,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall re execute the model using the speculative values.,117,0 -"84 ""White Board Execution Graph - -//Driver data members - double avgShapeSize_Original; - double avgShapeSize_Speculate; - // constraints data members - double avgTextSize; - double writeTime; - double noShapes; - double noTextItems; - double bandWidth - - - public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ -this. driver = driver; -this. constraints = constraints; - }// end of constructor - - - - public String toString(){ - String result; - result = """" avgShapeSize_Original = """" + avgShapeSize_Original + -"""",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate + -"""",\ navgTextSize = """" + avgTextSize - - -public void injectDrivers(){ -System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD""""); -//To Do: Run for loop for more then one drivers -//To Do: have a case insensitive check for driver name and then populate the data member - - -public void injectConstraints(){ -System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""""); -//To Do: have a case insensitive check for constraints name and then populate the data member -//System. out. println( const - -public double timeToBroadcastShapeBefore(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++ - - - public double timeToBroadcastShapeAfter(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noShapes; i++){ - - - public double timeToBroadcastText(){ -System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD""""); -double targetResponse time_ temp = 0.00; - for( int i=0; i< noTextItems; i++){ - target - - - public double writeTime(){ -System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD""""); -System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime); -System. out. println(""""\ t\ t\ tLEAVING w +",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 +String msg=""""""""; -public double targetResponseTimeBefore(){ -System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""""); -targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() +public ModelDriver(String text) + { +this. msg = text; +init(); + } -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 + public void init() + { +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,0 "84 ""White Board Execution Graph //Driver data members @@ -78423,381 +78842,138 @@ public double targetResponseTimeAfter(){ System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""""); targetResponse time = timeToBroadcastShapeAfter() + timeToBroadcastText() + w"" -",84,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,156,0 -"47 ""Impact Report +",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 private String server IP = """" local host """"; - private JPanel center Panel = null ; - - private JPanel driver Panel = new JPanel (); - - private JPanel driver Inner Panel = null ; - - private JPanel impact Panel = null ; - private JPanel impact Inner P - - public Impact Report () - { - - super ("""" Search Result GUI """"); - - container = get Content Pane (); - - set Size ( 800 , 250 ); - - panel = new JPanel (); - - panel . set Layout ( null ); - - this . server IP = - JOption Pane - . show In - - - public static void main ( String [] args ) - { - - Impact Report im = new Impact Report (); - - } - - - public Vector search Date () - { - - date Vector = new Vector (); - date Vector . add ("""" Select Query Date """"); - Socket server ; - String line = new String (); - try - { - - server = new Socket ( server IP , 1701 ); - if ( server . is C public void search Query ID ( String date ) - { - - pair Vector = new Vector (); - - query String Combo . remove All Items (); - - query String Combo . add Item ("""" Select Query String """"); - - Socket server ; - String line = new String (); - - - // Select Actions - - public void action Performed ( Action Event e ) - { - - if ( date Combo == ( JCombo Box ) e . get Source ()) - { - date = ( String ) date Combo . get Selected Item (); - search Query ID ( date ); - } - } - - // Button Actions - - -public void action Performed ( Action Event e ) { - - if ( submit Button == e . get Source ()) { - - for ( int i = 0 ; i < pair Vector . size (); i ++) { - - Pair pair = ( Pair ) pair Vector . get ( i ); - - if ( pair - . get - - - - public void impact Report ( String id ) - { - - // super ("""" Impact Report """"); - - container = get Content Pane (); - - set Size ( 1020 , 740 ); - - this . query ID = id ; - - System . out . println ("""" Impact Report Constructor ..... ID """" + - - - public Vector get Constraint From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered - - - - public Vector get Driver From Data Base () - { - - Vector v = new Vector (); - - Socket server ; - String line = new String (); - - try - { - server = new Socket ( server IP , 1701 ); - - if ( server . is Connected () ) - { - Buffered"" -",47,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall restore the executable model to its prior state.,119,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"56 ""Event Parser - -private Connection conn; - private ResultSet rs; - private Statement stmt; - - //EventParser Constructor - // initializes the Database connection - public EventParser() - { -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - this. conn = DriverManager. getConnection("""" jdbc: odbc: - - - public void updateEvent(String str, String ID) - { -String mProject; -String mEvent; -String mType; -String mNum; -String mrequirement ; -String mModule; -String mSQL; -String mDate; -String mReqtext; - - -//Check if a subscription exists - public boolean CheckSubscription(String str) - { - -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Message type = tokens. nextToken(); -String SubscriberName = tokens. next - - -//Insert a subscription into the """"Subscription"""" table - public void AddSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag - - -//DeleteSubscription from the """"Subscription"""" table - public void DeleteSubscription(String str, int ID) - { -// Parse the message string and get the fields -StringTokenizer tokens = new StringTokenizer( str, """"|""""); -String Messag //Speculate method will receive a string from the Speculative GUI - // tool and parse it using CallBack class to identify the - // performance models - - - public void speculate(String str) - { -System. out. println(""""Speculate""""); -CallBack - - -public void impactReport(String str) - { -CallBack cb = new CallBack(); -cb. parseImpactReport( str); - }// end impactReport()"" -",56,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,143,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The eventserver shall identify all related requirements and constraints for each impacted executable model.,133,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"54 ""eventserver - -public static void (String args[]) - { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; - try - { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 -"61 ""Worker Thread - -/** -* True if this thread is currently processing. - */ -public boolean busy; - -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; - - -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) -{ -owner = o; -} - - -/** - * Scan for and execute tasks. - */ -public void run() -{ -Runnable target = null; + 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 -do -{ -target = owner. getAssignment(); -if ( target!=null) -{ - target. run(); - owner. done. worker"" -",61,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"75 ""Driver + 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 -String id; - double valueFrom; - double valueTo; - String name; Driver(String id, double valueFrom, double valueTo, String name) + +private void set goal Label Values ( + String attribute , + String logic , + String value , + String units ) { -this. id = id; -this. valueFrom = valueFrom; -this. valueTo = valueTo; -this. name = name; + goal Label . set Text ( + """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units ); + } - public String toString() +public Vector get Values From Data Base () { -String temp; -temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; -return temp; - } + Vector v = new Vector (); + Socket server ; + String line = new String (); + try + { + server = new Socket ( server IP , 1701 ); - /** -* Returns the id. -* @return int -*/ - public String getId() - { -return id; - } + if ( server . is Connected () ) + { + Buffered R - /** -* Returns the name. -* @return String -*/ - public String getName() + private void set impacted Label Value ( + String attribute , + String value , + String impacted Value , + String units , + String logic ) { -return name; - } + if ( impacted Value ! = null ) + { + double value 1 = Double . parse Double ( value ); + d - /** -* Returns the value. -* @return double -*/ - public double getValueFrom() + +public JPanel get Panel () { -return valueFrom; - } + 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 +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 - public double getValueTo() - { -return valueTo; - } +private GridBagLayout grid bag; +private GridBagConstraints c; +// objects in top panel +private JPanel topPanel; +private JLabel modelLabel; +private JLabel typeLabel; +private JTextField modelField; +p - /** -* Sets the id. -* @param id The id to set -*/ - public void setId(String id) - { -this. id = id; - } +public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) +{ + +super ( parent, modal); + setTitle(""""Event Details""""); + getContentPane (). setLayout (private void closeDialog(WindowEvent evt) +{ +setVisible ( false); +dispose (); +} // event listener for """"Ok/Update"""" button - ** -* Sets the name. -* @param name The name to set -*/ - public void setName(String name) +private void okButtonActionPerformed (ActionEvent evt) +{ + if ( displayMode == true) { -this. name = name; - } +// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ - ** -* Sets the value. -* @param value The value to set -*/ - public void setValueFrom( double value) - { -this. valueFrom = valueFrom; - } +// event listener for """"Cancel"""" button +private void cancelButtonActionPerformed (ActionEvent evt) +{ +setVisible ( false); +dispose (); +} - public void setValueTo( double value) - { -this. valueTo = valueTo; - }"" -",75,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,0 +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 ModifyModel(EBT em) @@ -78828,148 +79004,9 @@ thisEvent. append( new Date(). toString()+ """"|""""); g. drawString(""""TESTING MODIFY"""",5,5); super. paintComponent( g); }"" -",91,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; - - /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. -*/ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException - -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. -*/ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); - } -} catch ( InterruptedException e - - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. -*/ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); - } - - - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() - { -_ activeThreads = 0; - }"" -",59,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,0 -"private JPanel center Panel = null ; - - private JLabel des Label = null ; - private JLabel change Label = null ; - private JLabel from Label = null ; - private JLabel to Label = null ; - private JText Area des Text = null ; - private JText Field c - - // Speculate Gui - - public Speculate Gui () - { - - super ("" Speculate GUI ""); - - container = get Content Pane (); - - set Size ( 800 , 600 ); - - this . event Server IP = - JOption Pane - . show Input Dialog ("" Please Enter the IP Address of eventserver - - - // Submit Listener - - public void action Performed ( Action Event e ) { - - if ( e . get Source () == submit Button ) { - - send Query TO Server (); - - } - - if ( e . get Source () == fetch Button ) { - - - System . out . println ("" Fetch Button Pressed - - - void send Query TO Server () - { - - String ip = this . event Server IP ; - int Port No = 1701 ; - - Socket socket ; - try { - - socket = new Socket ( ip , Port No ); - - Output Stream os = socket . get Output Stream (); - Output Stream - - public void pull Value From DOORS () - { - - String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - - String [] attribute = { "" Value "", "" Attribute "" }; - - String project Name = this . proj Name Text . get - - - public static void main ( String [] args ) - { - new Speculate Gui (); - }",46,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 +",91,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its 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 ModifyModel(EBT em) @@ -79000,562 +79037,449 @@ thisEvent. append( new Date(). toString()+ """"|""""); g. drawString(""""TESTING MODIFY"""",5,5); super. paintComponent( g); }"" -",91,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,0 -"86 ""EB Shape - - -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; - - -public EBShape( int xpos, int ypos, Color col) - { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } - +",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 - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +String id; + String name; + double value; + String logic; - public boolean match( int mx, int my) - { -return true; + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; } - public int GetX() - { -return x; + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - public int GetY() - { -return y; - } - - public Color GetC() -{ -return c; + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public String GetReqno() - { -return requirement No; - } - public String GetProject() - { -return ProjectName; + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; } - public String GetModule() - { -return ModulePath; - }"" -",86,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"52 ""Pair - -private String queryID; - private String queryString; - - - public Pair(String queryID, String queryString) { - -this. queryID = queryID; -this. queryString = queryString; - + /** +* Returns the name. +* @return String +*/ + public String getName() { +return name; } - public String getQueryID() { -return this. queryID; + /** +* Returns the value. +* @return double +*/ + public double getValue() { +return value; } - public String getQueryString() { -return this. queryString; - } - public void setQueryID(String queryID) { -this. queryID = queryID ; + /** +* Sets the id. +* @param id The id to set +*/ + public void setId(String id) { +this. id = id; } - public void setQueryString(String queryString) { -this. queryString = queryString; + ** +* Sets the logic. +* @param logic The logic to set +*/ + public void setLogic(String logic) { +this. logic = logic; } - public String toString(){ -return """"Query ID: """" -+ this. queryID -+ """"\ n"""" -+""""Query String : """" -+ this. queryString -+ """"\ n""""; - - - }"" -",52,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"69 ""Notification Event - -public String m_SubscriberName = """"""""; -public String m_EventID = """"""""; -public String m_Message type = """"""""; -public String m_EventType = """"""""; -public int m_NumberOfRequirements = 0; -public String m_EventTim - -public Notification_Event() -{ - m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); -} - - -public Object clone() throws CloneNotSupportedException - { -Notification_Event nEvt = (Notification_Event) super. clone(); - nEvt. m_LeftSide = new ArrayList(); - nEvt. m_RightSide = new ArrayLis - - - public void ParseEvent(String TextLine) - { - StringTokenizer LineSt; // Tokenizer for the line -int i=0; -LineSt = new StringTokenizer(TextLine, """"|""""); -m_SubscriberName = LineSt. nextToken// Set the other members before calling this function - - - public void ParseLeftAndRightLists(String LeftLine, String RightLine) - { -m_LeftSide = new ArrayList(); - m_RightSide = new ArrayList(); - -if ( m_Eve - -public void DisplayValues() -{ - System. out. println(""""\ r\ nValues of the event:\ r\ n""""); - System. out. println("""" m_SubscriberName: """"+ m_SubscriberName); - System. out. println("""" m_EventI"" -",69,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,131,0 -Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,101,0 -"67 ""Event Detail Dialog - -private GridBagLayout grid bag; -private GridBagConstraints c; -// objects in top panel -private JPanel topPanel; -private JLabel modelLabel; -private JLabel typeLabel; -private JTextField modelField; -p - - -public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode) -{ -super ( parent, modal); - setTitle(""""Event Details""""); - getContentPane (). setLayout (private void closeDialog(WindowEvent evt) -{ -setVisible ( false); -dispose (); -} // event listener for """"Ok/Update"""" button + /** +* Sets the name. +* @param name The name to set +*/ + public void setName(String name) { +this. name = name; + } -private void okButtonActionPerformed (ActionEvent evt) -{ - if ( displayMode == true) - { -// m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_ + /** +* 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 +private String project Name = null ; + private String module Path = null ; + private String requirement ID = null ; -// event listener for """"Cancel"""" button -private void cancelButtonActionPerformed (ActionEvent evt) -{ -setVisible ( false); -dispose (); -} + private String value = null ; + private String logic = null ; + private String units = null ; + private String description = null ; -private void LeftListClicked(MouseEvent e){ - if (!LeftList. isSelectionEmpty()) { - int index = LeftList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_LeftSide + public Constraints Description ( + String project Name , + String module Path , + String requirement ID ) + { + this . project Name = project Name ; + this . module Path = module Path ; + this . requirement ID = requirement ID ; -private void RightListClicked(MouseEvent e){ - if (!RightList. isSelectionEmpty()) { - int index = RightList. getSelectedIndex(); - Requirement requirement= (Requirement) m_Evt. m_RightS"" -",67,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",146,0 -"82 ""Tokenizer + } -/** - * Constructor. - * @param inStream the stream containing a program. - */ -public Tokenizer( Reader inStream ) -{ -errors = 0; -ch = '\0'; -currentLine = 1; -in = new PushbackReader + public String get Description () { + return this . description ; + } + public String get Logic () { + return this . logic ; + } -/** - * Gets current line number. - * @return current line number. - */ -public int getLineNumber( ) -{ -return currentLine; -} + public String get Module Path () { + return this . module Path ; + } + public String get Project Name () { + return this . project Name ; + } -/** - * Gets error count. - * @return error count. - */ -public int getErrorCount( ) -{ -return errors; -} + public String get Requirement ID () { + return this . requirement ID ; + } + public String get Units () { + return this . units ; + } -/** - * 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 Value () { + return this . value ; + } + public void set Description ( String description ) { + this . description = description ; + } + public void set Logic ( String logic ) { + this . logic = logic ; + } - /** - * Return true if ch can be part of a Java identifier - */ -private static final boolean isIdChar( char ch ) -{ -return Character. isJavaIdentifierPart( ch ); -} + 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 ; + } -/** - * Return an identifier read from input stream - * First character is already read into ch - */ -private String getRemainingString( ) -{ -String result = """""""" + ch; + public void set Requirement ID ( String requirement ID ) { + this . requirement ID = requirement ID ; + } -for( ; nextChar( ); result += ch ) + 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 ; + } - /** - * 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 Impacted Constraint ( String impacted Constraint ) { + this . impacted Constraint = impacted Constraint ; + } + public String get Attribute () { + return this . attribute ; + } -/** - * 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 Attribute ( String attribute ) { + this . attribute = attribute ; + } + public String get Performance Model Name () { + return this . performance Model 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 Performance Model Name ( String performance Model Name ) { + this . performance Model Name = performance Model Name ; + } + public String to String () { -/** - * Precondition: We are about to process a quote; have already seen - * beginning quote. - * Post condition: Stream will be set immediately after - * matching quote - */ + String str = + """"\ n Project Name = """" + + this . project Name + + """"\ n """" + + """" Module Path = """" + + this . module Path + + """"\ n """" + + """" Requirement ID = """" + + this . requirement ID + + """"\ n """" -private void skip +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 -/** - * After the opening slash is seen deal with next character. - * If it is a comment starter, process it; otherwise put back - * the next character if it is not a new line. - */ -private void processSlash( ) -{ -ifpublic static final int SLASH_SLASH = 0; -public static final int SLASH_STAR= 1; -private PushbackReader in;// The input stream -private char ch;// Current character -private int currentLine;//"" -",82,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -"94 ""Refine Model -public RefineModel(EBT em) +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 + +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 = 3; -} +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve + public StringBuffer GenerateEvent() -{ + { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Refine|0|""""); +thisEvent. append(""""Obsolete|0|""""); thisEvent. append( new Date(). toString()+""""|""""); -ebs = (EBShape)EventShapes. el"" -",94,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,A subscribermanager shall manage traces for one or more artifacts.,112,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -"68 ""Events Processor -// event list - private JList eventList; - private DefaultListModel listModel; - private ArrayList events; - - // popup menu - private JPopupMenu popup; - // Subscriber name - String m_SubscriberName; - // list of requirements to be d - - public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) - { - setTitle(""""EventsProcessor""""); +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 -addWindowListener( new WindowAdapter() +public NewModel(EBT em) { +super( em); + } - public void windowClosing(WindowEve void exitApplication() { -m_ parent.UpdateDisplayList(); - this. setVisible( false); - this. dispose(); + // Construct Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; } -// action for """" double click on Event List"""" - private void doubleClickEventList (MouseEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) +public StringBuffer GenerateEvent() { - try - { -Notification +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 +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; -// action for """"Open First Record"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) - { -if (! listModel. isEmpty()) +public Requirement() { - int index =0; - try +} + +public Object clone() throws CloneNotSupportedException { -Notification_Event nEvt1 = (Notificati +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -/ action for """"View Current Record"""" in popup menu - private void popupViewActionPerformed (ActionEvent evt) - { -int index = eventList. getSelectedIndex(); -if ( index != -1) -{ - try + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { -N +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -void DeleteEvent(String SubscriberName, String EventID) - { -try -{ - int i, j=-1; - for ( i=0; i< events. size(); i++) +public void ParseRequirement(String TextLine) { -Notification_Event nEvt = (Notification_Event) events. get( i); -i - + 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 -void DeleteRelatedEvents() - { -while ( m_Deleterequirement List. size()!=0) +public NewModel(EBT em) { - Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - - m_Deleterequirement List. remove(0); - +super( em); + } -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 Visual model for Merge Event +public void BuildEvent() +{ +ClearVectors(); +AddEventRect(60,80,1); +AddArrow(35,97,59,97); +CurrentEvent = 0; +} -void UpdateDisplayList() - { -listModel. removeAllElements(); -for ( int j=0; j< events. size(); j++) +public StringBuffer GenerateEvent() { - Notification_Event nEvt = (Notification_Event) events. get( j); - String displayStri - +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 - // 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 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(); -private boolean Analyze_CheckSubscription(String str) -{ -StringTokenizer tokens = new StringTokenizer( str,""""|""""); -String Messag"" -",68,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,142,0 -"63 ""Doors Thread +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { -static private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; - private Connection conn; - private Statement stmt; - private ResultSet rs; +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 +String msg=""""""""; - DOORsThread(ServerSocket ss) +public ModelDriver(String text) { - theServer = ss; - count++; - taskNumber = count; +this. msg = text; +init(); } - public void run() - { - - while( true) - { - try + public void init() { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P"" -",63,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 -Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,137,0 -"73 ""Constraints +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 String id; - String name; - double value; - String logic; - - - Constraints(String id, String name, double value, String logic){ + double valueFrom; + double valueTo; + String name; Driver(String id, double valueFrom, double valueTo, String name) + { this. id = id; +this. valueFrom = valueFrom; +this. valueTo = valueTo; this. name = name; -this. value = value; -this. logic = logic; } - public String toString(){ - String temp; - temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; - return temp; + public String toString() + { +String temp; +temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name; +return temp; } - /** * Returns the id. * @return int */ - public String getId() { + public String getId() + { return id; } - /** -* Returns the logic. -* @return String -*/ - public String getLogic() { -return logic; - } - - /** * Returns the name. * @return String */ - public String getName() { + public String getName() + { return name; } + /** * Returns the value. * @return double */ - public double getValue() { -return value; + public double getValueFrom() + { +return valueFrom; + } + + + public double getValueTo() + { +return valueTo; } @@ -79563,274 +79487,225 @@ 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: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber 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 +",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 -/** -* True if this thread is currently processing. - */ -public boolean busy; -/** - * The thread pool that this object belongs to. - */ -public ThreadPool owner; +public MergeModel(EBT em) + { +super( em); + MinimumNoRects = 3; + } -/** - * The constructor. - * - * @param o the thread pool - */ -WorkerThread(ThreadPool o) + // Construct Visual model for Merge Event +public void BuildEvent() { -owner = o; -} + ClearVectors(); +AddEventRect(90,220,1); + AddEventRect(20,20,1); +AddEventRect(20,70,1); +AddEvent -/** - * Scan for and execute tasks. - */ -public void run() +public StringBuffer GenerateEvent() { -Runnable target = null; +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 -do -{ -target = owner. getAssignment(); -if ( target!=null) +public ObsoleteModel(EBT em) { - target. run(); - owner. done. worker"" -",61,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",165,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,On receipt of an event message the eventserver shall record the event in an eventlog.,128,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,The user shall be able to construct speculative queries using a GUI.,115,0 -"66 ""Config Dialog +super( em); + } -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); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -private void closeDialog(WindowEvent evt) { -setVisible ( false); -dispose (); -} +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 +"52 ""Pair -// 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 queryID; + private String queryString; -private void cancelButtonActionPerformed (ActionEvent evt) { -setVisible ( false); -dispose (); -} + public Pair(String queryID, String queryString) { -// configuration entries -private JLabel UserNameLabel; -private JTextField UserName; -private JLabel DSN Label; -private JTextField DSN; -private JLabel EventServerIP Label; -private JTextField EventSe"" -",66,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,0 -Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,155,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 -Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,145,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,108,0 -"58 ""Subscribed Model +this. queryID = queryID; +this. queryString = queryString; -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 getQueryID() { +return this. queryID; + } -public String GetSubscriberName() { return SubscriberName;} + public String getQueryString() { +return this. queryString; + } -public String GetSubscriberReqno() { return SubscriberReqno;} + public void setQueryID(String queryID) { +this. queryID = queryID ; + } -public String GetSubscriberModule() { return SubscriberModule;} + public void setQueryString(String queryString) { +this. queryString = queryString; + } -public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; -public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" -",58,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,129,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The prototype system shall utilize a driver to trigger events.,120,0 -"49 ""Constraints Description -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; + }"" +",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 String value = null ; - private String logic = null ; - private String units = null ; - private String description = 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 Constraints Description ( - String project Name , - String module Path , - String requirement ID ) + public Speculate Gui () { - this . project Name = project Name ; - this . module Path = module Path ; - this . requirement ID = requirement ID ; - - } + super ("" Speculate GUI ""); + container = get Content Pane (); - public String get Description () { - return this . description ; - } + set Size ( 800 , 600 ); - public String get Logic () { - return this . logic ; - } + this . event Server IP = + JOption Pane + . show Input Dialog ("" Please Enter the IP Address of eventserver - public String get Module Path () { - return this . module Path ; - } - public String get Project Name () { - return this . project Name ; - } + // Submit Listener - public String get Requirement ID () { - return this . requirement ID ; - } + public void action Performed ( Action Event e ) { - public String get Units () { - return this . units ; - } + if ( e . get Source () == submit Button ) { - public String get Value () { - return this . value ; - } + send Query TO Server (); - public void set Description ( String description ) { - this . description = description ; - } + } - public void set Logic ( String logic ) { - this . logic = logic ; - } + if ( e . get Source () == fetch Button ) { - 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 ; - } + System . out . println ("" Fetch Button Pressed - public void set Requirement ID ( String requirement ID ) { - this . requirement ID = requirement ID ; - } - public void set Units ( String units ) { - this . units = units ; - } + void send Query TO Server () + { - public void set Value ( String units ) { - this . value = units ; - } + String ip = this . event Server IP ; + int Port No = 1701 ; - public String get Impacted Constraint () { - return this . impacted Constraint ; - } + Socket socket ; + try { - public void set Impacted Constraint ( String impacted Constraint ) { - this . impacted Constraint = impacted Constraint ; - } + socket = new Socket ( ip , Port No ); - public String get Attribute () { - return this . attribute ; - } + Output Stream os = socket . get Output Stream (); + Output Stream - public void set Attribute ( String attribute ) { - this . attribute = attribute ; - } + public void pull Value From DOORS () + { - public String get Performance Model Name () { - return this . performance Model Name ; - } + String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 ""; - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } + String [] attribute = { "" Value "", "" Attribute "" }; - public String to String () { + String project Name = this . proj Name Text . get - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" + 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 -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 RefineModel(EBT em) +{ +super( em); + } + // Construct Visual model for Merge Event +public void BuildEvent() +{ + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,A subscribermanager shall manage traces for one or more artifacts.,112,0 +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: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by 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 public String m_RequirementID =""""""""; @@ -79862,79 +79737,235 @@ 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 -"86 ""EB Shape +",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. + */ +public boolean busy; -private int x, y; - private String requirement No; - private String ProjectName, ModulePath; -private Color c; +/** + * The thread pool that this object belongs to. + */ +public ThreadPool owner; -public EBShape( int xpos, int ypos, Color col) +/** + * The constructor. + * + * @param o the thread pool + */ +WorkerThread(ThreadPool o) +{ +owner = o; +} + + +/** + * Scan for and execute tasks. + */ +public void run() +{ +Runnable target = null; + +do +{ +target = owner. getAssignment(); +if ( target!=null) +{ + target. run(); + owner. done. worker"" +",61,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",152,0 +Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. 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; + + //EventParser Constructor + // initializes the Database connection + public EventParser() { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } +try +{ + Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); + this. conn = DriverManager. getConnection("""" jdbc: odbc: + + + public void updateEvent(String str, String ID) + { +String mProject; +String mEvent; +String mType; +String mNum; +String mrequirement ; +String mModule; +String mSQL; +String mDate; +String mReqtext; + + +//Check if a subscription exists + public boolean CheckSubscription(String str) + { + +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Message type = tokens. nextToken(); +String SubscriberName = tokens. next + + +//Insert a subscription into the """"Subscription"""" table + public void AddSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag + + +//DeleteSubscription from the """"Subscription"""" table + public void DeleteSubscription(String str, int ID) + { +// Parse the message string and get the fields +StringTokenizer tokens = new StringTokenizer( str, """"|""""); +String Messag //Speculate method will receive a string from the Speculative GUI + // tool and parse it using CallBack class to identify the + // performance models + + + public void speculate(String str) + { +System. out. println(""""Speculate""""); +CallBack + + +public void impactReport(String str) + { +CallBack cb = new CallBack(); +cb. parseImpactReport( str); + }// end impactReport()"" +",56,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,0 +Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted 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 + +private String SubscriberName; +private String SubscriberReqno; +private String SubscriberModule; +private String SubscriberKeyword1; +private String SubscriberKeyword2; + +public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2) +{ +SubscriberName = sn; +SubscriberReqno = sr; +SubscriberModule = sm; +SubscriberKeyword1 = sk1; +SubscriberKeyword2 = s + +public String GetSubscriberName() { return SubscriberName;} + +public String GetSubscriberReqno() { return SubscriberReqno;} + +public String GetSubscriberModule() { return SubscriberModule;} + +public String GetSubscriberKeyword1() { return SubscriberKeyword1;} + +public String GetSubscriberKeyword2() { return SubscriberKeyword2;}"" +",58,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,0 +Test case: Delete subscriptions (2.2.3) 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. + */ - public void Updaterequirement Info(String rno, String pname, String mname) - { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); - } +public Balance( Reader inStream ) +{ +errors = 0; +tok = new Tokenizer( inStream ); +} - public boolean match( int mx, int my) - { -return true; - } +/** + * 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 GetX() - { -return x; - } + /** + * 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 GetY() - { -return y; - } + /** + * 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 - public Color GetC() -{ -return c; - } +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 GetReqno() - { -return requirement No; - } + String projectName, +String modulePath, +String requirementID, +String description, +String changeAttribute, +String fromValue, +String toValue) { - public String GetProject() - { -return ProjectName; - } +panel = new JPanel(); +panel. setBackground(Color.LIGHTpublic JPanel createPanel() { - public String GetModule() - { -return ModulePath; +return panel; }"" -",86,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,157,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,105,0 -"91 ""Modify Model +",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 -public ModifyModel(EBT em) + +public DecomposeModel(EBT em) { super( em); +MinimumNoRects = 3; } @@ -79942,381 +79973,237 @@ super( em); public void BuildEvent() { ClearVectors(); -AddEventRect(60,80,1); -CurrentEvent = 4; -} +AddEventRect(20,20,1); +AddEventRect(60,70,1); +AddEventRect(60,120,1); +AddEventRect + public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); -thisEvent. append(""""Modify|0|""""); -thisEvent. append( new Date(). toString()+ """"|""""); - ebs = (EBShape)EventShapes - - - protected void paintComponent(Graphics g) -{ -g. drawString(""""TESTING MODIFY"""",5,5); -super. paintComponent( g); - }"" -",91,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,144,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. -*/ - private int _ activeThreads = 0; +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; - /** -* 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. -*/ + // popup menu + private JPopupMenu popup; + // Subscriber name + String m_SubscriberName; + // list of requirements to be d - synchronized public void waitDone() + public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName) { -try { - while ( _ activeThreads>0 ) { -wait(); - } -} catch ( InterruptedException + setTitle(""""EventsProcessor""""); -/** -* 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 +addWindowListener( new WindowAdapter() +{ -/** -* 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 windowClosing(WindowEve void exitApplication() { +m_ parent.UpdateDisplayList(); + this. setVisible( false); + this. dispose(); +} - /** -* Called by a Worker object to -* indicate that it has completed a -* workload. -*/ - synchronized public void workerEnd() +// action for """" double click on Event List"""" + private void doubleClickEventList (MouseEvent evt) { -_ activeThreads--; -notify(); - } - - - /** -* Called to reset this object to -* its initial state. -*/ - synchronized public void reset() +int index = eventList. getSelectedIndex(); +if ( index != -1) +{ + try { -_ activeThreads = 0; - }"" -",59,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,149,0 -"54 ""eventserver +Notification -public static void (String args[]) + +// action for """"Open First Record"""" in popup menu + private void popupOpenActionPerformed (ActionEvent evt) { -ThreadPool pool = new ThreadPool(1); - int port = defaultPort; +if (! listModel. isEmpty()) +{ + int index =0; try { - ServerSocket ss = new ServerSocket( port); - for( int i=0; i<4; i++) - { -p - -public final static int defaultPort = 1701; - ServerSocket theServer;"" -",54,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,0 -"49 ""Constraints Description - -private String project Name = null ; - private String module Path = null ; - private String requirement ID = null ; - - private String value = null ; - private String logic = null ; - private String units = null ; - private String description = null ; +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 ; - - } - - - 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 ; - } +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 Attribute ( String attribute ) { - this . attribute = attribute ; - } - public String get Performance Model Name () { - return this . performance Model Name ; - } +void DeleteRelatedEvents() + { +while ( m_Deleterequirement List. size()!=0) +{ + Requirement requirement= (Requirement)( m_Deleterequirement List. get(0)); - public void set Performance Model Name ( String performance Model Name ) { - this . performance Model Name = performance Model Name ; - } + m_Deleterequirement List. remove(0); - public String to String () { - String str = - """"\ n Project Name = """" - + this . project Name - + """"\ n """" - + """" Module Path = """" - + this . module Path - + """"\ n """" - + """" Requirement ID = """" - + this . requirement ID - + """"\ n """" +void 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 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 UpdateDisplayList() + { +listModel. removeAllElements(); +for ( int j=0; j< events. size(); j++) +{ + Notification_Event nEvt = (Notification_Event) events. get( j); + String displayStri -public int hash Code () { - int hash Code = 0 ; - if ( hash Code == 0 ) { - int result = 17 ; - result = 37 * result + this . project Name . hash Code (); - result = 37 * result + this . module Path . hash Code (); - result = 37 * "" -",49,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 -Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,158,The user shall be able to delete subscriptions.,107,0 -Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,The eventserver shall send the customized message to each impacted executable model.,136,0 -"57 ""Event Notifier -// Variables to process the requirement - private String requirement No;//Requirement No. - private String ProjName; //Project name - private String ModPath;//Modular path - private String requirement Text;/ + // 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 EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType) - { -requirement No = rno;//Requirement number -ProjName = proj;// project name -ModPath = mo -// finds the subscribers for this requirement - public void IdentifySubscribers() - { -String mSQL; -// Create an SQL statement that will limit the selection as much as possible -// If a subscription is to a specific requirement - check for requi +private 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 -//Reads the result from IdentifySubscribers method selection - // and adds each result into ActualSubscribers Vector. - void ProcessResultSet() - { +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p -String sName, sReqno, sModule, sKey1, sKey2; -try +public TextModel(EBT e) { - System. o + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement - // Send messages to all subscribers listed in ActualSubscriber Vector -// Possible that a sort routine can be added later so that all notification to -// the same subscribermanager can be batched.This is not implemented yet. - public void Dispatch + public void 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 String getErrorMessage() - { - return errMsg; - } +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} +public void drawModel() +{ +repaint(); +} - public boolean Contains(String ContextString, String SearchString) - { -int cLen = ContextString. length(); -int sLen = SearchString. length(); -if (SearchString. length() == 0) - return false; -for ( int i = 0"" -",57,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -"55 ""eventserver Threadstatic private int count = 0; - private int taskNumber; - protected Done done; - ServerSocket theServer; +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); - private Connection conn; - private Statement stmt; - private ResultSet rs; - private EventParser ep; - private int id; +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 - EventServerThread(ServerSocket ss) - { - theServer = ss; - count++; - taskNumber = count; - ep = new EventParser(); - } public void run() - { +private String queryID; + private String queryString; - while( true) - { - try - { -Socket client = theServer. accept(); -BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream())); -PrintWriter output = new P + public Pair(String queryID, String queryString) { -public String getNextID() - { -try -{ -Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); -this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT""""); -this. stmt = conn +this. queryID = queryID; +this. queryString = queryString; + } -public String searchDate() - { -String dateString = new String(); -Vector dateVector = new Vector(); -try -{ - Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver""""); - Connection conn = DriverManager. getConnectio + public String getQueryID() { +return this. queryID; + } + public String getQueryString() { +return this. queryString; + } -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 setQueryID(String queryID) { +this. queryID = queryID ; + } + public void setQueryString(String queryString) { +this. queryString = queryString; + } - public String getConstraintFromDataBase(String queryID) - { -String ConstString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" j + public String toString(){ +return """"Query ID: """" ++ this. queryID ++ """"\ n"""" ++""""Query String : """" ++ this. queryString ++ """"\ n""""; - public String getDriverFromDataBase(String queryID) - { -String driverString = new String(); -try -{ - Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver""""); - conn = DriverManager. getConnection("""" jdbc "" -",55,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 -Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,Event types shall include adding new requirements.,121,0 + }"" +",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 private String server IP = """" local host """"; @@ -80382,471 +80269,662 @@ public JPanel get Panel () { return panel ; }"" -",48,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The eventserver shall differentiate between evolutionary and speculative events.,130,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,109,0 -Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,141,For speculative events; the eventserver shall construct a composite event message.,132,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,135,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,For speculative events; the eventserver shall construct a composite event message.,132,0 -"86 ""EB Shape +",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 +"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) + private JPanel impact Panel = null ; + private JPanel impact Inner P + + public Impact Report () { -x = xpos; -y = ypos; -c = col; -requirement No = """"""""; -ProjectName = """"""""; -ModulePath = """"""""; - } + super ("""" Search Result GUI """"); - public void Updaterequirement Info(String rno, String pname, String mname) + 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 ) { -requirement No = rno. trim(); -ProjectName = pname. trim(); -ModulePath = mname. trim(); + + Impact Report im = new Impact Report (); + } - public boolean match( int mx, int my) + public Vector search Date () { -return true; - } + date Vector = new Vector (); + date Vector . add ("""" Select Query Date """"); + Socket server ; + String line = new String (); + try + { - public int GetX() + server = new Socket ( server IP , 1701 ); + if ( server . is C public void search Query ID ( String date ) { -return x; - } + pair Vector = new Vector (); + + query String Combo . remove All Items (); - public int GetY() + 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 ) { -return y; - } - public Color GetC() -{ -return c; - } + // super ("""" Impact Report """"); - public String GetReqno() + 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 requirement No; - } - public String GetProject() + 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 () { -return ProjectName; - } + Vector v = new Vector (); - public String GetModule() + Socket server ; + String line = new String (); + + try + { + server = new Socket ( server IP , 1701 ); + + if ( server . is Connected () ) + { + Buffered"" +",47,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,0 +Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,154,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,111,0 +"69 ""Notification Event + +public String m_SubscriberName = """"""""; +public String m_EventID = """"""""; +public String m_Message type = """"""""; +public String m_EventType = """"""""; +public int m_NumberOfRequirements = 0; +public String m_EventTim + +public Notification_Event() +{ + m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); +} + + +public Object clone() throws CloneNotSupportedException { -return ModulePath; - }"" -",86,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,159,0 -"70 ""Notification Processing +Notification_Event nEvt = (Notification_Event) super. clone(); + nEvt. m_LeftSide = new ArrayList(); + nEvt. m_RightSide = new ArrayLis -// 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 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 Notification_Processing() + + public void ParseLeftAndRightLists(String LeftLine, String RightLine) { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); +m_LeftSide = new ArrayList(); + m_RightSide = new ArrayList(); -addWindowListener( new WindowAdapter() +if ( m_Eve + +public void DisplayValues() { - public void windowClosing(WindowEvent evt) + 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 + +private int CurrentEvent; +private EBT ebt; +private JLabel lblrequirement No, lblProject, lblModulePath; +private JTextField txtrequirement No, txtProject, txtModulePath; +private boolean HideMsg; +p + +public TextModel(EBT e) +{ + // System. out. println(""""Trying to create text box""""); +ebt = e; +CurrentEvent = -1; +// setForeground( new Color ( 255,255,255) ); + lblrequirement No = new JLabel(""""requirement + + + public void showText(EBShape sh) +{ + // Hide message in bottom box. + HideMsg = true; + repaint(); +lblProject. setVisible( true); +lblrequirement No. setVisible( true); +lblModulePath. set + +public void HideText() +{ +lblProject. setVisible( false); +lblrequirement No. setVisible( false); +lblModulePath. setVisible( false); +txtProject. setVisible( false); +txtrequirement No. setVisi + +public void ShowInfo( int CE) +{ +CurrentEvent = CE; +HideMsg = false; +HideText(); + repaint(); +} + +public void drawModel() +{ +repaint(); +} + + +protected void paintComponent(Graphics g) +{ + super. paintComponent( g); + +if (HideMsg == true) +{ + g. drawString("""" """",20,25); + g. drawString("""" """",20,40); + g. drawString("""" """",20,55 "" +",95,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,150,0 +"77 ""Model Driver + +String msg=""""""""; + +public ModelDriver(String text) { -try +this. msg = text; +init(); + } -public static void main(String args[]) + public void init() { -try +System. out. println(""""MODEL DRIVER CLASS 1/10""""); +performance modelHandler pmh = new performance modelHandler( msg); +System. out. println(""""MODEL DRIVER CLASS 2/10""""); + pmh. messageParser"" +",77,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,0 +"94 ""Refine Model + +public RefineModel(EBT em) { - 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() { -try + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 3; +} + +public StringBuffer GenerateEvent() { -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No +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=""""""""; -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) +public ModelDriver(String text) { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" +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 - private void saveMenuItemActionPerformed (ActionEvent evt) +public static void (String args[]) { -try -{ - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; +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 - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) +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) { -exitApplication(); - } +System. out. println(""""Received String = """" + str); +Connection conn = null; +Statement stmt = null; +DriverDescription dd = null; +String eventType = null; // - // action for """"Open Events"""" in popup menu - private void popupOpenActionPerformed (ActionEvent evt) +public void identifyPerformanceModels() { -openEventsMenuItemActionPerformed( evt); - } +Connection conn = null; +ResultSet rs = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Enumeration subscriberTableEnumeration = nu - // action for """"Open Events"""" - private void openEventsMenuItemActionPerformed (ActionEvent evt) + +public void pullInformationFromDoors() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) +String serverIP = """"140.192.37.150""""; +String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" }; +String subscriberName = null; +Vector constraints = n - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) +public void insertValuesInDataBase() { -if (! listModel. isEmpty()) -{ - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 +Connection conn = null; +Statement stmt = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector = null; +ConstraintsDescription cd = null; -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) + + public void createExecuteString() { -new AboutDialog ( this, true). show(); - } + +Connection conn = null; +Statement stmt = null; +ResultSet rs = null; +StringBuffer sb = null; +String subscriberName = null; +DriverDescription dd = null; +Vector driverVector -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try -{ - rs = stmt. executeQuery( mSQL); - while ( rs. next()) +public void parseImpactReport(String str) { - "" -",70,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber 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 +Connection conn = 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); +Statement stmt = null; +Vector constraintsVector = null; +Vector driversVector = null; - public EventModel(EBT e) -{ -ebt = e; -CurrentEvent = -1; -NotifyButton = new JButton(""""Notify""""); -setLayout( null); -NotifyButton. setBounds(305,265,80,25); -MinimumNoRects = 1; -add +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 +"80 ""Requirement -public void getIP Server( String serverIP) - { -this. serverIP = serverIP; - } +public String m_RequirementID =""""""""; +public String m_Project =""""""""; +public String m_ModulePath=""""""""; +public String m_Content = """"""""; +public String m_RegFlag = """"N""""; - public void ClearVectors() -{ -EventShapes. removeAllElements(); -EventLines. removeAllElements(); +public Requirement() {// empty constructor + } +public Object clone() throws CloneNotSupportedException { +Requirement requirement= (Requirement) super. clone(); +return requirement ; + } -public void drawModel() -{ -repaint(); -} + public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { +this. m_RequirementID = RequirementID; +this. m_Project = Project; +this. m_ModulePath -public void drawModel(EBShape sh) -{ -EventShapes. setElementAt( sh, ESCursor); -repaint(); -} +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 -private void ClearData() -{ -for ( int i = 0; i < EventShapes. size(); i++) +public ObsoleteModel(EBT em) { -ebs = (EBShape)EventShapes. elementAt( i); -ebs.Updaterequirement Info("""""""","""""""",""""""""); +super( em); } -} -public void Clicked ( int x, int y) -{ -int Hit = 0; -for ( int i = 0; i < EventShapes. size(); i++) +// Construct Visual model for Merge Event +public void BuildEvent() { - ebs = (EBShape)EventShapes. elementAt( i); -if (( x >= ebs.GetX() && ( x <= ebs + ClearVectors(); +AddEventRect(60,80,1); +AddLine(60,60,225,135); +AddLine(60,135,225,60); +CurrentEve -public void CheckNotifyStatus() +public StringBuffer GenerateEvent() { -//Check if Minimum Standards have been met. -int j = 0; -for ( j = 0; j < MinimumNoRects; j++) -{ -ebs2 = (EBShape)EventShapes. elementAt( j); - if ((((( - +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 - protected void BuildEvent(){} +String id; + String name; + double value; + String logic; - protected void AddLine( int t, int l, int r, int b) -{ -EventLines. addElement( new EventLine( t, l, r, b)); -} + Constraints(String id, String name, double value, String logic){ +this. id = id; +this. name = name; +this. value = value; +this. logic = logic; + } -protected void AddEventRect( int x, int y, int colorStatus) -{ -if ( colorStatus == 1) -{ - EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); + public String toString(){ + String temp; + temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic; + return temp; } - else - { -Even -public String getrequirement Text(String r, String p, String m) -{ -return new String(""""requirementwill go here""""); + /** +* Returns the id. +* @return int +*/ + public String getId() { +return id; } - public StringBuffer GenerateEvent() -{ -return new StringBuffer("""" """"); - }// end of GenerateEvent method + /** +* Returns the logic. +* @return String +*/ + public String getLogic() { +return logic; + } - protected void paintComponent(Graphics g) -{ -super. paintComponent( g); -for ( int i = 0; i < EventShapes. size(); i++) -{ -ebs = (EBShape)EventShapes. elementAt( i); - g. setC"" -",88,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",162,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,Event types shall include decomposing one requirement into two or more requirements.,122,0 -"59 ""Done /** -* The number of Worker object -* threads that are currently working -* on something. + /** +* Returns the name. +* @return String */ - private int _ activeThreads = 0; + public String getName() { +return name; + } /** -* This boolean keeps track of if -* the very first thread has started -* or not. This prevents this objec /** -* This method can be called to block -* the current thread until the ThreadPool -* is done. +* Returns the value. +* @return double */ - - synchronized public void waitDone() - { -try { - while ( _ activeThreads>0 ) { -wait(); + public double getValue() { +return value; } -} catch ( InterruptedException -/** -* Called to wait for the first thread to -* start. Once this method returns the -* process has begun. + + /** +* Sets the id. +* @param id The id to set */ - synchronized public void waitBegin() - { -try { - while ( !_ started ) { -wait(); + public void setId(String id) { +this. id = id; } -} catch ( InterruptedException e - -/** -* Called by a Worker object -* to indicate that it has begun -* working on a workload. + ** +* Sets the logic. +* @param logic The logic to set */ - synchronized public void workerBegin() - { -_ activeThreads++; -_ started = true; -notify(); + public void setLogic(String logic) { +this. logic = logic; } /** -* Called by a Worker object to -* indicate that it has completed a -* workload. +* Sets the name. +* @param name The name to set */ - synchronized public void workerEnd() - { -_ activeThreads--; -notify(); + public void setName(String name) { +this. name = name; } /** -* Called to reset this object to -* its initial state. +* Sets the value. +* @param value The value to set */ - synchronized public void reset() - { -_ activeThreads = 0; + public void setValue( double value) { +this. value = value; }"" -",59,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 -Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,153,The subscribermanager shall store information for evolutionary events in an eventlog.,114,0 -Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,147,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,110,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The subscribermanager shall re execute the model using the speculative values.,117,0 -Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,164,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,139,0 -"87 ""EBT - - -private JSplitPane splitPane; -private JSplitPane splitPane2; -private Frame FrameParent; -private JPanel MenuPanel; -private TextModel WorkArea; -private EventModel VisualPanel; -private MergeModel M - - -public EBT(Frame f) -{ -FrameParent = f; -CurrentEvent = -1; -this. serverIP = - JOptionPane -. showInputDialog(""""Please Enter the IP Address of eventserver"""") -. trim(); - +",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 - // Set up JList Selection wid - public void getrequirement Text(EBShape sh) +public ModifyModel(EBT em) { -WorkArea. showText( sh); - } - - - public boolean mouseDown( java. awt.Evente, int x, int y) - { - return true; +super( em); } - public boolean mouseUp( java. awt.Evente, int x, int y) + // Construct Visual model for Merge Event +public void BuildEvent() { -return true; - } + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - public void mouseClicked( java. awt. event.MouseEvente) + +public StringBuffer GenerateEvent() { -VisualPanel.Clicked( e. getX(), e. getY()); -} +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -public void mouseExited( java. awt. event.MouseEvente){} + 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 +"79 ""performance model Handler +String strES; // string received from eventserver + String impactReport;// string to be send to eventServer -public void mousePressed( java. awt. event.MouseEvente){} + String commandStr; // represent the command ex. execute, re - execute etc + String eventId;// refers to the eventId + String -public void mouseReleased( java. awt. event.MouseEvente){} -public void mouseEntered( java. awt. event.MouseEvente){} + performance model Handler(String msg) + { +this. strES = msg; + } -public void paint(Graphics g) {} + 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 update(Graphics g) {} - public JSplitPane getSplitPane() +//Re-execut +public String generateReport() { -return splitPane; -} + System. out. println(""""INSIDE generateReport""""); + mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto + /* +""""ImpactReport|1015818161020| int grId; -public void valueChanged(ListSelectionEvent e) -{ -if ( e. getValueIsAdjusting()) -return; -} +public int getId(){ + // get GraphId + System. out. println(""""database start""""); + int grId = database. getGraphId( modelName); + return grId; + } -private class ValueReporter implements ListSelectionListener -{ -public void valueChanged(ListSelectionEvent event) -{ - if (! event. getValueIsAdjusting()) + + public void saveModel( int id) { -switch(EventList. getSelectedIndex()) +// save current model +database. saveCurrentModel( id); + } -public void RedrawAll(EBShape sh) -{ -VisualPanel. drawModel( sh); -VisualPanel.CheckNotifyStatus(); -} -public static void main(String s[]) -{ -JFrame mainframe = new JFrame(""""Trigger an Event Notification""""); -mainframe. addWindowListener( new WindowAdapter() -{ -public void windowClosing(Wind"" -",87,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,148,0 + 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 processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis 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 String id; @@ -80938,114 +81016,36 @@ this. name = name; public void setValue( double value) { this. value = value; }"" -",73,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,163,0 -Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,151,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,140,0 -Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,161,The user shall update related artifacts according to the information contained in the event messages.,138,0 -Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,160,The user shall be able to delete subscriptions.,107,0 -"70 ""Notification Processing - -// member variables for menu - private JMenuBar menuBar; - // subscriber list - private JList SubscriberList; - private DefaultListModel listModel; - // popup menu - private JPopupMenu popup; - - // database and eventserver information - S - - public Notification_Processing() - { -setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); - -addWindowListener( new WindowAdapter() -{ - public void windowClosing(WindowEvent evt) - { -try - - -public static void main(String args[]) - { -try -{ - Notification_Processing mainFrame = new Notification_Processing(); - mainFrame. setSize(600, 400); - mainFrame. setLocation(100, 100); - mainFrame. void exitApplication() -{ -try -{ -int reply = JOptionPane. showConfirmDialog( this, -""""Do you really want to exit?"""", -""""No - - -// action for """"Open log database"""" - private void openMenuItemActionPerformed (ActionEvent evt) - { -new ConfigDialog( this, true). show(); - if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database"""" - - +",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 - private void saveMenuItemActionPerformed (ActionEvent evt) - { -try +public ModifyModel(EBT em) { - m_ conn. close(); - m_DSN=""""""""; - m_EventServerIP=""""""""; - m_EventServerPort=""""""""; - - - // action for """" exit"""" - private void exitMenuItemActionPerformed (ActionEvent evt) - { -exitApplication(); +super( em); } - // 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()) + // Construct Visual model for Merge Event +public void BuildEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1) + ClearVectors(); +AddEventRect(60,80,1); +CurrentEvent = 4; +} - // action for """" double click on Subscriber List"""" - private void doubleClickSubscriberList (MouseEvent evt) - { -if (! listModel. isEmpty()) +public StringBuffer GenerateEvent() { - int index = SubscriberList. getSelectedIndex(); - if ( index != -1 - - -// action for """"About"""" - private void aboutMenuItemActionPerformed (ActionEvent evt) - { -new AboutDialog ( this, true). show(); - } +StringBuffer thisEvent = new StringBuffer(); +thisEvent. append(""""Modify|0|""""); +thisEvent. append( new Date(). toString()+ """"|""""); + ebs = (EBShape)EventShapes -void UpdateDisplayList() - { -listModel. removeAllElements(); - String mSQL = """"SELECT distinct SubscriberName FROM EventDetails""""; -try + protected void paintComponent(Graphics g) { - 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 +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