thearod5 commited on
Commit
ef53496
1 Parent(s): 6eb8eab

Add dataset files

Browse files
Files changed (5) hide show
  1. README.md +8 -39
  2. artifacts.csv +3268 -0
  3. matrices.csv +3 -0
  4. traces.csv +145 -0
  5. train.csv +0 -0
README.md CHANGED
@@ -1,42 +1,11 @@
1
  ---
2
  configs:
3
- - config_name: artifact_df
4
- data_files: artifact_df.csv
5
- - config_name: trace_df
6
- data_files: trace_df.csv
7
- - config_name: layer_df
8
- data_files: layer_df.csv
9
  - config_name: train
10
- data_files: train.csv
11
- license: mit
12
- language:
13
- - en
14
- pretty_name: Event Based Traceability
15
- ---
16
- # Overview
17
- The following dataset contains the software artifacts used to evaluate the accuracy of traceability algorithms. It contains requirements, test cases, and source code with links established between requirements to code and requirements to test cases.
18
-
19
- [Source Files](http://sarec.nd.edu/coest/datasets.html)
20
-
21
- # Format
22
- The following files contains three datasets:
23
-
24
- - artifacts: Contains all software artifacts including their ID and content.
25
- - traces: Contains list of positive trace links established in the project.
26
- - matrices: Details the artifacts types containing traces (e.g. requirements -> test cases)
27
- - train: Contains a dataset ready for training with each row containing source and target artifact content alongside the label between the artifacts.
28
-
29
-
30
- ### Citation Information
31
- ```
32
- @ARTICLE{1232285,
33
- author={Cleland-Huang, J. and Chang, C.K. and Christensen, M.},
34
- journal={IEEE Transactions on Software Engineering},
35
- title={Event-based traceability for managing evolutionary change},
36
- year={2003},
37
- volume={29},
38
- number={9},
39
- pages={796-810},
40
- keywords={Software maintenance;Software systems;Maintenance engineering;Control systems;Computer science;Computer Society;Project management;Software testing;System testing;Software engineering},
41
- doi={10.1109/TSE.2003.1232285}}
42
- ```
 
1
  ---
2
  configs:
3
+ - config_name: artifacts
4
+ data_files: "artifacts.csv"
5
+ - config_name: traces
6
+ data_files: "traces.csv"
7
+ - config_name: matrices
8
+ data_files: "matrices.csv"
9
  - config_name: train
10
+ data_files: "train.csv"
11
+ ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 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 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ id,content,layer,summary
2
+ 100,Requirements shall be managed in a 3rd party requirements management tool such as DOORS.,Requirement,
3
+ 101,Non-requirement artifacts shall be managed in 3rd party tools such as Rational Rose or Clear case,Requirement,
4
+ 102,Only registered subscribers shall be allowed to establish traces.,Requirement,
5
+ 103,A user shall register as a subscriber.,Requirement,
6
+ 104,On registration a subscriber shall register itself under the control of a subscribermanager,Requirement,
7
+ 105,The user shall establish traces between requirements and other types of artifacts by establishing a subscription from an artifact to the relevant requirement,Requirement,
8
+ 106,Each artifact shall be placed under the control of a subscribermanager,Requirement,
9
+ 107,The user shall be able to delete subscriptions.,Requirement,
10
+ 108,A subscribermanager shall register itself with the eventserver so that it may receive relevant event messages.,Requirement,
11
+ 109,If the subscribermanager is online; the push model shall be used to send it event notifications in real time.,Requirement,
12
+ 110,Whenever the subscribermanager first comes on line; it shall implement the pull model to retrieve outstanding event messages from the eventserver.,Requirement,
13
+ 111,A subscribermanager shall receive event notifications on behalf of the artifacts that it manages.,Requirement,
14
+ 112,A subscribermanager shall manage traces for one or more artifacts.,Requirement,
15
+ 113,On receipt of an event message; the subscribermanager shall differentiate between speculative and evolutionary events.,Requirement,
16
+ 114,The subscribermanager shall store information for evolutionary events in an eventlog.,Requirement,
17
+ 115,The user shall be able to construct speculative queries using a GUI.,Requirement,
18
+ 116,The subscribermanager shall immediately process speculative events.,Requirement,
19
+ 117,The subscribermanager shall re execute the model using the speculative values.,Requirement,
20
+ 118,The subscribermanager shall report results indicating whether the speculative change negatively impacts other requirements and constraints.,Requirement,
21
+ 119,The subscribermanager shall restore the executable model to its prior state.,Requirement,
22
+ 120,The prototype system shall utilize a driver to trigger events.,Requirement,
23
+ 121,Event types shall include adding new requirements.,Requirement,
24
+ 122,Event types shall include decomposing one requirement into two or more requirements.,Requirement,
25
+ 123,Event types shall include refining one requirement by adding an additional requirement to the existing one.,Requirement,
26
+ 124,Event types shall include modifying a requirement.,Requirement,
27
+ 125,Event types shall include deleting a requirement.,Requirement,
28
+ 126,Event types shall include merging requirements.,Requirement,
29
+ 127,The eventserver shall receive event messages when a requirement changes.,Requirement,
30
+ 128,On receipt of an event message the eventserver shall record the event in an eventlog.,Requirement,
31
+ 129,On receipt of an event; the eventserver shall identify all relevant subscribers for the event.,Requirement,
32
+ 130,The eventserver shall differentiate between evolutionary and speculative events.,Requirement,
33
+ 131,When an evolutionary event occurs; the eventserver shall notify subscribers of the event.,Requirement,
34
+ 132,For speculative events; the eventserver shall construct a composite event message.,Requirement,
35
+ 133,The eventserver shall identify all related requirements and constraints for each impacted executable model.,Requirement,
36
+ 134,The eventserver shall retrieve quantitative values related to these additional requirements and constraints through querying the requirements management tool.,Requirement,
37
+ 135,The eventserver shall create a composite speculative message which includes the speculative event plus all related requirements and constraint values for each impacted model.,Requirement,
38
+ 136,The eventserver shall send the customized message to each impacted executable model.,Requirement,
39
+ 137,The user shall view all evolutionary events received for a specific artifact in the order in which they were received.,Requirement,
40
+ 138,The user shall update related artifacts according to the information contained in the event messages.,Requirement,
41
+ 139,The user shall eliminate unnecessary traces that were temporarily constructed by the eventserver during initial event processing.,Requirement,
42
+ 140,The notification processing system shall automatically eliminate any events that are not longer valid as a result of the user eliminating temporary traces.,Requirement,
43
+ 141,Test case: Establish Trace (2.1.1)(2.2.1) Preconditions Subscriber is registered Steps Subscriber establishes a trace between a UML artifact and a requirement. Postconditions A trace is established between the UML artifact and the requirement.,Test,
44
+ 142,Test case: Non-registered subscriber attempts to establish a trace (2.1.1) Preconditions The proposed Subscriber is not registered Steps Subscriber attempts to establish a trace between a UML artifact and a requirement. Postconditions No trace is established between the UML artifact and the requirement.,Test,
45
+ 143,Test case: Subscriber registers with subscriber manager (2.1.3)(2.2.2)(3.2.2?)(2.1.2?) Preconditions The subscriber is a valid subscriber At least one valid subscriber manager is in the system Steps The subscriber registers itself with the subscriber manager. Postconditions The subscriber is registered under the subscriber manager.,Test,
46
+ 144,Test case: Subscriber fails to register with subscriber manager (2.1.3)(2.2.2)(3.2.2?) Preconditions The subscriber is a valid subscriber Steps The subscriber attempts to exit from the registration process without registering itself under a subscriber manager. Postconditions The subscriber is removed from the system. ,Test,
47
+ 145,Test case: Delete subscriptions (2.2.3) Preconditions At least one subscription has been established in the system Steps The user deletes the subscription Postconditions The subscription has been deleted. ,Test,
48
+ 146,"Test case: Subscriber Manager registers with event server (3.1.1) Preconditions A subscriber manager has been created. Steps The subscriber manager registers its IP address, port, and name with the event server Post conditions The subscriber manager is registered with the event server. ",Test,
49
+ 147,Test case: An event is published in real time (3.1.2) Preconditions: At least one subscriber manager is online at its designated IP address and port. The subscriber manager has subscribed to at least one requirement. Steps The requirement changes. An event notification is sent to the relevant subscriber manager. Postconditions:,Test,
50
+ 148,Test case: Subscriber Manager comes online and checks for missed events (3.1.3) Preconditions: The subscriber manager is off line. The event server has stored an event notification that was not previously delivered to the subscriber manager. Steps: The subscriber manager comes online. Post conditions: The subscriber manager has successfully downloaded the relevant event notifications from the event server.,Test,
51
+ 149,Test case: Subscriber manager receives non-speculative event notification (3.2.1)(3.2.3)(3.3.1) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is stored in the local event log.,Test,
52
+ 150,Test case: Subscriber manager receives speculative event notification (3.2.1)(3.2.3) Preconditions: The subscriber manager has registered subscribers Steps An event notification is sent to the subscriber manager for a registered subscriber. The relevant subscriber manager receives the event notification. Postconditions: The event notification message is processed according to predefined protocols.,Test,
53
+ 151,Test case: User constructs a speculative query (3.4.1) Preconditions: At least one performance model has been built. Requirements and constraints have been defined for this performance model. Steps: The user constructs a speculative query using a GUI tool. Postconditions: A speculative event message is received by the event server.,Test,
54
+ 152,"Test case: Speculative event message is processed by subscriber manager (3.4.2)(3.4.3)(3.4.4)(3.4.5) Preconditions: A speculative query has been issued and sent to the relevant subscriber manager. Steps: The subscriber manager receives the speculative event message. The subscriber manager parses the event message to determine that it is a speculative event. The subscriber manager injects values into the relevant performance model, re-executes the model, collates the results, restores the model to its prior state, and returns the results. Postconditions A response is sent to the speculative event. The performance model is restored to its original state",Test,
55
+ 153,Test case: Add New Requirement (4.1.)(4.1.1) Preconditions: The trigger driver is running. Steps The user specifies a new event. The user adds a new requirement Post conditions: A new event message is sent.,Test,
56
+ 154,Test case: Decompose a Requirement (4.1)(4.1.2) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a decompose event. The user selects an existing requirement and decomposes it into two or more requirements. Post conditions: The requirement is decomposed into two or more events. A decompose event message is sent. Temporary links are established between the original requirement and its decomposed parts.,Test,
57
+ 155,Test case: Refine a requirement (4.1)(4.1.3) Preconditions: The trigger driver is running. At least one requirement is defined. Steps The user specifies a refine event. The user selects an existing requirement and adds an additional requirement related to it. Post conditions: The requirement is refined by adding at least one related requirement. A refine event message is sent. Temporary links are established between the original requirement and its refinements.,Test,
58
+ 156,Test case: Modify a requirement (4.1)(4.1.4) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a modify event. The user selects an existing requirement and changes it. Post conditions: The requirement is changed. A modify event message is sent. Existing links from the original requirement are changed to tentative status.,Test,
59
+ 157,Test case: Delete a requirement (4.1)(4.1.5) Preconditions: The trigger driver is running. At least one requirement is defined Steps The user specifies a delete event. The user selects an existing requirement and deletes it. Post conditions: The status of the requirement is set to obsolete. A delete event message is sent. Existing links from the obsolete requirement are set to tentative status.,Test,
60
+ 158,Test case: Merge two or more requirements (4.1)(4.1.6) Preconditions: The trigger driver is running. At least two requirements are defined Steps The user specifies a merge event. The user specifies two or more requirements to merge. Post conditions: The requirements are merged. A merge event message is sent. Existing links from the original requirements are assigned to the newly merged requirement.,Test,
61
+ 159,Test case: Event server receives message (5.1)(5.2)(5.4) Preconditions: The event server is running and waiting for incoming events at a well known port and IP address. The event trigger issues an event message. Steps The event server receives an event message. The event server parses the event message into its constituent parts. The event server categorizes each event according to whether it is speculative or evolutionary. The event server stores event details in its event log. Post conditions: The event is stored in the log. The event is categorized according to whether it is evolutionary or speculative.,Test,
62
+ 160,Test case: Event server identifies subscribers (5.3) Preconditions: The event server has received an event message. Steps: The event server identifies the impacted requirements from the received event message. The event server searches for subscribers to those impacted requirements. Post conditions All relevant subscribers are identified. ,Test,
63
+ 161,Test case: Notify subscribers when an evolutionary event occurs (5.5) Preconditions: The event server has received an evolutionary event message. The event server has identified a list of subscribers. Steps: The event server identifies the subscriber manager for each subscriber. The event server identifies the IP address and port for each relevant subscriber manager. The event server builds a notification event message and sends it to each relevant subscriber manager. Postconditions: The event message is received by each relevant subscriber manager or behalf of its managed subscribers.,Test,
64
+ 162,"Test case: Event server constructs composite event message for a speculate event (5.6)(5.6.1)(5.6.2)(5.6.3)(5.6.4) Preconditions: The event server has received a speculative event message. The event server has identified a list of subscribers. Steps: For each identified subscriber the event server identifies all additional requirements that are linked to the same artifact. The event server polls DOORS to obtain additional quantitative information for each of these additional requirements. The event server constructs a composite event message that includes the requirement that has changed, plus quantitative constraints obtained from other related requirements. The customized event message is sent to the relevant subscriber. ",Test,
65
+ 163,Test case: Events are displayed in the order in which they are received.(6.1) Preconditions: At least three event messages received for a single artifact. Steps: The user activates the notification process tool. The user selects the artifact. Event messages are displayed in the order in which they were received. Postconditions: none ,Test,
66
+ 164,Test case: User attempts to process an event message in the incorrect order (6.1) Preconditions: At least three event messages have been received by a subscriber manager on behalf of a single subscriber. The notification processing tool is running. Steps: The user examines the event messages that have been received for a single subscriber. The user tries to process an event other than the first one received. The system prohibits the user from processing the events in the incorrect order. Post conditions No events are processed.,Test,
67
+ 165,"Test case: User processes an event message (6.2)(6.3)(6.4) Preconditions: Event messages are displayed for a single artifact. Steps: The user examines the first event message. The user applies any information from the event message to update the artifact accordingly. The user selects which of the tentative links should be made permanent and which ones should be discarded. Postconditions: The links in the event server are changed according to the users directions. Any additional event messages that had previously been sent on the basis of a tentative link, and for which the tentative link has now been eliminated, are removed from the event processing list and display.",Test,
68
+ 46,"private JPanel center Panel = null ;
69
+
70
+ private JLabel des Label = null ;
71
+ private JLabel change Label = null ;
72
+ private JLabel from Label = null ;
73
+ private JLabel to Label = null ;
74
+ private JText Area des Text = null ;
75
+ private JText Field c
76
+
77
+ // Speculate Gui
78
+
79
+ public Speculate Gui ()
80
+ {
81
+
82
+ super ("" Speculate GUI "");
83
+
84
+ container = get Content Pane ();
85
+
86
+ set Size ( 800 , 600 );
87
+
88
+ this . event Server IP =
89
+ JOption Pane
90
+ . show Input Dialog ("" Please Enter the IP Address of eventserver
91
+
92
+
93
+ // Submit Listener
94
+
95
+ public void action Performed ( Action Event e ) {
96
+
97
+ if ( e . get Source () == submit Button ) {
98
+
99
+ send Query TO Server ();
100
+
101
+ }
102
+
103
+ if ( e . get Source () == fetch Button ) {
104
+
105
+
106
+ System . out . println ("" Fetch Button Pressed
107
+
108
+
109
+ void send Query TO Server ()
110
+ {
111
+
112
+ String ip = this . event Server IP ;
113
+ int Port No = 1701 ;
114
+
115
+ Socket socket ;
116
+ try {
117
+
118
+ socket = new Socket ( ip , Port No );
119
+
120
+ Output Stream os = socket . get Output Stream ();
121
+ Output Stream
122
+
123
+ public void pull Value From DOORS ()
124
+ {
125
+
126
+ String server IP = new String ( doors server IP ); //"" 140 . 192 . 37 . 150 "";
127
+
128
+ String [] attribute = { "" Value "", "" Attribute "" };
129
+
130
+ String project Name = this . proj Name Text . get
131
+
132
+
133
+ public static void main ( String [] args )
134
+ {
135
+ new Speculate Gui ();
136
+ }",Code,
137
+ 47,"47 ""Impact Report
138
+
139
+ private String server IP = """" local host """";
140
+ private JPanel center Panel = null ;
141
+
142
+ private JPanel driver Panel = new JPanel ();
143
+
144
+ private JPanel driver Inner Panel = null ;
145
+
146
+ private JPanel impact Panel = null ;
147
+ private JPanel impact Inner P
148
+
149
+ public Impact Report ()
150
+ {
151
+
152
+ super ("""" Search Result GUI """");
153
+
154
+ container = get Content Pane ();
155
+
156
+ set Size ( 800 , 250 );
157
+
158
+ panel = new JPanel ();
159
+
160
+ panel . set Layout ( null );
161
+
162
+ this . server IP =
163
+ JOption Pane
164
+ . show In
165
+
166
+
167
+ public static void main ( String [] args )
168
+ {
169
+
170
+ Impact Report im = new Impact Report ();
171
+
172
+ }
173
+
174
+
175
+ public Vector search Date ()
176
+ {
177
+
178
+ date Vector = new Vector ();
179
+ date Vector . add ("""" Select Query Date """");
180
+ Socket server ;
181
+ String line = new String ();
182
+ try
183
+ {
184
+
185
+ server = new Socket ( server IP , 1701 );
186
+ if ( server . is C public void search Query ID ( String date )
187
+ {
188
+
189
+ pair Vector = new Vector ();
190
+
191
+ query String Combo . remove All Items ();
192
+
193
+ query String Combo . add Item ("""" Select Query String """");
194
+
195
+ Socket server ;
196
+ String line = new String ();
197
+
198
+
199
+ // Select Actions
200
+
201
+ public void action Performed ( Action Event e )
202
+ {
203
+
204
+ if ( date Combo == ( JCombo Box ) e . get Source ())
205
+ {
206
+ date = ( String ) date Combo . get Selected Item ();
207
+ search Query ID ( date );
208
+ }
209
+ }
210
+
211
+ // Button Actions
212
+
213
+
214
+ public void action Performed ( Action Event e ) {
215
+
216
+ if ( submit Button == e . get Source ()) {
217
+
218
+ for ( int i = 0 ; i < pair Vector . size (); i ++) {
219
+
220
+ Pair pair = ( Pair ) pair Vector . get ( i );
221
+
222
+ if ( pair
223
+ . get
224
+
225
+
226
+
227
+ public void impact Report ( String id )
228
+ {
229
+
230
+ // super ("""" Impact Report """");
231
+
232
+ container = get Content Pane ();
233
+
234
+ set Size ( 1020 , 740 );
235
+
236
+ this . query ID = id ;
237
+
238
+ System . out . println ("""" Impact Report Constructor ..... ID """" +
239
+
240
+
241
+ public Vector get Constraint From Data Base ()
242
+ {
243
+
244
+ Vector v = new Vector ();
245
+
246
+ Socket server ;
247
+ String line = new String ();
248
+
249
+
250
+ try
251
+ {
252
+ server = new Socket ( server IP , 1701 );
253
+
254
+ if ( server . is Connected () )
255
+ {
256
+ Buffered
257
+
258
+
259
+
260
+ public Vector get Driver From Data Base ()
261
+ {
262
+
263
+ Vector v = new Vector ();
264
+
265
+ Socket server ;
266
+ String line = new String ();
267
+
268
+ try
269
+ {
270
+ server = new Socket ( server IP , 1701 );
271
+
272
+ if ( server . is Connected () )
273
+ {
274
+ Buffered""
275
+ ",Code,
276
+ 48,"48 ""Constraint Inner Panel
277
+
278
+ private String server IP = """" local host """";
279
+ private JLabel performance Model Label = null ;
280
+ private JLabel project Name Label = null ;
281
+ private JLabel module Path Label = null ;
282
+ private JLabel requirement Id Label = null ;
283
+ private JLabel
284
+
285
+ public Constraint Inner Panel (
286
+ String performance Model Name ,
287
+ String project Name ,
288
+ String module Path ,
289
+ String requirement Id ,
290
+ String description ,
291
+ String logic ,
292
+ String units ,
293
+ String value ,
294
+ String impacted Value
295
+
296
+
297
+ private void set goal Label Values (
298
+ String attribute ,
299
+ String logic ,
300
+ String value ,
301
+ String units )
302
+ {
303
+ goal Label . set Text (
304
+ """" Goal : """" + attribute + """" """" + logic + """" """" + value + """" """" + units );
305
+
306
+ }
307
+
308
+
309
+ public Vector get Values From Data Base ()
310
+ {
311
+ Vector v = new Vector ();
312
+ Socket server ;
313
+ String line = new String ();
314
+ try
315
+ {
316
+ server = new Socket ( server IP , 1701 );
317
+
318
+ if ( server . is Connected () )
319
+ {
320
+ Buffered R
321
+
322
+
323
+ private void set impacted Label Value (
324
+ String attribute ,
325
+ String value ,
326
+ String impacted Value ,
327
+ String units ,
328
+ String logic )
329
+ {
330
+
331
+ if ( impacted Value ! = null )
332
+ {
333
+ double value 1 = Double . parse Double ( value );
334
+ d
335
+
336
+
337
+ public JPanel get Panel ()
338
+ {
339
+ return panel ;
340
+ }""
341
+ ",Code,
342
+ 49,"49 ""Constraints Description
343
+
344
+ private String project Name = null ;
345
+ private String module Path = null ;
346
+ private String requirement ID = null ;
347
+
348
+ private String value = null ;
349
+ private String logic = null ;
350
+ private String units = null ;
351
+ private String description = null ;
352
+
353
+
354
+ public Constraints Description (
355
+ String project Name ,
356
+ String module Path ,
357
+ String requirement ID )
358
+ {
359
+
360
+ this . project Name = project Name ;
361
+ this . module Path = module Path ;
362
+ this . requirement ID = requirement ID ;
363
+
364
+ }
365
+
366
+
367
+ public String get Description () {
368
+ return this . description ;
369
+ }
370
+
371
+ public String get Logic () {
372
+ return this . logic ;
373
+ }
374
+
375
+ public String get Module Path () {
376
+ return this . module Path ;
377
+ }
378
+
379
+ public String get Project Name () {
380
+ return this . project Name ;
381
+ }
382
+
383
+ public String get Requirement ID () {
384
+ return this . requirement ID ;
385
+ }
386
+
387
+ public String get Units () {
388
+ return this . units ;
389
+ }
390
+
391
+ public String get Value () {
392
+ return this . value ;
393
+ }
394
+
395
+ public void set Description ( String description ) {
396
+ this . description = description ;
397
+ }
398
+
399
+ public void set Logic ( String logic ) {
400
+ this . logic = logic ;
401
+ }
402
+
403
+ public void set Module Path ( String module Path ) {
404
+ this . module Path = module Path ;
405
+ }
406
+
407
+ public void set Project Name ( String project Name ) {
408
+ this . project Name = project Name ;
409
+ }
410
+
411
+ public void set Requirement ID ( String requirement ID ) {
412
+ this . requirement ID = requirement ID ;
413
+ }
414
+
415
+ public void set Units ( String units ) {
416
+ this . units = units ;
417
+ }
418
+
419
+ public void set Value ( String units ) {
420
+ this . value = units ;
421
+ }
422
+
423
+ public String get Impacted Constraint () {
424
+ return this . impacted Constraint ;
425
+ }
426
+
427
+ public void set Impacted Constraint ( String impacted Constraint ) {
428
+ this . impacted Constraint = impacted Constraint ;
429
+ }
430
+
431
+ public String get Attribute () {
432
+ return this . attribute ;
433
+ }
434
+
435
+ public void set Attribute ( String attribute ) {
436
+ this . attribute = attribute ;
437
+ }
438
+
439
+ public String get Performance Model Name () {
440
+ return this . performance Model Name ;
441
+ }
442
+
443
+ public void set Performance Model Name ( String performance Model Name ) {
444
+ this . performance Model Name = performance Model Name ;
445
+ }
446
+
447
+ public String to String () {
448
+
449
+ String str =
450
+ """"\ n Project Name = """"
451
+ + this . project Name
452
+ + """"\ n """"
453
+ + """" Module Path = """"
454
+ + this . module Path
455
+ + """"\ n """"
456
+ + """" Requirement ID = """"
457
+ + this . requirement ID
458
+ + """"\ n """"
459
+
460
+
461
+ public boolean equals ( Object o ) {
462
+ if (!( o instance of Constraints Description ))
463
+ return false ;
464
+ Constraints Description cd = ( Constraints Description ) o ;
465
+ if ( cd . project Name . equals Ignore Case ( this . project Na
466
+
467
+
468
+ public int hash Code () {
469
+ int hash Code = 0 ;
470
+ if ( hash Code == 0 ) {
471
+ int result = 17 ;
472
+ result = 37 * result + this . project Name . hash Code ();
473
+ result = 37 * result + this . module Path . hash Code ();
474
+ result = 37 * ""
475
+ ",Code,
476
+ 50,"50 ""Driver Description
477
+
478
+ private String projectName = null;
479
+ private String modulePath = null;
480
+ private String requirementID = null;
481
+
482
+ private String description = null; // Description of the requirement.
483
+ private String changedArrtibute = null;
484
+ private Strin
485
+
486
+
487
+ public DriverDescription(
488
+ String projectName,
489
+ String modulePath,
490
+ String requirementID,
491
+ String description,
492
+ String changedAttribute,
493
+ String fromAttribute,
494
+ String toAttribute)
495
+ {
496
+
497
+ this. projectName = projec
498
+
499
+ public String getChangedAttribute()
500
+ {
501
+ return changedAttribute;
502
+ }
503
+
504
+ public String getDescription()
505
+ {
506
+ return description;
507
+ }
508
+
509
+ public String getFromAttribute()
510
+ {
511
+ return fromAttribute;
512
+ }
513
+
514
+ public String getModulePath()
515
+ {
516
+ return modulePath;
517
+ }
518
+
519
+ public String getProjectName()
520
+ {
521
+ return projectName;
522
+ }
523
+
524
+ public String getRequirementID()
525
+ {
526
+ return requirementID;
527
+ }
528
+
529
+ public String getToAttribute()
530
+ {
531
+ return toAttribute;
532
+ }
533
+
534
+ public void setChangedAttribute(String changedAttribute)
535
+ {
536
+ this. changedAttribute = changedAttribute;
537
+ }
538
+
539
+ public void setDescription(String description)
540
+ {
541
+ this. description = description;
542
+ }
543
+
544
+ public void setFromAttribute(String fromAttribute)
545
+ {
546
+ this. fromAttribute = fromAttribute;
547
+ }
548
+
549
+ public void setModulePath(String modulePath)
550
+ {
551
+ this. modulePath = modulePath;
552
+ }
553
+
554
+ public void setProjectName(String projectName)
555
+ {
556
+ this. projectName = projectName;
557
+ }
558
+
559
+ public void setRequirementID(String requirementID)
560
+ {
561
+ this. requirementID = requirementID;
562
+ }
563
+
564
+ public void setToAttribute(String toAttribute)
565
+ {
566
+ this. toAttribute = toAttribute;
567
+ }
568
+
569
+ public String createKey()
570
+ {
571
+ String key = this. projectName + this. modulePath + """"\\"""" + this. requirementID;
572
+ return key. toLowerCase();
573
+ }
574
+
575
+ public boolean equals(Object o)
576
+ {
577
+ if (!( o instance of DriverDescription))
578
+ return false;
579
+ DriverDescription dd = (DriverDescription) o;
580
+ if ( dd. projectName. equalsIgnoreCase( this. projectName)
581
+ && ddpublic String toString()
582
+ {
583
+
584
+ String str =
585
+ """"\ nProject Name = """"
586
+ + this. projectName
587
+ + """"\ n""""
588
+ + """"Module Path = """"
589
+ + this. modulePath
590
+ + """"\ n""""
591
+ + """"Requirement ID = """"
592
+ + this. requirementID
593
+ + """"\ n""""
594
+
595
+
596
+ public int hashCode()
597
+ {
598
+ int hashCode = 0;
599
+ if ( hashCode == 0)
600
+ {
601
+ int result = 17;
602
+ result = 37 * result + this. projectName. hashCode();
603
+ result = 37 * result + this. modulePath. hashCode();
604
+ result = 37 ""
605
+ ",Code,
606
+ 51,"51 ""Driver Inner Panel
607
+
608
+ private JLabel projectNameLabel = null;
609
+ private JLabel modulePathLabel = null;
610
+ private JLabel requirementIdLabel = null;
611
+ private JLabel desLabel = null;
612
+ private JLabel changeLabel = null;
613
+ private JLabel fromLabel = null;
614
+
615
+ String projectName,
616
+ String modulePath,
617
+ String requirementID,
618
+ String description,
619
+ String changeAttribute,
620
+ String fromValue,
621
+ String toValue) {
622
+
623
+ panel = new JPanel();
624
+
625
+ panel. setBackground(Color.LIGHTpublic JPanel createPanel() {
626
+
627
+ return panel;
628
+ }""
629
+ ",Code,
630
+ 52,"52 ""Pair
631
+
632
+ private String queryID;
633
+ private String queryString;
634
+
635
+
636
+ public Pair(String queryID, String queryString) {
637
+
638
+ this. queryID = queryID;
639
+ this. queryString = queryString;
640
+
641
+ }
642
+
643
+ public String getQueryID() {
644
+ return this. queryID;
645
+ }
646
+
647
+ public String getQueryString() {
648
+ return this. queryString;
649
+ }
650
+
651
+ public void setQueryID(String queryID) {
652
+ this. queryID = queryID ;
653
+ }
654
+
655
+ public void setQueryString(String queryString) {
656
+ this. queryString = queryString;
657
+ }
658
+
659
+ public String toString(){
660
+ return """"Query ID: """"
661
+ + this. queryID
662
+ + """"\ n""""
663
+ +""""Query String : """"
664
+ + this. queryString
665
+ + """"\ n"""";
666
+
667
+
668
+ }""
669
+ ",Code,
670
+ 53,"53 ""Performance Model
671
+
672
+ private String name = null;
673
+ private Vector driverVector = null;
674
+ private Vector constraintVector = null;
675
+
676
+ private long queryID = 0;
677
+
678
+ public static int count = 0;
679
+
680
+ public PerformanceModel(String name, long queryID)
681
+ {
682
+ this. name = name;
683
+ this. queryID = queryID;
684
+ this. driverVector = new Vector();
685
+ this. constraintVector = new Vector();
686
+ }
687
+
688
+ public Vector getConstraints()
689
+ {
690
+ return constraintVector;
691
+ }
692
+
693
+ public Vector getDrivers()
694
+ {
695
+ return driverVector;
696
+ }
697
+
698
+ public String getName()
699
+ {
700
+ return name;
701
+ }
702
+
703
+ public void setName(String name)
704
+ {
705
+ this. name = name;
706
+ }
707
+
708
+ public void addDriver(DriverDescription driver)
709
+ {
710
+ if ( driverVector. contains( driver))
711
+ {
712
+ }
713
+ else
714
+ this. driverVector. add( driver);
715
+ }
716
+
717
+ public void removeDriver(DriverDescription driver)
718
+ {
719
+ this. driverVector. remove( driver);
720
+ }
721
+
722
+ public boolean containsDriver(DriverDescription driver)
723
+ {
724
+ return this. driverVector. contains( driver);
725
+ }
726
+
727
+ public void addConstraint(ConstraintsDescription constraint)
728
+ {
729
+ this. constraintVector. add( constraint);
730
+ }
731
+
732
+ public boolean containsConstraint(ConstraintsDescription constraint)
733
+ {
734
+ return this. constraintVector. contains( constraint);
735
+ }
736
+
737
+ public void removeConstraint(ConstraintsDescription constraint)
738
+ {
739
+ this. constraintVector. remove( constraint);
740
+ }
741
+
742
+ public DriverDescription getDriver(DriverDescription driver)
743
+ {
744
+ DriverDescription dd = null;
745
+ for ( int i = 0; i < this. driverVector. size(); i++)
746
+ {
747
+ dd = (DriverDescription) this. driverVector. get( i)
748
+
749
+ public ConstraintsDescription getConstraint(ConstraintsDescription constraint)
750
+ {
751
+ ConstraintsDescription cd = null;
752
+ for ( int i = 0; i < this. constraintVector. size(); i++)
753
+ {
754
+ cd = (ConstraintsDescription) this
755
+
756
+ public long getQueryID()
757
+ {
758
+ return this. queryID;
759
+ }
760
+
761
+ public void setQueryID( long id)
762
+ {
763
+ this. queryID = id;
764
+ }
765
+
766
+ public String toString()
767
+ {
768
+ return """"performance modelName = """"
769
+ + this. name
770
+ + """"\ n""""
771
+ + """"Query ID = """"
772
+ + this. queryID
773
+ + """"\ n""""
774
+ + """"Drivers = """"
775
+ + this. driverVector
776
+ + """"\ n""""
777
+ + """"Constraints = """"
778
+ + this.""
779
+ ",Code,
780
+ 54,"54 ""eventserver
781
+
782
+ public static void (String args[])
783
+ {
784
+ ThreadPool pool = new ThreadPool(1);
785
+ int port = defaultPort;
786
+ try
787
+ {
788
+ ServerSocket ss = new ServerSocket( port);
789
+ for( int i=0; i<4; i++)
790
+ {
791
+ p
792
+
793
+ public final static int defaultPort = 1701;
794
+ ServerSocket theServer;""
795
+ ",Code,
796
+ 55,"55 ""eventserver Threadstatic private int count = 0;
797
+ private int taskNumber;
798
+ protected Done done;
799
+ ServerSocket theServer;
800
+
801
+ private Connection conn;
802
+ private Statement stmt;
803
+ private ResultSet rs;
804
+ private EventParser ep;
805
+ private int id;
806
+
807
+ EventServerThread(ServerSocket ss)
808
+ {
809
+ theServer = ss;
810
+ count++;
811
+ taskNumber = count;
812
+ ep = new EventParser();
813
+ } public void run()
814
+ {
815
+
816
+ while( true)
817
+ {
818
+ try
819
+ {
820
+ Socket client = theServer. accept();
821
+ BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream()));
822
+ PrintWriter output = new P
823
+
824
+
825
+ public String getNextID()
826
+ {
827
+ try
828
+ {
829
+ Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver"""");
830
+ this. conn = DriverManager. getConnection("""" jdbc: odbc:EBT"""",""""EBT"""",""""EBT"""");
831
+ this. stmt = conn
832
+
833
+
834
+ public String searchDate()
835
+ {
836
+ String dateString = new String();
837
+ Vector dateVector = new Vector();
838
+ try
839
+ {
840
+ Class. forName("""" sun. jdbc. odbc.jdbcodbcDriver"""");
841
+ Connection conn = DriverManager. getConnectio
842
+
843
+
844
+ public String searchQueryID(String date)
845
+ {
846
+ Vector queryVector = new Vector();
847
+ String searchQuery = new String();
848
+ try
849
+ {
850
+ Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver"""");
851
+ conn = DriverManager. get
852
+
853
+
854
+ public String getConstraintFromDataBase(String queryID)
855
+ {
856
+ String ConstString = new String();
857
+ try
858
+ {
859
+ Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver"""");
860
+ conn = DriverManager. getConnection("""" j
861
+
862
+
863
+ public String getDriverFromDataBase(String queryID)
864
+ {
865
+ String driverString = new String();
866
+ try
867
+ {
868
+ Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver"""");
869
+ conn = DriverManager. getConnection("""" jdbc ""
870
+ ",Code,
871
+ 56,"56 ""Event Parser
872
+
873
+ private Connection conn;
874
+ private ResultSet rs;
875
+ private Statement stmt;
876
+
877
+ //EventParser Constructor
878
+ // initializes the Database connection
879
+ public EventParser()
880
+ {
881
+ try
882
+ {
883
+ Class. forName("""" sun. jdbc. odbc.JdbcOdbcDriver"""");
884
+ this. conn = DriverManager. getConnection("""" jdbc: odbc:
885
+
886
+
887
+ public void updateEvent(String str, String ID)
888
+ {
889
+ String mProject;
890
+ String mEvent;
891
+ String mType;
892
+ String mNum;
893
+ String mrequirement ;
894
+ String mModule;
895
+ String mSQL;
896
+ String mDate;
897
+ String mReqtext;
898
+
899
+
900
+ //Check if a subscription exists
901
+ public boolean CheckSubscription(String str)
902
+ {
903
+
904
+ StringTokenizer tokens = new StringTokenizer( str, """"|"""");
905
+ String Message type = tokens. nextToken();
906
+ String SubscriberName = tokens. next
907
+
908
+
909
+ //Insert a subscription into the """"Subscription"""" table
910
+ public void AddSubscription(String str, int ID)
911
+ {
912
+ // Parse the message string and get the fields
913
+ StringTokenizer tokens = new StringTokenizer( str, """"|"""");
914
+ String Messag
915
+
916
+
917
+ //DeleteSubscription from the """"Subscription"""" table
918
+ public void DeleteSubscription(String str, int ID)
919
+ {
920
+ // Parse the message string and get the fields
921
+ StringTokenizer tokens = new StringTokenizer( str, """"|"""");
922
+ String Messag //Speculate method will receive a string from the Speculative GUI
923
+ // tool and parse it using CallBack class to identify the
924
+ // performance models
925
+
926
+
927
+ public void speculate(String str)
928
+ {
929
+ System. out. println(""""Speculate"""");
930
+ CallBack
931
+
932
+
933
+ public void impactReport(String str)
934
+ {
935
+ CallBack cb = new CallBack();
936
+ cb. parseImpactReport( str);
937
+ }// end impactReport()""
938
+ ",Code,
939
+ 57,"57 ""Event Notifier
940
+ // Variables to process the requirement
941
+ private String requirement No;//Requirement No.
942
+ private String ProjName; //Project name
943
+ private String ModPath;//Modular path
944
+ private String requirement Text;/
945
+
946
+
947
+ public EventNotifier(String rno, String proj, String mod, String rtext,String eID, String em, String eventType)
948
+ {
949
+ requirement No = rno;//Requirement number
950
+ ProjName = proj;// project name
951
+ ModPath = mo
952
+
953
+ // finds the subscribers for this requirement
954
+ public void IdentifySubscribers()
955
+ {
956
+ String mSQL;
957
+ // Create an SQL statement that will limit the selection as much as possible
958
+ // If a subscription is to a specific requirement - check for requi
959
+
960
+
961
+ //Reads the result from IdentifySubscribers method selection
962
+ // and adds each result into ActualSubscribers Vector.
963
+ void ProcessResultSet()
964
+ {
965
+
966
+ String sName, sReqno, sModule, sKey1, sKey2;
967
+ try
968
+ {
969
+ System. o
970
+
971
+ // Send messages to all subscribers listed in ActualSubscriber Vector
972
+ // Possible that a sort routine can be added later so that all notification to
973
+ // the same subscribermanager can be batched.This is not implemented yet.
974
+
975
+ public void Dispatch
976
+
977
+
978
+ public String getErrorMessage()
979
+ {
980
+ return errMsg;
981
+ }
982
+
983
+
984
+ public boolean Contains(String ContextString, String SearchString)
985
+ {
986
+ int cLen = ContextString. length();
987
+ int sLen = SearchString. length();
988
+ if (SearchString. length() == 0)
989
+ return false;
990
+
991
+ for ( int i = 0""
992
+ ",Code,
993
+ 58,"58 ""Subscribed Model
994
+
995
+ private String SubscriberName;
996
+ private String SubscriberReqno;
997
+ private String SubscriberModule;
998
+ private String SubscriberKeyword1;
999
+ private String SubscriberKeyword2;
1000
+
1001
+ public SubscribedModel(String sn, String sr, String sm, String sk1, String sk2)
1002
+ {
1003
+ SubscriberName = sn;
1004
+ SubscriberReqno = sr;
1005
+ SubscriberModule = sm;
1006
+ SubscriberKeyword1 = sk1;
1007
+ SubscriberKeyword2 = s
1008
+
1009
+ public String GetSubscriberName() { return SubscriberName;}
1010
+
1011
+ public String GetSubscriberReqno() { return SubscriberReqno;}
1012
+
1013
+ public String GetSubscriberModule() { return SubscriberModule;}
1014
+
1015
+ public String GetSubscriberKeyword1() { return SubscriberKeyword1;}
1016
+
1017
+ public String GetSubscriberKeyword2() { return SubscriberKeyword2;}""
1018
+ ",Code,
1019
+ 59,"59 ""Done /**
1020
+ * The number of Worker object
1021
+ * threads that are currently working
1022
+ * on something.
1023
+ */
1024
+ private int _ activeThreads = 0;
1025
+
1026
+ /**
1027
+ * This boolean keeps track of if
1028
+ * the very first thread has started
1029
+ * or not. This prevents this objec /**
1030
+ * This method can be called to block
1031
+ * the current thread until the ThreadPool
1032
+ * is done.
1033
+ */
1034
+
1035
+ synchronized public void waitDone()
1036
+ {
1037
+ try {
1038
+ while ( _ activeThreads>0 ) {
1039
+ wait();
1040
+ }
1041
+ } catch ( InterruptedException
1042
+
1043
+ /**
1044
+ * Called to wait for the first thread to
1045
+ * start. Once this method returns the
1046
+ * process has begun.
1047
+ */
1048
+ synchronized public void waitBegin()
1049
+ {
1050
+ try {
1051
+ while ( !_ started ) {
1052
+ wait();
1053
+ }
1054
+ } catch ( InterruptedException e
1055
+
1056
+
1057
+ /**
1058
+ * Called by a Worker object
1059
+ * to indicate that it has begun
1060
+ * working on a workload.
1061
+ */
1062
+ synchronized public void workerBegin()
1063
+ {
1064
+ _ activeThreads++;
1065
+ _ started = true;
1066
+ notify();
1067
+ }
1068
+
1069
+
1070
+ /**
1071
+ * Called by a Worker object to
1072
+ * indicate that it has completed a
1073
+ * workload.
1074
+ */
1075
+ synchronized public void workerEnd()
1076
+ {
1077
+ _ activeThreads--;
1078
+ notify();
1079
+ }
1080
+
1081
+
1082
+ /**
1083
+ * Called to reset this object to
1084
+ * its initial state.
1085
+ */
1086
+ synchronized public void reset()
1087
+ {
1088
+ _ activeThreads = 0;
1089
+ }""
1090
+ ",Code,
1091
+ 60,"60 ""Thread Pool
1092
+
1093
+ /**
1094
+ * The threads in the pool.
1095
+ */
1096
+ protected Thread threads[] = null;
1097
+ /**
1098
+ * The backlog of assignments, which are waiting
1099
+ * for the thread pool.
1100
+ */
1101
+ Collection assignments = new ArrayList(3);
1102
+
1103
+
1104
+ /**
1105
+ * A Done object that is /**
1106
+ * The constructor.
1107
+ *
1108
+ * @param sizeHow many threads in the thread pool.
1109
+ */
1110
+ public ThreadPool( int size)
1111
+ {
1112
+ threads = new WorkerThread[ size];
1113
+ for ( int i=0; i< threads. length; i++)
1114
+ {
1115
+ thr
1116
+ /**
1117
+ * Add a task to the thread pool. Any class
1118
+ * which implements the Runnable interface
1119
+ * may be assigned. When this task runs, its
1120
+ * run method will be called.
1121
+ *
1122
+ * @param r An object that implements the Runnable interface
1123
+ */
1124
+ pub
1125
+
1126
+
1127
+ /**
1128
+ * Get a new work assignment.
1129
+ *
1130
+ * @return A new assignment
1131
+ */
1132
+ public synchronized Runnable getAssignment()
1133
+ {
1134
+ try {
1135
+ while ( ! assignments. iterator(). hasNext() )
1136
+ wait();
1137
+ Runnable r = (Runnable) assignments.
1138
+
1139
+
1140
+ /**
1141
+ * Called to block the current thread until
1142
+ * the thread pool has no more work.
1143
+ */
1144
+ public void complete()
1145
+ {
1146
+ done. waitBegin();
1147
+ done. waitDone();
1148
+ } protected void finalize()
1149
+ {
1150
+ done. reset();
1151
+ for ( int i=0; i< threads. length; i++) {
1152
+ threads[ i]. interrupt();
1153
+ done. workerBegin();
1154
+ threads[ i]. destroy();
1155
+ }
1156
+ done. waitDone();
1157
+ }
1158
+ }""
1159
+ ",Code,
1160
+ 61,"61 ""Worker Thread
1161
+
1162
+ /**
1163
+ * True if this thread is currently processing.
1164
+ */
1165
+ public boolean busy;
1166
+
1167
+ /**
1168
+ * The thread pool that this object belongs to.
1169
+ */
1170
+ public ThreadPool owner;
1171
+
1172
+
1173
+ /**
1174
+ * The constructor.
1175
+ *
1176
+ * @param o the thread pool
1177
+ */
1178
+ WorkerThread(ThreadPool o)
1179
+ {
1180
+ owner = o;
1181
+ }
1182
+
1183
+
1184
+ /**
1185
+ * Scan for and execute tasks.
1186
+ */
1187
+ public void run()
1188
+ {
1189
+ Runnable target = null;
1190
+
1191
+ do
1192
+ {
1193
+ target = owner. getAssignment();
1194
+ if ( target!=null)
1195
+ {
1196
+ target. run();
1197
+ owner. done. worker""
1198
+ ",Code,
1199
+ 62,"62 ""Call Back
1200
+
1201
+
1202
+ private Hash table requirementDescTable = new Hash table();
1203
+
1204
+ private Hash table constraintDescTable = new Hash table();
1205
+
1206
+ private Hash table performanceModelTable = new Hash table();
1207
+
1208
+ private PerformanceModel performance model= null
1209
+
1210
+
1211
+ public void parseSpeculateInformation(String str)
1212
+ {
1213
+ System. out. println(""""Received String = """" + str);
1214
+ Connection conn = null;
1215
+ Statement stmt = null;
1216
+ DriverDescription dd = null;
1217
+ String eventType = null; //
1218
+
1219
+
1220
+ public void identifyPerformanceModels()
1221
+ {
1222
+ Connection conn = null;
1223
+ ResultSet rs = null;
1224
+ Statement stmt = null;
1225
+ String subscriberName = null;
1226
+ DriverDescription dd = null;
1227
+ Enumeration subscriberTableEnumeration = nu
1228
+
1229
+
1230
+ public void pullInformationFromDoors()
1231
+ {
1232
+ String serverIP = """"140.192.37.150"""";
1233
+ String[] attribute = { """"Value"""", """"Logic"""", """"Units"""", """"Attribute"""" };
1234
+ String subscriberName = null;
1235
+ Vector constraints = n
1236
+
1237
+
1238
+ public void insertValuesInDataBase()
1239
+ {
1240
+ Connection conn = null;
1241
+ Statement stmt = null;
1242
+ String subscriberName = null;
1243
+ DriverDescription dd = null;
1244
+ Vector driverVector = null;
1245
+ ConstraintsDescription cd = null;
1246
+
1247
+
1248
+
1249
+ public void createExecuteString()
1250
+ {
1251
+
1252
+ Connection conn = null;
1253
+ Statement stmt = null;
1254
+ ResultSet rs = null;
1255
+ StringBuffer sb = null;
1256
+ String subscriberName = null;
1257
+ DriverDescription dd = null;
1258
+ Vector driverVector
1259
+
1260
+
1261
+ public void parseImpactReport(String str)
1262
+ {
1263
+
1264
+ Connection conn = null;
1265
+
1266
+ Statement stmt = null;
1267
+
1268
+ Vector constraintsVector = null;
1269
+ Vector driversVector = null;
1270
+
1271
+ ConstraintsDescription constraint = null;
1272
+
1273
+ int driverLoop""
1274
+ ",Code,
1275
+ 63,"63 ""Doors Thread
1276
+
1277
+ static private int count = 0;
1278
+ private int taskNumber;
1279
+ protected Done done;
1280
+ ServerSocket theServer;
1281
+ private Connection conn;
1282
+ private Statement stmt;
1283
+ private ResultSet rs;
1284
+
1285
+
1286
+ DOORsThread(ServerSocket ss)
1287
+ {
1288
+ theServer = ss;
1289
+ count++;
1290
+ taskNumber = count;
1291
+ }
1292
+
1293
+
1294
+ public void run()
1295
+ {
1296
+
1297
+ while( true)
1298
+ {
1299
+ try
1300
+ {
1301
+ Socket client = theServer. accept();
1302
+ BufferedReader input = new BufferedReader( new InputStreamReader( client. getInputStream()));
1303
+ PrintWriter output = new P""
1304
+ ",Code,
1305
+ 64,"64 ""DOORs Thread Pool
1306
+
1307
+ public final static int defaultPort = 2347;
1308
+ ServerSocket theServer;
1309
+ // static int numberOfThreads = 3;
1310
+
1311
+
1312
+ //@param argsNo arguments are used.
1313
+ public static void main(String args[])
1314
+ {
1315
+ ThreadPool pool = new ThreadPool(1);
1316
+ int port = defaultPort;
1317
+ try
1318
+ {
1319
+ ServerSocket ss = new ServerSocket( port);
1320
+ for""
1321
+ ",Code,
1322
+ 65,"65 ""About Dialog
1323
+
1324
+ public AboutDialog(JFrame parent, boolean modal) {
1325
+ super ( parent, modal);
1326
+ getContentPane (). setLayout ( new BorderLayout ());
1327
+ setTitle (""""About"""");
1328
+ setName ("""" aboutDialog"""");
1329
+
1330
+ private JTextArea text;""
1331
+ ",Code,
1332
+ 66,"66 ""Config Dialog
1333
+
1334
+ public ConfigDialog(Notification_Processing parent, boolean modal) {
1335
+ super ( parent, modal);
1336
+ setTitle(""""Config Dialog Box"""");
1337
+ getContentPane (). setLayout ( new GridLayout(5,2));
1338
+
1339
+
1340
+ private void closeDialog(WindowEvent evt) {
1341
+ setVisible ( false);
1342
+ dispose ();
1343
+ }
1344
+
1345
+
1346
+ // event listener for """"Ok"""" button
1347
+ private void okButtonActionPerformed (ActionEvent evt) {
1348
+ if( UserName. getText(). equals("""""""") || DSN. getText(). equals("""""""") || EventServerIP. getText(). equa// event listener for """"Cancel"""" button
1349
+
1350
+
1351
+ private void cancelButtonActionPerformed (ActionEvent evt) {
1352
+ setVisible ( false);
1353
+ dispose ();
1354
+ }
1355
+
1356
+ // configuration entries
1357
+ private JLabel UserNameLabel;
1358
+ private JTextField UserName;
1359
+ private JLabel DSN Label;
1360
+ private JTextField DSN;
1361
+ private JLabel EventServerIP Label;
1362
+ private JTextField EventSe""
1363
+ ",Code,
1364
+ 67,"67 ""Event Detail Dialog
1365
+
1366
+ private GridBagLayout grid bag;
1367
+ private GridBagConstraints c;
1368
+ // objects in top panel
1369
+ private JPanel topPanel;
1370
+ private JLabel modelLabel;
1371
+ private JLabel typeLabel;
1372
+ private JTextField modelField;
1373
+ p
1374
+
1375
+
1376
+ public EventDetailDialog(EventsProcessor parent, boolean modal,Notification_Event nEvt, boolean mode)
1377
+ {
1378
+
1379
+ super ( parent, modal);
1380
+ setTitle(""""Event Details"""");
1381
+ getContentPane (). setLayout (private void closeDialog(WindowEvent evt)
1382
+ {
1383
+ setVisible ( false);
1384
+ dispose ();
1385
+ } // event listener for """"Ok/Update"""" button
1386
+
1387
+
1388
+ private void okButtonActionPerformed (ActionEvent evt)
1389
+ {
1390
+ if ( displayMode == true)
1391
+ {
1392
+ // m_ parent.DeleteEvent( m_Evt. m_SubscriberName, m_
1393
+
1394
+
1395
+ // event listener for """"Cancel"""" button
1396
+ private void cancelButtonActionPerformed (ActionEvent evt)
1397
+ {
1398
+ setVisible ( false);
1399
+ dispose ();
1400
+ }
1401
+
1402
+
1403
+ private void LeftListClicked(MouseEvent e){
1404
+ if (!LeftList. isSelectionEmpty()) {
1405
+ int index = LeftList. getSelectedIndex();
1406
+ Requirement requirement= (Requirement) m_Evt. m_LeftSide
1407
+
1408
+
1409
+ private void RightListClicked(MouseEvent e){
1410
+ if (!RightList. isSelectionEmpty()) {
1411
+ int index = RightList. getSelectedIndex();
1412
+ Requirement requirement= (Requirement) m_Evt. m_RightS""
1413
+ ",Code,
1414
+ 68,"68 ""Events Processor
1415
+ // event list
1416
+ private JList eventList;
1417
+ private DefaultListModel listModel;
1418
+ private ArrayList events;
1419
+
1420
+ // popup menu
1421
+ private JPopupMenu popup;
1422
+ // Subscriber name
1423
+ String m_SubscriberName;
1424
+ // list of requirements to be d
1425
+
1426
+ public EventsProcessor(Notification_Processing parent, boolean modal, String SubsName)
1427
+ {
1428
+ setTitle(""""EventsProcessor"""");
1429
+
1430
+ addWindowListener( new WindowAdapter()
1431
+ {
1432
+
1433
+
1434
+ public void windowClosing(WindowEve void exitApplication() {
1435
+ m_ parent.UpdateDisplayList();
1436
+ this. setVisible( false);
1437
+ this. dispose();
1438
+ }
1439
+
1440
+
1441
+ // action for """" double click on Event List""""
1442
+ private void doubleClickEventList (MouseEvent evt)
1443
+ {
1444
+ int index = eventList. getSelectedIndex();
1445
+ if ( index != -1)
1446
+ {
1447
+ try
1448
+ {
1449
+ Notification
1450
+
1451
+
1452
+ // action for """"Open First Record"""" in popup menu
1453
+ private void popupOpenActionPerformed (ActionEvent evt)
1454
+ {
1455
+ if (! listModel. isEmpty())
1456
+ {
1457
+ int index =0;
1458
+ try
1459
+ {
1460
+ Notification_Event nEvt1 = (Notificati
1461
+
1462
+
1463
+ / action for """"View Current Record"""" in popup menu
1464
+ private void popupViewActionPerformed (ActionEvent evt)
1465
+ {
1466
+ int index = eventList. getSelectedIndex();
1467
+ if ( index != -1)
1468
+ {
1469
+ try
1470
+ {
1471
+ N
1472
+
1473
+ void DeleteEvent(String SubscriberName, String EventID)
1474
+ {
1475
+ try
1476
+ {
1477
+ int i, j=-1;
1478
+ for ( i=0; i< events. size(); i++)
1479
+ {
1480
+ Notification_Event nEvt = (Notification_Event) events. get( i);
1481
+ i
1482
+
1483
+
1484
+ void DeleteRelatedEvents()
1485
+ {
1486
+ while ( m_Deleterequirement List. size()!=0)
1487
+ {
1488
+ Requirement requirement= (Requirement)( m_Deleterequirement List. get(0));
1489
+
1490
+ m_Deleterequirement List. remove(0);
1491
+
1492
+
1493
+
1494
+ void AddSubscription(String SubscriberName, Requirement requirement )
1495
+ {
1496
+ String SubscriberDependency = """"Requirements"""";
1497
+ String Message = """"ADD_SUBSCRIPTION""""+""""|"""";
1498
+ Message += m_UserName + """"|"""";
1499
+ Message += Subscribervoid DeleteSubscription(String SubscriberName, Requirement requirement )
1500
+ {
1501
+ String Message = """"REMOVE_SUBSCRIPTION""""+""""|"""";
1502
+ Message += SubscriberName + """"|"""";
1503
+ Message += requirement . m_RequirementID + """","""";
1504
+ Message += req
1505
+
1506
+
1507
+ void UpdateDisplayList()
1508
+ {
1509
+ listModel. removeAllElements();
1510
+ for ( int j=0; j< events. size(); j++)
1511
+ {
1512
+ Notification_Event nEvt = (Notification_Event) events. get( j);
1513
+ String displayStri
1514
+
1515
+
1516
+ // Passes a CHECK_SUBSCRIPTION message to the eventserver and waits for a response
1517
+ private boolean Check_Subscription(String ip,
1518
+ int PortNo,
1519
+ String SubscriberName,
1520
+ String Requirement // Takes an event string returned from the eventserver and
1521
+ // extracts True or False response
1522
+
1523
+
1524
+
1525
+ private boolean Analyze_CheckSubscription(String str)
1526
+ {
1527
+ StringTokenizer tokens = new StringTokenizer( str,""""|"""");
1528
+ String Messag""
1529
+ ",Code,
1530
+ 69,"69 ""Notification Event
1531
+
1532
+ public String m_SubscriberName = """""""";
1533
+ public String m_EventID = """""""";
1534
+ public String m_Message type = """""""";
1535
+ public String m_EventType = """""""";
1536
+ public int m_NumberOfRequirements = 0;
1537
+ public String m_EventTim
1538
+
1539
+ public Notification_Event()
1540
+ {
1541
+ m_LeftSide = new ArrayList();
1542
+ m_RightSide = new ArrayList();
1543
+ }
1544
+
1545
+
1546
+ public Object clone() throws CloneNotSupportedException
1547
+ {
1548
+ Notification_Event nEvt = (Notification_Event) super. clone();
1549
+ nEvt. m_LeftSide = new ArrayList();
1550
+ nEvt. m_RightSide = new ArrayLis
1551
+
1552
+
1553
+ public void ParseEvent(String TextLine)
1554
+ {
1555
+ StringTokenizer LineSt; // Tokenizer for the line
1556
+ int i=0;
1557
+ LineSt = new StringTokenizer(TextLine, """"|"""");
1558
+ m_SubscriberName = LineSt. nextToken// Set the other members before calling this function
1559
+
1560
+
1561
+ public void ParseLeftAndRightLists(String LeftLine, String RightLine)
1562
+ {
1563
+ m_LeftSide = new ArrayList();
1564
+ m_RightSide = new ArrayList();
1565
+
1566
+ if ( m_Eve
1567
+
1568
+ public void DisplayValues()
1569
+ {
1570
+ System. out. println(""""\ r\ nValues of the event:\ r\ n"""");
1571
+ System. out. println("""" m_SubscriberName: """"+ m_SubscriberName);
1572
+ System. out. println("""" m_EventI""
1573
+ ",Code,
1574
+ 70,"70 ""Notification Processing
1575
+
1576
+ // member variables for menu
1577
+ private JMenuBar menuBar;
1578
+ // subscriber list
1579
+ private JList SubscriberList;
1580
+ private DefaultListModel listModel;
1581
+ // popup menu
1582
+ private JPopupMenu popup;
1583
+
1584
+ // database and eventserver information
1585
+ S
1586
+
1587
+ public Notification_Processing()
1588
+ {
1589
+ setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
1590
+
1591
+ addWindowListener( new WindowAdapter()
1592
+ {
1593
+ public void windowClosing(WindowEvent evt)
1594
+ {
1595
+ try
1596
+
1597
+
1598
+ public static void main(String args[])
1599
+ {
1600
+ try
1601
+ {
1602
+ Notification_Processing mainFrame = new Notification_Processing();
1603
+ mainFrame. setSize(600, 400);
1604
+ mainFrame. setLocation(100, 100);
1605
+ mainFrame. void exitApplication()
1606
+ {
1607
+ try
1608
+ {
1609
+ int reply = JOptionPane. showConfirmDialog( this,
1610
+ """"Do you really want to exit?"""",
1611
+ """"No
1612
+
1613
+
1614
+ // action for """"Open log database""""
1615
+ private void openMenuItemActionPerformed (ActionEvent evt)
1616
+ {
1617
+ new ConfigDialog( this, true). show();
1618
+ if( m_DSN. equals("""""""") || m_EventServerIP. equals("""""""") || m_// action for """"Close log database""""
1619
+
1620
+
1621
+
1622
+ private void saveMenuItemActionPerformed (ActionEvent evt)
1623
+ {
1624
+ try
1625
+ {
1626
+ m_ conn. close();
1627
+ m_DSN="""""""";
1628
+ m_EventServerIP="""""""";
1629
+ m_EventServerPort="""""""";
1630
+
1631
+
1632
+ // action for """" exit""""
1633
+ private void exitMenuItemActionPerformed (ActionEvent evt)
1634
+ {
1635
+ exitApplication();
1636
+ }
1637
+
1638
+
1639
+ // action for """"Open Events"""" in popup menu
1640
+ private void popupOpenActionPerformed (ActionEvent evt)
1641
+ {
1642
+ openEventsMenuItemActionPerformed( evt);
1643
+ }
1644
+
1645
+ // action for """"Open Events""""
1646
+ private void openEventsMenuItemActionPerformed (ActionEvent evt)
1647
+ {
1648
+ if (! listModel. isEmpty())
1649
+ {
1650
+ int index = SubscriberList. getSelectedIndex();
1651
+ if ( index != -1)
1652
+
1653
+
1654
+ // action for """" double click on Subscriber List""""
1655
+ private void doubleClickSubscriberList (MouseEvent evt)
1656
+ {
1657
+ if (! listModel. isEmpty())
1658
+ {
1659
+ int index = SubscriberList. getSelectedIndex();
1660
+ if ( index != -1
1661
+
1662
+
1663
+ // action for """"About""""
1664
+ private void aboutMenuItemActionPerformed (ActionEvent evt)
1665
+ {
1666
+ new AboutDialog ( this, true). show();
1667
+ }
1668
+
1669
+
1670
+ void UpdateDisplayList()
1671
+ {
1672
+ listModel. removeAllElements();
1673
+ String mSQL = """"SELECT distinct SubscriberName FROM EventDetails"""";
1674
+ try
1675
+ {
1676
+ rs = stmt. executeQuery( mSQL);
1677
+ while ( rs. next())
1678
+ {
1679
+ ""
1680
+ ",Code,
1681
+ 71,"71 ""Requirement
1682
+
1683
+ public String m_RequirementID ="""""""";
1684
+ public String m_Project ="""""""";
1685
+ public String m_ModulePath="""""""";
1686
+ public String m_Content = """""""";
1687
+ public String m_RegFlag = """"N"""";
1688
+
1689
+ public Requirement()
1690
+ {
1691
+ }
1692
+
1693
+ public Object clone() throws CloneNotSupportedException
1694
+ {
1695
+ Requirement requirement= (Requirement) super. clone();
1696
+ return requirement ;
1697
+ }
1698
+
1699
+
1700
+ public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag)
1701
+ {
1702
+ this. m_RequirementID = RequirementID;
1703
+ this. m_Project = Project;
1704
+ this. m_ModulePath
1705
+
1706
+ public void ParseRequirement(String TextLine)
1707
+ {
1708
+ StringTokenizer LineSt;
1709
+ LineSt = new StringTokenizer(TextLine, """","""");
1710
+ m_RequirementID=LineSt. nextToken();
1711
+ m_Project=LineSt. ""
1712
+ ",Code,
1713
+ 72,"72 ""Balance
1714
+ /**
1715
+ * Symbol represents what will be placed on the stack.
1716
+ */
1717
+ private static class Symbol
1718
+ {
1719
+ public chartoken;
1720
+ public int theLine;
1721
+
1722
+ public Symbol( char tok, int line )
1723
+ {
1724
+ token = /**
1725
+ * Constructor.
1726
+ * @param inStream the stream containing a program.
1727
+ */
1728
+
1729
+
1730
+ public Balance( Reader inStream )
1731
+ {
1732
+ errors = 0;
1733
+ tok = new Tokenizer( inStream );
1734
+ }
1735
+
1736
+
1737
+ /**
1738
+ * Print an error message for unbalanced symbols.
1739
+ * @return number of errors detected.
1740
+ */
1741
+ public int checkBalance( )
1742
+ {
1743
+ char ch;
1744
+ Symbol match = null;
1745
+ Stack pendingTokens = new Stack( );
1746
+ private Tokenizer tok;
1747
+ private int errors;
1748
+
1749
+
1750
+ /**
1751
+ * Print an error message if clSym does not match opSym.
1752
+ * Update errors.
1753
+ */
1754
+ private void checkMatch( Symbol opSym, Symbol clSym )
1755
+ {
1756
+ if( opSym. token == '(' && clSym. token != ')' ||
1757
+
1758
+
1759
+ /**
1760
+ * main routine for balanced symbol checker.
1761
+ * Slightly different from text.
1762
+ * If no command line parameters, standard input is used.
1763
+ * Otherwise, files in command line are used.
1764
+ */
1765
+ public static void main( St""
1766
+ ",Code,
1767
+ 73,"73 ""Constraints
1768
+
1769
+ String id;
1770
+ String name;
1771
+ double value;
1772
+ String logic;
1773
+
1774
+
1775
+ Constraints(String id, String name, double value, String logic){
1776
+ this. id = id;
1777
+ this. name = name;
1778
+ this. value = value;
1779
+ this. logic = logic;
1780
+ }
1781
+
1782
+
1783
+ public String toString(){
1784
+ String temp;
1785
+ temp = """"ID = """" + id + """", Name = """" + name +"""", value = """" + value + """", Logic = """" + logic;
1786
+ return temp;
1787
+ }
1788
+
1789
+
1790
+ /**
1791
+ * Returns the id.
1792
+ * @return int
1793
+ */
1794
+ public String getId() {
1795
+ return id;
1796
+ }
1797
+
1798
+
1799
+ /**
1800
+ * Returns the logic.
1801
+ * @return String
1802
+ */
1803
+ public String getLogic() {
1804
+ return logic;
1805
+ }
1806
+
1807
+
1808
+ /**
1809
+ * Returns the name.
1810
+ * @return String
1811
+ */
1812
+ public String getName() {
1813
+ return name;
1814
+ }
1815
+
1816
+ /**
1817
+ * Returns the value.
1818
+ * @return double
1819
+ */
1820
+ public double getValue() {
1821
+ return value;
1822
+ }
1823
+
1824
+
1825
+ /**
1826
+ * Sets the id.
1827
+ * @param id The id to set
1828
+ */
1829
+ public void setId(String id) {
1830
+ this. id = id;
1831
+ }
1832
+
1833
+ **
1834
+ * Sets the logic.
1835
+ * @param logic The logic to set
1836
+ */
1837
+ public void setLogic(String logic) {
1838
+ this. logic = logic;
1839
+ }
1840
+
1841
+
1842
+ /**
1843
+ * Sets the name.
1844
+ * @param name The name to set
1845
+ */
1846
+ public void setName(String name) {
1847
+ this. name = name;
1848
+ }
1849
+
1850
+
1851
+ /**
1852
+ * Sets the value.
1853
+ * @param value The value to set
1854
+ */
1855
+ public void setValue( double value) {
1856
+ this. value = value;
1857
+ }""
1858
+ ",Code,
1859
+ 74,"74 ""database
1860
+
1861
+
1862
+ QueryConnection conn=null;
1863
+ ResultSet rs=null;
1864
+ Statement stmt=null;
1865
+ String mSQL="""""""";
1866
+
1867
+ Vector structVector = new Vector(); // for holding the dummy variable objects used in executeStructure()
1868
+ Variable v;// create this object and
1869
+
1870
+
1871
+ /**
1872
+ * Construct a connection object.
1873
+ * @param Returns an object of type Connection
1874
+ */
1875
+ public Connection getConnection()
1876
+ {
1877
+ System. out. println("""" in get Connection"""");
1878
+ Connection connect=null;
1879
+ try
1880
+ {
1881
+ Class. fo
1882
+
1883
+
1884
+
1885
+ /**
1886
+ * Returns GraphId as int
1887
+ * @param graphName performance modelHandler calls this method with graphName
1888
+ * as parameter, performance modelHandler parse the EventServer message and get the
1889
+ * graphName
1890
+ */
1891
+ public int get
1892
+
1893
+
1894
+ /**
1895
+ * Copy data from one set of columns to other in table Variable
1896
+ * @param graphId is the id of graph for which you want to save the
1897
+ * current state of variables
1898
+ */
1899
+ public void saveCurrentModel( int graphId)
1900
+ {
1901
+ conn = this. getConnect
1902
+
1903
+
1904
+ /**
1905
+ * Injects new value into Variable table, using Data stored in
1906
+ * Vector of Variable object
1907
+ * @param graphId is the id of graph
1908
+ * @param Vector var is the Vector that stores the Object of type Variable
1909
+ */
1910
+ public void injectVa
1911
+
1912
+ /**
1913
+ * this method will pick up the structure id from SPE Structure
1914
+ * If DependentStructureId is 0 then select StructureID
1915
+ * and invoke the executeStructure method on Selected
1916
+ * StructureId
1917
+ * Who Invokes this method: performance model // this method is about executing the structure
1918
+ // based on StructureId find all the data related to given StructureId
1919
+ // and using the equation in string format call the method equationParser.
1920
+ //I am passing Vector that has all the data abou
1921
+ public void solveStructure( int StructureId, Vector vr)
1922
+ {
1923
+ System. out. println(""""Inside solveStructure()&&&&&&&&&&&&&&&&&&&&&&&"""");
1924
+ Connection conn1 = this. getConnection();
1925
+ System. out. println("""" in solveStru
1926
+
1927
+
1928
+ public void solveStructureEquation()
1929
+ {
1930
+ System. out. println(""""Inside solveStructureEquation()%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"""");
1931
+ //Based on that result find out the equation and replace the name by its value
1932
+ System
1933
+
1934
+
1935
+ public void getTrackVariableName()
1936
+ {
1937
+ System. out. println(""""Inside getTrackVariableName()$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$"""");
1938
+ //This will get the variable name from SPE Graph and find the same name in variable
1939
+ // and inse
1940
+
1941
+
1942
+ public void setCalculatedValues()
1943
+ {
1944
+ System. out. println(""""Inside setCalculatedValues()>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"""");
1945
+ // and at matching location put the calculated values
1946
+ System. out. println("""" enter calcValue // this method creates the token for each variable name in the string
1947
+ // and store that variable into vector
1948
+ // it also creates the vector called varValues
1949
+ // varValues has values of each variable stored in varName
1950
+ //So equation has variable n
1951
+
1952
+
1953
+ public Vector getImpactReport()
1954
+ {
1955
+ //This SPE Graph works on the assumption that each model tracks
1956
+ // the effect of changes on one variable
1957
+ Vector report = new Vector();
1958
+ report. add( trackVariableName);
1959
+ report. add(Stri""
1960
+ ",Code,
1961
+ 75,"75 ""Driver
1962
+
1963
+ String id;
1964
+ double valueFrom;
1965
+ double valueTo;
1966
+ String name; Driver(String id, double valueFrom, double valueTo, String name)
1967
+ {
1968
+ this. id = id;
1969
+ this. valueFrom = valueFrom;
1970
+ this. valueTo = valueTo;
1971
+ this. name = name;
1972
+ }
1973
+
1974
+
1975
+ public String toString()
1976
+ {
1977
+ String temp;
1978
+ temp = """"ID = """" + id + """", valueFrom = """" + valueFrom + """", valueTo = """" + valueTo + """", Name = """" + name;
1979
+ return temp;
1980
+ }
1981
+
1982
+ /**
1983
+ * Returns the id.
1984
+ * @return int
1985
+ */
1986
+ public String getId()
1987
+ {
1988
+ return id;
1989
+ }
1990
+
1991
+
1992
+ /**
1993
+ * Returns the name.
1994
+ * @return String
1995
+ */
1996
+ public String getName()
1997
+ {
1998
+ return name;
1999
+ }
2000
+
2001
+
2002
+ /**
2003
+ * Returns the value.
2004
+ * @return double
2005
+ */
2006
+ public double getValueFrom()
2007
+ {
2008
+ return valueFrom;
2009
+ }
2010
+
2011
+
2012
+ public double getValueTo()
2013
+ {
2014
+ return valueTo;
2015
+ }
2016
+
2017
+
2018
+ /**
2019
+ * Sets the id.
2020
+ * @param id The id to set
2021
+ */
2022
+ public void setId(String id)
2023
+ {
2024
+ this. id = id;
2025
+ }
2026
+
2027
+
2028
+ **
2029
+ * Sets the name.
2030
+ * @param name The name to set
2031
+ */
2032
+ public void setName(String name)
2033
+ {
2034
+ this. name = name;
2035
+ }
2036
+
2037
+
2038
+ **
2039
+ * Sets the value.
2040
+ * @param value The value to set
2041
+ */
2042
+ public void setValueFrom( double value)
2043
+ {
2044
+ this. valueFrom = valueFrom;
2045
+ }
2046
+
2047
+
2048
+ public void setValueTo( double value)
2049
+ {
2050
+ this. valueTo = valueTo;
2051
+ }""
2052
+ ",Code,
2053
+ 76,"76 ""Evaluator
2054
+
2055
+ private static final int EOL = 0;
2056
+ private static final int VALUE = 1;
2057
+ private static final int OPAREN= 2;
2058
+ private static final int CPAREN= 3;
2059
+ private static final int EXP = 4;
2060
+ private static final int MULT=
2061
+
2062
+
2063
+ private static class Precedence
2064
+ {
2065
+ public int inputSymbol; // refers to the precedence level of operator
2066
+ public int topOfStack; // stores the operator in the form of integer
2067
+
2068
+ public Precedence( int inSymbol, int // PrecTable matches order of Token enumeration
2069
+ private static Precedence [ ] precTable = new Precedence[ ]
2070
+ {
2071
+
2072
+ new Precedence( 0, -1 ),// EOL
2073
+ new Precedence( 0,0 ),// VALUE
2074
+ new Precedence( 100
2075
+
2076
+
2077
+ private static class Token
2078
+ {
2079
+ public Token( ) { this( EOL ); }
2080
+ public Token( int t ) { this( t, 0 ); }
2081
+ public Token( int t, double v ) {
2082
+ System. out. println("""" INSIDE Token.Token()"""");
2083
+ private static class EvalTokenizer {
2084
+
2085
+
2086
+ public EvalTokenizer( StringTokenizer is ) {
2087
+ System. out. println(""""INSIDE EvalTokenizer"""");
2088
+ str = is;
2089
+ }
2090
+
2091
+ /**
2092
+ * Find the next token, skipping blanks, and return it.
2093
+ * For VALUE token, place the processed value in currentValue.
2094
+ * Print error message if input is unrecognized.
2095
+ */
2096
+ public Token getToken
2097
+
2098
+ /**
2099
+ * Construct an evaluator object.
2100
+ * @param s the string containing the expression.
2101
+ */
2102
+ public Evaluator( String s ) {
2103
+ opStack = new Stack( );
2104
+ postfixStack = new Stack( );
2105
+ str = new StringTokeni // The only publicly visible routine
2106
+
2107
+ /**
2108
+ * Public routine that performs the evaluation.
2109
+ * Examine thepostfix machine to see if a single result is
2110
+ * left and if so, return it; otherwise print error.
2111
+ * @return the result.
2112
+ private Stack opStack; // Operator stack for conversion
2113
+ private Stack postfixStack;// Stack for postfix machine that stores the numbers could be values or result
2114
+ private StringTokenizer str; // StringTokenizer stream, conte
2115
+
2116
+
2117
+ /**
2118
+ * Internal method that hides type-casting.
2119
+ * Changed the method to support double
2120
+ */
2121
+ private double postFixTopAndPop( ) {
2122
+ System. out. println(""""INSIDE postFixTopAndPop method"""");
2123
+ System
2124
+
2125
+
2126
+ /**
2127
+ * Another internal method that hides type-casting.
2128
+ */
2129
+ private int opStackTop( ) {
2130
+ return ( (Integer) ( opStack. peek( ) ) ). intValue( );
2131
+ }
2132
+
2133
+
2134
+ /**
2135
+ * After a token is read, use operator precedence parsing
2136
+ * approach to process it; missing opening parentheses
2137
+ * are detected here.
2138
+ */
2139
+ private void processToken( Token lastToken ) {
2140
+ System. out. printl
2141
+
2142
+
2143
+ /*
2144
+ * topAndPop the postfix machine stack; return the result.
2145
+ * If the stack is empty, print an error message.
2146
+ */
2147
+ private double getTop( ) { // change to support double
2148
+ System. out. println(""""INSIDE GET TOP
2149
+
2150
+
2151
+ /**
2152
+ * Internal routine to compute x^ n.
2153
+ */
2154
+ private static double pow( double x, double n ) {
2155
+ System. out. println(""""INSIDE pow"""");
2156
+ if( x == 0 ) {
2157
+ if( n == 0 ){
2158
+ System. out.
2159
+
2160
+
2161
+ /**
2162
+ * Process an operator by taking two items off the postfix
2163
+ * stack, applying the operator, and pushing the result.
2164
+ * Print error if missing closing parenthesis or division by 0.
2165
+ */
2166
+ private void binaryOp( int topOp/**
2167
+ * Simple main to exercise Evaluator class.
2168
+ */
2169
+
2170
+
2171
+
2172
+ public static void main( String [ ] args ) {
2173
+ String str;
2174
+ BufferedReader in = new BufferedReader( new InputStreamReader( System. in ) );
2175
+ try {
2176
+ ""
2177
+ ",Code,
2178
+ 77,"77 ""Model Driver
2179
+
2180
+ String msg="""""""";
2181
+
2182
+ public ModelDriver(String text)
2183
+ {
2184
+ this. msg = text;
2185
+ init();
2186
+ }
2187
+
2188
+
2189
+ public void init()
2190
+ {
2191
+ System. out. println(""""MODEL DRIVER CLASS 1/10"""");
2192
+ performance modelHandler pmh = new performance modelHandler( msg);
2193
+ System. out. println(""""MODEL DRIVER CLASS 2/10"""");
2194
+ pmh. messageParser""
2195
+ ",Code,
2196
+ 78,"78 ""Notification Event
2197
+
2198
+ public String m_SubscriberName = """""""";
2199
+ public String m_EventID = """""""";
2200
+ public String m_Message type = """""""";
2201
+ public String m_EventType = """""""";
2202
+ public int m_NumberOfRequirements = 0;
2203
+ public String m_EventTim
2204
+
2205
+ // constructor
2206
+ public Notification_Event()
2207
+ {
2208
+ m_LeftSide = new ArrayList();
2209
+ m_RightSide = new ArrayList();
2210
+ }
2211
+
2212
+ // end of class Notification_Event
2213
+ public Object clone() throws CloneNotSupportedException
2214
+ {
2215
+ // create new object with the same type
2216
+ Notification_Event nEvt = (Notification_Event) super. clone();
2217
+ nEvt. m_LeftSide = new ArrayList();
2218
+ n
2219
+
2220
+
2221
+ public void ParseEvent(String TextLine)
2222
+ {
2223
+ String msg = TextLine;
2224
+ if( msg. startsWith(""""Re-execute"""") )
2225
+ {
2226
+ ModelDriver md = new ModelDriver( msg );
2227
+ md. init();
2228
+ //ToDo:
2229
+ // divert all the calls fo
2230
+
2231
+
2232
+ // Set the other members before calling this function
2233
+ public void ParseLeftAndRightLists(String LeftLine, String RightLine)
2234
+ {
2235
+ m_LeftSide = new ArrayList();
2236
+ m_RightSide = new ArrayList();
2237
+ if ( m_Eve //Comment Added by Amit Uchat
2238
+
2239
+
2240
+
2241
+ //This method displays the contents of two array list to console
2242
+ public void DisplayValues()
2243
+ {
2244
+ System. out. println(""""\ r\ nValues of the event:\ r\ n"""");
2245
+ System. out. println("""" ""
2246
+ ",Code,
2247
+ 79,"79 ""performance model Handler
2248
+
2249
+ String strES; // string received from eventserver
2250
+ String impactReport;// string to be send to eventServer
2251
+
2252
+ String commandStr; // represent the command ex. execute, re - execute etc
2253
+ String eventId;// refers to the eventId
2254
+ String
2255
+
2256
+
2257
+ performance model Handler(String msg)
2258
+ {
2259
+ this. strES = msg;
2260
+ }
2261
+
2262
+ public void messageParser()
2263
+ {
2264
+ System. out. println(""""INSIDE PARSER"""");
2265
+ mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto
2266
+ tempStr1 = mainSto. nextToken();
2267
+
2268
+
2269
+ //Re-execut
2270
+ public String generateReport()
2271
+ {
2272
+ System. out. println(""""INSIDE generateReport"""");
2273
+ mainSto = new StringTokenizer( strES,""""|""""); // current ex will have 10 tokens in mainSto
2274
+ /*
2275
+ """"ImpactReport|1015818161020| int grId;
2276
+
2277
+
2278
+ public int getId(){
2279
+ // get GraphId
2280
+ System. out. println(""""database start"""");
2281
+ int grId = database. getGraphId( modelName);
2282
+ return grId;
2283
+ }
2284
+
2285
+
2286
+ public void saveModel( int id)
2287
+ {
2288
+ // save current model
2289
+ database. saveCurrentModel( id);
2290
+ }
2291
+
2292
+
2293
+ public void insertData( int id){
2294
+ // inject data into model
2295
+ database. injectVariables( id, variable);
2296
+ }
2297
+
2298
+ public void execute( int id){
2299
+ // inject data into model
2300
+ database. executeModel( id, variable);
2301
+ }""
2302
+ ",Code,
2303
+ 80,"80 ""Requirement
2304
+
2305
+ public String m_RequirementID ="""""""";
2306
+ public String m_Project ="""""""";
2307
+ public String m_ModulePath="""""""";
2308
+ public String m_Content = """""""";
2309
+ public String m_RegFlag = """"N"""";
2310
+
2311
+
2312
+ public Requirement() {// empty constructor
2313
+
2314
+ }
2315
+
2316
+ public Object clone() throws CloneNotSupportedException {
2317
+ Requirement requirement= (Requirement) super. clone();
2318
+ return requirement ;
2319
+ }
2320
+
2321
+
2322
+ public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) {
2323
+ this. m_RequirementID = RequirementID;
2324
+ this. m_Project = Project;
2325
+ this. m_ModulePath
2326
+
2327
+
2328
+ public void ParseRequirement(String TextLine) {
2329
+ StringTokenizer LineSt;
2330
+ LineSt = new StringTokenizer(TextLine, """","""");
2331
+ m_RequirementID=LineSt. nextToken();
2332
+ m_Project=Line""
2333
+ ",Code,
2334
+ 81,"81 ""subscribermanager
2335
+
2336
+ Socket aSocket;
2337
+ int ID;
2338
+ String EventLog;
2339
+
2340
+ Connection conn;
2341
+ ResultSet rs;
2342
+ Statement stmt;
2343
+
2344
+ // constructor, this object will be created in the main method of these class
2345
+ SubscriberListener() { }
2346
+
2347
+ // constructor, this object will be created in the main method of these class
2348
+ SubscriberListener(Socket socket, int ID, String ELog)
2349
+ {
2350
+ this. aSocket = socket;
2351
+ this.ID = ID;
2352
+ this.EventLog = ELog;
2353
+ try
2354
+ {
2355
+
2356
+
2357
+ }
2358
+ public void sendImpactReportToEventServer(String text)
2359
+ {
2360
+ //String impactReport = text;
2361
+ System. out. println(""""WOW IN SEND REPORT"""");
2362
+ System. out. println(""""The IR = """"+ text);
2363
+ String serverIP = """"140.
2364
+
2365
+
2366
+ // run method will be execute from the main method when u say Thread. start() in main
2367
+ public void run()
2368
+ {
2369
+ System. out. println(""""Inside Run method"""");
2370
+ String str="""""""";
2371
+ try
2372
+ {
2373
+
2374
+
2375
+
2376
+ // set up for reading the byte data in to characte // start of class from here
2377
+ public static void main(String[] args)
2378
+ {
2379
+ // default port number
2380
+ int port = 1705;
2381
+ // the message coming from eventserver
2382
+ String LogName = """"EventLog"""";
2383
+ //LogName is the database name used to log t""
2384
+ ",Code,
2385
+ 82,"82 ""Tokenizer
2386
+
2387
+
2388
+ /**
2389
+ * Constructor.
2390
+ * @param inStream the stream containing a program.
2391
+ */
2392
+ public Tokenizer( Reader inStream )
2393
+ {
2394
+ errors = 0;
2395
+ ch = '\0';
2396
+ currentLine = 1;
2397
+ in = new PushbackReader
2398
+
2399
+
2400
+ /**
2401
+ * Gets current line number.
2402
+ * @return current line number.
2403
+ */
2404
+ public int getLineNumber( )
2405
+ {
2406
+ return currentLine;
2407
+ }
2408
+
2409
+
2410
+ /**
2411
+ * Gets error count.
2412
+ * @return error count.
2413
+ */
2414
+ public int getErrorCount( )
2415
+ {
2416
+ return errors;
2417
+ }
2418
+
2419
+
2420
+ /**
2421
+ * Get the next opening or closing symbol.
2422
+ * Return false if end of file.
2423
+ * Skip past comments and character and string constants
2424
+ */
2425
+ public char getNextOpenClose( )
2426
+ {
2427
+ while( nextChar( ) )
2428
+ {
2429
+
2430
+
2431
+
2432
+ /**
2433
+ * Return true if ch can be part of a Java identifier
2434
+ */
2435
+ private static final boolean isIdChar( char ch )
2436
+ {
2437
+ return Character. isJavaIdentifierPart( ch );
2438
+ }
2439
+
2440
+
2441
+ /**
2442
+ * Return an identifier read from input stream
2443
+ * First character is already read into ch
2444
+ */
2445
+ private String getRemainingString( )
2446
+ {
2447
+ String result = """""""" + ch;
2448
+
2449
+ for( ; nextChar( ); result += ch )
2450
+
2451
+
2452
+
2453
+ /**
2454
+ * Return next identifier, skipping comments
2455
+ * string constants, and character constants.
2456
+ * Place identifier in currentIdNode. word and return false
2457
+ * only if end of stream is reached.
2458
+ */
2459
+ public String getNe
2460
+
2461
+
2462
+ /**
2463
+ * nextChar sets ch based on the next character in the input stream.
2464
+ * putBackChar puts the character back onto the stream.
2465
+ * It should only be used once after a nextChar.
2466
+ * Both routines adjust currentLine if necess
2467
+ private void putBackChar( )
2468
+ {
2469
+ if( ch == '\ n' )
2470
+ currentLine--;
2471
+ try
2472
+ { in. unread( ( int) ch ); }
2473
+ catch( IO Exception e ) { }
2474
+ }
2475
+
2476
+
2477
+ /**
2478
+ * Precondition: We are about to process a comment; have already seen
2479
+ * comment-start token
2480
+ * Post condition: Stream will be set immediately after
2481
+ * comment-ending token
2482
+ */
2483
+ private
2484
+
2485
+
2486
+ /**
2487
+ * Precondition: We are about to process a quote; have already seen
2488
+ * beginning quote.
2489
+ * Post condition: Stream will be set immediately after
2490
+ * matching quote
2491
+ */
2492
+
2493
+ private void skip
2494
+
2495
+
2496
+ /**
2497
+ * After the opening slash is seen deal with next character.
2498
+ * If it is a comment starter, process it; otherwise put back
2499
+ * the next character if it is not a new line.
2500
+ */
2501
+ private void processSlash( )
2502
+ {
2503
+ ifpublic static final int SLASH_SLASH = 0;
2504
+ public static final int SLASH_STAR= 1;
2505
+ private PushbackReader in;// The input stream
2506
+ private char ch;// Current character
2507
+ private int currentLine;//""
2508
+ ",Code,
2509
+ 83,"83 ""Variable
2510
+
2511
+ String id = """"""""; // requirement id ex WB10
2512
+ String type= """"""""; // type of requirement ex Driver or Constraints
2513
+ String name= """"""""; // requirement name which is same as variable name in graph
2514
+ double value= 0.0; // value of variable
2515
+ double speculat
2516
+
2517
+
2518
+ //General Constructor to initialize all the members
2519
+ Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path)
2520
+ {
2521
+ this. id = id;
2522
+ this. type = type;
2523
+ this.
2524
+
2525
+
2526
+ //Constructor to Add driver related members
2527
+ Variable(String id, String type, String name, double value, double speculateValue)
2528
+ {
2529
+ this. id = id;
2530
+ this. type = type;
2531
+ this. name = name;
2532
+ this. value = value;
2533
+ this
2534
+
2535
+
2536
+ //Constructor to Add constraints related members
2537
+ Variable(String id, String type, String name, double value, String logic){
2538
+ this. id = id;
2539
+ this. type = type;
2540
+ this. name = name;
2541
+ this. value = value;
2542
+ this. logic
2543
+
2544
+
2545
+
2546
+ public String toString()
2547
+ {
2548
+ String temp;
2549
+ temp = """"ID = """" + id + """", Type = """" + type + """", Name = """" + name +"""", value = """" + value +
2550
+ """", SpeculateValue = """" + speculateValue + """", Logic = """" + logic + """", Project_Path = """" + project_ path
2551
+
2552
+
2553
+ /**
2554
+ * Returns the id.
2555
+ * @return int
2556
+ */
2557
+ public String getId()
2558
+ {
2559
+ return id;
2560
+ }
2561
+
2562
+
2563
+ /**
2564
+ * Returns the logic.
2565
+ * @return String
2566
+ */
2567
+ public String getLogic()
2568
+ {
2569
+ return logic;
2570
+ }
2571
+
2572
+
2573
+ /**
2574
+ * Returns the name.
2575
+ * @return String
2576
+ */
2577
+ public String getName()
2578
+ {
2579
+ return name;
2580
+ }
2581
+
2582
+
2583
+ /**
2584
+ * Returns the value.
2585
+ * @return double
2586
+ */
2587
+ public double getValue() {
2588
+ return value;
2589
+ }
2590
+
2591
+
2592
+ /**
2593
+ * Sets the id.
2594
+ * @param id The id to set
2595
+ */
2596
+ public void setId(String id) {
2597
+ this. id = id;
2598
+ }
2599
+
2600
+
2601
+ /**
2602
+ * Sets the logic.
2603
+ * @param logic The logic to set
2604
+ */
2605
+ public void setLogic(String logic) {
2606
+ this. logic = logic;
2607
+ }
2608
+
2609
+
2610
+ /**
2611
+ * Sets the name.
2612
+ * @param name The name to set
2613
+ */
2614
+ public void setName(String name) {
2615
+ this. name = name;
2616
+ }
2617
+
2618
+
2619
+ /**
2620
+ * Sets the value.
2621
+ * @param value The value to set
2622
+ */
2623
+ public void setValue( double value) {
2624
+ this. value = value;
2625
+ }
2626
+
2627
+
2628
+ /**
2629
+ * Returns the speculateValue.
2630
+ * @return double
2631
+ */
2632
+ public double getSpeculateValue() {
2633
+ return speculateValue;
2634
+ }
2635
+
2636
+
2637
+ /**
2638
+ * Sets the speculateValue.
2639
+ * @param speculateValue The speculateValue to set
2640
+ */
2641
+ public void setSpeculateValue( double speculateValue) {
2642
+ this. speculateValue = speculateValue;
2643
+ }
2644
+
2645
+
2646
+ /**
2647
+ * Returns the type.
2648
+ * @return String
2649
+ */
2650
+ public String getType() {
2651
+ return type;
2652
+ }
2653
+
2654
+
2655
+ /**
2656
+ * Sets the type.
2657
+ * @param type The type to set
2658
+ */
2659
+ public void setType(String type) {
2660
+ this. type = type;
2661
+ }
2662
+
2663
+
2664
+ /**
2665
+ * Returns the project_ path.
2666
+ * @return String
2667
+ */
2668
+ public String getProject_ path() {
2669
+ return project_ path;
2670
+ }
2671
+
2672
+
2673
+ /**
2674
+ * Sets the project_ path.
2675
+ * @param project_ path The project_ path to set
2676
+ */
2677
+ public void setProject_ path(String project_ path) {
2678
+ this. project_ path = project_ path;
2679
+ }""
2680
+ ",Code,
2681
+ 84,"84 ""White Board Execution Graph
2682
+
2683
+ //Driver data members
2684
+ double avgShapeSize_Original;
2685
+ double avgShapeSize_Speculate;
2686
+ // constraints data members
2687
+ double avgTextSize;
2688
+ double writeTime;
2689
+ double noShapes;
2690
+ double noTextItems;
2691
+ double bandWidth
2692
+
2693
+
2694
+ public WhiteBoardExecutionGraph(Vector driver, Vector constraints){
2695
+ this. driver = driver;
2696
+ this. constraints = constraints;
2697
+ }// end of constructor
2698
+
2699
+
2700
+
2701
+ public String toString(){
2702
+ String result;
2703
+ result = """" avgShapeSize_Original = """" + avgShapeSize_Original +
2704
+ """",\ navgShapeSize_Speculate = """" + avgShapeSize_Speculate +
2705
+ """",\ navgTextSize = """" + avgTextSize
2706
+
2707
+
2708
+ public void injectDrivers(){
2709
+ System. out. println(""""\ t\ tINSIDE INJECT DRIVERs METHOD"""");
2710
+ //To Do: Run for loop for more then one drivers
2711
+ //To Do: have a case insensitive check for driver name and then populate the data member
2712
+
2713
+
2714
+ public void injectConstraints(){
2715
+ System. out. println(""""\ t\ tINSIDE INJECT CONSTRAINTs METHOD"""");
2716
+ //To Do: have a case insensitive check for constraints name and then populate the data member
2717
+ //System. out. println( const
2718
+
2719
+ public double timeToBroadcastShapeBefore(){
2720
+ System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD"""");
2721
+ double targetResponse time_ temp = 0.00;
2722
+ for( int i=0; i< noShapes; i++
2723
+
2724
+
2725
+ public double timeToBroadcastShapeAfter(){
2726
+ System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD"""");
2727
+ double targetResponse time_ temp = 0.00;
2728
+ for( int i=0; i< noShapes; i++){
2729
+
2730
+
2731
+ public double timeToBroadcastText(){
2732
+ System. out. println(""""\ t\ t\ tINSIDE timeToBroadcastText METHOD"""");
2733
+ double targetResponse time_ temp = 0.00;
2734
+ for( int i=0; i< noTextItems; i++){
2735
+ target
2736
+
2737
+
2738
+ public double writeTime(){
2739
+ System. out. println(""""\ t\ t\ tINSIDE writeTime METHOD"""");
2740
+ System. out. println(""""\ t\ t\ t\ tTotal time to write = """" + writeTime);
2741
+ System. out. println(""""\ t\ t\ tLEAVING w
2742
+
2743
+
2744
+ public double targetResponseTimeBefore(){
2745
+ System. out. println(""""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n"""");
2746
+ targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText()
2747
+
2748
+
2749
+ public double targetResponseTimeAfter(){
2750
+ System. out. println(""""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n"""");
2751
+ targetResponse time = timeToBroadcastShapeAfter() +
2752
+ timeToBroadcastText() + w""
2753
+ ",Code,
2754
+ 85,"85 ""Decompose Model
2755
+
2756
+
2757
+ public DecomposeModel(EBT em)
2758
+ {
2759
+ super( em);
2760
+ MinimumNoRects = 3;
2761
+ }
2762
+
2763
+
2764
+ // Construct Visual model for Merge Event
2765
+ public void BuildEvent()
2766
+ {
2767
+ ClearVectors();
2768
+ AddEventRect(20,20,1);
2769
+ AddEventRect(60,70,1);
2770
+ AddEventRect(60,120,1);
2771
+ AddEventRect
2772
+
2773
+
2774
+
2775
+ public StringBuffer GenerateEvent()
2776
+ {
2777
+ StringBuffer thisEvent = new StringBuffer();
2778
+ StringBuffer temp = new StringBuffer();
2779
+ int Count = -1;
2780
+ thisEvent. append(""""Decompose|"""");
2781
+ for ( int i = 0; i < EventShapes""
2782
+ ",Code,
2783
+ 86,"86 ""EB Shape
2784
+
2785
+
2786
+ private int x, y;
2787
+ private String requirement No;
2788
+ private String ProjectName, ModulePath;
2789
+ private Color c;
2790
+
2791
+
2792
+ public EBShape( int xpos, int ypos, Color col)
2793
+ {
2794
+ x = xpos;
2795
+ y = ypos;
2796
+ c = col;
2797
+ requirement No = """""""";
2798
+ ProjectName = """""""";
2799
+ ModulePath = """""""";
2800
+ }
2801
+
2802
+
2803
+ public void Updaterequirement Info(String rno, String pname, String mname)
2804
+ {
2805
+ requirement No = rno. trim();
2806
+ ProjectName = pname. trim();
2807
+ ModulePath = mname. trim();
2808
+ }
2809
+
2810
+
2811
+ public boolean match( int mx, int my)
2812
+ {
2813
+ return true;
2814
+ }
2815
+
2816
+
2817
+ public int GetX()
2818
+ {
2819
+ return x;
2820
+ }
2821
+
2822
+
2823
+ public int GetY()
2824
+ {
2825
+ return y;
2826
+ }
2827
+
2828
+ public Color GetC()
2829
+ {
2830
+ return c;
2831
+ }
2832
+
2833
+ public String GetReqno()
2834
+ {
2835
+ return requirement No;
2836
+ }
2837
+
2838
+ public String GetProject()
2839
+ {
2840
+ return ProjectName;
2841
+ }
2842
+
2843
+
2844
+ public String GetModule()
2845
+ {
2846
+ return ModulePath;
2847
+ }""
2848
+ ",Code,
2849
+ 87,"87 ""EBT
2850
+
2851
+
2852
+ private JSplitPane splitPane;
2853
+ private JSplitPane splitPane2;
2854
+ private Frame FrameParent;
2855
+ private JPanel MenuPanel;
2856
+ private TextModel WorkArea;
2857
+ private EventModel VisualPanel;
2858
+ private MergeModel M
2859
+
2860
+
2861
+ public EBT(Frame f)
2862
+ {
2863
+ FrameParent = f;
2864
+ CurrentEvent = -1;
2865
+ this. serverIP =
2866
+ JOptionPane
2867
+ . showInputDialog(""""Please Enter the IP Address of eventserver"""")
2868
+ . trim();
2869
+
2870
+
2871
+ // Set up JList Selection wid
2872
+ public void getrequirement Text(EBShape sh)
2873
+ {
2874
+ WorkArea. showText( sh);
2875
+ }
2876
+
2877
+
2878
+ public boolean mouseDown( java. awt.Evente, int x, int y)
2879
+ {
2880
+ return true;
2881
+ }
2882
+
2883
+
2884
+ public boolean mouseUp( java. awt.Evente, int x, int y)
2885
+ {
2886
+ return true;
2887
+ }
2888
+
2889
+ public void mouseClicked( java. awt. event.MouseEvente)
2890
+ {
2891
+ VisualPanel.Clicked( e. getX(), e. getY());
2892
+ }
2893
+
2894
+
2895
+ public void mouseExited( java. awt. event.MouseEvente){}
2896
+
2897
+
2898
+ public void mousePressed( java. awt. event.MouseEvente){}
2899
+
2900
+ public void mouseReleased( java. awt. event.MouseEvente){}
2901
+
2902
+ public void mouseEntered( java. awt. event.MouseEvente){}
2903
+
2904
+ public void paint(Graphics g) {}
2905
+
2906
+ public void update(Graphics g) {}
2907
+
2908
+ public JSplitPane getSplitPane()
2909
+ {
2910
+ return splitPane;
2911
+ }
2912
+
2913
+
2914
+ public void valueChanged(ListSelectionEvent e)
2915
+ {
2916
+ if ( e. getValueIsAdjusting())
2917
+ return;
2918
+ }
2919
+
2920
+ private class ValueReporter implements ListSelectionListener
2921
+ {
2922
+ public void valueChanged(ListSelectionEvent event)
2923
+ {
2924
+ if (! event. getValueIsAdjusting())
2925
+ {
2926
+ switch(EventList. getSelectedIndex())
2927
+
2928
+ public void RedrawAll(EBShape sh)
2929
+ {
2930
+ VisualPanel. drawModel( sh);
2931
+ VisualPanel.CheckNotifyStatus();
2932
+ }
2933
+ public static void main(String s[])
2934
+ {
2935
+ JFrame mainframe = new JFrame(""""Trigger an Event Notification"""");
2936
+
2937
+ mainframe. addWindowListener( new WindowAdapter()
2938
+ {
2939
+ public void windowClosing(Wind""
2940
+ ",Code,
2941
+ 88,"88 ""Event Model
2942
+
2943
+
2944
+ protected Vector EventShapes = new Vector();
2945
+ protected Vector EventLines = new Vector();
2946
+ protected EB Shape ebs, ebs2;
2947
+ protected EventLine mline;
2948
+ protected Color ShapeColor = new Color (190,190,190);
2949
+
2950
+
2951
+ public EventModel(EBT e)
2952
+ {
2953
+ ebt = e;
2954
+ CurrentEvent = -1;
2955
+ NotifyButton = new JButton(""""Notify"""");
2956
+ setLayout( null);
2957
+ NotifyButton. setBounds(305,265,80,25);
2958
+ MinimumNoRects = 1;
2959
+ add
2960
+
2961
+
2962
+ public void getIP Server( String serverIP)
2963
+ {
2964
+ this. serverIP = serverIP;
2965
+ }
2966
+
2967
+
2968
+ public void ClearVectors()
2969
+ {
2970
+ EventShapes. removeAllElements();
2971
+ EventLines. removeAllElements();
2972
+ }
2973
+
2974
+
2975
+ public void drawModel()
2976
+ {
2977
+ repaint();
2978
+ }
2979
+
2980
+
2981
+ public void drawModel(EBShape sh)
2982
+ {
2983
+ EventShapes. setElementAt( sh, ESCursor);
2984
+ repaint();
2985
+ }
2986
+
2987
+
2988
+ private void ClearData()
2989
+ {
2990
+ for ( int i = 0; i < EventShapes. size(); i++)
2991
+ {
2992
+ ebs = (EBShape)EventShapes. elementAt( i);
2993
+ ebs.Updaterequirement Info("""""""","""""""","""""""");
2994
+ }
2995
+ }
2996
+
2997
+
2998
+ public void Clicked ( int x, int y)
2999
+ {
3000
+ int Hit = 0;
3001
+ for ( int i = 0; i < EventShapes. size(); i++)
3002
+ {
3003
+ ebs = (EBShape)EventShapes. elementAt( i);
3004
+ if (( x >= ebs.GetX() && ( x <= ebs
3005
+
3006
+
3007
+ public void CheckNotifyStatus()
3008
+ {
3009
+ //Check if Minimum Standards have been met.
3010
+ int j = 0;
3011
+ for ( j = 0; j < MinimumNoRects; j++)
3012
+ {
3013
+ ebs2 = (EBShape)EventShapes. elementAt( j);
3014
+ if (((((
3015
+
3016
+
3017
+ protected void BuildEvent(){}
3018
+
3019
+
3020
+ protected void AddLine( int t, int l, int r, int b)
3021
+ {
3022
+ EventLines. addElement( new EventLine( t, l, r, b));
3023
+ }
3024
+
3025
+
3026
+ protected void AddEventRect( int x, int y, int colorStatus)
3027
+ {
3028
+ if ( colorStatus == 1)
3029
+ {
3030
+ EventShapes. addElement( new EBShape( x, y, new Color (100,100,100)));
3031
+ }
3032
+ else
3033
+ {
3034
+ Even
3035
+
3036
+
3037
+ public String getrequirement Text(String r, String p, String m)
3038
+ {
3039
+ return new String(""""requirementwill go here"""");
3040
+ }
3041
+
3042
+
3043
+ public StringBuffer GenerateEvent()
3044
+ {
3045
+ return new StringBuffer("""" """");
3046
+ }// end of GenerateEvent method
3047
+
3048
+
3049
+ protected void paintComponent(Graphics g)
3050
+ {
3051
+ super. paintComponent( g);
3052
+ for ( int i = 0; i < EventShapes. size(); i++)
3053
+ {
3054
+ ebs = (EBShape)EventShapes. elementAt( i);
3055
+ g. setC""
3056
+ ",Code,
3057
+ 89,"89 ""Event Line
3058
+
3059
+ protected int top, left, right, bottom;
3060
+
3061
+
3062
+ public EventLine ( int t, int l, int r, int b)
3063
+ {
3064
+ top = t;
3065
+ left = l;
3066
+ right = r;
3067
+ bottom = b;
3068
+ }
3069
+
3070
+
3071
+ public int GetT() { return top;}
3072
+
3073
+ public int GetL() { return left;}
3074
+
3075
+ public int GetR() { return right;}
3076
+
3077
+ public int GetB() { return bottom;}""
3078
+ ",Code,
3079
+ 90,"90 ""Merge Model
3080
+
3081
+
3082
+ public MergeModel(EBT em)
3083
+ {
3084
+ super( em);
3085
+ MinimumNoRects = 3;
3086
+ }
3087
+
3088
+
3089
+ // Construct Visual model for Merge Event
3090
+ public void BuildEvent()
3091
+ {
3092
+ ClearVectors();
3093
+ AddEventRect(90,220,1);
3094
+ AddEventRect(20,20,1);
3095
+ AddEventRect(20,70,1);
3096
+ AddEvent
3097
+
3098
+
3099
+ public StringBuffer GenerateEvent()
3100
+ {
3101
+ StringBuffer thisEvent = new StringBuffer();
3102
+ StringBuffer temp = new StringBuffer();
3103
+ int MergeCount = -1;
3104
+ thisEvent. append(""""Merge|"""");
3105
+ for ( int i = 0; i < EventSha""
3106
+ ",Code,
3107
+ 91,"91 ""Modify Model
3108
+
3109
+ public ModifyModel(EBT em)
3110
+ {
3111
+ super( em);
3112
+ }
3113
+
3114
+
3115
+ // Construct Visual model for Merge Event
3116
+ public void BuildEvent()
3117
+ {
3118
+ ClearVectors();
3119
+ AddEventRect(60,80,1);
3120
+ CurrentEvent = 4;
3121
+ }
3122
+
3123
+
3124
+ public StringBuffer GenerateEvent()
3125
+ {
3126
+ StringBuffer thisEvent = new StringBuffer();
3127
+ thisEvent. append(""""Modify|0|"""");
3128
+ thisEvent. append( new Date(). toString()+ """"|"""");
3129
+ ebs = (EBShape)EventShapes
3130
+
3131
+
3132
+ protected void paintComponent(Graphics g)
3133
+ {
3134
+ g. drawString(""""TESTING MODIFY"""",5,5);
3135
+ super. paintComponent( g);
3136
+ }""
3137
+ ",Code,
3138
+ 92,"92 ""New Model
3139
+
3140
+ public NewModel(EBT em)
3141
+ {
3142
+ super( em);
3143
+ }
3144
+
3145
+
3146
+ // Construct Visual model for Merge Event
3147
+ public void BuildEvent()
3148
+ {
3149
+ ClearVectors();
3150
+ AddEventRect(60,80,1);
3151
+ AddArrow(35,97,59,97);
3152
+ CurrentEvent = 0;
3153
+ }
3154
+
3155
+
3156
+ public StringBuffer GenerateEvent()
3157
+ {
3158
+ StringBuffer thisEvent = new StringBuffer();
3159
+ thisEvent. append(""""New|0|"""");
3160
+ thisEvent. append( new Date(). toString()+ """"|"""");
3161
+ ebs = (EBShape)EventShapes. elem""
3162
+ ",Code,
3163
+ 93,"93 ""Obsolete Model
3164
+
3165
+ public ObsoleteModel(EBT em)
3166
+ {
3167
+ super( em);
3168
+ }
3169
+
3170
+
3171
+ // Construct Visual model for Merge Event
3172
+ public void BuildEvent()
3173
+ {
3174
+ ClearVectors();
3175
+ AddEventRect(60,80,1);
3176
+ AddLine(60,60,225,135);
3177
+ AddLine(60,135,225,60);
3178
+ CurrentEve
3179
+
3180
+
3181
+ public StringBuffer GenerateEvent()
3182
+ {
3183
+ StringBuffer thisEvent = new StringBuffer();
3184
+ thisEvent. append(""""Obsolete|0|"""");
3185
+ thisEvent. append( new Date(). toString()+""""|"""");
3186
+ ebs = (EBShape)EventShapes. e""
3187
+ ",Code,
3188
+ 94,"94 ""Refine Model
3189
+
3190
+ public RefineModel(EBT em)
3191
+ {
3192
+ super( em);
3193
+ }
3194
+
3195
+ // Construct Visual model for Merge Event
3196
+ public void BuildEvent()
3197
+ {
3198
+ ClearVectors();
3199
+ AddEventRect(60,80,1);
3200
+ CurrentEvent = 3;
3201
+ }
3202
+
3203
+ public StringBuffer GenerateEvent()
3204
+ {
3205
+ StringBuffer thisEvent = new StringBuffer();
3206
+ thisEvent. append(""""Refine|0|"""");
3207
+ thisEvent. append( new Date(). toString()+""""|"""");
3208
+ ebs = (EBShape)EventShapes. el""
3209
+ ",Code,
3210
+ 95,"95 ""Text Model
3211
+
3212
+ private int CurrentEvent;
3213
+ private EBT ebt;
3214
+ private JLabel lblrequirement No, lblProject, lblModulePath;
3215
+ private JTextField txtrequirement No, txtProject, txtModulePath;
3216
+ private boolean HideMsg;
3217
+ p
3218
+
3219
+ public TextModel(EBT e)
3220
+ {
3221
+ // System. out. println(""""Trying to create text box"""");
3222
+ ebt = e;
3223
+ CurrentEvent = -1;
3224
+ // setForeground( new Color ( 255,255,255) );
3225
+ lblrequirement No = new JLabel(""""requirement
3226
+
3227
+
3228
+ public void showText(EBShape sh)
3229
+ {
3230
+ // Hide message in bottom box.
3231
+ HideMsg = true;
3232
+ repaint();
3233
+ lblProject. setVisible( true);
3234
+ lblrequirement No. setVisible( true);
3235
+ lblModulePath. set
3236
+
3237
+ public void HideText()
3238
+ {
3239
+ lblProject. setVisible( false);
3240
+ lblrequirement No. setVisible( false);
3241
+ lblModulePath. setVisible( false);
3242
+ txtProject. setVisible( false);
3243
+ txtrequirement No. setVisi
3244
+
3245
+ public void ShowInfo( int CE)
3246
+ {
3247
+ CurrentEvent = CE;
3248
+ HideMsg = false;
3249
+ HideText();
3250
+ repaint();
3251
+ }
3252
+
3253
+ public void drawModel()
3254
+ {
3255
+ repaint();
3256
+ }
3257
+
3258
+
3259
+ protected void paintComponent(Graphics g)
3260
+ {
3261
+ super. paintComponent( g);
3262
+
3263
+ if (HideMsg == true)
3264
+ {
3265
+ g. drawString("""" """",20,25);
3266
+ g. drawString("""" """",20,40);
3267
+ g. drawString("""" """",20,55 ""
3268
+ ",Code,
matrices.csv ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ source_type,target_type
2
+ Test,Requirement
3
+ Code,Test
traces.csv ADDED
@@ -0,0 +1,145 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ s_id,t_id,label
2
+ 141,102,1
3
+ 143,103,1
4
+ 143,104,1
5
+ 144,104,1
6
+ 141,105,1
7
+ 142,105,1
8
+ 143,106,1
9
+ 144,106,1
10
+ 145,107,1
11
+ 146,108,1
12
+ 147,109,1
13
+ 148,110,1
14
+ 149,111,1
15
+ 150,111,1
16
+ 143,112,1
17
+ 144,112,1
18
+ 149,113,1
19
+ 150,113,1
20
+ 149,114,1
21
+ 151,115,1
22
+ 152,116,1
23
+ 152,117,1
24
+ 152,118,1
25
+ 152,119,1
26
+ 153,120,1
27
+ 154,120,1
28
+ 155,120,1
29
+ 156,120,1
30
+ 157,120,1
31
+ 158,120,1
32
+ 153,121,1
33
+ 154,122,1
34
+ 155,123,1
35
+ 156,124,1
36
+ 157,125,1
37
+ 158,126,1
38
+ 159,127,1
39
+ 159,128,1
40
+ 160,129,1
41
+ 159,130,1
42
+ 161,131,1
43
+ 162,132,1
44
+ 162,133,1
45
+ 162,134,1
46
+ 162,135,1
47
+ 162,136,1
48
+ 163,137,1
49
+ 164,137,1
50
+ 165,138,1
51
+ 165,139,1
52
+ 165,140,1
53
+ 69,143,1
54
+ 70,143,1
55
+ 58,143,1
56
+ 68,143,1
57
+ 69,144,1
58
+ 70,144,1
59
+ 58,144,1
60
+ 68,144,1
61
+ 56,145,1
62
+ 68,145,1
63
+ 57,147,1
64
+ 78,148,1
65
+ 57,149,1
66
+ 81,149,1
67
+ 57,150,1
68
+ 46,151,1
69
+ 56,152,1
70
+ 54,152,1
71
+ 47,152,1
72
+ 62,152,1
73
+ 78,152,1
74
+ 83,152,1
75
+ 77,152,1
76
+ 55,152,1
77
+ 79,152,1
78
+ 81,152,1
79
+ 74,152,1
80
+ 69,153,1
81
+ 85,153,1
82
+ 78,153,1
83
+ 87,153,1
84
+ 95,153,1
85
+ 68,153,1
86
+ 92,153,1
87
+ 69,154,1
88
+ 85,154,1
89
+ 78,154,1
90
+ 87,154,1
91
+ 95,154,1
92
+ 68,154,1
93
+ 69,155,1
94
+ 85,155,1
95
+ 78,155,1
96
+ 87,155,1
97
+ 95,155,1
98
+ 94,155,1
99
+ 68,155,1
100
+ 69,156,1
101
+ 85,156,1
102
+ 78,156,1
103
+ 87,156,1
104
+ 91,156,1
105
+ 95,156,1
106
+ 68,156,1
107
+ 69,157,1
108
+ 85,157,1
109
+ 78,157,1
110
+ 87,157,1
111
+ 93,157,1
112
+ 95,157,1
113
+ 68,157,1
114
+ 69,158,1
115
+ 85,158,1
116
+ 78,158,1
117
+ 87,158,1
118
+ 95,158,1
119
+ 68,158,1
120
+ 90,158,1
121
+ 56,159,1
122
+ 78,159,1
123
+ 55,159,1
124
+ 56,160,1
125
+ 57,160,1
126
+ 57,161,1
127
+ 56,162,1
128
+ 62,162,1
129
+ 63,162,1
130
+ 48,162,1
131
+ 51,162,1
132
+ 50,162,1
133
+ 64,162,1
134
+ 49,162,1
135
+ 70,163,1
136
+ 68,163,1
137
+ 64,163,1
138
+ 67,163,1
139
+ 70,164,1
140
+ 68,164,1
141
+ 64,164,1
142
+ 67,164,1
143
+ 69,165,1
144
+ 68,165,1
145
+ 67,165,1
train.csv CHANGED
The diff for this file is too large to render. See raw diff