id
int64
46
165
content
stringlengths
38
3.18k
layer
stringclasses
3 values
summary
float64
80
80 "Requirement public String m_RequirementID =""""; public String m_Project =""""; public String m_ModulePath=""""; public String m_Content = """"; public String m_RegFlag = ""N""; public Requirement() {// empty constructor } public Object clone() throws CloneNotSupportedException { Requirement requirement= (Requirement) super. clone(); return requirement ; } public void ReadValues(String RequirementID, String Project, String ModulePath, String Content, String RegFlag) { this. m_RequirementID = RequirementID; this. m_Project = Project; this. m_ModulePath public void ParseRequirement(String TextLine) { StringTokenizer LineSt; LineSt = new StringTokenizer(TextLine, "",""); m_RequirementID=LineSt. nextToken(); m_Project=Line"
Code
null
81
81 "subscribermanager Socket aSocket; int ID; String EventLog; Connection conn; ResultSet rs; Statement stmt; // constructor, this object will be created in the main method of these class SubscriberListener() { } // constructor, this object will be created in the main method of these class SubscriberListener(Socket socket, int ID, String ELog) { this. aSocket = socket; this.ID = ID; this.EventLog = ELog; try { } public void sendImpactReportToEventServer(String text) { //String impactReport = text; System. out. println(""WOW IN SEND REPORT""); System. out. println(""The IR = ""+ text); String serverIP = ""140. // run method will be execute from the main method when u say Thread. start() in main public void run() { System. out. println(""Inside Run method""); String str=""""; try { // set up for reading the byte data in to characte // start of class from here public static void main(String[] args) { // default port number int port = 1705; // the message coming from eventserver String LogName = ""EventLog""; //LogName is the database name used to log t"
Code
null
82
82 "Tokenizer /** * Constructor. * @param inStream the stream containing a program. */ public Tokenizer( Reader inStream ) { errors = 0; ch = '\0'; currentLine = 1; in = new PushbackReader /** * Gets current line number. * @return current line number. */ public int getLineNumber( ) { return currentLine; } /** * Gets error count. * @return error count. */ public int getErrorCount( ) { return errors; } /** * Get the next opening or closing symbol. * Return false if end of file. * Skip past comments and character and string constants */ public char getNextOpenClose( ) { while( nextChar( ) ) { /** * Return true if ch can be part of a Java identifier */ private static final boolean isIdChar( char ch ) { return Character. isJavaIdentifierPart( ch ); } /** * Return an identifier read from input stream * First character is already read into ch */ private String getRemainingString( ) { String result = """" + ch; for( ; nextChar( ); result += ch ) /** * Return next identifier, skipping comments * string constants, and character constants. * Place identifier in currentIdNode. word and return false * only if end of stream is reached. */ public String getNe /** * nextChar sets ch based on the next character in the input stream. * putBackChar puts the character back onto the stream. * It should only be used once after a nextChar. * Both routines adjust currentLine if necess private void putBackChar( ) { if( ch == '\ n' ) currentLine--; try { in. unread( ( int) ch ); } catch( IO Exception e ) { } } /** * Precondition: We are about to process a comment; have already seen * comment-start token * Post condition: Stream will be set immediately after * comment-ending token */ private /** * Precondition: We are about to process a quote; have already seen * beginning quote. * Post condition: Stream will be set immediately after * matching quote */ private void skip /** * After the opening slash is seen deal with next character. * If it is a comment starter, process it; otherwise put back * the next character if it is not a new line. */ private void processSlash( ) { ifpublic static final int SLASH_SLASH = 0; public static final int SLASH_STAR= 1; private PushbackReader in;// The input stream private char ch;// Current character private int currentLine;//"
Code
null
83
83 "Variable String id = """"; // requirement id ex WB10 String type= """"; // type of requirement ex Driver or Constraints String name= """"; // requirement name which is same as variable name in graph double value= 0.0; // value of variable double speculat //General Constructor to initialize all the members Variable(String id, String type, String name, double value, double speculateValue, String logic, String project_ path) { this. id = id; this. type = type; this. //Constructor to Add driver related members Variable(String id, String type, String name, double value, double speculateValue) { this. id = id; this. type = type; this. name = name; this. value = value; this //Constructor to Add constraints related members Variable(String id, String type, String name, double value, String logic){ this. id = id; this. type = type; this. name = name; this. value = value; this. logic public String toString() { String temp; temp = ""ID = "" + id + "", Type = "" + type + "", Name = "" + name +"", value = "" + value + "", SpeculateValue = "" + speculateValue + "", Logic = "" + logic + "", Project_Path = "" + project_ path /** * Returns the id. * @return int */ public String getId() { return id; } /** * Returns the logic. * @return String */ public String getLogic() { return logic; } /** * Returns the name. * @return String */ public String getName() { return name; } /** * Returns the value. * @return double */ public double getValue() { return value; } /** * Sets the id. * @param id The id to set */ public void setId(String id) { this. id = id; } /** * Sets the logic. * @param logic The logic to set */ public void setLogic(String logic) { this. logic = logic; } /** * Sets the name. * @param name The name to set */ public void setName(String name) { this. name = name; } /** * Sets the value. * @param value The value to set */ public void setValue( double value) { this. value = value; } /** * Returns the speculateValue. * @return double */ public double getSpeculateValue() { return speculateValue; } /** * Sets the speculateValue. * @param speculateValue The speculateValue to set */ public void setSpeculateValue( double speculateValue) { this. speculateValue = speculateValue; } /** * Returns the type. * @return String */ public String getType() { return type; } /** * Sets the type. * @param type The type to set */ public void setType(String type) { this. type = type; } /** * Returns the project_ path. * @return String */ public String getProject_ path() { return project_ path; } /** * Sets the project_ path. * @param project_ path The project_ path to set */ public void setProject_ path(String project_ path) { this. project_ path = project_ path; }"
Code
null
84
84 "White Board Execution Graph //Driver data members double avgShapeSize_Original; double avgShapeSize_Speculate; // constraints data members double avgTextSize; double writeTime; double noShapes; double noTextItems; double bandWidth public WhiteBoardExecutionGraph(Vector driver, Vector constraints){ this. driver = driver; this. constraints = constraints; }// end of constructor public String toString(){ String result; result = "" avgShapeSize_Original = "" + avgShapeSize_Original + "",\ navgShapeSize_Speculate = "" + avgShapeSize_Speculate + "",\ navgTextSize = "" + avgTextSize public void injectDrivers(){ System. out. println(""\ t\ tINSIDE INJECT DRIVERs METHOD""); //To Do: Run for loop for more then one drivers //To Do: have a case insensitive check for driver name and then populate the data member public void injectConstraints(){ System. out. println(""\ t\ tINSIDE INJECT CONSTRAINTs METHOD""); //To Do: have a case insensitive check for constraints name and then populate the data member //System. out. println( const public double timeToBroadcastShapeBefore(){ System. out. println(""\ t\ t\ tINSIDE timeToBroadcastShapeBefore METHOD""); double targetResponse time_ temp = 0.00; for( int i=0; i< noShapes; i++ public double timeToBroadcastShapeAfter(){ System. out. println(""\ t\ t\ tINSIDE timeToBroadcastShapeAfter METHOD""); double targetResponse time_ temp = 0.00; for( int i=0; i< noShapes; i++){ public double timeToBroadcastText(){ System. out. println(""\ t\ t\ tINSIDE timeToBroadcastText METHOD""); double targetResponse time_ temp = 0.00; for( int i=0; i< noTextItems; i++){ target public double writeTime(){ System. out. println(""\ t\ t\ tINSIDE writeTime METHOD""); System. out. println(""\ t\ t\ t\ tTotal time to write = "" + writeTime); System. out. println(""\ t\ t\ tLEAVING w public double targetResponseTimeBefore(){ System. out. println(""\ t\ tINSIDE targetResponseTimeBefore METHOD\ n""); targetResponse time = timeToBroadcastShapeBefore() +timeToBroadcastText() public double targetResponseTimeAfter(){ System. out. println(""\ t\ tINSIDE targetResponseTimeAfter METHOD\ n""); targetResponse time = timeToBroadcastShapeAfter() + timeToBroadcastText() + w"
Code
null
85
85 "Decompose Model public DecomposeModel(EBT em) { super( em); MinimumNoRects = 3; } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(20,20,1); AddEventRect(60,70,1); AddEventRect(60,120,1); AddEventRect public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); StringBuffer temp = new StringBuffer(); int Count = -1; thisEvent. append(""Decompose|""); for ( int i = 0; i < EventShapes"
Code
null
86
86 "EB Shape private int x, y; private String requirement No; private String ProjectName, ModulePath; private Color c; public EBShape( int xpos, int ypos, Color col) { x = xpos; y = ypos; c = col; requirement No = """"; ProjectName = """"; ModulePath = """"; } public void Updaterequirement Info(String rno, String pname, String mname) { requirement No = rno. trim(); ProjectName = pname. trim(); ModulePath = mname. trim(); } public boolean match( int mx, int my) { return true; } public int GetX() { return x; } public int GetY() { return y; } public Color GetC() { return c; } public String GetReqno() { return requirement No; } public String GetProject() { return ProjectName; } public String GetModule() { return ModulePath; }"
Code
null
87
87 "EBT private JSplitPane splitPane; private JSplitPane splitPane2; private Frame FrameParent; private JPanel MenuPanel; private TextModel WorkArea; private EventModel VisualPanel; private MergeModel M public EBT(Frame f) { FrameParent = f; CurrentEvent = -1; this. serverIP = JOptionPane . showInputDialog(""Please Enter the IP Address of eventserver"") . trim(); // Set up JList Selection wid public void getrequirement Text(EBShape sh) { WorkArea. showText( sh); } public boolean mouseDown( java. awt.Evente, int x, int y) { return true; } public boolean mouseUp( java. awt.Evente, int x, int y) { return true; } public void mouseClicked( java. awt. event.MouseEvente) { VisualPanel.Clicked( e. getX(), e. getY()); } public void mouseExited( java. awt. event.MouseEvente){} public void mousePressed( java. awt. event.MouseEvente){} public void mouseReleased( java. awt. event.MouseEvente){} public void mouseEntered( java. awt. event.MouseEvente){} public void paint(Graphics g) {} public void update(Graphics g) {} public JSplitPane getSplitPane() { return splitPane; } public void valueChanged(ListSelectionEvent e) { if ( e. getValueIsAdjusting()) return; } private class ValueReporter implements ListSelectionListener { public void valueChanged(ListSelectionEvent event) { if (! event. getValueIsAdjusting()) { switch(EventList. getSelectedIndex()) public void RedrawAll(EBShape sh) { VisualPanel. drawModel( sh); VisualPanel.CheckNotifyStatus(); } public static void main(String s[]) { JFrame mainframe = new JFrame(""Trigger an Event Notification""); mainframe. addWindowListener( new WindowAdapter() { public void windowClosing(Wind"
Code
null
88
88 "Event Model protected Vector EventShapes = new Vector(); protected Vector EventLines = new Vector(); protected EB Shape ebs, ebs2; protected EventLine mline; protected Color ShapeColor = new Color (190,190,190); public EventModel(EBT e) { ebt = e; CurrentEvent = -1; NotifyButton = new JButton(""Notify""); setLayout( null); NotifyButton. setBounds(305,265,80,25); MinimumNoRects = 1; add public void getIP Server( String serverIP) { this. serverIP = serverIP; } public void ClearVectors() { EventShapes. removeAllElements(); EventLines. removeAllElements(); } public void drawModel() { repaint(); } public void drawModel(EBShape sh) { EventShapes. setElementAt( sh, ESCursor); repaint(); } private void ClearData() { for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); ebs.Updaterequirement Info("""","""",""""); } } public void Clicked ( int x, int y) { int Hit = 0; for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); if (( x >= ebs.GetX() && ( x <= ebs public void CheckNotifyStatus() { //Check if Minimum Standards have been met. int j = 0; for ( j = 0; j < MinimumNoRects; j++) { ebs2 = (EBShape)EventShapes. elementAt( j); if ((((( protected void BuildEvent(){} protected void AddLine( int t, int l, int r, int b) { EventLines. addElement( new EventLine( t, l, r, b)); } protected void AddEventRect( int x, int y, int colorStatus) { if ( colorStatus == 1) { EventShapes. addElement( new EBShape( x, y, new Color (100,100,100))); } else { Even public String getrequirement Text(String r, String p, String m) { return new String(""requirementwill go here""); } public StringBuffer GenerateEvent() { return new StringBuffer("" ""); }// end of GenerateEvent method protected void paintComponent(Graphics g) { super. paintComponent( g); for ( int i = 0; i < EventShapes. size(); i++) { ebs = (EBShape)EventShapes. elementAt( i); g. setC"
Code
null
89
89 "Event Line protected int top, left, right, bottom; public EventLine ( int t, int l, int r, int b) { top = t; left = l; right = r; bottom = b; } public int GetT() { return top;} public int GetL() { return left;} public int GetR() { return right;} public int GetB() { return bottom;}"
Code
null
90
90 "Merge Model public MergeModel(EBT em) { super( em); MinimumNoRects = 3; } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(90,220,1); AddEventRect(20,20,1); AddEventRect(20,70,1); AddEvent public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); StringBuffer temp = new StringBuffer(); int MergeCount = -1; thisEvent. append(""Merge|""); for ( int i = 0; i < EventSha"
Code
null
91
91 "Modify Model public ModifyModel(EBT em) { super( em); } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); CurrentEvent = 4; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""Modify|0|""); thisEvent. append( new Date(). toString()+ ""|""); ebs = (EBShape)EventShapes protected void paintComponent(Graphics g) { g. drawString(""TESTING MODIFY"",5,5); super. paintComponent( g); }"
Code
null
92
92 "New Model public NewModel(EBT em) { super( em); } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); AddArrow(35,97,59,97); CurrentEvent = 0; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""New|0|""); thisEvent. append( new Date(). toString()+ ""|""); ebs = (EBShape)EventShapes. elem"
Code
null
93
93 "Obsolete Model public ObsoleteModel(EBT em) { super( em); } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); AddLine(60,60,225,135); AddLine(60,135,225,60); CurrentEve public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""Obsolete|0|""); thisEvent. append( new Date(). toString()+""|""); ebs = (EBShape)EventShapes. e"
Code
null
94
94 "Refine Model public RefineModel(EBT em) { super( em); } // Construct Visual model for Merge Event public void BuildEvent() { ClearVectors(); AddEventRect(60,80,1); CurrentEvent = 3; } public StringBuffer GenerateEvent() { StringBuffer thisEvent = new StringBuffer(); thisEvent. append(""Refine|0|""); thisEvent. append( new Date(). toString()+""|""); ebs = (EBShape)EventShapes. el"
Code
null
95
95 "Text Model private int CurrentEvent; private EBT ebt; private JLabel lblrequirement No, lblProject, lblModulePath; private JTextField txtrequirement No, txtProject, txtModulePath; private boolean HideMsg; p public TextModel(EBT e) { // System. out. println(""Trying to create text box""); ebt = e; CurrentEvent = -1; // setForeground( new Color ( 255,255,255) ); lblrequirement No = new JLabel(""requirement public void showText(EBShape sh) { // Hide message in bottom box. HideMsg = true; repaint(); lblProject. setVisible( true); lblrequirement No. setVisible( true); lblModulePath. set public void HideText() { lblProject. setVisible( false); lblrequirement No. setVisible( false); lblModulePath. setVisible( false); txtProject. setVisible( false); txtrequirement No. setVisi public void ShowInfo( int CE) { CurrentEvent = CE; HideMsg = false; HideText(); repaint(); } public void drawModel() { repaint(); } protected void paintComponent(Graphics g) { super. paintComponent( g); if (HideMsg == true) { g. drawString("" "",20,25); g. drawString("" "",20,40); g. drawString("" "",20,55 "
Code
null