rem stringlengths 1 53.3k | add stringlengths 0 80.5k | context stringlengths 6 326k | meta stringlengths 141 403 | input_ids list | attention_mask list | labels list |
|---|---|---|---|---|---|---|
if (!isStateless()) { Session.get().getSessionStore().getSessionId(RequestCycle.get().getRequest(), true); } getSession().touch(this); | public final void renderPage() { // first try to check if the page can be rendered: if (!isActionAuthorized(RENDER)) { if (log.isDebugEnabled()) { log.debug("Page not allowed to render: " + this); } throw new UnauthorizedActionException(this, Component.RENDER); } // Make sure it is really empty renderedComponents = null; // Reset it to stateless so that it can be tested again this.stateless = null; if (!isStateless()) { // trigger creation of the actual session in case it was deferred Session.get().getSessionStore().getSessionId(RequestCycle.get().getRequest(), true); } // Add/touch the response page in the session (its pagemap). getSession().touch(this); // Set form component values from cookies setFormComponentValuesFromCookies(); // First, give priority to IFeedback instances, as they have to // collect their messages before components like ListViews // remove any child components visitChildren(IFeedback.class, new IVisitor() { public Object component(Component component) { ((IFeedback)component).updateFeedback(); component.internalAttach(); return IVisitor.CONTINUE_TRAVERSAL; } }); if (this instanceof IFeedback) { ((IFeedback)this).updateFeedback(); } // Now, do the initialization for the other components internalAttach(); // Visit all this page's children to reset markup streams and check // rendering authorization, as appropriate. We set any result; positive // or negative as a temporary boolean in the components, and when a // authorization exception is thrown it will block the rendering of this // page visitChildren(new IVisitor() { public Object component(final Component component) { // Find out if this component can be rendered final boolean renderAllowed = component.isActionAuthorized(RENDER); // Authorize rendering component.setRenderAllowed(renderAllowed); return IVisitor.CONTINUE_TRAVERSAL; } }); // Handle request by rendering page onBeforeRender(); try { render(null); } finally { onAfterRender(); } // Check rendering if it happened fully checkRendering(this); } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/c0121c80dbb63ead59451d937f3a4e6cd66875f4/Page.java/buggy/wicket/src/java/wicket/Page.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1743,
1964,
1435,
202,
95,
202,
202,
759,
1122,
775,
358,
866,
309,
326,
1363,
848,
506,
7935,
30,
202,
202,
430,
16051,
291,
1803,
15341,
12,
25230,
3719,
202,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
918,
1743,
1964,
1435,
202,
95,
202,
202,
759,
1122,
775,
358,
866,
309,
326,
1363,
848,
506,
7935,
30,
202,
202,
430,
16051,
291,
1803,
15341,
12,
25230,
3719,
202,
202,... | |
return description; | return description; | public java.lang.String getDescription() { return description;} | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/4c34db578b77ba3c1f4c891c4e5bc40fe5d7a231/EntityGroupImpl.java/clean/source/org/jasig/portal/groups/EntityGroupImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
2252,
18,
4936,
18,
780,
11056,
1435,
288,
202,
2463,
2477,
31,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
2252,
18,
4936,
18,
780,
11056,
1435,
288,
202,
2463,
2477,
31,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-... |
+ "WHERE c.relfilenode=t.tgrelid AND t.tgfoid = p.oid " + "AND p.proname LIKE 'RI_FKey_%_upd') as a," | + "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid " + "AND t.tgfoid = p.oid AND p.proname LIKE 'RI_FKey_%_upd') as a, " | public java.sql.ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException { Field f[] = new Field[14]; f[0] = new Field(connection, "PKTABLE_CAT", iVarcharOid, 32); f[1] = new Field(connection, "PKTABLE_SCHEM", iVarcharOid, 32); f[2] = new Field(connection, "PKTABLE_NAME", iVarcharOid, 32); f[3] = new Field(connection, "PKCOLUMN_NAME", iVarcharOid, 32); f[4] = new Field(connection, "FKTABLE_CAT", iVarcharOid, 32); f[5] = new Field(connection, "FKTABLE_SCHEM", iVarcharOid, 32); f[6] = new Field(connection, "FKTABLE_NAME", iVarcharOid, 32); f[7] = new Field(connection, "FKCOLUMN_NAME", iVarcharOid, 32); f[8] = new Field(connection, "KEY_SEQ", iInt2Oid, 2); f[9] = new Field(connection, "UPDATE_RULE", iInt2Oid, 2); f[10] = new Field(connection, "DELETE_RULE", iInt2Oid, 2); f[11] = new Field(connection, "FK_NAME", iVarcharOid, 32); f[12] = new Field(connection, "PK_NAME", iVarcharOid, 32); f[13] = new Field(connection, "DEFERRABILITY", iInt2Oid, 2); java.sql.ResultSet rs = connection.ExecSQL("SELECT a.tgargs," + "substring(a.proname from 9 for (char_length(a.proname)-12))," + "substring(b.proname from 9 for (char_length(b.proname)-12))," + "a.tgdeferrable," + "a.tginitdeferred " + "FROM " + "(SELECT t.tgargs, t.tgconstrname, p.proname, t.tgdeferrable," + "t.tginitdeferred " + "FROM pg_class as c, pg_proc as p, pg_trigger as t " + "WHERE c.relfilenode=t.tgrelid AND t.tgfoid = p.oid " + "AND p.proname LIKE 'RI_FKey_%_upd') as a," + "(SELECT t.tgconstrname, p.proname " + "FROM pg_class as c, pg_proc as p, pg_trigger as t " + "WHERE c.relfilenode=t.tgrelid AND t.tgfoid = p.oid " + "AND p.proname LIKE 'RI_FKey_%_del') as b," + "(SELECT t.tgconstrname FROM pg_class as c, pg_trigger as t " + "WHERE c.relname like '"+table+"' AND c.relfilenode=t.tgrelid) as c " + "WHERE a.tgconstrname=b.tgconstrname AND a.tgconstrname=c.tgconstrname" ); Vector tuples = new Vector(); while (rs.next()) { tuples.add(parseConstraint(rs)); } return new ResultSet(connection, f, tuples, "OK", 1); } | 45672 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45672/355cc69dfce59c417b24ce9957824dfb565bc0f7/DatabaseMetaData.java/buggy/src/interfaces/jdbc/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
26246,
1798,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
13,
1216,
6483,
202,
95,
7734,
2286,
284,
8526,
273,
394,
2286,
63,
3461,
15533,
773... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
2252,
18,
4669,
18,
13198,
26246,
1798,
2396,
12,
780,
6222,
16,
514,
1963,
16,
514,
1014,
13,
1216,
6483,
202,
95,
7734,
2286,
284,
8526,
273,
394,
2286,
63,
3461,
15533,
773... |
if (state.getSelf().getInstanceVariable(iVisited.getName()) != null) { | if (runtime.getCurrentContext().getFrameSelf().getInstanceVariable(iVisited.getName()) != null) { | public Instruction visitInstVarNode(InstVarNode iVisited) { if (state.getSelf().getInstanceVariable(iVisited.getName()) != null) { definition = "instance-variable"; } return null; } | 1060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1060/6e15491217631472c05c6928672f9c7064a978b3/DefinedVisitor.java/buggy/src/org/jruby/evaluator/DefinedVisitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24605,
3757,
10773,
1537,
907,
12,
10773,
1537,
907,
277,
30019,
13,
288,
202,
202,
430,
261,
2019,
18,
588,
10084,
7675,
588,
1442,
3092,
12,
77,
30019,
18,
17994,
10756,
480,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
24605,
3757,
10773,
1537,
907,
12,
10773,
1537,
907,
277,
30019,
13,
288,
202,
202,
430,
261,
2019,
18,
588,
10084,
7675,
588,
1442,
3092,
12,
77,
30019,
18,
17994,
10756,
480,
... |
lblRangeLabel.setText( Messages.getString( "AxisMarkersSheet.Label.Label" ) ); | lblRangeLabel.setText( Messages.getString("AxisMarkersSheet.Label.Label") ); | protected Composite getComponent( Composite parent ) { // Layout for the main composite GridLayout glContent = new GridLayout( ); glContent.numColumns = 2; glContent.horizontalSpacing = 5; glContent.verticalSpacing = 5; glContent.marginHeight = 7; glContent.marginWidth = 7; cmpContent = new Composite( parent, SWT.NONE ); cmpContent.setLayout( glContent ); // Layout for the List composite GridLayout glList = new GridLayout( ); glList.numColumns = 3; glList.horizontalSpacing = 5; glList.verticalSpacing = 5; glList.marginHeight = 0; glList.marginWidth = 0; cmpList = new Composite( cmpContent, SWT.NONE ); GridData gdCMPList = new GridData( GridData.FILL_BOTH ); gdCMPList.horizontalSpan = 2; cmpList.setLayoutData( gdCMPList ); cmpList.setLayout( glList ); // Layout for the buttons composite GridLayout glButtons = new GridLayout( ); glButtons.numColumns = 3; glButtons.horizontalSpacing = 5; glButtons.verticalSpacing = 5; glButtons.marginHeight = 5; glButtons.marginWidth = 0; Composite cmpButtons = new Composite( cmpList, SWT.NONE ); GridData gdCMPButtons = new GridData( GridData.FILL_HORIZONTAL ); gdCMPButtons.horizontalSpan = 3; cmpButtons.setLayoutData( gdCMPButtons ); cmpButtons.setLayout( glButtons ); btnAddLine = new Button( cmpButtons, SWT.PUSH ); GridData gdBTNAddLine = new GridData( GridData.FILL_HORIZONTAL ); btnAddLine.setLayoutData( gdBTNAddLine ); btnAddLine.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.AddLine" ) ); //$NON-NLS-1$ btnAddLine.addSelectionListener( this ); btnAddRange = new Button( cmpButtons, SWT.PUSH ); GridData gdBTNAddRange = new GridData( GridData.FILL_HORIZONTAL ); btnAddRange.setLayoutData( gdBTNAddRange ); btnAddRange.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.AddRange" ) ); //$NON-NLS-1$ btnAddRange.addSelectionListener( this ); btnRemove = new Button( cmpButtons, SWT.PUSH ); GridData gdBTNRemove = new GridData( GridData.FILL_HORIZONTAL ); btnRemove.setLayoutData( gdBTNRemove ); btnRemove.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.RemoveEntry" ) ); //$NON-NLS-1$ btnRemove.addSelectionListener( this ); lstMarkers = new List( cmpList, SWT.BORDER | SWT.SINGLE | SWT.V_SCROLL ); GridData gdLSTMarkers = new GridData( GridData.FILL_HORIZONTAL ); gdLSTMarkers.horizontalSpan = 3; gdLSTMarkers.heightHint = 100; lstMarkers.setLayoutData( gdLSTMarkers ); lstMarkers.addSelectionListener( this ); // Layout for the general composite slMarkers = new StackLayout( ); slMarkers.marginHeight = 0; slMarkers.marginWidth = 0; grpGeneral = new Group( cmpContent, SWT.NONE ); GridData gdCMPGeneral = new GridData( GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL ); gdCMPGeneral.widthHint = 180; grpGeneral.setLayoutData( gdCMPGeneral ); grpGeneral.setLayout( slMarkers ); grpGeneral.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.MarkerProperties" ) ); //$NON-NLS-1$ // Layout for the Marker Line composite GridLayout glMarkerLine = new GridLayout( ); glMarkerLine.numColumns = 3; glMarkerLine.horizontalSpacing = 5; glMarkerLine.verticalSpacing = 5; glMarkerLine.marginHeight = 7; glMarkerLine.marginWidth = 7; cmpLine = new Composite( grpGeneral, SWT.NONE ); GridData gdGRPLine = new GridData( GridData.FILL_HORIZONTAL ); cmpLine.setLayoutData( gdGRPLine ); cmpLine.setLayout( glMarkerLine ); lblLineLabel = new Label( cmpLine, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalIndent = 5; gd.widthHint = 38; lblLineLabel.setLayoutData( gd ); lblLineLabel.setText( Messages.getString( "AxisMarkersSheet.Label.Label" ) ); //$NON-NLS-1$ } txtLineEText = new ExternalizedTextEditorComposite( cmpLine, SWT.BORDER | SWT.SINGLE, -1, -1, getContext( ).getUIServiceProvider( ).getRegisteredKeys( ), getContext( ).getUIServiceProvider( ), "" ); //$NON-NLS-1$ { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; txtLineEText.setLayoutData( gd ); txtLineEText.addListener( this ); } // Layout for Value composite GridLayout glValue = new GridLayout( ); glValue.numColumns = 3; glValue.horizontalSpacing = 5; glValue.verticalSpacing = 5; glValue.marginHeight = 0; glValue.marginWidth = 0; Composite cmpValue = new Composite( cmpLine, SWT.NONE ); GridData gdCMPValue = new GridData( GridData.FILL_HORIZONTAL ); gdCMPValue.horizontalSpan = 3; cmpValue.setLayoutData( gdCMPValue ); cmpValue.setLayout( glValue ); lblValue = new Label( cmpValue, SWT.NONE ); GridData gdLBLValue = new GridData( ); gdLBLValue.horizontalIndent = 5; gdLBLValue.widthHint = 38; lblValue.setLayoutData( gdLBLValue ); lblValue.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.Value" ) ); //$NON-NLS-1$ txtValue = new TextEditorComposite( cmpValue, SWT.BORDER | SWT.SINGLE, true ); GridData gdTXTValue = new GridData( GridData.FILL_HORIZONTAL ); txtValue.setLayoutData( gdTXTValue ); txtValue.addListener( this ); btnLineFormatSpecifier = new Button( cmpValue, SWT.PUSH ); GridData gdBTNLineFormatSpecifier = new GridData( ); gdBTNLineFormatSpecifier.heightHint = 18; gdBTNLineFormatSpecifier.widthHint = 18; btnLineFormatSpecifier.setLayoutData( gdBTNLineFormatSpecifier ); btnLineFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$ btnLineFormatSpecifier.addSelectionListener( this ); btnLineFormatSpecifier.getImage( ) .setBackground( btnLineFormatSpecifier.getBackground( ) ); lblAnchor = new Label( cmpLine, SWT.NONE ); GridData gdLBLAnchor = new GridData( ); gdLBLAnchor.horizontalIndent = 5; lblAnchor.setLayoutData( gdLBLAnchor ); lblAnchor.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.Anchor" ) ); //$NON-NLS-1$ cmbLineAnchor = new Combo( cmpLine, SWT.DROP_DOWN | SWT.READ_ONLY ); GridData gdCMBAnchor = new GridData( GridData.FILL_HORIZONTAL ); gdCMBAnchor.horizontalSpan = 2; cmbLineAnchor.setLayoutData( gdCMBAnchor ); cmbLineAnchor.addSelectionListener( this ); grpMarkerLine = new Group( cmpLine, SWT.NONE ); GridData gdGRPMarkerLine = new GridData( GridData.FILL_HORIZONTAL ); gdGRPMarkerLine.horizontalSpan = 3; grpMarkerLine.setLayoutData( gdGRPMarkerLine ); grpMarkerLine.setLayout( new FillLayout( ) ); grpMarkerLine.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.MarkerLineAttributes" ) ); //$NON-NLS-1$ liacMarkerLine = new LineAttributesComposite( grpMarkerLine, SWT.NONE, getContext( ), null, true, true, true ); liacMarkerLine.addListener( this ); btnLineTriggers = new Button( cmpLine, SWT.PUSH ); { GridData gd = new GridData( ); gd.horizontalSpan = 2; btnLineTriggers.setLayoutData( gd ); btnLineTriggers.setText( Messages.getString( "SeriesYSheetImpl.Label.Interactivity" ) ); //$NON-NLS-1$ btnLineTriggers.addSelectionListener( this ); } // Layout for the Marker Range composite GridLayout glMarkerRange = new GridLayout( ); glMarkerRange.numColumns = 3; glMarkerRange.horizontalSpacing = 5; glMarkerRange.verticalSpacing = 5; glMarkerRange.marginHeight = 7; glMarkerRange.marginWidth = 7; cmpRange = new Composite( grpGeneral, SWT.NONE ); GridData gdGRPRange = new GridData( GridData.FILL_HORIZONTAL ); cmpRange.setLayoutData( gdGRPRange ); cmpRange.setLayout( glMarkerRange ); lblRangeLabel = new Label( cmpRange, SWT.NONE ); { GridData gd = new GridData( ); gd.horizontalIndent = 5; gd.widthHint = 38; lblRangeLabel.setLayoutData( gd ); lblRangeLabel.setText( Messages.getString( "AxisMarkersSheet.Label.Label" ) ); //$NON-NLS-1$ } txtRangeEText = new ExternalizedTextEditorComposite( cmpRange, SWT.BORDER | SWT.SINGLE, -1, -1, getContext( ).getUIServiceProvider( ).getRegisteredKeys( ), getContext( ).getUIServiceProvider( ), "" ); //$NON-NLS-1$ { GridData gd = new GridData( GridData.FILL_HORIZONTAL ); gd.horizontalSpan = 2; txtRangeEText.setLayoutData( gd ); txtRangeEText.addListener( this ); } // Layout for Value composite GridLayout glRangeValue = new GridLayout( ); glRangeValue.numColumns = 3; glRangeValue.horizontalSpacing = 2; glRangeValue.verticalSpacing = 5; glRangeValue.marginHeight = 0; glRangeValue.marginWidth = 0; Composite cmpRangeValue = new Composite( cmpRange, SWT.NONE ); GridData gdCMPRangeValue = new GridData( GridData.FILL_HORIZONTAL ); gdCMPRangeValue.horizontalSpan = 3; cmpRangeValue.setLayoutData( gdCMPRangeValue ); cmpRangeValue.setLayout( glRangeValue ); lblStartValue = new Label( cmpRangeValue, SWT.NONE ); GridData gdLBLStartValue = new GridData( ); gdLBLStartValue.horizontalIndent = 5; lblStartValue.setLayoutData( gdLBLStartValue ); lblStartValue.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.StartValue" ) ); //$NON-NLS-1$ txtStartValue = new TextEditorComposite( cmpRangeValue, SWT.BORDER | SWT.SINGLE, true ); GridData gdTXTStartValue = new GridData( GridData.FILL_HORIZONTAL ); txtStartValue.setLayoutData( gdTXTStartValue ); txtStartValue.addListener( this ); btnStartFormatSpecifier = new Button( cmpRangeValue, SWT.PUSH ); GridData gdBTNStartFormatSpecifier = new GridData( ); gdBTNStartFormatSpecifier.heightHint = 18; gdBTNStartFormatSpecifier.widthHint = 18; btnStartFormatSpecifier.setLayoutData( gdBTNStartFormatSpecifier ); btnStartFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$ btnStartFormatSpecifier.addSelectionListener( this ); btnStartFormatSpecifier.getImage( ) .setBackground( btnStartFormatSpecifier.getBackground( ) ); lblEndValue = new Label( cmpRangeValue, SWT.NONE ); GridData gdLBLEndValue = new GridData( ); gdLBLEndValue.horizontalIndent = 5; lblEndValue.setLayoutData( gdLBLEndValue ); lblEndValue.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.EndValue" ) ); //$NON-NLS-1$ txtEndValue = new TextEditorComposite( cmpRangeValue, SWT.BORDER | SWT.SINGLE, true ); GridData gdTXTEndValue = new GridData( GridData.FILL_HORIZONTAL ); txtEndValue.setLayoutData( gdTXTEndValue ); txtEndValue.addListener( this ); btnEndFormatSpecifier = new Button( cmpRangeValue, SWT.PUSH ); GridData gdBTNEndFormatSpecifier = new GridData( ); gdBTNEndFormatSpecifier.heightHint = 18; gdBTNEndFormatSpecifier.widthHint = 18; btnEndFormatSpecifier.setLayoutData( gdBTNEndFormatSpecifier ); btnEndFormatSpecifier.setImage( UIHelper.getImage( "icons/obj16/formatbuilder.gif" ) ); //$NON-NLS-1$ btnEndFormatSpecifier.addSelectionListener( this ); btnEndFormatSpecifier.getImage( ) .setBackground( btnEndFormatSpecifier.getBackground( ) ); lblRangeAnchor = new Label( cmpRange, SWT.NONE ); GridData gdLBLRangeAnchor = new GridData( ); gdLBLRangeAnchor.horizontalIndent = 5; gdLBLRangeAnchor.widthHint = 54; lblRangeAnchor.setLayoutData( gdLBLRangeAnchor ); lblRangeAnchor.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.Anchor" ) ); //$NON-NLS-1$ cmbRangeAnchor = new Combo( cmpRange, SWT.DROP_DOWN | SWT.READ_ONLY ); GridData gdCMBRangeAnchor = new GridData( GridData.FILL_HORIZONTAL ); gdCMBRangeAnchor.horizontalSpan = 2; cmbRangeAnchor.setLayoutData( gdCMBRangeAnchor ); cmbRangeAnchor.addSelectionListener( this ); lblRangeFill = new Label( cmpRange, SWT.NONE ); GridData gdLBLRangeFill = new GridData( ); gdLBLRangeFill.horizontalIndent = 5; gdLBLRangeFill.widthHint = 54; lblRangeFill.setLayoutData( gdLBLRangeFill ); lblRangeFill.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.Fill" ) ); //$NON-NLS-1$ fccRange = new FillChooserComposite( cmpRange, SWT.NONE, getContext( ), null, true, true ); GridData gdFCCRange = new GridData( GridData.FILL_HORIZONTAL ); gdFCCRange.horizontalSpan = 2; fccRange.setLayoutData( gdFCCRange ); fccRange.addListener( this ); grpMarkerRange = new Group( cmpRange, SWT.NONE ); GridData gdGRPMarkerRange = new GridData( GridData.FILL_HORIZONTAL ); gdGRPMarkerRange.horizontalSpan = 3; grpMarkerRange.setLayoutData( gdGRPMarkerRange ); grpMarkerRange.setLayout( new FillLayout( ) ); grpMarkerRange.setText( Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.RangeOutline" ) ); //$NON-NLS-1$ liacMarkerRange = new LineAttributesComposite( grpMarkerRange, SWT.NONE, getContext( ), null, true, true, true ); liacMarkerRange.addListener( this ); btnRangeTriggers = new Button( cmpRange, SWT.PUSH ); { GridData gd = new GridData( ); gd.horizontalSpan = 2; btnRangeTriggers.setLayoutData( gd ); btnRangeTriggers.setText( Messages.getString( "SeriesYSheetImpl.Label.Interactivity" ) ); //$NON-NLS-1$ btnRangeTriggers.addSelectionListener( this ); } lacLabel = new LabelAttributesComposite( cmpContent, SWT.NONE, Messages.getString( "BaseAxisMarkerAttributeSheetImpl.Lbl.MarkerLabelProperties" ), //$NON-NLS-1$ Position.ABOVE_LITERAL, LabelImpl.create( ), getChart( ).getUnits( ), false, true, getContext( ), true ); GridData gdLACLabel = new GridData( GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL ); lacLabel.setLayoutData( gdLACLabel ); lacLabel.addListener( this ); slMarkers.topControl = cmpLine; populateLists( ); refreshButtons( ); setAllEnabled( !getAxisForProcessing( ).isCategoryAxis( ) || getAxisForProcessing( ).getType( ) .equals( AxisType.TEXT_LITERAL ) ); return cmpContent; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/914e51508d3fcacb3ba0228e7fe9ccb6126251ba/AxisMarkersSheet.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/wizard/format/popup/axis/AxisMarkersSheet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
14728,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
759,
9995,
364,
326,
2774,
9635,
202,
202,
6313,
3744,
5118,
1350,
273,
394,
7145,
3744,
12,
11272,
202,
202,
7043,
1350,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
14728,
10322,
12,
14728,
982,
262,
202,
95,
202,
202,
759,
9995,
364,
326,
2774,
9635,
202,
202,
6313,
3744,
5118,
1350,
273,
394,
7145,
3744,
12,
11272,
202,
202,
7043,
1350,
... |
addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); | addReferencedItem(tgtItem, ensemblDataSet, "evidence", true, "", false); | protected Collection translateItem(Item srcItem) throws ObjectStoreException, InterMineException { Collection result = new HashSet(); String srcNs = XmlUtil.getNamespaceFromURI(srcItem.getClassName()); String className = XmlUtil.getFragmentFromURI(srcItem.getClassName()); Collection translated = super.translateItem(srcItem); if (translated != null) { for (Iterator i = translated.iterator(); i.hasNext();) { boolean storeTgtItem = true; Item tgtItem = (Item) i.next(); if ("karyotype".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); if (tgtItem.hasAttribute("identifier")) { Item synonym = createSynonym(tgtItem.getIdentifier(), "name", tgtItem.getAttribute("identifier").getValue(), ensemblSourceRef); addReferencedItem(tgtItem, synonym, "synonyms", true, "subject", false); result.add(synonym); } Item location = createLocation(srcItem, tgtItem, "chromosome", "chr", true); location.addAttribute(new Attribute("strand", "0")); result.add(location); } else if ("exon".equals(className)) { tgtItem.addReference(organismRef); Item stableId = getStableId("exon", srcItem.getIdentifier(), srcNs); if (stableId != null) { moveField(stableId, tgtItem, "stable_id", "identifier"); } addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); // more than one item representing same exon -> store up in map Item location = createLocation(srcItem, tgtItem, "contig", "contig", true); if (srcItem.hasAttribute("nonUniqueId")) { storeTgtItem = false; processExon(srcItem, tgtItem, location); } else { addToLocations(srcItem.getIdentifier(), location); } } else if ("simple_feature".equals(className)) { tgtItem.addReference(organismRef); tgtItem.addAttribute(new Attribute("identifier", srcItem.getIdentifier())); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); result.add(createAnalysisResult(srcItem, tgtItem)); result.add(createLocation(srcItem, tgtItem, "contig", "contig", true)); } else if ("repeat_feature".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); result.add(createAnalysisResult(srcItem, tgtItem)); result.add(createLocation(srcItem, tgtItem, "contig", "contig", true)); promoteField(tgtItem, srcItem, "consensus", "repeat_consensus", "repeat_consensus"); promoteField(tgtItem, srcItem, "type", "repeat_consensus", "repeat_class"); promoteField(tgtItem, srcItem, "identifier", "repeat_consensus", "repeat_name"); } else if ("gene".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); // gene name should be its stable id (or identifier if none) Item stableId = null; stableId = getStableId("gene", srcItem.getIdentifier(), srcNs); if (stableId != null) { moveField(stableId, tgtItem, "stable_id", "identifier"); } if (!tgtItem.hasAttribute("identifier")) { tgtItem.addAttribute(new Attribute("identifier", srcItem.getIdentifier())); } // display_xref is gene name (?) //promoteField(tgtItem, srcItem, "symbol", "display_xref", "display_label"); result.addAll(setGeneSynonyms(srcItem, tgtItem, srcNs)); // if no organismDbId set to be same as identifier if (!tgtItem.hasAttribute("organismDbId")) { tgtItem.addAttribute(new Attribute("organismDbId", tgtItem.getAttribute("identifier").getValue())); } } else if ("contig".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); if (tgtItem.hasAttribute("identifier")) { Item synonym = createSynonym(tgtItem.getIdentifier(), "identifier", tgtItem.getAttribute("identifier").getValue(), ensemblSourceRef); addReferencedItem(tgtItem, synonym, "synonyms", true, "subject", false); result.add(synonym); } } else if ("transcript".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); // SimpleRelation between Gene and Transcript result.add(createSimpleRelation(tgtItem.getReference("gene").getRefId(), tgtItem.getIdentifier())); // set transcript identifier to be ensembl stable id if (!tgtItem.hasAttribute("identifier")) { Item stableId = getStableId("transcript", srcItem.getIdentifier(), srcNs); if (stableId != null) { moveField(stableId, tgtItem, "stable_id", "identifier"); } else { tgtItem.addAttribute(new Attribute("identifier", srcItem.getIdentifier())); } } Item translation = ItemHelper.convert(srcItemReader.getItemById(srcItem .getReference("translation").getRefId())); // Transcript.translation is set by mapping file - add reference to protein // if no SwissProt or trembl accession found there will not be a protein String proteinId = getChosenProteinId(translation.getIdentifier(), srcNs); if (proteinId != null) { tgtItem.addReference(new Reference("protein", proteinId)); result.add(createSimpleRelation(tgtItem.getIdentifier(), proteinId)); } // need to fetch translation to get identifier for CDS // create CDS and reference from MRNA Item cds = createItem(tgtNs + "CDS", ""); if (translation != null) { Item stableId = getStableId("translation", translation.getIdentifier(), srcNs); cds.setAttribute("identifier", stableId.getAttribute("stable_id").getValue() + "_CDS"); cds.addToCollection("polypeptides", translation.getIdentifier()); result.add(createSimpleRelation(cds.getIdentifier(), translation.getIdentifier())); } cds.addReference(organismRef); addReferencedItem(cds, ensemblDb, "evidence", true, "", false); Item synonym = createSynonym(tgtItem.getIdentifier(), "identifier", cds.getAttribute("identifier").getValue(), ensemblSourceRef); result.add(synonym); if (proteinId != null) { cds.setReference("protein", proteinId); } tgtItem.addToCollection("CDSs", cds); result.add(createSimpleRelation(tgtItem.getIdentifier(), cds.getIdentifier())); result.add(cds); // stable_ids become syonyms, need ensembl DataSet as evidence } else if (className.endsWith("_stable_id")) { // TODO: should this be: // addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); tgtItem.addToCollection("evidence", ensemblDb); tgtItem.addAttribute(new Attribute("type", "identifier")); } else if ("chromosome".equals(className)) { tgtItem.addReference(organismRef); addReferencedItem(tgtItem, ensemblDb, "evidence", true, "", false); if (tgtItem.hasAttribute("identifier")) { Item synonym = createSynonym(tgtItem.getIdentifier(), "name", tgtItem.getAttribute("identifier").getValue(), ensemblSourceRef); addReferencedItem(tgtItem, synonym, "synonyms", true, "subject", false); result.add(synonym); } } else if ("translation".equals(className)) { tgtItem.addReference(organismRef); // if protein can be created it will be put in proteins collection and stored // at end of translating Item protein = getProteinByPrimaryAccession(srcItem, srcNs); // Transcript.translation is set by mapping file - add reference to protein // if no SwissProt or trembl accession found there will not be a protein if (protein != null) { tgtItem.addReference(new Reference("protein", protein.getIdentifier())); result.add(createSimpleRelation(tgtItem.getIdentifier(), protein.getIdentifier())); } // set translation identifier to be ensembl stable id Item stableId = getStableId("translation", srcItem.getIdentifier(), srcNs); if (stableId != null) { moveField(stableId, tgtItem, "stable_id", "identifier"); } else { tgtItem.addAttribute(new Attribute("identifier", srcItem.getIdentifier())); } } if (storeTgtItem) { result.add(tgtItem); } } // assembly maps to null but want to create location on a supercontig } else if ("assembly".equals(className)) { Item sc = getSuperContig(srcItem.getAttribute("superctg_name").getValue(), srcItem.getReference("chromosome").getRefId(), Integer.parseInt(srcItem.getAttribute("chr_start").getValue()), Integer.parseInt(srcItem.getAttribute("chr_end").getValue()), srcItem.getAttribute("superctg_ori").getValue()); // locate contig on supercontig - for drosophila and anopheles strans is always 1 Item location = createLocation(srcItem, sc, "contig", "superctg", false); result.add(location); } return result; } | 29158 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/29158/55775efc5e7c6f4c46a538752004538f293c8c2a/EnsemblDataTranslator.java/buggy/flymine/model/ensembl/src/java/org/flymine/dataconversion/EnsemblDataTranslator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2200,
4204,
1180,
12,
1180,
1705,
1180,
13,
3639,
1216,
1033,
21151,
16,
5294,
49,
558,
503,
288,
3639,
2200,
563,
273,
394,
6847,
5621,
3639,
514,
1705,
10386,
273,
5714,
1304,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
2200,
4204,
1180,
12,
1180,
1705,
1180,
13,
3639,
1216,
1033,
21151,
16,
5294,
49,
558,
503,
288,
3639,
2200,
563,
273,
394,
6847,
5621,
3639,
514,
1705,
10386,
273,
5714,
1304,
18,... |
f[0] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); | f[0] = new Field(connection,"TABLE_SCHEM",iVarcharOid,32); | public java.sql.ResultSet getSchemas() throws SQLException { // We don't use schemas, so we simply return a single schema name "". // Field f[] = new Field[1]; Vector v = new Vector(); byte[][] tuple = new byte[1][0]; f[0] = new Field(connection,new String("TABLE_SCHEM"),iVarcharOid,32); tuple[0] = "".getBytes(); v.addElement(tuple); return new ResultSet(connection,f,v,"OK",1); } | 2413 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2413/7b09f310e38798eea75fcbaddeb1808940bf951c/DatabaseMetaData.java/clean/org/postgresql/jdbc2/DatabaseMetaData.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
1322,
7753,
1435,
1216,
6483,
225,
288,
565,
368,
1660,
2727,
1404,
999,
12783,
16,
1427,
732,
8616,
327,
279,
2202,
1963,
508,
1408,
18,
565,
368,
565,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2252,
18,
4669,
18,
13198,
1322,
7753,
1435,
1216,
6483,
225,
288,
565,
368,
1660,
2727,
1404,
999,
12783,
16,
1427,
732,
8616,
327,
279,
2202,
1963,
508,
1408,
18,
565,
368,
565,
... |
mdrp[i] = input.popInt(); | mdrp[i] = input.popShort(); | public void work() { for (int i = 0; i < mLARc.length; i++) { mLARc[i] = input.popInt(); //fix inputs!! } for (int i = 0; i < mdrp.length; i++) { mdrp[i] = input.popInt(); } //Decoding of the coded Log-Area ratios: for (int i = 0; i < 8; i++) { int temp1 = (mLARc[i] + MIC[i]) << 10; int temp2 = B[i] << 10; temp1 = temp1 - temp2; temp1 = INVA[i] * temp1; mLARpp[i] = temp1 + temp1; } //Computation of the quantized reflection coefficients //Interpolation of mLARpp to get mLARp: for (int k = 0; k < 13; k++) { for(int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 2) + (mLARpp[i] >> 2); mLARp[i] = mLARp[i] + (mprevLARpp[i] >> 1); } } for (int k = 13; k < 27; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 1) + (mLARpp[i] >> 1); } } for (int k = 27; k < 39; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = (mprevLARpp[i] >> 2) + (mLARpp[i] >> 2); mLARp[i] = mLARp[i] + (mLARpp[i] >> 1); } } for (int k = 40; k < 160; k++) { for (int i = 0; i < 8; i++) { mLARp[i] = mLARpp[i]; } } //set current LARpp to previous: for (int j = 0; j < mprevLARpp.length; j++) { mprevLARpp[j] = mLARpp[j]; } //Compute mrrp[0..7] from mLARp[0...7] for (int i = 0; i < 8; i++) { int temp = Math.abs(mLARp[i]); if (temp < 11059) { temp = temp << 1; } else { if (temp < 20070) { temp = temp + 11059; } else { temp = (temp >> 2) + 26112; } } mrrp[i] = temp; if (mLARp[i] < 0) { mrrp[i] = 0 - mrrp[i]; } } //Short term synthesis filtering: uses drp[0..39] and rrp[0...7] // to produce sr[0...159]. A temporary array wt[0..159] is used. for (int k = 0; k < 40; k++) { wt[k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[40+k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[80+k] = mdrp[k]; } for (int k = 0; k < 40; k++) { wt[120+k] = mdrp[k]; } //below is supposed to be from index_start to index_end...how is //this different from just 0 to 159? for (int k = 0; k < 160; k++) { int sri = wt[k]; for (int i = 1; i < 8; i++) { sri = sri - (mrrp[8-i] * v[8-i]); v[9-i] = v[8-i] + (mrrp[8-i] * sri); } sr[k] = sri; v[0] = sri; } for (int j = 0; j < sr.length; j++) { output.pushInt(sr[j]); } } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/c5e91a6ec8a5659d8447a6e75ef238c33b98716a/StGsmDecoder.java/buggy/streams/apps/benchmarks/gsm/streamit/StGsmDecoder.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
377,
288,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
312,
48,
985,
71,
18,
2469,
31,
277,
27245,
202,
95,
202,
565,
312,
48,
985,
71,
63,
77,
65,
273,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1440,
1435,
377,
288,
202,
1884,
261,
474,
277,
273,
374,
31,
277,
411,
312,
48,
985,
71,
18,
2469,
31,
277,
27245,
202,
95,
202,
565,
312,
48,
985,
71,
63,
77,
65,
273,
... |
while (isAnimated() && !monitor.isCanceled()) { | while (isAnimated() && !monitor.isCanceled() && (startErrorState == showingError)) { | void animateLoop(IProgressMonitor monitor) { // Create an off-screen image to draw on, and a GC to draw with. // Both are disposed after the animation. if (getControl().isDisposed()) return; Display display = imageCanvas.getDisplay(); ImageData[] imageDataArray = getImageData(); ImageData imageData = imageDataArray[0]; Image image = getImage(imageData); int imageDataIndex = 0; final Color[] backgrounds = new Color[1]; Image offScreenImage = new Image( display, loader.logicalScreenWidth, loader.logicalScreenHeight); GC offScreenImageGC = new GC(offScreenImage); try { final boolean[] disposed = { false }; // Use syncExec to get the background color of the imageCanvas. display.syncExec(new Runnable() { public void run() { if (imageCanvas.isDisposed()) { disposed[0] = true; return; } backgrounds[0] = imageCanvas.getBackground(); } }); //If we never got the background then leave. if (disposed[0]) return; // Fill the off-screen image with the background color of the canvas. offScreenImageGC.setBackground(backgrounds[0]); offScreenImageGC.fillRectangle( 0, 0, loader.logicalScreenWidth, loader.logicalScreenHeight); // Draw the current image onto the off-screen image. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); if (loader.repeatCount > 0) { while (isAnimated() && !monitor.isCanceled()) { if (getControl().isDisposed()) return; if (imageData.disposalMethod == SWT.DM_FILL_BACKGROUND) { // Fill with the background color before drawing. Color bgColor = null; int backgroundPixel = loader.backgroundPixel; if (backgroundPixel != -1) { // Fill with the background color. RGB backgroundRGB = imageData.palette.getRGB(backgroundPixel); bgColor = new Color(null, backgroundRGB); } try { offScreenImageGC.setBackground( bgColor != null ? bgColor : backgrounds[0]); offScreenImageGC.fillRectangle( imageData.x, imageData.y, imageData.width, imageData.height); } finally { if (bgColor != null) bgColor.dispose(); } } else if ( imageData.disposalMethod == SWT.DM_FILL_PREVIOUS) { // Restore the previous image before drawing. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); } // Get the next image data. imageDataIndex = (imageDataIndex + 1) % imageDataArray.length; imageData = imageDataArray[imageDataIndex]; image.dispose(); image = new Image(display, imageData); // Draw the new image data. offScreenImageGC.drawImage( image, 0, 0, imageData.width, imageData.height, imageData.x, imageData.y, imageData.width, imageData.height); // Draw the off-screen image to the screen. imageCanvasGC.drawImage(offScreenImage, 0, 0); // Sleep for the specified delay time before drawing again. try { Thread.sleep(visibleDelay(imageData.delayTime * 10)); } catch (InterruptedException e) { } } } } finally { image.dispose(); offScreenImage.dispose(); offScreenImageGC.dispose(); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/cc72ec84df4d93cc632406d8e555ffcc65f0b1b1/AnimationItem.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/progress/AnimationItem.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
14671,
6452,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
759,
1788,
392,
3397,
17,
9252,
1316,
358,
3724,
603,
16,
471,
279,
15085,
358,
3724,
598,
18,
202,
202,
759,
19118,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
6459,
14671,
6452,
12,
45,
5491,
7187,
6438,
13,
288,
202,
202,
759,
1788,
392,
3397,
17,
9252,
1316,
358,
3724,
603,
16,
471,
279,
15085,
358,
3724,
598,
18,
202,
202,
759,
19118,... |
if ((available == null) || (defaults == null)) { | if ((available == null) || available.isEmpty()) { | public Locale getBestMatchingLocale(Locale requestedLocale, List defaults, Collection available) { if ((available == null) || (defaults == null)) { return null; } // the requested locale is the match we want to find most if (available.contains(requestedLocale)) { // check if the requested locale is directly available return requestedLocale; } if (requestedLocale.getVariant().length() > 0) { // locale has a variant like "en_EN_whatever", try only with language and country Locale check = new Locale(requestedLocale.getLanguage(), requestedLocale.getCountry(), ""); if (available.contains(check)) { return check; } } if (requestedLocale.getCountry().length() > 0) { // locale has a country like "en_EN", try only with language Locale check = new Locale(requestedLocale.getLanguage(), "", ""); if (available.contains(check)) { return check; } } // no match found for the requested locale, return the first match from the default locales return getFirstMatchingLocale(defaults, available); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/3894e60be8f5f1c93e1e50076f188eaff001ce33/CmsLocaleManager.java/buggy/src/org/opencms/i18n/CmsLocaleManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6458,
28782,
9517,
3916,
12,
3916,
3764,
3916,
16,
987,
3467,
16,
2200,
2319,
13,
288,
3639,
309,
14015,
5699,
422,
446,
13,
747,
2319,
18,
291,
1921,
10756,
288,
2398,
327,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
6458,
28782,
9517,
3916,
12,
3916,
3764,
3916,
16,
987,
3467,
16,
2200,
2319,
13,
288,
3639,
309,
14015,
5699,
422,
446,
13,
747,
2319,
18,
291,
1921,
10756,
288,
2398,
327,
446,
... |
public void startElement(String name, AttributeList atts) throws org.xml.sax.SAXException { //-- handle namespaces String namespace = null; if (hasNameSpace(name)) { name = getLocalPart(name); } UnmarshalState state = null; if (_stateInfo.empty()) { //-- Initialize since this is the first element if (_cdResolver == null) { if (_topClass == null) { String err = "The class for the root element '" + name + "' could not be found."; throw new SAXException(err); } else _cdResolver = new ClassDescriptorResolverImpl(_loader); } _topState = new UnmarshalState(); _topState.elementName = name; XMLClassDescriptor classDesc = null; //-- If _topClass is null, then we need to search //-- the resolver for one if (_topClass == null) { classDesc = _cdResolver.resolveByXMLName(name, null); if (classDesc != null) _topClass = classDesc.getJavaClass(); if (_topClass == null) { String err = "The class for the root element '" + name + "' could not be found."; throw new SAXException(err); } } //-- create a "fake" FieldDescriptor for the root element XMLFieldDescriptorImpl fieldDesc = new XMLFieldDescriptorImpl(_topClass, name, name, NodeType.Element); _topState.fieldDesc = fieldDesc; //-- look for XMLClassDescriptor if null if (classDesc == null) classDesc = getClassDescriptor(_topClass); fieldDesc.setClassDescriptor(classDesc); if (classDesc == null) { //-- report error if ((!_topClass.isPrimitive()) && (!Serializable.class.isAssignableFrom( _topClass ))) throw new SAXException(MarshalException.NON_SERIALIZABLE_ERR); else { String err = "unable to create XMLClassDescriptor " + "for class: " + _topClass.getName(); throw new SAXException(err); } } _topState.classDesc = classDesc; _topState.type = _topClass; // Retrieving the xsi:type attribute, if present String instanceClassname = getInstanceType(atts); if (instanceClassname != null) { Class instanceClass = null; Object instance = null; try { instanceClass = _cdResolver.resolve(instanceClassname) .getJavaClass(); if (!_topClass.isAssignableFrom(instanceClass)) { String err = instanceClass + " is not a subclass of " + _topClass; throw new SAXException(err); } } catch(Exception ex) { String msg = "unable to instantiate " + instanceClassname + "; "; throw new SAXException(msg + ex); } //-- try to create instance of the given Class try { _topState.object = instanceClass.newInstance(); } catch(Exception ex) { String msg = "unable to instantiate " + instanceClass.getName() + "; "; throw new SAXException(msg + ex); } } else { //-- try to create instance of the given Class try { _topState.object = _topClass.newInstance(); } catch(Exception ex) { String msg = "unable to instantiate " + _topClass.getName() + "; "; throw new SAXException(msg + ex); } } _stateInfo.push(_topState); processAttributes(atts, classDesc); return; } //-- get MarshalDescriptor for the given element UnmarshalState parentState = (UnmarshalState)_stateInfo.peek(); //-- create new state object state = new UnmarshalState(); state.elementName = name; _stateInfo.push(state); //-- make sure we should proceed if (parentState.object == null) return; Class _class = null; //-- Find ClassDescriptor for Parent XMLClassDescriptor classDesc = parentState.classDesc; if (classDesc == null) { classDesc = (XMLClassDescriptor)parentState.fieldDesc.getClassDescriptor(); if (classDesc == null) classDesc = getClassDescriptor(parentState.object.getClass()); } //-- Find FieldDescriptor for the element //-- we wish to unmarshal XMLFieldDescriptor descriptor = null; descriptor = classDesc.getFieldDescriptor(name, NodeType.Element); /* If descriptor is null, we need to handle possible inheritence, which might not be described in the current ClassDescriptor. This can be a slow process...for speed use the match attribute of the xml element in the mapping file. This logic might not be completely necessary, and perhaps we should remove it. */ XMLClassDescriptor cdInherited = null; if (descriptor == null) { cdInherited = _cdResolver.resolveByXMLName(name, null); if (cdInherited != null) { Class subclass = cdInherited.getJavaClass(); XMLFieldDescriptor[] descriptors = classDesc.getElementDescriptors(); for (int i = 0; i < descriptors.length; i++) { if (descriptors[i] == null) continue; Class superclass = descriptors[i].getFieldType(); if (superclass.isAssignableFrom(subclass)) { descriptor = descriptors[i]; break; } } } } /* end of additional inheritance logic */ if (descriptor == null) { String msg = "unable to find FieldDescriptor for '" + name; msg += "' in ClassDescriptor of " + classDesc.getXMLName(); message(msg); return; } //-- Find object type and create new Object of that type state.fieldDesc = descriptor; /* <update> * we need to add this code back in, to make sure * we have proper access rights. * if (!descriptor.getAccessRights().isWritable()) { if (debug) { buf.setLength(0); buf.append("The field for element '"); buf.append(name); buf.append("' is read-only."); message(buf.toString()); } return; } */ //-- Find class to instantiate //-- check xml names to see if we should look for a more specific //-- ClassDescriptor, otherwise just use the one found in the //-- descriptor classDesc = null; if (cdInherited != null) classDesc = cdInherited; else if (!name.equals(descriptor.getXMLName())) classDesc = _cdResolver.resolveByXMLName(name, null); if (classDesc == null) classDesc = (XMLClassDescriptor)descriptor.getClassDescriptor(); FieldHandler handler = descriptor.getHandler(); boolean useHandler = true; try { //-- Get Class type...first use ClassDescriptor, //-- since it could be more specific than //-- the FieldDescriptor if (classDesc != null) { _class = classDesc.getJavaClass(); //-- XXXX this is a hack I know...but we //-- XXXX can't use the handler in this case state.derived = true; } else _class = descriptor.getFieldType(); // Retrieving the xsi:type attribute, if present String instanceType = getInstanceType(atts); if (instanceType != null) { Class instanceClass = null; try { XMLClassDescriptor instanceDesc = getClassDescriptor(instanceType, _loader); if (instanceDesc != null) { instanceClass = instanceDesc.getJavaClass(); classDesc = instanceDesc; } else instanceClass = loadClass(instanceType, null); if (!_class.isAssignableFrom(instanceClass)) { String err = instanceClass + " is not a subclass of " + _class; throw new SAXException(err); } _class = instanceClass; useHandler = false; } catch(Exception ex) { String msg = "unable to instantiate " + instanceType; throw new SAXException(msg + "; " + ex); } } //-- Handle support for "Any" type if (_class == Object.class) { Class pClass = parentState.type; ClassLoader loader = pClass.getClassLoader(); //-- first look for a descriptor based //-- on the XML name classDesc = _cdResolver.resolveByXMLName(name, loader); //-- if null, create classname, and try resolving String cname = null; if (classDesc == null) { //-- create class name cname = JavaNaming.toJavaClassName(name); classDesc = getClassDescriptor(cname, loader); } //-- if still null, try using parents package if (classDesc == null) { //-- use parent to get package information String pkg = pClass.getName(); int idx = pkg.lastIndexOf('.'); if (idx > 0) { pkg = pkg.substring(0,idx+1); cname = pkg + cname; classDesc = getClassDescriptor(cname, loader); } } if (classDesc != null) { _class = classDesc.getJavaClass(); useHandler = false; } else { String err = "unable to determine class for " + "element: " + name; throw new SAXException(err); } } boolean byteArray = false; if (_class.isArray()) byteArray = (_class.getComponentType() == Byte.TYPE); //-- check for immutable if (isPrimitive(_class) || descriptor.isImmutable() || byteArray) { state.object = null; state.primitiveOrImmutable = true; } else { //-- XXXX should remove this test once we can //-- XXXX come up with a better solution if ((!state.derived) && useHandler) state.object = handler.newInstance(parentState.object); //-- reassign class in case there is a conflict //-- between descriptor#getFieldType and //-- handler#newInstance...I should hope not, but //-- who knows if (state.object != null) _class = state.object.getClass(); else { try { state.object = _class.newInstance(); } catch(java.lang.Exception ex) { String err = "unable to instantiate a new type of: "; err += className(_class); throw new SAXException(err); } } } state.type = _class; } catch (java.lang.IllegalStateException ise) { message(ise.toString()); throw new SAXException(ise); } //-- At this point we should have a new object, unless //-- we are dealing with a primitive type, or a special //-- case such as byte[] if (classDesc == null) { classDesc = getClassDescriptor(_class); } state.classDesc = classDesc; if ((state.object == null) && (!state.primitiveOrImmutable)) { String err = "unable to unmarshal: " + name + "\n"; err += " - unable to instantiate: " + className(_class); throw new SAXException(err); } //-- assign object, if incremental if (descriptor.isIncremental()) { if (debug) { buf.setLength(0); buf.append("debug: Processing incrementally for element: "); buf.append(name); message(buf.toString()); } try { handler.setValue(parentState.object, state.object); } catch(java.lang.IllegalStateException ise) { String err = "unable to add \"" + name + "\" to "; err += parentState.fieldDesc.getXMLName(); err += " due to the following error: " + ise; throw new SAXException(err); } } if (state.object != null) processAttributes(atts, classDesc); else if ((state.type != null) && (!state.primitiveOrImmutable)) { buf.setLength(0); buf.append("The current object for element '"); buf.append(name); buf.append("\' is null, ignoring attributes."); message(buf.toString()); } } //-- void startElement(String, AttributeList) | 3614 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3614/73afc2a946b3dca4a1ef937db80e79ce0cab6d1b/UnmarshalHandler.java/clean/trunk/castor-2002/castor/src/main/org/exolab/castor/xml/UnmarshalHandler.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
780,
508,
16,
3601,
682,
15687,
13,
540,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
7734,
368,
413,
1640,
7728,
7734,
514,
1981,
273,
446,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
13591,
12,
780,
508,
16,
3601,
682,
15687,
13,
540,
1216,
2358,
18,
2902,
18,
87,
651,
18,
55,
2501,
503,
565,
288,
7734,
368,
413,
1640,
7728,
7734,
514,
1981,
273,
446,
3... | ||
} else if (jj_2_49(2147483647)) { | } else if (jj_2_53(2147483647)) { | final public void CastLookahead() throws ParseException { if (jj_2_48(2)) { jj_consume_token(LPAREN); PrimitiveType(); label_25: while (true) { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LBRACKET: ; break; default: jj_la1[121] = jj_gen; break label_25; } jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } jj_consume_token(RPAREN); } else if (jj_2_49(2147483647)) { jj_consume_token(LPAREN); CompoundWord(); jj_consume_token(LBRACKET); jj_consume_token(RBRACKET); } else { switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case LPAREN: jj_consume_token(LPAREN); CompoundWord(); jj_consume_token(RPAREN); switch ((jj_ntk==-1)?jj_ntk():jj_ntk) { case TILDE: jj_consume_token(TILDE); break; case BANG: jj_consume_token(BANG); break; case LPAREN: jj_consume_token(LPAREN); break; case IDENTIFIER: jj_consume_token(IDENTIFIER); break; case THIS: jj_consume_token(THIS); break; case SUPER: jj_consume_token(SUPER); break; case NEW: jj_consume_token(NEW); break; case FALSE: case NULL: case TRUE: case DECIMAL_LITERAL: case HEX_LITERAL: case OCTAL_LITERAL: case LONG_DECIMAL_LITERAL: case LONG_HEX_LITERAL: case LONG_OCTAL_LITERAL: case DOUBLE_FLOATING_POINT_LITERAL: case FLOATING_POINT_LITERAL: case CHARACTER_LITERAL: case STRING_LITERAL: Literal(); break; default: jj_la1[122] = jj_gen; jj_consume_token(-1); throw new ParseException(); } break; default: jj_la1[123] = jj_gen; jj_consume_token(-1); throw new ParseException(); } } } | 11192 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11192/8e9d6d4a3458f4fb8d197d118149328dfb2ae150/ACParser.java/clean/drjava/src/edu/rice/cs/drjava/model/autocomplete/parser/ACParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
19782,
9794,
11617,
1435,
1216,
10616,
288,
565,
309,
261,
78,
78,
67,
22,
67,
8875,
12,
22,
3719,
288,
1377,
10684,
67,
21224,
67,
2316,
12,
48,
15111,
1769,
1377,
1448... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
727,
1071,
918,
19782,
9794,
11617,
1435,
1216,
10616,
288,
565,
309,
261,
78,
78,
67,
22,
67,
8875,
12,
22,
3719,
288,
1377,
10684,
67,
21224,
67,
2316,
12,
48,
15111,
1769,
1377,
1448... |
if( unLo > unHi ) | if( unLo > unHi ) { | private void qSort3( int loSt, int hiSt, int dSt ) { int unLo; int unHi; int ltLo; int gtHi; int med; int n; int m; int sp; int lo; int hi; int d; StackElem[] stack = new StackElem[ QSORT_STACK_SIZE ]; for( int count = 0; count < QSORT_STACK_SIZE; count++ ) stack[ count ] = new StackElem(); sp = 0; stack[ sp ].ll = loSt; stack[ sp ].hh = hiSt; stack[ sp ].dd = dSt; sp++; while( sp > 0 ) { if( sp >= QSORT_STACK_SIZE ) panic(); sp--; lo = stack[ sp ].ll; hi = stack[ sp ].hh; d = stack[ sp ].dd; if( hi - lo < SMALL_THRESH || d > DEPTH_THRESH ) { simpleSort( lo, hi, d ); if( workDone > workLimit && firstAttempt ) return; continue; } med = med3( block[ zptr[ lo ] + d + 1 ], block[ zptr[ hi ] + d + 1 ], block[ zptr[ ( lo + hi ) >> 1 ] + d + 1 ] ); unLo = ltLo = lo; unHi = gtHi = hi; while( true ) { while( true ) { if( unLo > unHi ) break; n = ( (int)block[ zptr[ unLo ] + d + 1 ] ) - med; if( n == 0 ) { int temp = 0; temp = zptr[ unLo ]; zptr[ unLo ] = zptr[ ltLo ]; zptr[ ltLo ] = temp; ltLo++; unLo++; continue; } ; if( n > 0 ) break; unLo++; } while( true ) { if( unLo > unHi ) break; n = ( (int)block[ zptr[ unHi ] + d + 1 ] ) - med; if( n == 0 ) { int temp = 0; temp = zptr[ unHi ]; zptr[ unHi ] = zptr[ gtHi ]; zptr[ gtHi ] = temp; gtHi--; unHi--; continue; } ; if( n < 0 ) break; unHi--; } if( unLo > unHi ) break; int temp = 0; temp = zptr[ unLo ]; zptr[ unLo ] = zptr[ unHi ]; zptr[ unHi ] = temp; unLo++; unHi--; } if( gtHi < ltLo ) { stack[ sp ].ll = lo; stack[ sp ].hh = hi; stack[ sp ].dd = d + 1; sp++; continue; } n = ( ( ltLo - lo ) < ( unLo - ltLo ) ) ? ( ltLo - lo ) : ( unLo - ltLo ); vswap( lo, unLo - n, n ); m = ( ( hi - gtHi ) < ( gtHi - unHi ) ) ? ( hi - gtHi ) : ( gtHi - unHi ); vswap( unLo, hi - m + 1, m ); n = lo + unLo - ltLo - 1; m = hi - ( gtHi - unHi ) + 1; stack[ sp ].ll = lo; stack[ sp ].hh = n; stack[ sp ].dd = d; sp++; stack[ sp ].ll = n + 1; stack[ sp ].hh = m - 1; stack[ sp ].dd = d + 1; sp++; stack[ sp ].ll = m; stack[ sp ].hh = hi; stack[ sp ].dd = d; sp++; } } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/8ce1de2178a0422105fa437c327b49fb5637ff28/CBZip2OutputStream.java/buggy/proposal/myrmidon/src/java/org/apache/aut/bzip2/CBZip2OutputStream.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1043,
4416,
23,
12,
509,
437,
510,
16,
509,
10118,
510,
16,
509,
302,
510,
262,
565,
288,
3639,
509,
640,
1504,
31,
3639,
509,
640,
25009,
31,
3639,
509,
13489,
1504,
31,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
1043,
4416,
23,
12,
509,
437,
510,
16,
509,
10118,
510,
16,
509,
302,
510,
262,
565,
288,
3639,
509,
640,
1504,
31,
3639,
509,
640,
25009,
31,
3639,
509,
13489,
1504,
31,
3... |
LinearPrinter.println(" resetting parent pointer for " + newChildPipe.get(0)); newChildPipe.get(0).setParent(parentPipe); | private static void doPipelineAdd(SIRPipeline parentPipe, SIRPipeline newChildPipe, HashMap linearRepMap) { LinearPrinter.println(" new child pipe: "); Iterator newKidIter = newChildPipe.getChildren().iterator(); while(newKidIter.hasNext()) {LinearPrinter.println(" " + newKidIter.next());} // if the new child pipe has 0-1 children, we are done if (newChildPipe.size() == 0) { LinearPrinter.println(" (no children)"); return; } else if (newChildPipe.size() == 1) { LinearPrinter.println(" (one child)"); LinearPrinter.println(" resetting parent pointer for " + newChildPipe.get(0)); newChildPipe.get(0).setParent(parentPipe); return; } // if the newChild pipeline contains all of the children of // the parent pipe, there is no need to do any replacing // (we would just be adding a pipeline with its only child a pipeline). if (parentPipe.size() != newChildPipe.size()) { // set the parent field of the child pipe to be the parent (duh) newChildPipe.setParent(parentPipe); newChildPipe.setInit(SIRStream.makeEmptyInit()); // set to empty init method // remember the location of the first wrapper pipe's child // in the original parent pipeline (so we can insert the wrapper // pipe at the appropriate place. int newPipeIndex = parentPipe.indexOf(newChildPipe.get(0)); if (newPipeIndex == -1) {throw new RuntimeException("unknown child in wrapper pipe");} // now, remove all of the streams that appear in the new child wrapper pipeline Iterator wrappedChildIter = newChildPipe.getChildren().iterator(); while(wrappedChildIter.hasNext()) { SIRStream removeKid = (SIRStream)wrappedChildIter.next() ; parentPipe.remove(removeKid); } // now, add the new child pipeline to the parent at the index of first wrapped child parentPipe.add(newPipeIndex,newChildPipe); } else { // no need to do wrap all of the children again. newChildPipe = parentPipe; } // now, calculate the overall linear rep of the child pipeline List repList = getLinearRepList(linearRepMap, newChildPipe.getChildren()); // list of linear reps LinearTransform pipeTransform = LinearTransformPipeline.calculate(repList); try { LinearFilterRepresentation newRep = pipeTransform.transform(); // add a mapping from child pipe to the new linear form. linearRepMap.put(newChildPipe, newRep); // write output for output parsing scripts (check output mode // because printing this takes a loooooong time for big matrices) if (LinearPrinter.getOutput()) { LinearPrinter.println("Linear pipeline found: " + newChildPipe + "\n-->Matrix:\n" + newRep.getA() + "\n-->Constant Vector:\n" + newRep.getb()); } } catch (NoTransformPossibleException e) { // otherwise something bad happened in the combination process. LinearPrinter.println(" can't combine transform reps: " + e.getMessage()); //throw new RuntimeException("Error combining pipeline!"); } return; } | 47772 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47772/1a670b48be0096b5c596820b7105c86541a1e439/LinearAnalyzer.java/clean/streams/src/at/dms/kjc/sir/linear/LinearAnalyzer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
741,
8798,
986,
12,
2320,
54,
8798,
982,
11546,
16,
6862,
1377,
5705,
54,
8798,
19783,
11546,
16,
6862,
1377,
4317,
9103,
18933,
863,
13,
288,
202,
15982,
12149,
18,
8222,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
760,
918,
741,
8798,
986,
12,
2320,
54,
8798,
982,
11546,
16,
6862,
1377,
5705,
54,
8798,
19783,
11546,
16,
6862,
1377,
4317,
9103,
18933,
863,
13,
288,
202,
15982,
12149,
18,
8222,... | |
public final boolean hasLocalPropertiesForExtendedElements( ) { if ( !isSameType( ) ) return false; if ( !isExtendedElements( ) ) return false; List elements = getElements( ); for ( Iterator iter = elements.iterator( ); iter.hasNext( ); ) { DesignElementHandle elementHandle = (DesignElementHandle) iter .next( ); Iterator propIter = elementHandle.getPropertyIterator( ); while ( propIter.hasNext( ) ) { PropertyHandle propertyHandle = (PropertyHandle) propIter .next( ); String name = propertyHandle.getDefn( ).getName( ); if ( IDesignElementModel.EXTENDS_PROP.equals( name ) ) continue; if ( elementHandle.getElement( ).getLocalProperty( elementHandle.getModule( ), name ) != null ) return true; } } return false; } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/7a8901e22a00fadf540ba238a22fb2a695b7644f/GroupElementHandle.java/clean/model/org.eclipse.birt.report.model/src/org/eclipse/birt/report/model/api/GroupElementHandle.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
711,
2042,
2297,
1290,
11456,
3471,
12,
262,
202,
95,
202,
202,
430,
261,
401,
291,
8650,
559,
12,
262,
262,
1082,
202,
2463,
629,
31,
202,
202,
430,
261,
401,
29... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
727,
1250,
711,
2042,
2297,
1290,
11456,
3471,
12,
262,
202,
95,
202,
202,
430,
261,
401,
291,
8650,
559,
12,
262,
262,
1082,
202,
2463,
629,
31,
202,
202,
430,
261,
401,
29... | ||
GrailsDomainClass domainClass = this.grailsApplication.getGrailsDomainClass("org.codehaus.groovy.grails.orm.hibernate.PersistentMethodTestClass"); | GrailsDomainClass domainClass = this.grailsApplication.getGrailsDomainClass("PersistentMethodTests"); GroovyObject obj = (GroovyObject)domainClass.newInstance(); obj.setProperty( "id", new Long(1) ); obj.setProperty( "firstName", "fred" ); obj.setProperty( "lastName", "flintstone" ); obj.setProperty( "age", new Integer(45)); obj.invokeMethod("save", null); GroovyObject obj2 = (GroovyObject)domainClass.newInstance(); obj2.setProperty( "id", new Long(2) ); obj2.setProperty( "firstName", "wilma" ); obj2.setProperty( "lastName", "flintstone" ); obj2.setProperty( "age", new Integer(42)); obj2.invokeMethod("save", null); GroovyObject obj3 = (GroovyObject)domainClass.newInstance(); obj3.setProperty( "id", new Long(3) ); obj3.setProperty( "firstName", "dino" ); obj3.setProperty( "lastName", "dinosaur" ); obj3.setProperty( "age", new Integer(12)); obj3.invokeMethod("save", null); Object returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findAllByFirstName", new Object[] { "fred", new Integer(10) }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); List returnList = (List)returnValue; assertEquals(1, returnList.size()); returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findAllByFirstNameAndLastName", new Object[] { "fred", "flintstone" }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); returnList = (List)returnValue; assertEquals(1, returnList.size()); /*returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findByFirstNameOrLastName", new Object[] { "fred", "flintstone" }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); | public void testFindByPersistentMethods() { GrailsDomainClass domainClass = this.grailsApplication.getGrailsDomainClass("org.codehaus.groovy.grails.orm.hibernate.PersistentMethodTestClass"); GroovyObject obj = (GroovyObject)domainClass.newInstance(); obj.setProperty( "id", new Long(1) ); obj.setProperty( "firstName", "fred" ); obj.setProperty( "lastName", "flintstone" ); obj.setProperty( "age", new Integer(45)); obj.invokeMethod("save", null); GroovyObject obj2 = (GroovyObject)domainClass.newInstance(); obj2.setProperty( "id", new Long(2) ); obj2.setProperty( "firstName", "wilma" ); obj2.setProperty( "lastName", "flintstone" ); obj2.setProperty( "age", new Integer(42)); obj2.invokeMethod("save", null); GroovyObject obj3 = (GroovyObject)domainClass.newInstance(); obj3.setProperty( "id", new Long(3) ); obj3.setProperty( "firstName", "dino" ); obj3.setProperty( "lastName", "dinosaur" ); obj3.setProperty( "age", new Integer(12)); obj3.invokeMethod("save", null); Object returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findAllByFirstName", new Object[] { "fred", new Integer(10) }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); List returnList = (List)returnValue; assertEquals(1, returnList.size()); returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findAllByFirstNameAndLastName", new Object[] { "fred", "flintstone" }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); returnList = (List)returnValue; assertEquals(1, returnList.size()); /*returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findByFirstNameOrLastName", new Object[] { "fred", "flintstone" }); assertNotNull(returnValue); assertTrue(returnValue instanceof List); returnList = (List)returnValue; assertEquals(2, returnList.size());*/ returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByFirstNameNotEqual", new Object[] { "fred" }); assertEquals(2, returnList.size()); obj = (GroovyObject)returnList.get(0); obj2 = (GroovyObject)returnList.get(1); assertFalse("fred".equals( obj.getProperty("firstName"))); assertFalse("fred".equals( obj2.getProperty("firstName"))); returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByAgeLessThan", new Object[] { new Integer(20) }); assertEquals(1, returnList.size()); obj = (GroovyObject)returnList.get(0); assertEquals("dino", obj.getProperty("firstName")); returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByAgeGreaterThan", new Object[] { new Integer(20) }); assertEquals(2, returnList.size()); returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByAgeGreaterThanAndLastName", new Object[] { new Integer(20), "flintstone" }); assertEquals(2, returnList.size()); returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByLastNameLike", new Object[] { "flint%" }); assertEquals(2, returnList.size()); returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByAgeBetween", new Object[] { new Integer(10), new Integer(43) }); assertEquals(2, returnList.size()); Map queryMap = new HashMap(); queryMap.put("firstName", "wilma"); queryMap.put("lastName", "flintstone"); returnValue = obj.getMetaClass().invokeStaticMethod(obj, "findWhere", new Object[] { queryMap }); assertNotNull(returnValue); // now lets test out some junk and make sure we get errors! try { returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByLastNameLike", new Object[] { new Boolean(false) }); fail("Should have thrown an exception for invalid arguments"); } catch(MissingMethodException mme) { //great! } // and the wrong number of arguments! try { returnList = (List)obj.getMetaClass().invokeStaticMethod(obj, "findAllByAgeBetween", new Object[] { new Integer(10) }); fail("Should have thrown an exception for invalid argument count"); } catch(MissingMethodException mme) { //great! } } | 26970 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/26970/a5c9dcc1f634b2b34633f99a226b7a489931c458/PersistentMethodTests.java/clean/test/persistence/org/codehaus/groovy/grails/orm/hibernate/PersistentMethodTests.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3125,
858,
11906,
4712,
1435,
288,
202,
202,
14571,
14573,
3748,
797,
2461,
797,
273,
333,
18,
2752,
14573,
3208,
18,
588,
14571,
14573,
3748,
797,
2932,
3341,
18,
71... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1842,
3125,
858,
11906,
4712,
1435,
288,
202,
202,
14571,
14573,
3748,
797,
2461,
797,
273,
333,
18,
2752,
14573,
3208,
18,
588,
14571,
14573,
3748,
797,
2932,
3341,
18,
71... |
protected int checkVerticalKey(int key, String exception) { return 0; } | protected int checkVerticalKey(int key, String exception) { switch (key) { case SwingConstants.TOP: case SwingConstants.BOTTOM: case SwingConstants.CENTER: break; default: throw new IllegalArgumentException(exception); } return key; } | protected int checkVerticalKey(int key, String exception) { // Ensures that the key is a valid. return 0; } | 1056 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1056/2703ae3b51c371a2a79d28271cd57b4046c647d0/AbstractButton.java/clean/core/src/classpath/javax/javax/swing/AbstractButton.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
509,
866,
15704,
653,
12,
474,
498,
16,
514,
1520,
13,
288,
202,
202,
759,
4202,
1374,
8421,
716,
326,
498,
353,
279,
923,
18,
202,
202,
2463,
374,
31,
202,
97,
2,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
509,
866,
15704,
653,
12,
474,
498,
16,
514,
1520,
13,
288,
202,
202,
759,
4202,
1374,
8421,
716,
326,
498,
353,
279,
923,
18,
202,
202,
2463,
374,
31,
202,
97,
2,
-100,
... |
tabbedPane.setTitleAt(index, title); | tabbedContentManager.setTitleAt(index, title); | public void setTitleAt(int index, String title) { tabbedPane.setTitleAt(index, title); } | 51282 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51282/57a407dc329b3647060b6a1165a8a1233b1f2fee/MyDoggyWindowContentManager.java/clean/mydoggy-plaf/src/main/java/org/noos/xing/mydoggy/plaf/MyDoggyWindowContentManager.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14109,
861,
12,
474,
770,
16,
514,
2077,
13,
288,
3639,
3246,
2992,
1350,
1318,
18,
542,
4247,
861,
12,
1615,
16,
2077,
1769,
565,
289,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
14109,
861,
12,
474,
770,
16,
514,
2077,
13,
288,
3639,
3246,
2992,
1350,
1318,
18,
542,
4247,
861,
12,
1615,
16,
2077,
1769,
565,
289,
2,
-100,
-100,
-100,
-100,
-100,
-100,... |
fCurrentElement.rawname = fElementTypeStack[fElementDepth]; | public void callEndElement(int readerId) throws Exception { if ( DEBUG_SCHEMA_VALIDATION ) System.out.println("=======EndElement : " + fStringPool.toString(fCurrentElement.localpart)+"\n"); int prefixIndex = fCurrentElement.prefix; int elementType = fCurrentElement.rawname; if (fCurrentElementEntity != readerId) { fErrorReporter.reportError(fErrorReporter.getLocator(), XMLMessages.XML_DOMAIN, XMLMessages.MSG_ELEMENT_ENTITY_MISMATCH, XMLMessages.P78_NOT_WELLFORMED, new Object[] { fStringPool.toString(elementType) }, XMLErrorReporter.ERRORTYPE_FATAL_ERROR); } fElementDepth--; if (fValidating) { int elementIndex = fCurrentElementIndex; if (elementIndex != -1 && fCurrentContentSpecType != -1) { QName children[] = fElementChildren; int childrenOffset = fElementChildrenOffsetStack[fElementDepth + 1] + 1; int childrenLength = fElementChildrenLength - childrenOffset; if (DEBUG_ELEMENT_CHILDREN) { System.out.println("endElement("+fStringPool.toString(fCurrentElement.rawname)+')'); System.out.print("offset: "); System.out.print(childrenOffset); System.out.print(", length: "); System.out.print(childrenLength); System.out.println(); printChildren(); printStack(); } int result = checkContent(elementIndex, children, childrenOffset, childrenLength); if ( DEBUG_SCHEMA_VALIDATION ) System.out.println("!!!!!!!!In XMLValidator, the return value from checkContent : " + result); if (result != -1) { int majorCode = result != childrenLength ? XMLMessages.MSG_CONTENT_INVALID : XMLMessages.MSG_CONTENT_INCOMPLETE; fGrammar.getElementDecl(elementIndex, fTempElementDecl); if (fTempElementDecl.type == XMLElementDecl.TYPE_EMPTY) { reportRecoverableXMLError(majorCode, 0, fStringPool.toString(elementType), "EMPTY"); } else reportRecoverableXMLError(majorCode, 0, fStringPool.toString(elementType), XMLContentSpec.toString(fGrammar, fStringPool, fTempElementDecl.contentSpecIndex)); } } fElementChildrenLength = fElementChildrenOffsetStack[fElementDepth + 1] + 1; } fDocumentHandler.endElement(fCurrentElement); if (fNamespacesEnabled) { fNamespacesScope.decreaseDepth(); } // now pop this element off the top of the element stack //if (fElementDepth-- < 0) { if (fElementDepth < -1) { throw new RuntimeException("FWK008 Element stack underflow"); } if (fElementDepth < 0) { fCurrentElement.clear(); fCurrentElementEntity = -1; fCurrentElementIndex = -1; fCurrentContentSpecType = -1; fInElementContent = false; // // Check after document is fully parsed // (1) check that there was an element with a matching id for every // IDREF and IDREFS attr (V_IDREF0) // if (fValidating && fIdRefs != null) { checkIdRefs(); } return; } //restore enclosing element to all the "current" variables // REVISIT: Validation. This information needs to be stored. fCurrentElement.prefix = -1; if (fNamespacesEnabled) { //If Namespace enable then localName != rawName fCurrentElement.localpart = fElementLocalPartStack[fElementDepth]; } else {//REVISIT - jeffreyr - This is so we still do old behavior when namespace is off fCurrentElement.localpart = fElementTypeStack[fElementDepth]; } fCurrentElement.rawname = fElementTypeStack[fElementDepth]; fCurrentElementEntity = fElementEntityStack[fElementDepth]; fCurrentElementIndex = fElementIndexStack[fElementDepth]; fCurrentContentSpecType = fContentSpecTypeStack[fElementDepth]; fCurrentScope = fScopeStack[fElementDepth]; //if ( DEBUG_SCHEMA_VALIDATION ) { /****System.out.println("+++++ currentElement : " + fStringPool.toString(elementType)+ "\n fCurrentElementIndex : " + fCurrentElementIndex + "\n fCurrentScope : " + fCurrentScope + "\n fCurrentContentSpecType : " + fCurrentContentSpecType + "\n++++++++++++++++++++++++++++++++++++++++++++++++" );/****/ //} // if enclosing element's Schema is different, need to switch "context" if ( fGrammarNameSpaceIndex != fGrammarNameSpaceIndexStack[fElementDepth] ) { fGrammarNameSpaceIndex = fGrammarNameSpaceIndexStack[fElementDepth]; switchGrammar(fGrammarNameSpaceIndex); } if (fValidating) { fBufferDatatype = false; } fInElementContent = (fCurrentContentSpecType == XMLElementDecl.TYPE_CHILDREN); } // callEndElement(int) | 46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/c9b7cd65128a71bc17ef1e5e7ffbc8ba0363c727/XMLValidator.java/buggy/src/org/apache/xerces/validators/common/XMLValidator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
1638,
1046,
12,
474,
2949,
548,
13,
1216,
1185,
288,
3639,
309,
261,
6369,
67,
14233,
67,
5063,
2689,
262,
5411,
2332,
18,
659,
18,
8222,
2932,
894,
12275,
1638,
1046,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
745,
1638,
1046,
12,
474,
2949,
548,
13,
1216,
1185,
288,
3639,
309,
261,
6369,
67,
14233,
67,
5063,
2689,
262,
5411,
2332,
18,
659,
18,
8222,
2932,
894,
12275,
1638,
1046,
2... | |
_log.info(((EOKeyValueQualifier)qualifier).selector()); | private EOQualifierSQLGeneration.Support supportForQualifier(EOQualifier qualifier) { EOQualifierSQLGeneration.Support support = null; if(qualifier instanceof EOKeyValueQualifier) { synchronized (_qualifierKeys) { support = (Support) _qualifierKeys.get(((EOKeyValueQualifier)qualifier).selector().name()); _log.info(((EOKeyValueQualifier)qualifier).selector()); } } if(support == null) { support = _old; } return support; } | 46145 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46145/cce270dafeb0638f7dc17f06b003ebf9f4fe1f66/ERXExtensions.java/buggy/Common/Frameworks/ERExtensions/Sources/er/extensions/ERXExtensions.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
3238,
512,
51,
16185,
3997,
13842,
18,
6289,
2865,
1290,
16185,
12,
41,
51,
16185,
12327,
13,
288,
7734,
512,
51,
16185,
3997,
13842,
18,
6289,
2865,
273,
446,
31,
7734,
309,
12,
28157,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
3238,
512,
51,
16185,
3997,
13842,
18,
6289,
2865,
1290,
16185,
12,
41,
51,
16185,
12327,
13,
288,
7734,
512,
51,
16185,
3997,
13842,
18,
6289,
2865,
273,
446,
31,
7734,
309,
12,
28157,
... | |
source.println("\n" + indent + " return;"); | source.println(indent + " return;"); | public void generateCode(PrintStream header, PrintStream source, String context, String mapName, String stateName, String indent) throws ParseException { int guardCount; int guardIndex; int nullConditions; ListIterator paramIt; SmcParameter parameter; ListIterator guardIt; SmcGuard guard; source.print("\n" + indent + "protected void " + _name + "(" + context + "Context s"); // Add user-defined parameters. for (paramIt = _parameters.listIterator(); paramIt.hasNext() == true; ) { parameter = (SmcParameter) paramIt.next(); source.print(", "); parameter.generateCode(source); } source.println(")"); source.println(indent + "{"); // Output transtion to debug stream. if (Smc.isDebug() == true) { source.println(indent + " if (s.getDebugFlag() == true)"); source.println(indent + " {"); source.print(indent + " System.err.println(\"TRANSITION : " + mapName + "." + stateName + "." + _name); if (_parameters.size() > 0) { String separator; source.print("("); for (paramIt = _parameters.listIterator(), separator = ""; paramIt.hasNext() == true; separator = ", ") { parameter = (SmcParameter) paramIt.next(); source.print(separator); parameter.generateCode(source); } source.print(")"); } source.println("\");"); source.println(indent + " }\n"); } // Loop through the guards and print each one. for (guardIt = _guards.listIterator(), guardIndex = 0, guardCount = _guards.size(), nullConditions = 0; guardIt.hasNext() == true; ++guardIndex) { guard = (SmcGuard) guardIt.next(); // Count up the guards with no condition. if (guard.getCondition() == null) { ++nullConditions; } guard.generateCode(source, guardIndex, guardCount, context, mapName, stateName, indent); } // If all guards have a condition, then create a final // "else" clause which passes control to the default // transition. Pass all arguments into the default // transition. if (guardCount > 0 && nullConditions == 0) { source.println("}\n" + indent + " else"); source.println(indent + " {"); source.print(indent + " " + mapName + ".Default." + _name + "(s"); for (paramIt = _parameters.listIterator(); paramIt.hasNext() == true; ) { parameter = (SmcParameter) paramIt.next(); source.print(", " + parameter.getName()); } source.println(");"); source.println(indent + " }"); } else if (nullConditions > 1) { // If there are multiple transition with the same // name, then only one of them can be unguarded. ParseException e = new ParseException("State " + mapName + "::" + stateName + " has multiple transitions with the same name (\"" + _name + "\") and guard.", 0); throw(e); } // Need to add a final newline after a multiguard block. else if (guardCount > 0) { source.println(); } source.println("\n" + indent + " return;"); source.println(indent + "}"); return; } | 50995 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50995/eb27700d8309435b1a9692fbf7cfa887d4d1fcd7/SmcTransitionJava.java/clean/bin/SmcTransitionJava.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2103,
1085,
12,
5108,
1228,
1446,
16,
11794,
21677,
1084,
16,
11794,
514,
819,
16,
11794,
514,
852,
461,
16,
11794,
514,
919,
461,
16,
11794,
514,
3504,
13,
3639,
1216,
10616,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2103,
1085,
12,
5108,
1228,
1446,
16,
11794,
21677,
1084,
16,
11794,
514,
819,
16,
11794,
514,
852,
461,
16,
11794,
514,
919,
461,
16,
11794,
514,
3504,
13,
3639,
1216,
10616,
... |
public void drawRenderableImage(RenderableImage image, AffineTransform xform) | public void drawRenderableImage(RenderableImage image, AffineTransform xform) | public void drawRenderableImage(RenderableImage image, AffineTransform xform) { drawRenderedImage (image.createRendering (new RenderContext (xform)), xform); } | 45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/bef34bda2204726d6cecbf5422e100bc663abc3e/GdkGraphics2D.java/buggy/libraries/javalib/gnu/java/awt/peer/gtk/GdkGraphics2D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3724,
3420,
429,
2040,
12,
3420,
429,
2040,
1316,
16,
21394,
23906,
558,
4059,
619,
687,
13,
225,
288,
565,
3724,
19222,
2040,
261,
2730,
18,
2640,
14261,
261,
2704,
6987,
1042... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
3724,
3420,
429,
2040,
12,
3420,
429,
2040,
1316,
16,
21394,
23906,
558,
4059,
619,
687,
13,
225,
288,
565,
3724,
19222,
2040,
261,
2730,
18,
2640,
14261,
261,
2704,
6987,
1042... |
Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Cannot load the nullable class to return a dependency object for " + m_metadata.getField() + " -> " + m_metadata.getServiceSpecification()); | m_handler.getInstanceManager().getFactory().getLogger().log(Logger.INFO, "[" + m_handler.getInstanceManager().getClassName() + "] Cannot load the nullable class to return a dependency object for " + m_metadata.getField() + " -> " + m_metadata.getServiceSpecification()); | protected Object get() { Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Call get for a dependency on : " + m_metadata.getServiceSpecification() + " Multiple : " + m_metadata.isMultiple() + " Optional : " + m_metadata.isOptional()); try { // 1 : Test if there is any change in the reference list : if (!m_change) { if (!m_metadata.isMultiple()) { if (m_services.length > 0) { return m_services[0]; } } else { return m_services; } } // 2 : Else there is a change in the list -> recompute the m_services array Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Create a service array of " + m_clazz.getName()); m_services = (Object[]) Array.newInstance(m_clazz, m_ref.length); for (int i = 0; i < m_ref.length; i++) { m_services[i] = m_handler.getComponentManager().getContext().getService(m_ref[i]); } m_change = false; Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Create an array with the size " + m_services.length); // 3 : The service object list is populated, I return either the first service object, either the array. // Return null or an empty array if no service are found. if (!m_metadata.isMultiple()) { if (m_services.length > 0) { return m_services[0]; } else { // Load the nullable class String[] segment = m_metadata.getServiceSpecification().split("[.]"); String className = "org.apache.felix.ipojo." + segment[segment.length - 1] + "Nullable"; Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Try to load the nullable class for " + getMetadata().getServiceSpecification() + " -> " + className); Class nullableClazz = m_handler.getNullableClass(className); if (nullableClazz == null) { Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Cannot load the nullable class to return a dependency object for " + m_metadata.getField() + " -> " + m_metadata.getServiceSpecification()); return null; } // The nullable class is loaded, create the object and return it Object instance = nullableClazz.newInstance(); Activator.getLogger().log(Level.INFO, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Nullable object created for " + getMetadata().getServiceSpecification() + " -> " + instance); return instance; } } else { // Multiple dependency return m_services; } } catch (Exception e) { // There is a problem in the dependency resolving (like in stopping method) if (!m_metadata.isMultiple()) { Activator.getLogger().log(Level.SEVERE, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Return null, an exception was throwed in the get method -> " + e.getMessage()); return null; } else { Activator.getLogger().log(Level.SEVERE, "[" + m_handler.getComponentManager().getComponentMetatada().getClassName() + "] Return an empty array, an exception was throwed in the get method" + e.getMessage()); return Array.newInstance(m_clazz, 0); } } } | 45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/d229001e440fb0347d56e6cc3a6e65308dcdb431/Dependency.java/buggy/ipojo/src/main/java/org/apache/felix/ipojo/handlers/dependency/Dependency.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
336,
1435,
288,
3639,
26939,
639,
18,
588,
3328,
7675,
1330,
12,
2355,
18,
5923,
16,
13626,
397,
312,
67,
4176,
18,
588,
1841,
1318,
7675,
588,
1841,
12244,
270,
16524,
7675,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
1033,
336,
1435,
288,
3639,
26939,
639,
18,
588,
3328,
7675,
1330,
12,
2355,
18,
5923,
16,
13626,
397,
312,
67,
4176,
18,
588,
1841,
1318,
7675,
588,
1841,
12244,
270,
16524,
7675,
... |
listener.onMove( event.getX() - x, event.getY() + y, event.getX(), event.getY() ); | listener.onMove( event.getX() - x, y - event.getY(), event.getX(), event.getY() ); | public void update() { int x = lastEventX; int y = lastEventY; if ( listeners != null && !listeners.isEmpty() ) { while ( !swingEvents.isEmpty() ) { MouseEvent event = (MouseEvent) swingEvents.remove( 0 ); switch ( event.getID() ) { case MouseEvent.MOUSE_DRAGGED: case MouseEvent.MOUSE_MOVED: for ( int i = 0; i < listeners.size(); i++ ) { MouseInputListener listener = (MouseInputListener) listeners.get( i ); listener.onMove( event.getX() - x, event.getY() + y, event.getX(), event.getY() ); } x = event.getX(); y = event.getY(); break; case MouseEvent.MOUSE_PRESSED: case MouseEvent.MOUSE_RELEASED: for ( int i = 0; i < listeners.size(); i++ ) { MouseInputListener listener = (MouseInputListener) listeners.get( i ); listener.onButton( event.getButton(), event.getID() == MouseEvent.MOUSE_PRESSED, event.getX(), event.getY() ); } break; case MouseEvent.MOUSE_WHEEL: for ( int i = 0; i < listeners.size(); i++ ) { MouseInputListener listener = (MouseInputListener) listeners.get( i ); listener.onWheel( ((MouseWheelEvent)event).getUnitsToScroll()*WHEEL_AMP, event.getX(), event.getY() ); } break; default: } } } else { swingEvents.clear(); } lastEventX = x; lastEventY = y; wheelDelta = currentWheelDelta; currentWheelDelta = 0; deltaPoint.setLocation(0,0); } | 19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/48c3de9131a4b1326335327f33e92440ca9ac425/AWTMouseInput.java/clean/src/com/jmex/awt/input/AWTMouseInput.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
1435,
288,
3639,
509,
619,
273,
1142,
1133,
60,
31,
3639,
509,
677,
273,
1142,
1133,
61,
31,
3639,
309,
261,
4679,
480,
446,
597,
401,
16072,
18,
291,
1921,
1435,
262,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1089,
1435,
288,
3639,
509,
619,
273,
1142,
1133,
60,
31,
3639,
509,
677,
273,
1142,
1133,
61,
31,
3639,
309,
261,
4679,
480,
446,
597,
401,
16072,
18,
291,
1921,
1435,
262,
... |
public org.quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { org.quickfix.field.FundRenewWaiv value = new org.quickfix.field.FundRenewWaiv(); | public quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { quickfix.field.FundRenewWaiv value = new quickfix.field.FundRenewWaiv(); | public org.quickfix.field.FundRenewWaiv getFundRenewWaiv() throws FieldNotFound { org.quickfix.field.FundRenewWaiv value = new org.quickfix.field.FundRenewWaiv(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderCross.java/buggy/src/java/src/quickfix/fix44/NewOrderCross.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
42,
1074,
24058,
59,
69,
427,
2812,
1074,
24058,
59,
69,
427,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
42,
1074,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
42,
1074,
24058,
59,
69,
427,
2812,
1074,
24058,
59,
69,
427,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
42,
1074,
... |
case 43: | case 45: | public final java_cup.runtime.Symbol CUP$Parser$do_action( int CUP$Parser$act_num, java_cup.runtime.lr_parser CUP$Parser$parser, java.util.Stack CUP$Parser$stack, int CUP$Parser$top) throws java.lang.Exception { /* Symbol object for return from actions */ java_cup.runtime.Symbol CUP$Parser$result; /* select the action based on the action number */ switch (CUP$Parser$act_num) { /*. . . . . . . . . . . . . . . . . . . .*/ case 95: // new_non_term_id ::= ID { String RESULT = null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token id = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String) id.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(41/*new_non_term_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 94: // new_term_id ::= ID { String RESULT = null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token id = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String) id.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(42/*new_term_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 93: // type_id ::= type_id LBRACK RBRACK { String RESULT = null; int t_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int t_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String t_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = t_id + "[]"; CUP$Parser$result = new java_cup.runtime.Symbol(40/*type_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 92: // type_id ::= multipart_id { String RESULT = null; int m_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int m_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String m_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = m_id; CUP$Parser$result = new java_cup.runtime.Symbol(40/*type_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 91: // import_id ::= multipart_id { String RESULT = null; int m_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int m_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String m_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = m_id; CUP$Parser$result = new java_cup.runtime.Symbol(36/*import_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 90: // import_id ::= multipart_id DOT STAR { String RESULT = null; int m_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int m_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String m_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; RESULT = m_id + ".*"; CUP$Parser$result = new java_cup.runtime.Symbol(36/*import_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 89: // multipart_id ::= robust_id { String RESULT = null; int r_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int r_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String r_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = r_id; CUP$Parser$result = new java_cup.runtime.Symbol(38/*multipart_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 88: // multipart_id ::= multipart_id DOT robust_id { String RESULT = null; int m_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int m_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; String m_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int r_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int r_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String r_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = m_id + "." + r_id; CUP$Parser$result = new java_cup.runtime.Symbol(38/*multipart_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 87: // start_spec ::= empty { String RESULT = null; RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(39/*start_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 86: // start_spec ::= START WITH nt_id SEMI { String RESULT = null; int start_nameleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int start_nameright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String start_name = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = start_name; CUP$Parser$result = new java_cup.runtime.Symbol(39/*start_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 85: // term_id ::= symbol_id { String RESULT = null; int symleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int symright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String sym = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = sym; CUP$Parser$result = new java_cup.runtime.Symbol(33/*term_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 84: // terminal_id ::= term_id { String RESULT = null; int symleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int symright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String sym = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = sym; CUP$Parser$result = new java_cup.runtime.Symbol(32/*terminal_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 83: // terminal_list ::= terminal_id { Vector RESULT = null; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String t = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector t_list = new Vector(); t_list.addElement(t); RESULT = t_list; CUP$Parser$result = new java_cup.runtime.Symbol(49/*terminal_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 82: // terminal_list ::= terminal_list COMMA terminal_id { Vector RESULT = null; int t_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int t_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector t_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int tleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int tright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String t = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; t_list.addElement(t); RESULT = t_list; CUP$Parser$result = new java_cup.runtime.Symbol(49/*terminal_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 81: // preced ::= PRECEDENCE NONASSOC terminal_list SEMI { Object RESULT = null; int t_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int t_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector t_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Precedence(Precedence.NONASSOC, t_list); CUP$Parser$result = new java_cup.runtime.Symbol(12/*preced*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 80: // preced ::= PRECEDENCE RIGHT terminal_list SEMI { Object RESULT = null; int t_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int t_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector t_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Precedence(Precedence.RIGHT, t_list); CUP$Parser$result = new java_cup.runtime.Symbol(12/*preced*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 79: // preced ::= PRECEDENCE LEFT terminal_list SEMI { Object RESULT = null; int t_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int t_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector t_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Precedence(Precedence.LEFT, t_list); CUP$Parser$result = new java_cup.runtime.Symbol(12/*preced*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 78: // precedence_l ::= preced { Vector RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object p = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector p_l = new Vector(); p_l.addElement(p); RESULT = p_l; CUP$Parser$result = new java_cup.runtime.Symbol(50/*precedence_l*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 77: // precedence_l ::= precedence_l preced { Vector RESULT = null; int p_lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int p_lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector p_l = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object p = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; p_l.addElement(p); RESULT = p_l; CUP$Parser$result = new java_cup.runtime.Symbol(50/*precedence_l*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 76: // precedence_list ::= empty { Vector RESULT = null; RESULT = new Vector(); CUP$Parser$result = new java_cup.runtime.Symbol(51/*precedence_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 75: // precedence_list ::= precedence_l { Vector RESULT = null; int p_lleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int p_lright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector p_l = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = p_l; CUP$Parser$result = new java_cup.runtime.Symbol(51/*precedence_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 74: // non_term_name_list ::= new_non_term_id { Vector RESULT = null; int n_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int n_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String n_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector nnt_list = new Vector(); nnt_list.addElement(n_id); RESULT = nnt_list; CUP$Parser$result = new java_cup.runtime.Symbol(43/*non_term_name_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 73: // non_term_name_list ::= non_term_name_list COMMA new_non_term_id { Vector RESULT = null; int ntn_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int ntn_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector ntn_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int n_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int n_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String n_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; ntn_list.addElement(n_id); RESULT = ntn_list; CUP$Parser$result = new java_cup.runtime.Symbol(43/*non_term_name_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 72: // term_name_list ::= new_term_id { Vector RESULT = null; int n_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int n_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String n_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector tn_list = new Vector(); tn_list.addElement(n_id); RESULT = tn_list; CUP$Parser$result = new java_cup.runtime.Symbol(45/*term_name_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 71: // term_name_list ::= term_name_list COMMA new_term_id { Vector RESULT = null; int tn_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int tn_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector tn_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int n_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int n_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String n_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; tn_list.addElement(n_id); RESULT = tn_list; CUP$Parser$result = new java_cup.runtime.Symbol(45/*term_name_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 70: // declares_non_term ::= non_term_name_list SEMI { Vector RESULT = null; int ntn_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int ntn_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector ntn_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = ntn_list; CUP$Parser$result = new java_cup.runtime.Symbol(53/*declares_non_term*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 69: // declares_term ::= term_name_list SEMI { Vector RESULT = null; int tn_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int tn_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector tn_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = tn_list; CUP$Parser$result = new java_cup.runtime.Symbol(52/*declares_term*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 68: // symbol ::= non_terminal declares_non_term { SymbolList RESULT = null; int non_termleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int non_termright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector non_term = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new SymbolList(SymbolList.NONTERMINAL, null, non_term); CUP$Parser$result = new java_cup.runtime.Symbol(54/*symbol*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 67: // symbol ::= non_terminal type_id declares_non_term { SymbolList RESULT = null; int typeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int typeright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String type = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int non_termleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int non_termright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector non_term = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new SymbolList(SymbolList.NONTERMINAL, type, non_term); CUP$Parser$result = new java_cup.runtime.Symbol(54/*symbol*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 66: // symbol ::= TERMINAL declares_term { SymbolList RESULT = null; int termleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int termright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector term = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new SymbolList(SymbolList.TERMINAL, null, term); CUP$Parser$result = new java_cup.runtime.Symbol(54/*symbol*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 65: // symbol ::= TERMINAL type_id declares_term { SymbolList RESULT = null; int typeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int typeright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String type = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int termleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int termright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector term = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new SymbolList(SymbolList.TERMINAL, type, term); CUP$Parser$result = new java_cup.runtime.Symbol(54/*symbol*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 64: // symbol_list ::= symbol { Vector RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; SymbolList s = (SymbolList)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector s_list = new Vector(); s_list.addElement(s); RESULT = s_list; CUP$Parser$result = new java_cup.runtime.Symbol(46/*symbol_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 63: // symbol_list ::= symbol_list symbol { Vector RESULT = null; int s_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int s_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector s_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; SymbolList s = (SymbolList)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; s_list.addElement(s); RESULT = s_list; CUP$Parser$result = new java_cup.runtime.Symbol(46/*symbol_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 62: // scan_code ::= SCAN WITH CODE_STR opt_semi { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Token user_code = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ScanCode((String) user_code.getValue()); CUP$Parser$result = new java_cup.runtime.Symbol(11/*scan_code*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 61: // init_code ::= INIT WITH CODE_STR opt_semi { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Token user_code = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new InitCode((String) user_code.getValue()); CUP$Parser$result = new java_cup.runtime.Symbol(10/*init_code*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 60: // parser_code_part ::= PARSER CODE CODE_STR opt_semi { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Token user_code = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ParserCode((String) user_code.getValue()); CUP$Parser$result = new java_cup.runtime.Symbol(9/*parser_code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 59: // action_code_part ::= ACTION CODE CODE_STR opt_semi { Object RESULT = null; int user_codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int user_coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Token user_code = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new ActionCode((String) user_code.getValue()); CUP$Parser$result = new java_cup.runtime.Symbol(6/*action_code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 58: // code_part ::= scan_code { Object RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object s = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = s; CUP$Parser$result = new java_cup.runtime.Symbol(7/*code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 57: // code_part ::= init_code { Object RESULT = null; int ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object i = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = i; CUP$Parser$result = new java_cup.runtime.Symbol(7/*code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 56: // code_part ::= parser_code_part { Object RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object p = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = p; CUP$Parser$result = new java_cup.runtime.Symbol(7/*code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 55: // code_part ::= action_code_part { Object RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object a = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = a; CUP$Parser$result = new java_cup.runtime.Symbol(7/*code_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 54: // code_parts ::= empty { Vector RESULT = null; RESULT = new Vector(); CUP$Parser$result = new java_cup.runtime.Symbol(48/*code_parts*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 53: // code_parts ::= code_parts code_part { Vector RESULT = null; int c_partsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int c_partsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector c_parts = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int cleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int cright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object c = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; c_parts.addElement(c); RESULT = c_parts; CUP$Parser$result = new java_cup.runtime.Symbol(48/*code_parts*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 52: // import_spec ::= IMPORT import_id SEMI { String RESULT = null; int ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String i = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = i; CUP$Parser$result = new java_cup.runtime.Symbol(37/*import_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 51: // import_list ::= empty { Vector RESULT = null; RESULT = new Vector(); CUP$Parser$result = new java_cup.runtime.Symbol(44/*import_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 50: // import_list ::= import_list import_spec { Vector RESULT = null; int i_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int i_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector i_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int ileft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int iright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String i = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; i_list.addElement(i); RESULT = i_list; CUP$Parser$result = new java_cup.runtime.Symbol(44/*import_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 49: // package_spec ::= empty { String RESULT = null; RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(35/*package_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 48: // package_spec ::= PACKAGE multipart_id SEMI { String RESULT = null; int m_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int m_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String m_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = m_id; CUP$Parser$result = new java_cup.runtime.Symbol(35/*package_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 47: // cup_spec ::= package_spec import_list code_parts symbol_list precedence_list start_spec production_list { Spec RESULT = null; int pkgleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int pkgright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String pkg = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int impleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int impright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; Vector imp = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Vector code = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int sym_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int sym_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Vector sym_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int prec_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int prec_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector prec_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int startleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int startright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String start = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int prod_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int prod_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector prod_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new CUPSpec(pkg, imp, code, sym_list, prec_list, start, prod_list); CUP$Parser$result = new java_cup.runtime.Symbol(15/*cup_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 46: // empty ::= { Object RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(4/*empty*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 45: // opt_semi ::= empty { Object RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(5/*opt_semi*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 44: // opt_semi ::= SEMI { Object RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(5/*opt_semi*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 43: // non_terminal ::= NONTERMINAL { Object RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(8/*non_terminal*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 42: // non_terminal ::= NON TERMINAL { Object RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(8/*non_terminal*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 41: // robust_id ::= ID { String RESULT = null; int the_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int the_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token the_id = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)the_id.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(34/*robust_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 40: // label_id ::= robust_id { String RESULT = null; int the_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int the_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String the_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = the_id; CUP$Parser$result = new java_cup.runtime.Symbol(30/*label_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 39: // opt_label ::= empty { String RESULT = null; RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(31/*opt_label*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 38: // opt_label ::= COLON label_id { String RESULT = null; int labidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int labidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String labid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = labid; CUP$Parser$result = new java_cup.runtime.Symbol(31/*opt_label*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 37: // prod_part ::= CODE_STR { Object RESULT = null; int code_strleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int code_strright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token code_str = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new SemanticAction((String)code_str.getValue()); CUP$Parser$result = new java_cup.runtime.Symbol(2/*prod_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 36: // prod_part ::= symbol_id opt_label { Object RESULT = null; int symidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int symidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String symid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int labidleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int labidright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String labid = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new Nonterminal(symid, labid); CUP$Parser$result = new java_cup.runtime.Symbol(2/*prod_part*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 35: // prod_part_list ::= empty { Vector RESULT = null; RESULT = new Vector(); CUP$Parser$result = new java_cup.runtime.Symbol(18/*prod_part_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 34: // prod_part_list ::= prod_part_list prod_part { Vector RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector a = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object b = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; /* Vector a, (non)terminal/code b */ a.addElement(b); RESULT = a; CUP$Parser$result = new java_cup.runtime.Symbol(18/*prod_part_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 33: // rhs ::= prod_part_list { Object RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector p = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = p; CUP$Parser$result = new java_cup.runtime.Symbol(3/*rhs*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 32: // rhs ::= prod_part_list PERCENT_PREC term_id { Object RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector p = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int term_nameleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int term_nameright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String term_name = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; /* ???? */ CUP$Parser$result = new java_cup.runtime.Symbol(3/*rhs*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 31: // rhs_list ::= rhs { Vector RESULT = null; int rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector r_list = new Vector(); r_list.addElement(r); RESULT = r_list; CUP$Parser$result = new java_cup.runtime.Symbol(19/*rhs_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 30: // rhs_list ::= rhs_list BAR rhs { Vector RESULT = null; int r_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int r_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector r_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int rleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int rright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Object r = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; r_list.addElement(r); RESULT = r_list; CUP$Parser$result = new java_cup.runtime.Symbol(19/*rhs_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 29: // symbol_id ::= ID { String RESULT = null; int the_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int the_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token the_id = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)the_id.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(29/*symbol_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 28: // nt_id ::= ID { String RESULT = null; int the_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int the_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token the_id = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)the_id.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(28/*nt_id*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 27: // production ::= nt_id COLON_COLON_EQUALS rhs_list SEMI { Production RESULT = null; int lhs_idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int lhs_idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String lhs_id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int rhsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int rhsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector rhs = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new Production(new Nonterminal(lhs_id), rhs); CUP$Parser$result = new java_cup.runtime.Symbol(26/*production*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 26: // production_list ::= production { Vector RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Production p = (Production)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector p_list = new Vector(); p_list.addElement(p); RESULT = p_list; CUP$Parser$result = new java_cup.runtime.Symbol(27/*production_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 25: // production_list ::= production_list production { Vector RESULT = null; int p_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int p_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector p_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Production p = (Production)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; p_list.addElement(p); RESULT = p_list; CUP$Parser$result = new java_cup.runtime.Symbol(27/*production_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 24: // transfer_list ::= TO nt_id LBRACE rhs_list RBRACE { Vector RESULT = null; int ntleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int ntright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String nt = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int rhsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int rhsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector rhs = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; Vector v = new Vector(); Production p = new Production(new Nonterminal(nt), rhs); v.addElement(p); RESULT = v; CUP$Parser$result = new java_cup.runtime.Symbol(20/*transfer_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 23: // transfer_list ::= transfer_list TO nt_id LBRACE rhs_list RBRACE { Vector RESULT = null; int tlleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int tlright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; Vector tl = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int ntleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int ntright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; String nt = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int rhsleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int rhsright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector rhs = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; Production p = new Production(new Nonterminal(nt), rhs); tl.addElement(p); RESULT = tl; CUP$Parser$result = new java_cup.runtime.Symbol(20/*transfer_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 22: // prod_modifier_opt ::= empty { Object RESULT = null; RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(1/*prod_modifier_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 21: // prod_modifier_opt ::= OVERRIDE { Object RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token a = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)a.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(1/*prod_modifier_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 20: // prod_modifier_opt ::= EXTEND { Object RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token a = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)a.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(1/*prod_modifier_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 19: // nt_id_list ::= nt_id { Vector RESULT = null; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Vector list = new Vector(); list.addElement(id); RESULT = list; CUP$Parser$result = new java_cup.runtime.Symbol(24/*nt_id_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 18: // nt_id_list ::= nt_id_list COMMA nt_id { Vector RESULT = null; int listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int idleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int idright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; String id = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; list.addElement(id); RESULT = list; CUP$Parser$result = new java_cup.runtime.Symbol(24/*nt_id_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 17: // command ::= TRANSFER nt_id transfer_list { Command RESULT = null; int ntleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int ntright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String nt = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int tlistleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int tlistright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector tlist = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new TransferCmd(nt, tlist); CUP$Parser$result = new java_cup.runtime.Symbol(25/*command*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 16: // command ::= DROP LBRACE nt_id_list RBRACE { Command RESULT = null; int nt_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int nt_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector nt_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new DropCmd(nt_list); CUP$Parser$result = new java_cup.runtime.Symbol(25/*command*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 15: // command ::= DROP LBRACE production RBRACE { Command RESULT = null; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Production p = (Production)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = new DropCmd(p); CUP$Parser$result = new java_cup.runtime.Symbol(25/*command*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 14: // command ::= prod_modifier_opt production { Command RESULT = null; int modleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int modright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Object mod = (Object)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int pleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int pright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Production p = (Production)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; if (mod == null) { /* no modifier, new command */ RESULT = new NewProdCmd(p); } else if (mod.equals("extend")) { RESULT = new ExtendCmd(p); } else /* if (mod.equals("override")) */ { RESULT = new OverrideCmd(p); } CUP$Parser$result = new java_cup.runtime.Symbol(25/*command*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 13: // command_list_opt ::= { Vector RESULT = null; RESULT = new Vector(); CUP$Parser$result = new java_cup.runtime.Symbol(17/*command_list_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 12: // command_list_opt ::= command_list_opt command { Vector RESULT = null; int bleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int bright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector b = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Command a = (Command)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; /* b = Vector, a = command; */ b.addElement(a); RESULT = b; CUP$Parser$result = new java_cup.runtime.Symbol(17/*command_list_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 11: // jlgen_start_spec_elt ::= START WITH ID ID ID SEMI { Vector RESULT = null; int startleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int startright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Token start = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int methodleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int methodright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Token method = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int tokenleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int tokenright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Token token = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; Vector m = new Vector(); m.addElement(start.getValue()); m.addElement(method.getValue()); m.addElement(token.getValue()); RESULT = m; CUP$Parser$result = new java_cup.runtime.Symbol(22/*jlgen_start_spec_elt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 10: // jlgen_start_spec_list ::= jlgen_start_spec_elt { Vector RESULT = null; int eltleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int eltright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector elt = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = elt; CUP$Parser$result = new java_cup.runtime.Symbol(23/*jlgen_start_spec_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 9: // jlgen_start_spec_list ::= jlgen_start_spec_list jlgen_start_spec_elt { Vector RESULT = null; int listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int eltleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int eltright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector elt = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; list.addAll(elt); RESULT = list; CUP$Parser$result = new java_cup.runtime.Symbol(23/*jlgen_start_spec_list*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 8: // jlgen_start_spec ::= jlgen_start_spec_list { Vector RESULT = null; int mleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int mright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector m = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = m; CUP$Parser$result = new java_cup.runtime.Symbol(21/*jlgen_start_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 7: // jlgen_start_spec ::= START WITH nt_id SEMI { Vector RESULT = null; int startleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int startright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; String start = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; Vector v = new Vector(); v.addElement(start); RESULT = v; CUP$Parser$result = new java_cup.runtime.Symbol(21/*jlgen_start_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 6: // symbol_list_opt ::= { Vector RESULT = null; RESULT = null; CUP$Parser$result = new java_cup.runtime.Symbol(47/*symbol_list_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 5: // symbol_list_opt ::= symbol_list { Vector RESULT = null; int sym_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sym_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector sym_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = sym_list; CUP$Parser$result = new java_cup.runtime.Symbol(47/*symbol_list_opt*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 4: // include_spec ::= INCLUDE STRING_CONST { String RESULT = null; int aleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int aright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Token a = (Token)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = (String)a.getValue(); CUP$Parser$result = new java_cup.runtime.Symbol(16/*include_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 3: // jlgen_spec ::= include_spec package_spec import_list code_parts symbol_list_opt precedence_list jlgen_start_spec command_list_opt { Spec RESULT = null; int incleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left; int incright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).right; String inc = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-7)).value; int pkgleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).left; int pkgright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-6)).right; String pkg = (String)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-6)).value; int impleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).left; int impright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-5)).right; Vector imp = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-5)).value; int codeleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).left; int coderight = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-4)).right; Vector code = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-4)).value; int sym_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).left; int sym_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-3)).right; Vector sym_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-3)).value; int prec_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).left; int prec_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-2)).right; Vector prec_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-2)).value; int startleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int startright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Vector start = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; int cmd_listleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int cmd_listright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Vector cmd_list = (Vector)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; RESULT = new JLgenSpec(inc, pkg, imp, code, sym_list, prec_list, start, cmd_list); CUP$Parser$result = new java_cup.runtime.Symbol(14/*jlgen_spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-7)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 2: // spec ::= cup_spec { Spec RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Spec s = (Spec)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Parser.setProgramNode(s); CUP$Parser$result = new java_cup.runtime.Symbol(13/*spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 1: // spec ::= jlgen_spec { Spec RESULT = null; int sleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left; int sright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right; Spec s = (Spec)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-0)).value; Parser.setProgramNode(s); CUP$Parser$result = new java_cup.runtime.Symbol(13/*spec*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } return CUP$Parser$result; /*. . . . . . . . . . . . . . . . . . . .*/ case 0: // $START ::= spec EOF { Object RESULT = null; int start_valleft = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left; int start_valright = ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).right; Spec start_val = (Spec)((java_cup.runtime.Symbol) CUP$Parser$stack.elementAt(CUP$Parser$top-1)).value; RESULT = start_val; CUP$Parser$result = new java_cup.runtime.Symbol(0/*$START*/, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-1)).left, ((java_cup.runtime.Symbol)CUP$Parser$stack.elementAt(CUP$Parser$top-0)).right, RESULT); } /* ACCEPT */ CUP$Parser$parser.done_parsing(); return CUP$Parser$result; /* . . . . . .*/ default: throw new Exception( "Invalid action number found in internal parse table"); } } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/26fc4d1a48a61b4891d4596c06f484a628c04cb1/Parser.java/buggy/tools/ppg/src/ppg/parse/Parser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
2252,
67,
71,
416,
18,
9448,
18,
5335,
385,
3079,
8,
2678,
8,
2896,
67,
1128,
12,
565,
509,
13491,
385,
3079,
8,
2678,
8,
621,
67,
2107,
16,
565,
2252,
67,
71,
416,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
727,
2252,
67,
71,
416,
18,
9448,
18,
5335,
385,
3079,
8,
2678,
8,
2896,
67,
1128,
12,
565,
509,
13491,
385,
3079,
8,
2678,
8,
621,
67,
2107,
16,
565,
2252,
67,
71,
416,
18,
... |
SocketWriter.writing(sock, error.returnError( ServerConst.ERROR, "", tmp)); | SocketWriter.writing(sock, error.returnError(ServerConst.ERROR, SocketServer.getBd(sock), valida.getId(), tmp)); | public static void ValidClient(Document doc, SocketChannel sock) { /* * Obtenemos la raiz del documento si el documento tiene raiz */ Element raiz = doc.getRootElement(); String nom_raiz = raiz.getName(); /* * Validaci�n de solicitud de paquetes, se verifica si el socket ya fue * autenticado, si lo fue entonces se procede a validar la solicitud * del paquete requerido, si no se procede a validar un paquete CNX o la * solicitud de paquetes no autorizados (solicitud de paquetes sin previa * autentificaci�n) */ if (SocketServer.isLoged(sock)) { /* * Validaci�n de un paquete transaccion */ if (nom_raiz.equals("TRANSACTION")) { System.out.println("Paquete TRANSACCION"); XMLOutputter xmlOutputter = new XMLOutputter(); xmlOutputter.setFormat(Format.getPrettyFormat()); try { xmlOutputter.output(doc,System.out); new RunTransaction(sock,doc); } catch (IOException e) { e.printStackTrace(); } } /* * Validacion de una solicitud de consulta */ else if (nom_raiz.equals("QUERY")) { String bd = SocketServer.getBd(sock); ValidQuery valida = new ValidQuery(bd,SocketServer.getLoging(sock), raiz); String codigo = ""; if (valida.isValid()) { codigo = raiz.getChild("sql").getValue(); ResultSetToXML answer; if (valida.changeStructParam()) { answer = new ResultSetToXML(bd, codigo, valida.getArgs()); } else { answer = new ResultSetToXML(bd, codigo); } answer.transmition(sock,valida.getId()); } else { ErrorXML error = new ErrorXML(); String tmp = Language.getWord("SQL_ACCESS_DENIED") + " "+valida.getQuery()+" "+ sock.socket(); LogAdmin.setMessage(tmp, ServerConst.MESSAGE); SocketWriter.writing(sock, error.returnError( ServerConst.ERROR, "", tmp)); } } /* * Validacion de solicitud de paquetes de cache */ else if (nom_raiz.equals("CACHE-QUERY")) { String codigo = raiz.getValue(); System.out.println(codigo); String bd = SocketServer.getBd(sock); CacheXML cache_answer = new CacheXML(bd,codigo); cache_answer.transmition(sock); } /* * Validacion de solicitud de la fecha */ else if (nom_raiz.equals("DATE")) { SocketWriter.writing(sock,SendDATE.getPackage()); } /* * Validacion para totalizacion de cuentas contables */ else if (nom_raiz.endsWith("TOTALACCOUNT")) { new TotalizarCuentas(SocketServer.getBd(sock),raiz); } /* * Validacion de solicitud del codigo consecutivo de un documento */ else if (nom_raiz.equals("UPDATECODE")) { String bd = SocketServer.getBd(sock); String key = raiz.getChild("idDocument").getValue(); SocketWriter.writing(sock, SendUPDATECODE.getPackage(key, LinkingCache.getConsecutive(bd,key))); } /* * Recepcion de un paquete error */ else if (nom_raiz.equals("ERROR")) { System.out.println("Paquete ERROR"); } /* Recepcion de un paquete de solicitud de un reporte */ else if (nom_raiz.equals("REPORTREQUEST")) { System.out.println("Nueva solicitud de un reporte"); new MakeReport(raiz, sock); } else { ErrorXML error = new ErrorXML(); String tmp = Language.getWord("ERR_FORMAT_PROTOCOL") + " " + sock.socket(); LogAdmin.setMessage(tmp, ServerConst.ERROR); System.out.println("ERROR FORMATO PROTOCOLO"); XMLOutputter xmlOutputter = new XMLOutputter(); xmlOutputter.setFormat(Format.getPrettyFormat()); try { xmlOutputter.output(doc,System.out); } catch (IOException e) { e.printStackTrace(); } SocketWriter.writing(sock, error.returnError( ServerConst.ERROR, "", tmp)); } } /* * Validacion de una solicitud de un paquete conexi� */ else if (nom_raiz.equals("CNX")) { if (PoolConexiones.chekDataBase(raiz.getChild("db").getValue())) { LoginUser loguser = new LoginUser(raiz); if (loguser.valid()) { String bd = loguser.getBD(); String login = loguser.getLogin(); SocketServer.setLogin(sock, bd, login); SendACP docacp = new SendACP(sock,bd,login); docacp.start(); } else { SocketWriter.writing(sock, new AcpFailure(Language.getWord("ACPFAILURE"))); } } else { LogAdmin.setMessage(Language.getWord("DBNFEX") + raiz.getChild("db").getValue(), ServerConst.ERROR); SocketWriter.writing(sock, new AcpFailure(Language.getWord("ACPFAILURE"))); } } /* * Validaci�n de solicitud de paquetes no autorizados */ else { System.out.println("paquete no autorizado"); } } | 55980 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55980/0d6f6dfc6efcdc45bdd4785b2f9a84fb75a0b65b/ValidHeaders.java/buggy/trunk/beta/Server/server/control/ValidHeaders.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2364,
1227,
12,
2519,
997,
16,
8758,
2909,
7313,
13,
288,
7734,
1748,
540,
380,
19659,
2253,
351,
538,
7125,
767,
452,
1464,
1668,
83,
7533,
415,
1668,
83,
11374,
4009,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
2364,
1227,
12,
2519,
997,
16,
8758,
2909,
7313,
13,
288,
7734,
1748,
540,
380,
19659,
2253,
351,
538,
7125,
767,
452,
1464,
1668,
83,
7533,
415,
1668,
83,
11374,
4009,
... |
return typeBinding; } else { AllocationExpression allocationExpression = (AllocationExpression) astNode; return this.getTypeBinding(allocationExpression.resolvedType); } case ASTNode.SIMPLE_NAME : case ASTNode.QUALIFIED_NAME : return this.resolveTypeBindingForName((Name) expression); case ASTNode.ARRAY_INITIALIZER : case ASTNode.ARRAY_CREATION : case ASTNode.ASSIGNMENT : case ASTNode.POSTFIX_EXPRESSION : case ASTNode.PREFIX_EXPRESSION : case ASTNode.CAST_EXPRESSION : case ASTNode.TYPE_LITERAL : case ASTNode.INFIX_EXPRESSION : case ASTNode.INSTANCEOF_EXPRESSION : case ASTNode.FIELD_ACCESS : case ASTNode.SUPER_FIELD_ACCESS : case ASTNode.ARRAY_ACCESS : case ASTNode.METHOD_INVOCATION : case ASTNode.SUPER_METHOD_INVOCATION : case ASTNode.CONDITIONAL_EXPRESSION : case ASTNode.MARKER_ANNOTATION : case ASTNode.NORMAL_ANNOTATION : case ASTNode.SINGLE_MEMBER_ANNOTATION : org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.eclipse.jdt.internal.compiler.ast.Expression) this.newAstToOldAst.get(expression); if (compilerExpression == null) { return null; } return this.getTypeBinding(compilerExpression.resolvedType); case ASTNode.STRING_LITERAL : if (this.scope == null) return null; return this.getTypeBinding(this.scope.getJavaLangString()); case ASTNode.BOOLEAN_LITERAL : case ASTNode.NULL_LITERAL : case ASTNode.CHARACTER_LITERAL : case ASTNode.NUMBER_LITERAL : Literal literal = (Literal) this.newAstToOldAst.get(expression); return this.getTypeBinding(literal.literalType(null)); case ASTNode.THIS_EXPRESSION : ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression); BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression); if (blockScope == null) { return null; } return this.getTypeBinding(thisReference.resolveType(blockScope)); case ASTNode.PARENTHESIZED_EXPRESSION : ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression; return this.resolveExpressionType(parenthesizedExpression.getExpression()); case ASTNode.VARIABLE_DECLARATION_EXPRESSION : VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) expression; Type type = variableDeclarationExpression.getType(); if (type != null) { return type.resolveBinding(); } return null; default: return null; | break; case ASTNode.SIMPLE_NAME : case ASTNode.QUALIFIED_NAME : return this.resolveTypeBindingForName((Name) expression); case ASTNode.ARRAY_INITIALIZER : case ASTNode.ARRAY_CREATION : case ASTNode.ASSIGNMENT : case ASTNode.POSTFIX_EXPRESSION : case ASTNode.PREFIX_EXPRESSION : case ASTNode.CAST_EXPRESSION : case ASTNode.TYPE_LITERAL : case ASTNode.INFIX_EXPRESSION : case ASTNode.INSTANCEOF_EXPRESSION : case ASTNode.FIELD_ACCESS : case ASTNode.SUPER_FIELD_ACCESS : case ASTNode.ARRAY_ACCESS : case ASTNode.METHOD_INVOCATION : case ASTNode.SUPER_METHOD_INVOCATION : case ASTNode.CONDITIONAL_EXPRESSION : case ASTNode.MARKER_ANNOTATION : case ASTNode.NORMAL_ANNOTATION : case ASTNode.SINGLE_MEMBER_ANNOTATION : org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.eclipse.jdt.internal.compiler.ast.Expression) this.newAstToOldAst.get(expression); if (compilerExpression != null) { return this.getTypeBinding(compilerExpression.resolvedType); } break; case ASTNode.STRING_LITERAL : if (this.scope != null) { return this.getTypeBinding(this.scope.getJavaLangString()); } break; case ASTNode.BOOLEAN_LITERAL : case ASTNode.NULL_LITERAL : case ASTNode.CHARACTER_LITERAL : case ASTNode.NUMBER_LITERAL : Literal literal = (Literal) this.newAstToOldAst.get(expression); return this.getTypeBinding(literal.literalType(null)); case ASTNode.THIS_EXPRESSION : ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression); BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression); if (blockScope != null) { return this.getTypeBinding(thisReference.resolveType(blockScope)); } break; case ASTNode.PARENTHESIZED_EXPRESSION : ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression; return this.resolveExpressionType(parenthesizedExpression.getExpression()); case ASTNode.VARIABLE_DECLARATION_EXPRESSION : VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) expression; Type type = variableDeclarationExpression.getType(); if (type != null) { return type.resolveBinding(); } break; } } catch (AbortCompilation e) { | synchronized ITypeBinding resolveExpressionType(Expression expression) { switch(expression.getNodeType()) { case ASTNode.CLASS_INSTANCE_CREATION : org.eclipse.jdt.internal.compiler.ast.ASTNode astNode = (org.eclipse.jdt.internal.compiler.ast.ASTNode) this.newAstToOldAst.get(expression); if (astNode instanceof org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) { // anonymous type case org.eclipse.jdt.internal.compiler.ast.TypeDeclaration typeDeclaration = (org.eclipse.jdt.internal.compiler.ast.TypeDeclaration) astNode; ITypeBinding typeBinding = this.getTypeBinding(typeDeclaration.binding); if (typeBinding == null) { return null; } return typeBinding; } else { // should be an AllocationExpression AllocationExpression allocationExpression = (AllocationExpression) astNode; return this.getTypeBinding(allocationExpression.resolvedType); } case ASTNode.SIMPLE_NAME : case ASTNode.QUALIFIED_NAME : return this.resolveTypeBindingForName((Name) expression); case ASTNode.ARRAY_INITIALIZER : case ASTNode.ARRAY_CREATION : case ASTNode.ASSIGNMENT : case ASTNode.POSTFIX_EXPRESSION : case ASTNode.PREFIX_EXPRESSION : case ASTNode.CAST_EXPRESSION : case ASTNode.TYPE_LITERAL : case ASTNode.INFIX_EXPRESSION : case ASTNode.INSTANCEOF_EXPRESSION : case ASTNode.FIELD_ACCESS : case ASTNode.SUPER_FIELD_ACCESS : case ASTNode.ARRAY_ACCESS : case ASTNode.METHOD_INVOCATION : case ASTNode.SUPER_METHOD_INVOCATION : case ASTNode.CONDITIONAL_EXPRESSION : case ASTNode.MARKER_ANNOTATION : case ASTNode.NORMAL_ANNOTATION : case ASTNode.SINGLE_MEMBER_ANNOTATION : org.eclipse.jdt.internal.compiler.ast.Expression compilerExpression = (org.eclipse.jdt.internal.compiler.ast.Expression) this.newAstToOldAst.get(expression); if (compilerExpression == null) { return null; } return this.getTypeBinding(compilerExpression.resolvedType); case ASTNode.STRING_LITERAL : if (this.scope == null) return null; return this.getTypeBinding(this.scope.getJavaLangString()); case ASTNode.BOOLEAN_LITERAL : case ASTNode.NULL_LITERAL : case ASTNode.CHARACTER_LITERAL : case ASTNode.NUMBER_LITERAL : Literal literal = (Literal) this.newAstToOldAst.get(expression); return this.getTypeBinding(literal.literalType(null)); case ASTNode.THIS_EXPRESSION : ThisReference thisReference = (ThisReference) this.newAstToOldAst.get(expression); BlockScope blockScope = (BlockScope) this.astNodesToBlockScope.get(expression); if (blockScope == null) { return null; } return this.getTypeBinding(thisReference.resolveType(blockScope)); case ASTNode.PARENTHESIZED_EXPRESSION : ParenthesizedExpression parenthesizedExpression = (ParenthesizedExpression) expression; return this.resolveExpressionType(parenthesizedExpression.getExpression()); case ASTNode.VARIABLE_DECLARATION_EXPRESSION : VariableDeclarationExpression variableDeclarationExpression = (VariableDeclarationExpression) expression; Type type = variableDeclarationExpression.getType(); if (type != null) { return type.resolveBinding(); } return null; default: return null; } } | 10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/43c55ec0fd64bd306ef21c4d7e4780f0acc5640d/DefaultBindingResolver.java/clean/org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/DefaultBindingResolver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
22043,
467,
559,
5250,
2245,
2300,
559,
12,
2300,
2652,
13,
288,
202,
202,
9610,
12,
8692,
18,
588,
15101,
10756,
288,
1082,
202,
3593,
9183,
907,
18,
5237,
67,
13341,
67,
5458,
26... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
22043,
467,
559,
5250,
2245,
2300,
559,
12,
2300,
2652,
13,
288,
202,
202,
9610,
12,
8692,
18,
588,
15101,
10756,
288,
1082,
202,
3593,
9183,
907,
18,
5237,
67,
13341,
67,
5458,
26... |
public void clear() { setID(-1L); databases = new ArrayList(); steps = new ArrayList(); hops = new ArrayList(); notes = new ArrayList(); dependencies = new ArrayList(); variables = new Hashtable(); name = null; filename = null; readStep = null; writeStep = null; inputStep = null; outputStep = null; updateStep = null; logTable = null; logConnection = null; sizeRowset = Const.ROWS_IN_ROWSET; sleepTimeEmpty = Const.SLEEP_EMPTY_NANOS; sleepTimeFull = Const.SLEEP_FULL_NANOS; maxDateConnection = null; maxDateTable = null; maxDateField = null; maxDateOffset = 0.0; maxDateDifference = 0.0; undo = new ArrayList(); max_undo = Const.MAX_UNDO; undo_position = -1; counters = new Hashtable(); resultRows = null; clearUndo(); clearChanged(); useBatchId = true; // Make this one the default from now on... batchId = 0; logfieldUsed = false; // Don't use the log-field by default... modifiedUser = "-"; //$NON-NLS-1$ modifiedDate = new Value("modified_date", new Date()); //$NON-NLS-1$ // LOAD THE DATABASE CACHE! dbCache = DBCache.getInstance(); directoryTree = new RepositoryDirectory(); // Default directory: root directory = directoryTree; } | 9547 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9547/e0f806b7a2aa0aecea379c4a5a9ae69885dd1e12/TransMeta.java/clean/src/be/ibridge/kettle/trans/TransMeta.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2424,
1435,
565,
288,
3639,
444,
734,
19236,
21,
48,
1769,
3639,
16358,
273,
394,
2407,
5621,
3639,
6075,
273,
394,
2407,
5621,
3639,
366,
4473,
273,
394,
2407,
5621,
3639,
109... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
2424,
1435,
565,
288,
3639,
444,
734,
19236,
21,
48,
1769,
3639,
16358,
273,
394,
2407,
5621,
3639,
6075,
273,
394,
2407,
5621,
3639,
366,
4473,
273,
394,
2407,
5621,
3639,
109... | ||
boolean isSame) { assertEquals("schedule is wrong", schedule.isSameSession(time1, time2), isSame); assertEquals("schedule is wrong", schedule.isSameSession(time2, time1), isSame); | boolean isSameSession) { assertEquals("schedule is wrong", schedule.isSameSession(time1, time2), isSameSession); assertEquals("schedule is wrong", schedule.isSameSession(time2, time1), isSameSession); | private void doIsSameSessionTest(SessionSchedule schedule, Calendar time1, Calendar time2, boolean isSame) { assertEquals("schedule is wrong", schedule.isSameSession(time1, time2), isSame); assertEquals("schedule is wrong", schedule.isSameSession(time2, time1), isSame); } | 6791 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6791/df16b2519d9031521ec803d69871e43e71ba6447/SessionScheduleTest.java/clean/test/quickfix/SessionScheduleTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
2520,
8650,
2157,
4709,
12,
2157,
6061,
4788,
16,
5542,
813,
21,
16,
5542,
813,
22,
16,
5411,
1250,
23061,
13,
288,
3639,
1815,
8867,
2932,
10676,
353,
7194,
3113,
4788,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
741,
2520,
8650,
2157,
4709,
12,
2157,
6061,
4788,
16,
5542,
813,
21,
16,
5542,
813,
22,
16,
5411,
1250,
23061,
13,
288,
3639,
1815,
8867,
2932,
10676,
353,
7194,
3113,
4788,
... |
public String getComponentName() { //return "VcsManagerPerModuleConfiguration"; return "VcsManagerConfiguration"; } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/d2888516987b622d3961ab93a884c6ba0640caa3/VcsManagerPerModuleConfiguration.java/buggy/source/com/intellij/openapi/vcs/impl/VcsManagerPerModuleConfiguration.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
780,
588,
1841,
461,
1435,
95,
759,
2463,
6,
58,
2143,
1318,
2173,
3120,
1750,
14432,
2463,
6,
58,
2143,
1318,
1750,
14432,
97,
2,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
780,
588,
1841,
461,
1435,
95,
759,
2463,
6,
58,
2143,
1318,
2173,
3120,
1750,
14432,
2463,
6,
58,
2143,
1318,
1750,
14432,
97,
2,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
... | ||
ZimbraLog.ozserver.info("buffer pool name=" + mName + " inuse=" + mInUse + " allocated=" + mAllocatedBuffers.size()); | mLog.info("buffer pool name=" + mName + " inuse=" + mInUse + " allocated=" + mAllocatedBuffers.size()); | public void run() { ZimbraLog.ozserver.info("buffer pool name=" + mName + " inuse=" + mInUse + " allocated=" + mAllocatedBuffers.size()); } | 6965 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6965/81a5e1a9b45c0b2385e76a631dd21ec0e0792363/OzBufferPool.java/buggy/ZimbraServer/src/java/com/zimbra/cs/ozserver/OzBufferPool.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
7734,
312,
1343,
18,
1376,
2932,
4106,
2845,
508,
1546,
397,
312,
461,
397,
315,
316,
1202,
1546,
397,
312,
15435,
397,
315,
11977,
1546,
397,
312,
29392,
136... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
918,
1086,
1435,
288,
7734,
312,
1343,
18,
1376,
2932,
4106,
2845,
508,
1546,
397,
312,
461,
397,
315,
316,
1202,
1546,
397,
312,
15435,
397,
315,
11977,
1546,
397,
312,
29392,
136... |
private int getLayoutID(int userId, int profileId) throws SQLException { String query = "SELECT LAYOUT_ID " + "FROM UP_USER_PROFILE " + "WHERE USER_ID=? AND PROFILE_ID=?"; Connection con = RDBMServices.getConnection(); PreparedStatement pstmt = con.prepareStatement(query); LogService.log(LogService.DEBUG, "RDBMUserLayoutStore::getLayoutID(userId=" + userId + ", profileId=" + profileId + " ): " + query); pstmt.setInt(1, userId); pstmt.setInt(2, profileId); ResultSet rs = pstmt.executeQuery(); int layoutId = 0; try { if (rs.next()) { layoutId = rs.getInt(1); if (rs.wasNull()) { layoutId = 0; } } } finally { rs.close(); } return layoutId; } | 1895 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1895/d500d35accd8372052d9a6f8c177a8054d61c39a/RDBMUserLayoutStore.java/clean/source/org/jasig/portal/RDBMUserLayoutStore.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
17670,
734,
12,
474,
6249,
16,
509,
25903,
13,
1216,
6483,
288,
1377,
514,
843,
273,
1850,
315,
4803,
25239,
5069,
67,
734,
315,
397,
1850,
315,
11249,
7376,
67,
4714,
67,
22... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
509,
17670,
734,
12,
474,
6249,
16,
509,
25903,
13,
1216,
6483,
288,
1377,
514,
843,
273,
1850,
315,
4803,
25239,
5069,
67,
734,
315,
397,
1850,
315,
11249,
7376,
67,
4714,
67,
22... | ||
pomNeedsRewriting = false; | shouldRewritePom = false; | private void rewriteMetadata( Artifact artifact, RewriteTransaction transaction, File sourceBase, ArtifactRepository sourceRepo, File targetBase, ArtifactRepository targetRepo, Reporter artifactReporter, boolean reportOnly ) throws Exception { // SNAPSHOT metadata ArtifactMetadata snapshot = new SnapshotArtifactMetadata( artifact ); File snapshotSource = new File( sourceBase, sourceRepo.pathOfMetadata( snapshot ) ); File snapshotTarget = new File( targetBase, targetRepo.pathOfMetadata( snapshot ) ); freshenSupplementalMetadata( snapshot, snapshotSource, snapshotTarget, transaction, artifactReporter, reportOnly ); // RELEASE metadata ArtifactMetadata release = new ReleaseArtifactMetadata( artifact ); File releaseSource = new File( sourceBase, sourceRepo.pathOfMetadata( release ) ); File releaseTarget = new File( targetBase, targetRepo.pathOfMetadata( release ) ); freshenSupplementalMetadata( release, releaseSource, releaseTarget, transaction, artifactReporter, reportOnly ); // The rest is for POM metadata - translation and bridging of locations in the target repo may be required. ArtifactMetadata pom = new ProjectMetadata( artifact ); File sourcePom = new File( sourceBase, sourceRepo.pathOfMetadata( pom ) ); File targetPom = new File( targetBase, targetRepo.pathOfMetadata( pom ).replace( '+', '-' ) ); String pomContents = null; boolean pomNeedsRewriting = true; if ( sourcePom.exists() ) { pomContents = readPomContents( sourcePom ); if ( pomContents.indexOf( "modelVersion" ) > -1 ) { pomNeedsRewriting = false; freshenSupplementalMetadata( pom, sourcePom, targetPom, transaction, artifactReporter, reportOnly ); } } if ( pomNeedsRewriting ) { ArtifactPomRewriter artifactPomRewriter = null; try { artifactPomRewriter = (ArtifactPomRewriter) container.lookup( ArtifactPomRewriter.ROLE, ArtifactPomRewriter.V3_POM ); transaction.addFile( targetPom ); File bridgedTargetPom = new File( targetBase, bridgingLayout.pathOfMetadata( pom ).replace( '+', '-' ) ); transaction.addFile( bridgedTargetPom ); File targetPomParent = targetPom.getParentFile(); if ( !targetPomParent.exists() ) { targetPomParent.mkdirs(); } FileWriter to = null; try { StringReader from = null; if ( pomContents != null ) { from = new StringReader( pomContents ); } to = new FileWriter( targetPom ); artifactPomRewriter.rewrite( artifact, from, to, artifactReporter, reportOnly ); } finally { IOUtil.close( to ); } boolean wroteBridge = bridgePomLocations( pom, targetPom, bridgedTargetPom, artifactReporter, transaction, reportOnly ); digestVerifier.verifyDigest( sourcePom, targetPom, transaction, artifactReporter, reportOnly ); if ( wroteBridge ) { digestVerifier.verifyDigest( sourcePom, bridgedTargetPom, transaction, artifactReporter, reportOnly ); } } finally { if ( artifactPomRewriter != null ) { try { container.release( artifactPomRewriter ); } catch ( ComponentLifecycleException e ) { } } } } } | 1315 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1315/d1e7f4d5ad3155cc9f1a4a5fdc0ece21f78df284/RewritePhase.java/clean/sandbox/repoclean/src/main/java/org/apache/maven/tools/repoclean/phase/RewritePhase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10738,
2277,
12,
14022,
6462,
16,
17851,
3342,
2492,
16,
1387,
1084,
2171,
16,
4766,
14022,
3305,
1084,
8791,
16,
1387,
1018,
2171,
16,
14022,
3305,
1018,
8791,
16,
4766,
25585,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
10738,
2277,
12,
14022,
6462,
16,
17851,
3342,
2492,
16,
1387,
1084,
2171,
16,
4766,
14022,
3305,
1084,
8791,
16,
1387,
1018,
2171,
16,
14022,
3305,
1018,
8791,
16,
4766,
25585,
... |
setInitial(null); | setInitial(MIDDLENAME_DEFAULT); | public void resetPropertyValue(Object property) { if (P_ID_FIRSTNAME.equals(property)) { setFirstName(null); return; } if (P_ID_LASTNAME.equals(property)) { setLastName(null); return; } if (P_ID_MIDDLENAME.equals(property)) { setInitial(null); return; }} | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/4693fc4466a3a7e80f54e8af70a459cc0947fc03/Name.java/clean/examples/org.eclipse.ui.examples.propertysheet/Eclipse UI Examples PropertySheet/org/eclipse/ui/examples/propertysheet/Name.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
2715,
16107,
12,
921,
1272,
13,
288,
202,
430,
261,
52,
67,
734,
67,
15354,
1985,
18,
14963,
12,
4468,
3719,
288,
202,
202,
542,
3759,
461,
12,
2011,
1769,
202,
202,
2463,
31,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
918,
2715,
16107,
12,
921,
1272,
13,
288,
202,
430,
261,
52,
67,
734,
67,
15354,
1985,
18,
14963,
12,
4468,
3719,
288,
202,
202,
542,
3759,
461,
12,
2011,
1769,
202,
202,
2463,
31,
2... |
w.write( "( ARRAY INITIALIZER "); | w.write( "ARRAY INITIALIZER "); | public void dump( CodeWriter w) { w.write( "( ARRAY INITIALIZER "); dumpNodeInfo( w); w.write( ")"); } | 11982 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11982/a09f0b7976561d3eee38c023d7cfbffad6a36a8b/ArrayInitializerExpression.java/buggy/src/polyglot/ast/ArrayInitializerExpression.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4657,
12,
3356,
2289,
341,
13,
225,
288,
565,
341,
18,
2626,
12,
315,
8552,
12584,
15154,
654,
315,
1769,
565,
4657,
25392,
12,
341,
1769,
565,
341,
18,
2626,
12,
7310,
1769,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
4657,
12,
3356,
2289,
341,
13,
225,
288,
565,
341,
18,
2626,
12,
315,
8552,
12584,
15154,
654,
315,
1769,
565,
4657,
25392,
12,
341,
1769,
565,
341,
18,
2626,
12,
7310,
1769,... |
byte[] tmp_state=null; switch(evt.getType()) { | byte[] tmp_state = null; switch (evt.getType()) { | public void passUp(Event evt) { byte[] tmp_state=null; switch(evt.getType()) { case Event.MSG: if(msg_listener != null) msg_listener.receive((Message)evt.getArg()); break; case Event.GET_APPLSTATE: // reply with GET_APPLSTATE_OK if(msg_listener != null) { try { tmp_state=msg_listener.getState(); } catch(Throwable t) { log.error("failed getting state from message listener (" + msg_listener + ")", t); } } channel.returnState(tmp_state); break; case Event.GET_STATE_OK: if(msg_listener != null) { try { msg_listener.setState((byte[])evt.getArg()); } catch(ClassCastException cast_ex) { if(log.isErrorEnabled()) log.error("received SetStateEvent, but argument " + evt.getArg() + " is not serializable. Discarding message."); } } break; case Event.VIEW_CHANGE: View v=(View)evt.getArg(); Vector new_mbrs=v.getMembers(); if(new_mbrs != null) { members.removeAllElements(); for(int i=0; i < new_mbrs.size(); i++) members.addElement(new_mbrs.elementAt(i)); } if(membership_listener != null) membership_listener.viewAccepted(v); break;//// case Event.SET_LOCAL_ADDRESS:// local_addr=(Address)evt.getArg();// break; case Event.SUSPECT: if(membership_listener != null) membership_listener.suspect((Address)evt.getArg()); break; case Event.BLOCK: if(membership_listener != null) membership_listener.block(); break; } } | 51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/9b133caccdd70cd06c1674ee2a42e75071fdc287/MessageDispatcher.java/buggy/src/org/jgroups/blocks/MessageDispatcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1342,
1211,
12,
1133,
6324,
13,
288,
5411,
1160,
8526,
1853,
67,
2019,
33,
2011,
31,
5411,
1620,
12,
73,
11734,
18,
588,
559,
10756,
288,
7734,
648,
2587,
18,
11210,
30,
1079... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
918,
1342,
1211,
12,
1133,
6324,
13,
288,
5411,
1160,
8526,
1853,
67,
2019,
33,
2011,
31,
5411,
1620,
12,
73,
11734,
18,
588,
559,
10756,
288,
7734,
648,
2587,
18,
11210,
30,
1079... |
FoodItemManager.instance().add(item); | itemManager.add(item); | private void addNewItem() { final FoodItem item = new FoodItem(); boolean canceled = openEditor(item); if (!canceled) { FoodItemManager.instance().add(item); } } | 13936 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13936/fb2bbf9d4379206ed10cec29ce94c3e1ebbc1f8d/SupplyPanel.java/buggy/Housekeeper/trunk/housekeeper/src/java/net/sf/housekeeper/swing/SupplyPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
20973,
1180,
1435,
565,
288,
3639,
727,
478,
4773,
1180,
761,
273,
394,
478,
4773,
1180,
5621,
3639,
1250,
17271,
273,
1696,
6946,
12,
1726,
1769,
3639,
309,
16051,
10996,
329,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
20973,
1180,
1435,
565,
288,
3639,
727,
478,
4773,
1180,
761,
273,
394,
478,
4773,
1180,
5621,
3639,
1250,
17271,
273,
1696,
6946,
12,
1726,
1769,
3639,
309,
16051,
10996,
329,
... |
options = VM_RuntimeCompiler.options; optimizationPlan = VM_RuntimeCompiler.optimizationPlan; | options = (OPT_Options)VM_RuntimeCompiler.options; optimizationPlan = (OPT_OptimizationPlanElement[])VM_RuntimeCompiler.optimizationPlan; | public void process() { VM_CompiledMethod compiledMethod = VM_CompiledMethods.getCompiledMethod(CMID); VM_NormalMethod todoMethod = (VM_NormalMethod)compiledMethod.getMethod(); double priority; OPT_Options options; OPT_OptimizationPlanElement[] optimizationPlan; VM_ControllerPlan oldPlan = VM_ControllerMemory.findLatestPlan(todoMethod); if (oldPlan != null) { OPT_CompilationPlan oldCompPlan = oldPlan.getCompPlan(); priority = oldPlan.getPriority(); options = oldCompPlan.options; optimizationPlan = oldCompPlan.optimizationPlan; } else { priority = 5.0; options = VM_RuntimeCompiler.options; optimizationPlan = VM_RuntimeCompiler.optimizationPlan; } OPT_CompilationPlan compPlan = new OPT_CompilationPlan(todoMethod, optimizationPlan, null, options); OSR_OnStackReplacementPlan plan = new OSR_OnStackReplacementPlan(this.suspendedThread, compPlan, this.CMID, this.whereFrom, this.tsFromFPoff, this.ypTakenFPoff, priority); VM_Controller.compilationQueue.insert(priority, plan); VM_AOSLogging.logOsrEvent("OSR inserts compilation plan successfully!"); // do not hold the reference anymore. suspendedThread = null; CMID = 0; } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/3244bbe4a4a879b815f1721d3b48595e84349cc5/OSR_OnStackReplacementEvent.java/clean/rvm/src/com/ibm/jikesrvm/adaptive/OSR_OnStackReplacementEvent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1207,
1435,
288,
3639,
8251,
67,
20733,
1305,
7743,
1305,
273,
8251,
67,
20733,
4712,
18,
588,
20733,
1305,
12,
9611,
734,
1769,
3639,
8251,
67,
5506,
1305,
10621,
1305,
273,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1207,
1435,
288,
3639,
8251,
67,
20733,
1305,
7743,
1305,
273,
8251,
67,
20733,
4712,
18,
588,
20733,
1305,
12,
9611,
734,
1769,
3639,
8251,
67,
5506,
1305,
10621,
1305,
273,
2... |
if (getContentService().isActive(visibleExtensions[i].getId())) | if (getContentService().isActive(visibleExtensions[i].getId())) { | private void updateCheckedState() { INavigatorContentDescriptor[] visibleExtensions = getContentService() .getVisibleExtensions(); for (int i = 0; i < visibleExtensions.length; i++) { if (getContentService().isActive(visibleExtensions[i].getId())) getTableViewer().setChecked(visibleExtensions[i], true); } } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/ContentExtensionsTab.java/buggy/bundles/org.eclipse.ui.navigator/src/org/eclipse/ui/internal/navigator/filters/ContentExtensionsTab.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
11454,
1119,
1435,
288,
202,
202,
706,
13061,
1350,
3187,
8526,
6021,
7513,
273,
5154,
1179,
1435,
9506,
202,
18,
588,
6207,
7513,
5621,
202,
202,
1884,
261,
474,
27... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1089,
11454,
1119,
1435,
288,
202,
202,
706,
13061,
1350,
3187,
8526,
6021,
7513,
273,
5154,
1179,
1435,
9506,
202,
18,
588,
6207,
7513,
5621,
202,
202,
1884,
261,
474,
27... |
formattedStr ); | formattedStr, content ); | private void evaluateEmbeddedExpression( Node node, TextItemDesign text, TextItemContent content, HTMLProcessor htmlProcessor ) { if ( node.getNodeType( ) == Node.ELEMENT_NODE ) { Element ele = (Element) node; if ( node.getNodeName( ).equals( "img" ) ) //$NON-NLS-1$ { String src = ele.getAttribute( "src" ); //$NON-NLS-1$ if ( FileUtil.isLocalResource( src ) ) { src = FileUtil.getAbsolutePath( context.getReport( ) .getBasePath( ), src ); ele.removeAttribute( "src" ); //$NON-NLS-1$ ImageItemContent imgContent = (ImageItemContent)ContentFactory .createImageContent( null, content ); content.addImageContent( node, imgContent ); imgContent.setImageSource( ImageItemDesign.IMAGE_FILE ); imgContent.setUri( src ); imgContent.setExtension( FileUtil.getExtFromFileName( src, FileUtil.SEPARATOR_PATH ) ); } } else if ( node.getNodeName( ).equals( "value-of" ) ) //$NON-NLS-1$ { String strExpr = node.getFirstChild( ).getNodeValue( ); IBaseExpression expr = text.getExpression( strExpr ); Object value; if ( expr != null ) { value = context.evaluate( expr ); } else { value = context.evaluate( strExpr ); } if ( value != null ) { String format = ( (Element) ( node ) ) .getAttribute( "format" ); //$NON-NLS-1$ //TODO Only the type string and blob are done in the format // of HTML, or else only string type. if ( "html".equals( format ) ) //$NON-NLS-1$ { //parse the value to get the DOM tree Document doc = null; if ( value.getClass( ).isArray( ) && value.getClass( ).getComponentType( ) == byte.class ) { byte[] blob = (byte[]) value; doc = new TextParser( ).parse( new ByteArrayInputStream( blob ), "html" ); //$NON-NLS-1$ } else { doc = new TextParser( ).parse( value.toString( ), "html" ); //$NON-NLS-1$ } if ( doc != null ) { Element body = null; if ( doc.getFirstChild( ) instanceof Element ) { body = (Element) doc.getFirstChild( ); } if ( body != null ) { htmlProcessor.execute( body, content ); content.addExpressionVal( node, doc ); } } } else { StringBuffer formattedStr = new StringBuffer( ); //Uses the ROM style of design because the // format-related styles are constant, which are the // same as those of the content. formatValue( value, format, text.getStyle( ), formattedStr ); Element appendedNode = null; Document textDoc; try { textDoc = DocumentBuilderFactory.newInstance( ) .newDocumentBuilder( ).newDocument( ); if ( textDoc != null && textDoc.getFirstChild( ) != null && textDoc.getFirstChild( ) instanceof Element ) { ( (Element) ( textDoc.getFirstChild( ) ) ) .setAttribute( "text-type", //$NON-NLS-1$ TextParser.TEXT_TYPE_PLAIN ); } appendedNode = textDoc.createElement( "body" ); //$NON-NLS-1$ textDoc.appendChild( appendedNode ); appendedNode .appendChild( textDoc .createTextNode( formattedStr .toString( ) ) ); content.addExpressionVal( node, textDoc ); } catch ( ParserConfigurationException e ) { logger .log( Level.SEVERE, "[TextItemExecutor] Fails to create document for value-of", //$NON-NLS-1$ e ); } catch ( FactoryConfigurationError e ) { logger .log( Level.SEVERE, "[TextItemExecutor] Fails to create document for value-of", //$NON-NLS-1$ e ); } } } return; } else if ( node.getNodeName( ).equals( "image" ) ) //$NON-NLS-1$ { ImageItemContent image = (ImageItemContent)ContentFactory .createImageContent( null, content ); //Get the image content String imageType = ( (Element) ( node ) ).getAttribute( "type" ); //$NON-NLS-1$ if ( "expr".equalsIgnoreCase( imageType ) ) //$NON-NLS-1$ { image.setImageSource( ImageItemDesign.IMAGE_EXPRESSION ); //The image is from data source String strExpression = node.getFirstChild( ).getNodeValue( ); Object value = context.evaluate( text .getExpression( strExpression ) ); if ( value != null && value.getClass( ).isArray( ) && value.getClass( ).getComponentType( ) == byte.class ) { image.setData( (byte[]) value ); } } else { //The image is an embedded one. String name = ( (Element) ( node ) ).getAttribute( "name" ); //$NON-NLS-1$ EmbeddedImage embeddedImage = context.getReport( ) .getReportDesign( ).findImage( name ); if ( embeddedImage != null ) { image.setData( embeddedImage.getData( ) ); image.setImageSource( ImageItemDesign.IMAGE_NAME ); image.setUri( name ); String extension = FileUtil .getExtFromType( embeddedImage.getType( ) ); if ( extension == null ) { extension = FileUtil.getExtFromFileName( name, FileUtil.SEPARATOR_PATH ); } image.setExtension( extension ); } } if ( image.getData( ) != null ) { try { Document imgDoc; imgDoc = DocumentBuilderFactory.newInstance( ) .newDocumentBuilder( ).newDocument( ); Element body = imgDoc.createElement( "body" ); //$NON-NLS-1$ Element imgNode = imgDoc.createElement( "img" ); //$NON-NLS-1$ content.addImageContent( imgNode, image ); // add image node to DOM tree body.appendChild( imgNode ); imgDoc.appendChild( body ); content.addExpressionVal( node, imgDoc ); } catch ( ParserConfigurationException e ) { logger .log( Level.SEVERE, "[TextItemExecutor] Fails to create document for img", //$NON-NLS-1$ e ); } catch ( FactoryConfigurationError e ) { logger .log( Level.SEVERE, "[TextItemExecutor] Fails to create document for img", //$NON-NLS-1$ e ); } } else { logger.log( Level.SEVERE, "can't handle image element in HTML" ); //$NON-NLS-1$ } return; } // call recursively for ( Node child = node.getFirstChild( ); child != null; child = child .getNextSibling( ) ) { evaluateEmbeddedExpression( child, text, content, htmlProcessor ); } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/46b3013f64d73accec44cdf5a1a0af7dcd5513b7/TextItemExecutor.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/executor/TextItemExecutor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
5956,
14980,
2300,
12,
2029,
756,
16,
3867,
1180,
15478,
977,
16,
1082,
202,
1528,
1180,
1350,
913,
16,
3982,
5164,
1729,
5164,
262,
202,
95,
202,
202,
430,
261,
756,
18... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
5956,
14980,
2300,
12,
2029,
756,
16,
3867,
1180,
15478,
977,
16,
1082,
202,
1528,
1180,
1350,
913,
16,
3982,
5164,
1729,
5164,
262,
202,
95,
202,
202,
430,
261,
756,
18... |
Point newSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); Point oldSize = composite.getSize(); int widthDelta = Math.max(newSize.x - oldSize.x, 0); int heightDelta = Math.max(newSize.y - oldSize.y, 0); if (widthDelta > 0 || heightDelta > 0) { Point shellSize = shell.getSize(); shell.setSize(shellSize.x + widthDelta, shellSize.y + heightDelta); } | protected void handleAdvancedButtonSelect() { Shell shell = getShell(); if (linkedResourceGroup != null) { Composite composite = (Composite) getControl(); linkedResourceGroup.dispose(); linkedResourceGroup = null; setPageComplete(validatePage()); advancedButton.setText(WorkbenchMessages.getString("WizardNewFileCreationPage.advancedButtonCollapsed")); Point newSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); Point oldSize = composite.getSize(); int heightDelta = newSize.y - oldSize.y; if (heightDelta < 0) { Point shellSize = shell.getSize(); shell.setSize(shellSize.x, shellSize.y + heightDelta); } } else { Composite composite = (Composite) getControl(); linkedResourceGroup = new CreateLinkedResourceGroup( IResource.FILE, new Listener() { public void handleEvent(Event e) { setPageComplete(validatePage()); } }); linkedResourceGroup.createContents(composite); advancedButton.setText(WorkbenchMessages.getString("WizardNewFileCreationPage.advancedButtonExpanded")); Point newSize = composite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true); Point oldSize = composite.getSize(); int widthDelta = Math.max(newSize.x - oldSize.x, 0); int heightDelta = Math.max(newSize.y - oldSize.y, 0); if (widthDelta > 0 || heightDelta > 0) { Point shellSize = shell.getSize(); shell.setSize(shellSize.x + widthDelta, shellSize.y + heightDelta); } }} | 58148 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58148/6d5fe7c7ed2841b60cc1545330ed4994c212b177/WizardNewFileCreationPage.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/dialogs/WizardNewFileCreationPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
1640,
23618,
3616,
3391,
1435,
288,
202,
13220,
5972,
273,
7932,
1165,
5621,
202,
202,
430,
261,
17738,
18860,
480,
446,
13,
288,
202,
202,
9400,
9635,
273,
261,
9400,
13,
27174,
56... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
1640,
23618,
3616,
3391,
1435,
288,
202,
13220,
5972,
273,
7932,
1165,
5621,
202,
202,
430,
261,
17738,
18860,
480,
446,
13,
288,
202,
202,
9400,
9635,
273,
261,
9400,
13,
27174,
56... | |
if (element != null) element.delete(-1); | if (element == sentinel) { debug("maxSelect() ERROR chose sentinel??????!!! size="+ size); Thread.dumpStack(); } else if (element != null) element.delete(-1); | public synchronized FloatSetElement maxSelect(int halfGcThreshold) { if ((halfGcThreshold > 0) && (size >= 2 * halfGcThreshold)) gc(halfGcThreshold); Thread.yield(); FloatSetElement element = maxSelect(); if (element != null) element.delete(-1); return element; } | 51914 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51914/2d22535cabb0d2d42e320337caf0050b735964fd/FloatWeightSet.java/buggy/ecologylab/collections/FloatWeightSet.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
3852,
5450,
694,
1046,
943,
3391,
12,
474,
8816,
43,
71,
7614,
13,
282,
288,
1377,
309,
14015,
20222,
43,
71,
7614,
405,
374,
13,
597,
261,
1467,
1545,
576,
380,
8816,
43,
71,
7... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
1071,
3852,
5450,
694,
1046,
943,
3391,
12,
474,
8816,
43,
71,
7614,
13,
282,
288,
1377,
309,
14015,
20222,
43,
71,
7614,
405,
374,
13,
597,
261,
1467,
1545,
576,
380,
8816,
43,
71,
7... |
void newGame() { clearFlags(); turnNumber = 1; phase = Constants.SPLIT; caretaker.resetAllCounts(); players.clear(); options.saveOptions(); VariantSupport.loadVariant(options.getStringOption(Options.variant), true); Log.event("Starting new game"); CustomRecruitBase.resetAllInstances(); CustomRecruitBase.setCaretaker(caretaker); CustomRecruitBase.setGame(this); addPlayersFromOptions(); history = new History(); initServer(); } | 51862 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51862/0da497aad0d3b9e59e2d73dcb5418a314284e9ee/Game.java/clean/Colossus/net/sf/colossus/server/Game.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
394,
12496,
1435,
565,
288,
3639,
2424,
5094,
5621,
7734,
7005,
1854,
273,
404,
31,
3639,
6855,
273,
5245,
18,
17482,
31,
3639,
21683,
6388,
18,
6208,
1595,
9211,
5621,
3639,
18115,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
918,
394,
12496,
1435,
565,
288,
3639,
2424,
5094,
5621,
7734,
7005,
1854,
273,
404,
31,
3639,
6855,
273,
5245,
18,
17482,
31,
3639,
21683,
6388,
18,
6208,
1595,
9211,
5621,
3639,
18115,
... | ||
treeViewer.cancelEditing(); treeViewer.remove(removals.toArray()); | treeViewer.cancelEditing(); treeViewer.remove(removals.toArray()); | protected void updateViewer(ArrayList additions, ArrayList removals, ArrayList changes) { // perform removals if (removals.size() > 0) { treeViewer.cancelEditing(); treeViewer.remove(removals.toArray()); } // perform additions if (additions.size() > 0) { for (int i=0; i<additions.size(); i++) { AbstractPMDRecord addedRec = (AbstractPMDRecord) additions.get(i); if (addedRec instanceof FileRecord) treeViewer.add(addedRec.getParent(), addedRec); else treeViewer.add(root, addedRec); } } // perform changes if (changes.size() > 0) { treeViewer.update(changes.toArray(), null); } violationView.refresh(); } | 41673 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/41673/a71f46c4f6b1195d02582581aa74424aff607ebb/ViolationOverviewContentProvider.java/clean/pmd-eclipse-ui/src/net/sourceforge/pmd/ui/views/ViolationOverviewContentProvider.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1089,
18415,
12,
19558,
26260,
16,
2407,
2797,
1031,
16,
1082,
202,
19558,
3478,
13,
288,
1082,
3639,
368,
3073,
2797,
1031,
3639,
309,
261,
2764,
1527,
1031,
18,
1467,
14... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
1089,
18415,
12,
19558,
26260,
16,
2407,
2797,
1031,
16,
1082,
202,
19558,
3478,
13,
288,
1082,
3639,
368,
3073,
2797,
1031,
3639,
309,
261,
2764,
1527,
1031,
18,
1467,
14... |
{ out.write(Integer.toString(i).getBytes()); } | { out.write(Integer.toString(i).getBytes()); } | private void writeInt(OutputStream out, int i) throws IOException { out.write(Integer.toString(i).getBytes()); } | 6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/0b04663d2974e5a85037d82e2f9e0613ea48178b/RtfRow.java/clean/src/com/lowagie/text/rtf/RtfRow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
13682,
12,
4632,
596,
16,
509,
277,
13,
1216,
1860,
225,
288,
565,
596,
18,
2626,
12,
4522,
18,
10492,
12,
77,
2934,
588,
2160,
10663,
225,
289,
2,
0,
0,
0,
0,
0,
0,
0,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
918,
13682,
12,
4632,
596,
16,
509,
277,
13,
1216,
1860,
225,
288,
565,
596,
18,
2626,
12,
4522,
18,
10492,
12,
77,
2934,
588,
2160,
10663,
225,
289,
2,
-100,
-100,
-100,
-100,
... |
if (isEditable()) { | if (hasWritePermissions()) { | public String deleteButton() { try { if (isEditable()) { return button("javascript:deleteResource(\'" + getParamResourcePath() + "\');", null, "deletecontent", "title.delete", 0); } } catch (CmsException e) { // ignore } return button(null, null, "deletecontent_in", "", 0); } | 8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/1468a6164e585db9e0d1549c3215f8cb7eab0073/CmsGallery.java/clean/src/org/opencms/workplace/commons/CmsGallery.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1430,
3616,
1435,
288,
3639,
775,
288,
5411,
309,
261,
5332,
3067,
6521,
10756,
288,
7734,
327,
3568,
2932,
11242,
30,
3733,
1420,
21923,
6,
397,
9027,
29906,
1435,
397,
1548,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1430,
3616,
1435,
288,
3639,
775,
288,
5411,
309,
261,
5332,
3067,
6521,
10756,
288,
7734,
327,
3568,
2932,
11242,
30,
3733,
1420,
21923,
6,
397,
9027,
29906,
1435,
397,
1548,
... |
handleManagePreviewValidations(errors,request); errors.add(super.validate(mapping, request)); | handleManagePreviewValidations(errors, request); | public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) { ActionErrors errors = new ActionErrors(); String method = request.getParameter("method"); if (method.equals(Methods.preview.toString())) { handleCreatePreviewValidations(errors,request); errors.add(super.validate(mapping, request)); } if (method.equals(Methods.previewManage.toString())) { handleManagePreviewValidations(errors,request); errors.add(super.validate(mapping, request)); } if (null != errors && !errors.isEmpty()) { request.setAttribute(Globals.ERROR_KEY, errors); request.setAttribute("methodCalled", method); request.setAttribute(Constants.CURRENTFLOWKEY, request .getParameter(Constants.CURRENTFLOWKEY)); //update the role list also try{ updateRoleLists(request); } catch (PageExpiredException e) { // TODO: do we need to ingnore it ? } } return errors; } | 45468 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45468/9cd26c56978cf78f76664a8772fc60c61df014c7/PersonActionForm.java/clean/mifos/src/org/mifos/application/personnel/struts/actionforms/PersonActionForm.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
4229,
1954,
12,
1803,
3233,
2874,
16,
1082,
202,
2940,
18572,
590,
13,
288,
202,
202,
1803,
4229,
1334,
273,
394,
4382,
4229,
5621,
202,
202,
780,
707,
273,
590,
18,
588... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
4382,
4229,
1954,
12,
1803,
3233,
2874,
16,
1082,
202,
2940,
18572,
590,
13,
288,
202,
202,
1803,
4229,
1334,
273,
394,
4382,
4229,
5621,
202,
202,
780,
707,
273,
590,
18,
588... |
public org.quickfix.field.UnderlyingSecurityID getUnderlyingSecurityID() throws FieldNotFound { org.quickfix.field.UnderlyingSecurityID value = new org.quickfix.field.UnderlyingSecurityID(); | public quickfix.field.UnderlyingSecurityID getUnderlyingSecurityID() throws FieldNotFound { quickfix.field.UnderlyingSecurityID value = new quickfix.field.UnderlyingSecurityID(); | public org.quickfix.field.UnderlyingSecurityID getUnderlyingSecurityID() throws FieldNotFound { org.quickfix.field.UnderlyingSecurityID value = new org.quickfix.field.UnderlyingSecurityID(); getField(value); return value; } | 8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderStatusRequest.java/clean/src/java/src/quickfix/fix44/OrderStatusRequest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734,
10833,
765,
6291,
4368,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734,
10833,
765,
6291,
4368,
734,
1435,
1216,
2286,
2768,
225,
288,
2358,
18,
19525,
904,
18,
1518,
18,
14655,
6291,
4368,
734... |
field_1_flag = LittleEndian.getShort(data, 0 + offset); | field_1_flag = in.readShort(); | protected void fillFields(byte [] data, short size, int offset) { field_1_flag = LittleEndian.getShort(data, 0 + offset); } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/ada69333b277a95ccfc608144b991cfd8d1a9d37/UseSelFSRecord.java/buggy/src/java/org/apache/poi/hssf/record/UseSelFSRecord.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3636,
2314,
12,
7229,
5378,
501,
16,
3025,
963,
16,
509,
1384,
13,
565,
288,
3639,
652,
67,
21,
67,
6420,
273,
316,
18,
896,
4897,
5621,
565,
289,
2,
0,
0,
0,
0,
0,
0,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
3636,
2314,
12,
7229,
5378,
501,
16,
3025,
963,
16,
509,
1384,
13,
565,
288,
3639,
652,
67,
21,
67,
6420,
273,
316,
18,
896,
4897,
5621,
565,
289,
2,
-100,
-100,
-100,
-100... |
SimpleToadletServer server = new SimpleToadletServer(1111, "127.0.0.1", "127.0.0.1", new TempBucketFactory(new FilenameGenerator(new DummyRandomSource(), true, new File("temp-test"), "test-temp-")), "aqua"); | SimpleToadletServer server = new SimpleToadletServer(1111, "127.0.0.1", "127.0.0.1", new TempBucketFactory(new FilenameGenerator(new DummyRandomSource(), true, new File("temp-test"), "test-temp-")), "aqua", null); | public static void main(String[] args) throws IOException, IntervalParseException { File logDir = new File("logs-toadlettest"); logDir.mkdir(); FileLoggerHook logger = new FileLoggerHook(true, new File(logDir, "test-1111").getAbsolutePath(), "d (c, t, p): m", "MMM dd, yyyy HH:mm:ss:SSS", Logger.MINOR, false, true, 1024*1024*1024 /* 1GB of old compressed logfiles */); logger.setInterval("5MINUTES"); Logger.setupChain(); Logger.globalSetThreshold(Logger.MINOR); Logger.globalAddHook(logger); logger.start(); SimpleToadletServer server = new SimpleToadletServer(1111, "127.0.0.1", "127.0.0.1", new TempBucketFactory(new FilenameGenerator(new DummyRandomSource(), true, new File("temp-test"), "test-temp-")), "aqua"); server.register(new TrivialToadlet(null), "", true); server.start(); System.out.println("Bound to port 1111."); while(true) { try { Thread.sleep(100000); } catch (InterruptedException e) { // Ignore } } } | 50653 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50653/7b992ac7b46f4eaaf97e9e0e1b7e5c18e1c89deb/SimpleToadletServer.java/clean/src/freenet/clients/http/SimpleToadletServer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1860,
16,
10803,
13047,
288,
3639,
1387,
31101,
273,
394,
1387,
2932,
10011,
17,
869,
361,
1810,
3813,
8863,
3639,
31101,
18,
26686... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
918,
2774,
12,
780,
8526,
833,
13,
1216,
1860,
16,
10803,
13047,
288,
3639,
1387,
31101,
273,
394,
1387,
2932,
10011,
17,
869,
361,
1810,
3813,
8863,
3639,
31101,
18,
26686... |
int flags = Modifiers.PARAM; if ("def".equals(token)) { nextToken(); flags |= Modifiers.DEF; } | int flags = Modifiers.PARAM; if ("def".equals(token)) { nextToken(); flags |= Modifiers.DEF; } | protected Type parseMetaMethod() { locals = new Scope(); try { nextToken(); Symbol[] smbls = null; //System.out.println("parse meta method " + token); if ("[".equals(token)) { Vector syms = new Vector(); do { nextToken(); if ("]".equals(token)) break; assert token.startsWith("?"); Symbol s = getTVar(token, owner); if (s == Symbol.NONE) return defaultType; nextToken(); //System.out.println("new var " + s + ", " + token); if (token.equals("<")) { nextToken(); s.setInfo(parseType(), parser.phaseId); } syms.add(s); } while (token.equals(",")); assert "]".equals(token); nextToken(); smbls = (Symbol[])syms.toArray(new Symbol[syms.size()]); } if ("(".equals(token)) { int i = 0; Vector params = new Vector(); do { nextToken(); if (")".equals(token)) break; int flags = Modifiers.PARAM; if ("def".equals(token)) { nextToken(); flags |= Modifiers.DEF; } params.add(new TermSymbol( Position.NOPOS, Name.fromString("x" + (i++)), owner, flags).setInfo(parseType(), parser.phaseId)); //System.out.println(" + " + token); } while (token.equals(",")); assert ")".equals(token); nextToken(); //System.out.println("+++ method " + token); Type restpe = parseType(); assert ";".equals(token); if (smbls == null) return Type.MethodType( (Symbol[])params.toArray(new Symbol[params.size()]), restpe); else return Type.PolyType( smbls, Type.MethodType( (Symbol[])params.toArray(new Symbol[params.size()]), restpe)); } else { Type res = parseType(); assert ";".equals(token); if (smbls == null) return Type.PolyType(Symbol.EMPTY_ARRAY, res); else return Type.PolyType(smbls, res); } } catch (NoSuchElementException e) { return defaultType; } finally { locals = null; } } | 10130 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10130/964d33ca593138a52648af5b10f0fb7a9ea7aceb/AttributeParser.java/buggy/sources/scalac/symtab/classfile/AttributeParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1412,
1109,
2781,
1305,
1435,
288,
5411,
8985,
273,
394,
5468,
5621,
5411,
775,
288,
7734,
9617,
5621,
7734,
8565,
8526,
272,
1627,
3251,
273,
446,
31,
7734,
368,
3163,
18,
659,
18,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
4750,
1412,
1109,
2781,
1305,
1435,
288,
5411,
8985,
273,
394,
5468,
5621,
5411,
775,
288,
7734,
9617,
5621,
7734,
8565,
8526,
272,
1627,
3251,
273,
446,
31,
7734,
368,
3163,
18,
659,
18,... |
List values = getPropertyValues(prop_token); | List values = getPropertyValues(propToken); | protected void firePropertyValueChanged(String prop_token, int index, Object old_value) { // Get the new value of the changed property. List values = getPropertyValues(prop_token); Object new_value = values.get(index); if (new_value instanceof ConfigElementPointer) { new_value = ((ConfigElementPointer)new_value).getTarget(); } // If the value did not actually change, then do not fire the change // event. if ( ! old_value.equals(new_value) ) { ConfigElementEvent evt = null; Object[] listeners = listenerList.getListenerList(); for (int i=listeners.length-2; i>=0; i-=2) { if (listeners[i] == ConfigElementListener.class) { if (evt == null) { evt = new ConfigElementEvent(this, prop_token, index, old_value); } ((ConfigElementListener)listeners[i+1]).propertyValueChanged(evt); } } } } | 7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/f9aac3be4f9e99aff0002d0cca791c2c8ee9a20c/ConfigElement.java/buggy/modules/jackal/config/org/vrjuggler/jccl/config/ConfigElement.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
4452,
16107,
5033,
12,
780,
2270,
67,
2316,
16,
509,
770,
16,
4766,
6647,
1033,
1592,
67,
1132,
13,
282,
288,
1377,
368,
968,
326,
394,
460,
434,
326,
3550,
1272,
18,
1377,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
565,
4750,
918,
4452,
16107,
5033,
12,
780,
2270,
67,
2316,
16,
509,
770,
16,
4766,
6647,
1033,
1592,
67,
1132,
13,
282,
288,
1377,
368,
968,
326,
394,
460,
434,
326,
3550,
1272,
18,
1377,
... |
eDynamicSet( eFeature, newValue ); | super.eSet( featureID, newValue ); | public void eSet( EStructuralFeature eFeature, Object newValue ) { switch ( eDerivedStructuralFeatureID( eFeature ) ) { case AttributePackage.DATA_POINT_COMPONENT__TYPE : setType( (DataPointComponentType) newValue ); return; case AttributePackage.DATA_POINT_COMPONENT__FORMAT_SPECIFIER : setFormatSpecifier( (FormatSpecifier) newValue ); return; } eDynamicSet( eFeature, newValue ); } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/036e8c78765730b146e5854b9d6c397a296fed86/DataPointComponentImpl.java/buggy/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/model/attribute/impl/DataPointComponentImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20199,
12,
512,
14372,
4595,
425,
4595,
16,
1033,
6129,
262,
202,
95,
202,
202,
9610,
261,
425,
21007,
14372,
4595,
734,
12,
425,
4595,
262,
262,
202,
202,
95,
1082,
202,... |
assertEquals("Test7_blah.txt", result); | assertEquals("Test7_originalName.txt", result); | public void testAntStyleParsing() { SimpleFilenameParser parser = new SimpleFilenameParser(); DefaultMessageAdapter adapter = new DefaultMessageAdapter("hello"); adapter.setProperty("foo", "bar"); adapter.setProperty(FileConnector.PROPERTY_FILENAME, "blah"); String result = parser.getFilename(adapter, "Test1_${COUNT}.txt"); assertEquals("Test1_0.txt", result); result = parser.getFilename(adapter, "Test2_${DATE:yyMMdd}.txt"); assertEquals(16, result.length()); result = parser.getFilename(adapter, "Test3_${DATE}.txt"); assertEquals(31, result.length()); result = parser.getFilename(adapter, "Test4_${SYSTIME}.txt"); assertFalse(result.equals("Test4_${SYSTIME}.txt")); result = parser.getFilename(adapter, "Test5_${UUID}.txt"); assertFalse(result.equals("Test5_${UUID}.txt")); result = parser.getFilename(adapter, "Test6_${COUNT}.txt"); assertEquals("Test6_1.txt", result); result = parser.getFilename(adapter, "Test7_${ORIGINALNAME}.txt"); assertEquals("Test7_blah.txt", result); result = parser.getFilename(adapter, "Test8_${foo}.txt"); assertEquals("Test8_bar.txt", result); result = parser.getFilename(adapter, "Test9_${xxx}.txt"); assertEquals("Test9_${xxx}.txt", result); } | 28323 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/28323/ba2375ddd42c8e3be84abe679c90e77253717357/SimpleFilenameParserTestCase.java/buggy/transports/file/src/test/java/org/mule/test/providers/file/SimpleFilenameParserTestCase.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14925,
2885,
13963,
1435,
565,
288,
3639,
4477,
5359,
2678,
2082,
273,
394,
4477,
5359,
2678,
5621,
3639,
2989,
1079,
4216,
4516,
273,
394,
2989,
1079,
4216,
2932,
23711,
8... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
14925,
2885,
13963,
1435,
565,
288,
3639,
4477,
5359,
2678,
2082,
273,
394,
4477,
5359,
2678,
5621,
3639,
2989,
1079,
4216,
4516,
273,
394,
2989,
1079,
4216,
2932,
23711,
8... |
if (len > NATIVE_THRESHOLD) { memcopy(VM_Magic.objectAsAddress(dst) + dstPos, VM_Magic.objectAsAddress(src) + srcPos, len); | if (len > (NATIVE_THRESHOLD>>1)) { memcopy(VM_Magic.objectAsAddress(dst) + (dstPos<<1), VM_Magic.objectAsAddress(src) + (srcPos<<1), len<<1); | static void arraycopy(byte[] src, int srcPos, byte[] dst, int dstPos, int len) { VM_Magic.pragmaInline(); if (len > NATIVE_THRESHOLD) { memcopy(VM_Magic.objectAsAddress(dst) + dstPos, VM_Magic.objectAsAddress(src) + srcPos, len); } else { if ((srcPos & 0x3) == (dstPos & 0x3)) { // alignment is the same int byteStart = srcPos; int wordStart = (srcPos + 3) & ~0x3; int wordEnd = (srcPos + len) & ~0x3; int byteEnd = srcPos + len; int startDiff = wordStart - byteStart; int endDiff = byteEnd - wordEnd; int wordLen = wordEnd - wordStart; if (startDiff == 3) { dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; } else if (startDiff == 2) { dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; } else if (startDiff == 1) { dst[dstPos++] = src[srcPos++]; } internalAligned32Copy(VM_Magic.objectAsAddress(dst) + dstPos, VM_Magic.objectAsAddress(src) + srcPos, wordLen); srcPos += wordLen; dstPos += wordLen; if (endDiff == 3) { dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; } else if (endDiff == 2) { dst[dstPos++] = src[srcPos++]; dst[dstPos++] = src[srcPos++]; } else if (endDiff == 1) { dst[dstPos++] = src[srcPos++]; } } else { for (int i=0; i<len; i++) { dst[dstPos+i] = src[srcPos+i]; } } } } | 49871 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49871/b09fd073fbb2b0118a623dc0fb0e36b4f044e392/VM_Memory.java/buggy/rvm/src/vm/runtime/VM_Memory.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
8817,
12,
7229,
8526,
1705,
16,
509,
1705,
1616,
16,
1160,
8526,
3046,
16,
509,
3046,
1616,
16,
509,
562,
13,
288,
565,
8251,
67,
19289,
18,
683,
9454,
10870,
5621,
565,
309,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
760,
918,
8817,
12,
7229,
8526,
1705,
16,
509,
1705,
1616,
16,
1160,
8526,
3046,
16,
509,
3046,
1616,
16,
509,
562,
13,
288,
565,
8251,
67,
19289,
18,
683,
9454,
10870,
5621,
565,
309,
... |
return (ClassInfo) m_repository.get(className); | return info; | public ClassInfo getClassInfo(final String className) { ClassInfo info = (ClassInfo) m_repository.get(className); if (info == null) { return checkParentClassRepository(className, (ClassLoader) m_loaderRef.get()); } return (ClassInfo) m_repository.get(className); } | 7954 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7954/b828990c07063cdd2f80d43b5ca4b651a929b9b8/AsmClassInfoRepository.java/clean/aspectwerkz3/src/main/org/codehaus/aspectwerkz/reflect/impl/asm/AsmClassInfoRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19010,
2900,
966,
12,
6385,
514,
2658,
13,
288,
3639,
19010,
1123,
273,
261,
19455,
13,
312,
67,
9071,
18,
588,
12,
12434,
1769,
3639,
309,
261,
1376,
422,
446,
13,
288,
5411,
327... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
19010,
2900,
966,
12,
6385,
514,
2658,
13,
288,
3639,
19010,
1123,
273,
261,
19455,
13,
312,
67,
9071,
18,
588,
12,
12434,
1769,
3639,
309,
261,
1376,
422,
446,
13,
288,
5411,
327... |
case LDAPTransformer.STATE_INSIDE_ATTRIBUTE_ELEMENT: | case LDAPTransformer.STATE_INSIDE_ATTRIBUTE_ELEMENT : | protected void endAttributeElement() { switch (current_state) { case LDAPTransformer.STATE_INSIDE_ATTRIBUTE_ELEMENT: getCurrentQuery().addAttrList(current_value.toString()); current_state = getCurrentQuery().toDo; break; default: throwIllegalStateException("Not expecting a end attribute element"); } } | 46428 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46428/52ffdd8b732294554bcca0d4e0574ce6a20c35bc/LDAPTransformer.java/buggy/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
679,
1499,
1046,
1435,
288,
3639,
1620,
261,
2972,
67,
2019,
13,
288,
5411,
648,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
11616,
67,
10976,
294,
7734,
5175,
1138,
7675,
1289,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
679,
1499,
1046,
1435,
288,
3639,
1620,
261,
2972,
67,
2019,
13,
288,
5411,
648,
11916,
8319,
18,
7998,
67,
706,
26498,
67,
11616,
67,
10976,
294,
7734,
5175,
1138,
7675,
1289,... |
case 47: break; | case 50: break; | public Yytoken yylex() throws java.io.IOException { int zzInput; int zzAction; // cached fields: int zzCurrentPosL; int zzMarkedPosL; int zzEndReadL = zzEndRead; char [] zzBufferL = zzBuffer; char [] zzCMapL = ZZ_CMAP; int [] zzTransL = ZZ_TRANS; int [] zzRowMapL = ZZ_ROWMAP; int [] zzAttrL = ZZ_ATTRIBUTE; while (true) { zzMarkedPosL = zzMarkedPos; zzAction = -1; zzCurrentPosL = zzCurrentPos = zzStartRead = zzMarkedPosL; zzState = zzLexicalState; zzForAction: { while (true) { if (zzCurrentPosL < zzEndReadL) zzInput = zzBufferL[zzCurrentPosL++]; else if (zzAtEOF) { zzInput = YYEOF; break zzForAction; } else { // store back cached positions zzCurrentPos = zzCurrentPosL; zzMarkedPos = zzMarkedPosL; boolean eof = zzRefill(); // get translated positions and possibly new buffer zzCurrentPosL = zzCurrentPos; zzMarkedPosL = zzMarkedPos; zzBufferL = zzBuffer; zzEndReadL = zzEndRead; if (eof) { zzInput = YYEOF; break zzForAction; } else { zzInput = zzBufferL[zzCurrentPosL++]; } } int zzNext = zzTransL[ zzRowMapL[zzState] + zzCMapL[zzInput] ]; if (zzNext == -1) break zzForAction; zzState = zzNext; int zzAttributes = zzAttrL[zzState]; if ( (zzAttributes & 1) == 1 ) { zzAction = zzState; zzMarkedPosL = zzCurrentPosL; if ( (zzAttributes & 8) == 8 ) break zzForAction; } } } // store back cached position zzMarkedPos = zzMarkedPosL; switch (zzAction < 0 ? zzAction : ZZ_ACTION[zzAction]) { case 23: { // This is horrible. However it seems that there is no other way to do it with either jflex or CUP, as {URL} cannot be an unambiguous token :( String s = yytext(); if(debug) log("Recognized URL: "+s); DecodedStringThingy dst = new DecodedStringThingy(s); if(!dst.url) { throw new IllegalStateException("parsing url().. isn't a url()"); } if(dst.suffix.length() > 0) { yypushback(dst.suffix.length()); dst.suffix = ""; } s = dst.data; if(debug) log("URL now: "+s); try { s = processURL(s); dst.data = s; if(s == null || s.equals("")) { if(debug) log("URL invalid"); w.write("url()"); } else { s = dst.toString(); if(debug) log("Writing: "+s); w.write(s); } } catch (CommentException e) { w.write("/* "+commentEncode(e.getMessage())+" */"); } } case 31: break; case 18: { String s = yytext(); w.write(s); if(debug) log("Matched unicode: "+s); } case 32: break; case 8: { String s = yytext(); w.write(s); if(debug) log("Matched close braces: "+s); } case 33: break; case 22: { String s = yytext(); w.write(s); if(debug) log("Matched HTML comment: "+s); } case 34: break; case 16: { String s = yytext(); w.write(s); if(debug) log("Matched ~=: "+s); } case 35: break; case 12: { String s = yytext(); if(debug) log("Matched string: "+s); if(paranoidStringCheck && s.indexOf(':') != -1) { w.write("/* Deleted disallowed string */"); log("Deleted disallowed string: "+s); } else { w.write(s); } } case 36: break; case 25: { String s = yytext(); w.write(s); if(debug) log("Matched @page: "+s); } case 37: break; case 13: { String s = yytext(); w.write(s); if(debug) log("Matched number: "+s); } case 38: break; case 1: { String s = yytext(); char c = s.charAt(0); log("Matched anything: "+yytext()+" - ignoring"); w.write("/* ignored unmatched char: "+c+" */"); // single char cannot break out of comment } case 39: break; case 6: { String s = yytext(); w.write(s); if(debug) log("Matched semicolon: "+s); } case 40: break; case 20: { String s = yytext(); if(debug) log("Got hexcolor: "+s); w.write(s); } case 41: break; case 7: { String s = yytext(); w.write(s); if(debug) log("Matched open braces: "+s); } case 42: break; case 26: { String s = yytext(); s = s.substring("@media".length()).trim(); w.write("@media "+s+ ' '); if(debug) log("Matched @media: "+s); } case 43: break; case 2: { String s = yytext(); w.write(s); if(debug) log("Matched ident: "+s); } case 44: break; case 24: { String s = yytext(); w.write(s); if(debug) log("Matched unicode range: "+s); } case 45: break; case 28: { String s = yytext(); w.write(s); if(debug) log("Matched @font-face: "+s); } case 46: break; case 19: { String s = yytext(); w.write(s); if(debug) log("Matched HTML comment: "+s); } case 47: break; case 9: { String s = yytext(); if(s.startsWith("url")) throwError("Invalid contents of url()"); w.write(s); if(debug) log("Matched function start: "+s); } case 48: break; case 27: { String s = yytext(); if(debug) log("Found @import: "+s); s = s.substring("@import".length()); s = s.trim(); DecodedStringThingy dst = new DecodedStringThingy(s); s = dst.data; if(debug) log("URL: "+s); try { s = processImportURL(s); dst.data = s; if(debug) log("Processed URL: "+s); if(dst.quote == ' ') dst.quote = '\"'; if (!(s == null || s.equals(""))) { if(debug) log("URL now: "+s); s = "@import "+dst.toString(); if(debug) log("Writing: "+s); w.write(s); } else if(debug) log("Dropped @import"); } catch (CommentException e) { w.write("/* " + commentEncode(e.getMessage()) + " */"); } } case 49: break; case 3: { String s = yytext(); w.write(s); if(debug) log("Matched whitespace: "+s); } case 50: break; case 29: { String s = yytext(); w.write(s); if(debug) log("Matched important: "+s); } case 51: break; case 21: { String s = yytext(); StringBuffer sb = new StringBuffer(s.length()); sb.append("/* "); boolean inPrefix = true; for(int i=2;i<s.length()-2;i++) { char c = s.charAt(i); if(inPrefix && Character.isWhitespace(c)) { continue; } inPrefix = false; if(Character.isDigit(c) || Character.isWhitespace(c) || Character.isLetter(c) || c == '.' || c == '_' || c == '-') { // No @, no !, etc; IE has been known to do things with comments // in CSS, and other browsers may too sb.append(c); } } while(Character.isWhitespace(sb.charAt(sb.length()-1))) sb.deleteCharAt(sb.length()-1); sb.append(" */"); w.write(sb.toString()); if(debug) log("Matched comment: "+s+" -> "+sb.toString()); } case 52: break; case 15: { if(!deleteErrors) { throwError("Unknown @identifier "+yytext()); } else { String s = yytext(); if(debug) log("Discarded identifier: "+s); // Ignore } } case 53: break; case 11: { String s = yytext(); w.write(s); if(debug) log("Matched measurement: "+s); } case 54: break; case 17: { String s = yytext(); w.write(s); if(debug) log("Matched |=: "+s); } case 55: break; case 30: { String s = yytext(); detectedCharset = s; if(debug) log("Matched and ignoring charset: "+s); // Ignore } case 56: break; case 10: { if(postBadImportFlag) { // Ignore postBadImportFlag = false; if(debug) log("Ignoring mediums list because after bad import: "+ yytext()); } else { String s = yytext(); w.write(s); if(debug) log("Matched and passing on mediums list: "+s); } } case 57: break; case 4: { String s = yytext(); w.write(s); if(debug) log("Matched single char: "+s); } case 58: break; case 14: { String s = yytext(); w.write(s); if(debug) log("Matched #name: "+s); } case 59: break; case 5: { String s = yytext(); w.write(s); if(debug) log("Matched function end: "+s); } case 60: break; default: if (zzInput == YYEOF && zzStartRead == zzCurrentPos) { zzAtEOF = true; return null; } else { zzScanError(ZZ_NO_MATCH); } } } } | 56348 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56348/58e844dc77aa5d1ee9f4952f22f0f7b6b8469457/CSSTokenizerFilter.java/buggy/src/freenet/clients/http/filter/CSSTokenizerFilter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1624,
93,
2316,
677,
1362,
92,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
11273,
1210,
31,
565,
509,
11273,
1803,
31,
565,
368,
3472,
1466,
30,
565,
509,
11273,
3935,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
1624,
93,
2316,
677,
1362,
92,
1435,
1216,
2252,
18,
1594,
18,
14106,
288,
565,
509,
11273,
1210,
31,
565,
509,
11273,
1803,
31,
565,
368,
3472,
1466,
30,
565,
509,
11273,
3935,
1... |
new MulticastReceiverThread().start(); | receiverThread = new MulticastReceiverThread(); receiverThread.start(); | public void activateOptions() { InetAddress addr = null; try { Class c = Class.forName(decoder); Object o = c.newInstance(); if (o instanceof Decoder) { this.decoderImpl = (Decoder) o; } } catch (ClassNotFoundException cnfe) { LogLog.warn("Unable to find decoder", cnfe); } catch (IllegalAccessException iae) { LogLog.warn("Could not construct decoder", iae); } catch (InstantiationException ie) { LogLog.warn("Could not construct decoder", ie); } try { addr = InetAddress.getByName(address); } catch (UnknownHostException uhe) { uhe.printStackTrace(); } try { socket = new MulticastSocket(port); socket.joinGroup(addr); new MulticastReceiverThread().start(); handlerThread = new MulticastHandlerThread(); handlerThread.start(); setActive(true); } catch (IOException ioe) { ioe.printStackTrace(); } } | 45952 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45952/437a2a9f957072af18835320b886c5fa565ea8d7/MulticastReceiver.java/buggy/src/java/org/apache/log4j/net/MulticastReceiver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10235,
1320,
1435,
288,
565,
14218,
3091,
273,
446,
31,
565,
775,
288,
1377,
1659,
276,
273,
1659,
18,
1884,
461,
12,
21070,
1769,
1377,
1033,
320,
273,
276,
18,
2704,
1442,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
10235,
1320,
1435,
288,
565,
14218,
3091,
273,
446,
31,
565,
775,
288,
1377,
1659,
276,
273,
1659,
18,
1884,
461,
12,
21070,
1769,
1377,
1033,
320,
273,
276,
18,
2704,
1442,
... |
public void init( IWorkbench workbench, IStructuredSelection selection ) { // TODO Auto-generated method stub } | 5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/5ff652fd83c8ea5a8c067e89f8bca825e5fa73fd/NewReportTemplateWizard.java/buggy/UI/org.eclipse.birt.report.designer.ui.rcp/src/org/eclipse/birt/report/designer/ui/internal/rcp/wizards/NewReportTemplateWizard.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
467,
2421,
22144,
1440,
22144,
16,
467,
30733,
6233,
4421,
262,
202,
95,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
202,
97,
2,
0,
0,
0,
0,
0,
0... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
1208,
12,
467,
2421,
22144,
1440,
22144,
16,
467,
30733,
6233,
4421,
262,
202,
95,
202,
202,
759,
2660,
8064,
17,
11168,
707,
7168,
1082,
202,
97,
2,
-100,
-100,
-100,
-1... | ||
if (first && pack) { window.pack(); if (LookUtils.IS_OS_LINUX) { Dimension size = window.getSize(); size.height += 10; window.setSize(size); } } | if (first && pack) SwingUtil.pack(window); | public void showWindow() { if (first && pack) { window.pack(); // HACK - work around a layout issue where panel is slightly too short // this hack also appears in loci.visbio.view.DisplayWindow.repack() if (LookUtils.IS_OS_LINUX) { Dimension size = window.getSize(); size.height += 10; window.setSize(size); } } // arrange window in cascade formation Dimension ss = Toolkit.getDefaultToolkit().getScreenSize(); Rectangle scr = new Rectangle(0, 0, ss.width, ss.height); Rectangle win = window.getBounds(); boolean offscreen = !win.intersects(scr); if (first || offscreen) { gap += GAP; if (gap + win.width > scr.width || gap + win.height > scr.height) { gap = 0; } window.setLocation(gap, gap); } window.setVisible(true); } | 11426 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11426/541846d970043d0d493ef71920701f21b228ba7d/WindowInfo.java/buggy/loci/visbio/WindowInfo.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
3829,
1435,
288,
565,
309,
261,
3645,
597,
2298,
13,
288,
1377,
2742,
18,
2920,
5621,
1377,
368,
670,
3649,
300,
1440,
6740,
279,
3511,
5672,
1625,
6594,
353,
21980,
4885... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
2405,
3829,
1435,
288,
565,
309,
261,
3645,
597,
2298,
13,
288,
1377,
2742,
18,
2920,
5621,
1377,
368,
670,
3649,
300,
1440,
6740,
279,
3511,
5672,
1625,
6594,
353,
21980,
4885... |
metadataBucket = ah.getMetadata(actx, null, null, recursionLevel+1, true); | metadataBucket = ah.getMetadata(actx, null, recursionLevel+1, true); | private void handleMetadata() throws FetchException, MetadataParseException, ArchiveFailureException, ArchiveRestartException { while(true) { if(metadata.isSimpleManifest()) { String name; if(metaStrings.isEmpty()) name = null; else name = (String) metaStrings.removeFirst(); // Since metadata is a document, we just replace metadata here if(name == null) { metadata = metadata.getDefaultDocument(); if(metadata == null) throw new FetchException(FetchException.NOT_ENOUGH_METASTRINGS); } else { metadata = metadata.getDocument(name); thisKey = thisKey.pushMetaString(name); if(metadata == null) throw new FetchException(FetchException.NOT_IN_ARCHIVE); } continue; // loop } else if(metadata.isArchiveManifest()) { if(metaStrings.isEmpty() && ctx.returnZIPManifests) { // Just return the archive, whole. metadata.setSimpleRedirect(); continue; } // First we need the archive metadata. // Then parse it. // Then we may need to fetch something from inside the archive. ah = (ArchiveStoreContext) ctx.archiveManager.makeHandler(thisKey, metadata.getArchiveType(), false); // ah is set. This means we are currently handling an archive. Bucket metadataBucket; metadataBucket = ah.getMetadata(actx, null, null, recursionLevel+1, true); if(metadataBucket != null) { try { metadata = Metadata.construct(metadataBucket); } catch (IOException e) { // Bucket error? throw new FetchException(FetchException.BUCKET_ERROR, e); } } else { fetchArchive(); // will result in this function being called again return; } continue; } else if(metadata.isArchiveInternalRedirect()) { clientMetadata.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! // Fetch it from the archive if(ah == null) throw new FetchException(FetchException.UNKNOWN_METADATA, "Archive redirect not in an archive"); if(metaStrings.isEmpty()) throw new FetchException(FetchException.NOT_ENOUGH_METASTRINGS); Bucket dataBucket = ah.get((String) metaStrings.removeFirst(), actx, null, null, recursionLevel+1, true); if(dataBucket != null) { // Return the data onSuccess(new FetchResult(this.clientMetadata, dataBucket)); return; } else { // Metadata cannot contain pointers to files which don't exist. // We enforce this in ArchiveHandler. // Therefore, the archive needs to be fetched. fetchArchive(); // Will call back into this function when it has been fetched. return; } } else if(metadata.isMultiLevelMetadata()) { // Fetch on a second SingleFileFetcher, like with archives. Metadata newMeta = (Metadata) metadata.clone(); metadata.setSimpleRedirect(); SingleFileFetcher f = new SingleFileFetcher(this, newMeta, new MultiLevelMetadataCallback(), ctx); f.handleMetadata(); return; } else if(metadata.isSingleFileRedirect()) { clientMetadata.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! // FIXME implement implicit archive support // Simple redirect // Just create a new SingleFileFetcher // Which will then fetch the target URI, and call the rcd.success // Hopefully! FreenetURI uri = metadata.getSingleTarget(); ClientKey key; try { key = ClientKey.getBaseKey(uri); } catch (MalformedURLException e) { throw new FetchException(FetchException.INVALID_URI, e); } LinkedList newMetaStrings = uri.listMetaStrings(); // Move any new meta strings to beginning of our list of remaining meta strings while(!newMetaStrings.isEmpty()) { Object o = newMetaStrings.removeLast(); metaStrings.addFirst(o); } SingleFileFetcher f = new SingleFileFetcher(parent, rcb, clientMetadata, key, metaStrings, ctx, actx, maxRetries, recursionLevel, false, null); if(metadata.isCompressed()) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.getCompressionCodec()); f.addDecompressor(codec); } f.schedule(); // All done! No longer our problem! return; } else if(metadata.isSplitfile()) { // FIXME implicit archive support clientMetadata.mergeNoOverwrite(metadata.getClientMetadata()); // even splitfiles can have mime types! // Splitfile (possibly compressed) if(metadata.isCompressed()) { Compressor codec = Compressor.getCompressionAlgorithmByMetadataID(metadata.getCompressionCodec()); addDecompressor(codec); } SplitFileFetcher sf = new SplitFileFetcher(metadata, rcb, parent, ctx, decompressors, clientMetadata, actx, recursionLevel); // SplitFile will now run. // Then it will return data to rcd. // We are now out of the loop. Yay! return; } else { Logger.error(this, "Don't know what to do with metadata: "+metadata); throw new FetchException(FetchException.UNKNOWN_METADATA); } } } | 50915 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50915/d32229c02576d531c915059f111c468591f30e84/SingleFileFetcher.java/buggy/src/freenet/client/async/SingleFileFetcher.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
2277,
1435,
1216,
8065,
503,
16,
6912,
13047,
16,
13124,
14389,
16,
13124,
15057,
503,
288,
202,
202,
17523,
12,
3767,
13,
288,
1082,
202,
430,
12,
4165,
18,
291,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
918,
1640,
2277,
1435,
1216,
8065,
503,
16,
6912,
13047,
16,
13124,
14389,
16,
13124,
15057,
503,
288,
202,
202,
17523,
12,
3767,
13,
288,
1082,
202,
430,
12,
4165,
18,
291,
... |
error(XSLTErrorResources.ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, new Object[]{ piName }); | transformer.getMsgMgr().warn( this, XSLTErrorResources.WG_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, new Object[]{ Constants.ATTRNAME_NAME, piName }); return; | public void execute( TransformerImpl transformer) throws TransformerException { if (TransformerImpl.S_DEBUG) transformer.getTraceManager().fireTraceEvent(this); XPathContext xctxt = transformer.getXPathContext(); int sourceNode = xctxt.getCurrentNode(); String piName = m_name_atv.evaluate(xctxt, sourceNode, this); if (piName.equalsIgnoreCase("xml")) { error(XSLTErrorResources.ER_PROCESSINGINSTRUCTION_NAME_CANT_BE_XML); //"processing-instruction name can not be 'xml'"); } // Only check if an avt was used (ie. this wasn't checked at compose time.) else if ((!m_name_atv.isSimple()) && (!isValidNCName(piName))) { error(XSLTErrorResources.ER_PROCESSINGINSTRUCTION_NOTVALID_NCNAME, new Object[]{ piName }); //"processing-instruction name must be a valid NCName: "+piName); } // Note the content model is: // <!ENTITY % instructions " // %char-instructions; // | xsl:processing-instruction // | xsl:comment // | xsl:element // | xsl:attribute // "> String data = transformer.transformToString(this); try { transformer.getResultTreeHandler().processingInstruction(piName, data); } catch(org.xml.sax.SAXException se) { throw new TransformerException(se); } if (TransformerImpl.S_DEBUG) transformer.getTraceManager().fireTraceEndEvent(this); } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/18fa4318bc003a5458d08aaa955c4777a73e15cd/ElemPI.java/buggy/src/org/apache/xalan/templates/ElemPI.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
12,
1850,
11519,
2828,
8360,
13,
5411,
1216,
21684,
225,
288,
565,
309,
261,
8319,
2828,
18,
55,
67,
9394,
13,
1377,
8360,
18,
588,
3448,
1318,
7675,
12179,
3448,
1133,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
1071,
918,
1836,
12,
1850,
11519,
2828,
8360,
13,
5411,
1216,
21684,
225,
288,
565,
309,
261,
8319,
2828,
18,
55,
67,
9394,
13,
1377,
8360,
18,
588,
3448,
1318,
7675,
12179,
3448,
1133,
... |
log( "<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG ); | log("<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG); | public void targetFinished(BuildEvent event) { log( "<< TARGET FINISHED -- " + event.getTarget(), Project.MSG_DEBUG ); String time = formatTime(System.currentTimeMillis() - targetStartTime); log( event.getTarget() + ": duration " + time, Project.MSG_VERBOSE ); out.flush(); } | 639 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/639/c6c232893c39257745a8f7a618bcdb5c59791cae/RecorderEntry.java/buggy/src/main/org/apache/tools/ant/taskdefs/RecorderEntry.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1018,
10577,
12,
3116,
1133,
871,
13,
288,
3639,
613,
2932,
17685,
16964,
25768,
2056,
1493,
315,
397,
871,
18,
588,
2326,
9334,
5420,
18,
11210,
67,
9394,
1769,
540,
514,
813,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1018,
10577,
12,
3116,
1133,
871,
13,
288,
3639,
613,
2932,
17685,
16964,
25768,
2056,
1493,
315,
397,
871,
18,
588,
2326,
9334,
5420,
18,
11210,
67,
9394,
1769,
540,
514,
813,... |
if (currentResourceSelection.getType() == IResource.FILE) currentResourceSelection = currentResourceSelection.getParent(); | if (currentResourceSelection.getType() == IResource.FILE) { currentResourceSelection = currentResourceSelection.getParent(); } | protected WizardResourceImportPage(String name, IStructuredSelection selection) { super(name); //Initialize to null currentResourceSelection = null; if (selection.size() == 1) { Object firstElement = selection.getFirstElement(); if (firstElement instanceof IAdaptable) { Object resource = ((IAdaptable) firstElement) .getAdapter(IResource.class); if (resource != null) currentResourceSelection = (IResource) resource; } } if (currentResourceSelection != null) { if (currentResourceSelection.getType() == IResource.FILE) currentResourceSelection = currentResourceSelection.getParent(); if (!currentResourceSelection.isAccessible()) currentResourceSelection = null; } } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/WizardResourceImportPage.java/buggy/bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/dialogs/WizardResourceImportPage.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
678,
13412,
1420,
5010,
1964,
12,
780,
508,
16,
5411,
467,
30733,
6233,
4421,
13,
288,
3639,
2240,
12,
529,
1769,
3639,
368,
7520,
358,
446,
3639,
783,
1420,
6233,
273,
446,
31,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
678,
13412,
1420,
5010,
1964,
12,
780,
508,
16,
5411,
467,
30733,
6233,
4421,
13,
288,
3639,
2240,
12,
529,
1769,
3639,
368,
7520,
358,
446,
3639,
783,
1420,
6233,
273,
446,
31,
3... |
iCodeTop = generateICode(child, iCodeTop); | String property = child.getString(); | private int generateICode(Node node, int iCodeTop) { int type = node.getType(); Node child = node.getFirstChild(); Node firstChild = child; int savedStackDepth = itsStackDepth; int stackDelta = 0; // expected stack change for subtree code boolean stackShouldBeZero = false; switch (type) { case Token.FUNCTION : { int fnIndex = node.getExistingIntProp(Node.FUNCTION_PROP); FunctionNode fn = scriptOrFn.getFunctionNode(fnIndex); if (fn.getFunctionType() != FunctionNode.FUNCTION_STATEMENT) { stackDelta = 1; // Only function expressions or function expression // statements needs closure code creating new function // object on stack as function statements are initialized // at script/function start iCodeTop = addIndexOp(Icode_CLOSURE, fnIndex, iCodeTop); stackChange(1); } else { stackShouldBeZero = true; } break; } case Token.SCRIPT : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { if (child.getType() != Token.FUNCTION) iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.CASE : // Skip case condition child = child.getNext(); // fallthrough case Token.LABEL : case Token.LOOP : case Token.DEFAULT : case Token.BLOCK : case Token.EMPTY : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } break; case Token.WITH : ++itsWithDepth; stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } --itsWithDepth; break; case Token.LOCAL_BLOCK : stackShouldBeZero = true; if ((itsLocalTop & ~0xFF) != 0) { throw Context.reportRuntimeError( "Program too complex (out of locals)"); } node.putIntProp(Node.LOCAL_PROP, itsLocalTop); ++itsLocalTop; if (itsLocalTop > itsData.itsMaxLocals) { itsData.itsMaxLocals = itsLocalTop; } iCodeTop = updateLineNumber(node, iCodeTop); while (child != null) { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); } --itsLocalTop; break; case Token.LOCAL_LOAD : { stackDelta = 1; int localIndex = getLocalBlockRef(node); iCodeTop = addIndexOp(Token.LOCAL_LOAD, localIndex, iCodeTop); stackChange(1); break; } case Token.COMMA : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); while (null != (child = child.getNext())) { if (1 != itsStackDepth - savedStackDepth) Kit.codeBug(); iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; iCodeTop = generateICode(child, iCodeTop); } break; case Token.INIT_LIST : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); while (null != (child = child.getNext())) { if (1 != itsStackDepth - savedStackDepth) Kit.codeBug(); iCodeTop = addIcode(Icode_DUP, iCodeTop); // No stack adjusting: USE_STACK in subtree will do it iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; } break; case Token.USE_STACK: // Indicates that stack was modified externally, // like placed catch object stackDelta = 1; itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.SWITCH : { stackShouldBeZero = true; Node.Jump switchNode = (Node.Jump)node; iCodeTop = updateLineNumber(switchNode, iCodeTop); iCodeTop = generateICode(child, iCodeTop); ObjArray cases = (ObjArray) switchNode.getProp(Node.CASES_PROP); for (int i = 0; i < cases.size(); i++) { Node thisCase = (Node)cases.get(i); Node first = thisCase.getFirstChild(); // the case expression is the firstmost child // the rest will be generated when the case // statements are encountered as siblings of // the switch statement. iCodeTop = generateICode(first, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.SHEQ, iCodeTop); itsStackDepth--; Node.Target target = new Node.Target(); thisCase.addChildAfter(target, first); // If true, Icode_IFEQ_POP will jump and remove case value // from stack iCodeTop = addGoto(target, Icode_IFEQ_POP, iCodeTop); itsStackDepth--; } iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; Node defaultNode = (Node) switchNode.getProp(Node.DEFAULT_PROP); if (defaultNode != null) { Node.Target defaultTarget = new Node.Target(); defaultNode.getFirstChild(). addChildToFront(defaultTarget); iCodeTop = addGoto(defaultTarget, Token.GOTO, iCodeTop); } Node.Target breakTarget = switchNode.target; iCodeTop = addGoto(breakTarget, Token.GOTO, iCodeTop); break; } case Token.TARGET : stackShouldBeZero = true; markTargetLabel((Node.Target)node, iCodeTop); break; case Token.NEW : case Token.CALL : { stackDelta = 1; if (type == Token.NEW) { iCodeTop = generateICode(child, iCodeTop); } else { iCodeTop = generateCallFunAndThis(child, iCodeTop); if (itsStackDepth - savedStackDepth != 2) Kit.codeBug(); } int argCount = 0; while ((child = child.getNext()) != null) { iCodeTop = generateICode(child, iCodeTop); ++argCount; } int callType = node.getIntProp(Node.SPECIALCALL_PROP, Node.NON_SPECIALCALL); if (callType != Node.NON_SPECIALCALL) { // embed line number and source filename iCodeTop = addIndexOp(Icode_CALLSPECIAL, argCount, iCodeTop); iCodeTop = addByte(callType, iCodeTop); iCodeTop = addByte(type == Token.NEW ? 1 : 0, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); } else { iCodeTop = addIndexOp(type, argCount, iCodeTop); } // adjust stack if (type == Token.NEW) { // f, args -> results itsStackDepth -= argCount; } else { // f, thisObj, args -> results itsStackDepth -= (argCount + 1); } if (argCount > itsData.itsMaxCalleeArgs) itsData.itsMaxCalleeArgs = argCount; break; } case Token.IFEQ : case Token.IFNE : iCodeTop = generateICode(child, iCodeTop); itsStackDepth--; // after the conditional GOTO, really // fall thru... case Token.GOTO : { stackShouldBeZero = true; Node.Target target = ((Node.Jump)node).target; iCodeTop = addGoto(target, (byte) type, iCodeTop); break; } case Token.JSR : { stackShouldBeZero = true; Node.Target target = ((Node.Jump)node).target; iCodeTop = addGoto(target, Icode_GOSUB, iCodeTop); break; } case Token.FINALLY : { stackShouldBeZero = true; // Account for incomming exception or GOTOSUB address ++itsStackDepth; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int finallyRegister = getLocalBlockRef(node); iCodeTop = addIndexOp(Token.LOCAL_SAVE, finallyRegister, iCodeTop); itsStackDepth--; while (child != null) { iCodeTop = generateICode(child, iCodeTop); if (itsStackDepth != 0) Kit.codeBug(); child = child.getNext(); } iCodeTop = addIndexOp(Icode_RETSUB, finallyRegister, iCodeTop); break; } case Token.AND : case Token.OR : { stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addIcode(Icode_DUP, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; int afterSecondJumpStart = iCodeTop; int jump = (type == Token.AND) ? Token.IFNE : Token.IFEQ; iCodeTop = addForwardGoto(jump, iCodeTop); itsStackDepth--; iCodeTop = addToken(Token.POP, iCodeTop); itsStackDepth--; child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); resolveForwardGoto(afterSecondJumpStart, iCodeTop); break; } case Token.HOOK : { stackDelta = 1; Node ifThen = child.getNext(); Node ifElse = ifThen.getNext(); iCodeTop = generateICode(child, iCodeTop); int elseJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.IFNE, iCodeTop); itsStackDepth--; iCodeTop = generateICode(ifThen, iCodeTop); int afterElseJumpStart = iCodeTop; iCodeTop = addForwardGoto(Token.GOTO, iCodeTop); resolveForwardGoto(elseJumpStart, iCodeTop); itsStackDepth = savedStackDepth; iCodeTop = generateICode(ifElse, iCodeTop); resolveForwardGoto(afterElseJumpStart, iCodeTop); break; } case Token.GETPROP : stackDelta = 1; iCodeTop = visitGetProp(iCodeTop, node, child, false); break; case Token.GETELEM : stackDelta = 1; iCodeTop = visitGetElem(iCodeTop, node, child, false); break; case Token.DELPROP : case Token.BITAND : case Token.BITOR : case Token.BITXOR : case Token.LSH : case Token.RSH : case Token.URSH : case Token.ADD : case Token.SUB : case Token.MOD : case Token.DIV : case Token.MUL : case Token.EQ: case Token.NE: case Token.SHEQ: case Token.SHNE: case Token.IN : case Token.INSTANCEOF : case Token.LE : case Token.LT : case Token.GE : case Token.GT : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(type, iCodeTop); itsStackDepth--; break; case Token.POS : case Token.NEG : case Token.NOT : case Token.BITNOT : case Token.TYPEOF : case Token.VOID : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); if (type == Token.VOID) { iCodeTop = addToken(Token.POP, iCodeTop); iCodeTop = addToken(Token.UNDEFINED, iCodeTop); } else { iCodeTop = addToken(type, iCodeTop); } break; case Token.SETPROP : case Token.SETPROP_OP : { stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); int special = node.getIntProp(Node.SPECIAL_PROP_PROP, 0); if (special != 0) { if (type == Token.SETPROP_OP) { iCodeTop = addIcode(Icode_DUP, iCodeTop); if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; if (special == Node.SPECIAL_PROP_PROTO) { iCodeTop = addIcode(Icode_GETPROTO, iCodeTop); } else if (special == Node.SPECIAL_PROP_PARENT) { iCodeTop = addIcode(Icode_GETSCOPEPARENT, iCodeTop); } else { throw badTree(node); } // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); if (special == Node.SPECIAL_PROP_PROTO) { iCodeTop = addIcode(Icode_SETPROTO, iCodeTop); } else if (special == Node.SPECIAL_PROP_PARENT) { iCodeTop = addIcode(Icode_SETPARENT, iCodeTop); } else { throw badTree(node); } itsStackDepth--; } else { iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); if (type == Token.SETPROP_OP) { iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETPROP, iCodeTop); itsStackDepth--; // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.SETPROP, iCodeTop); itsStackDepth -= 2; } break; } case Token.SETELEM : case Token.SETELEM_OP : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); if (type == Token.SETELEM_OP) { iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); iCodeTop = addIcode(Icode_DUPSECOND, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETELEM, iCodeTop); itsStackDepth--; // Compensate for the following USE_STACK itsStackDepth--; } iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.SETELEM, iCodeTop); itsStackDepth -= 2; break; case Token.SETNAME : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addStringOp(Token.SETNAME, firstChild.getString(), iCodeTop); itsStackDepth--; break; case Token.TYPEOFNAME : { stackDelta = 1; String name = node.getString(); int index = -1; // use typeofname if an activation frame exists // since the vars all exist there instead of in jregs if (itsInFunctionFlag && !itsData.itsNeedsActivation) index = scriptOrFn.getParamOrVarIndex(name); if (index == -1) { iCodeTop = addStringOp(Icode_TYPEOFNAME, name, iCodeTop); stackChange(1); } else { iCodeTop = addToken(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); stackChange(1); iCodeTop = addToken(Token.TYPEOF, iCodeTop); } break; } case Token.BINDNAME : case Token.NAME : case Token.STRING : stackDelta = 1; iCodeTop = addStringOp(type, node.getString(), iCodeTop); stackChange(1); break; case Token.INC : case Token.DEC : { stackDelta = 1; int childType = child.getType(); switch (childType) { case Token.GETVAR : { String name = child.getString(); if (itsData.itsNeedsActivation) { iCodeTop = addIcode(Icode_SCOPE, iCodeTop); iCodeTop = addStringOp(Token.STRING, name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addIcode(type == Token.INC ? Icode_PROPINC : Icode_PROPDEC, iCodeTop); itsStackDepth--; } else { int i = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addIcode(type == Token.INC ? Icode_VARINC : Icode_VARDEC, iCodeTop); iCodeTop = addByte(i, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.GETPROP : case Token.GETELEM : { Node getPropChild = child.getFirstChild(); iCodeTop = generateICode(getPropChild, iCodeTop); getPropChild = getPropChild.getNext(); iCodeTop = generateICode(getPropChild, iCodeTop); int icode; if (childType == Token.GETPROP) { icode = (type == Token.INC) ? Icode_PROPINC : Icode_PROPDEC; } else { icode = (type == Token.INC) ? Icode_ELEMINC : Icode_ELEMDEC; } iCodeTop = addIcode(icode, iCodeTop); itsStackDepth--; break; } default : { iCodeTop = addStringOp(type == Token.INC ? Icode_NAMEINC : Icode_NAMEDEC, child.getString(), iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; } } break; } case Token.NUMBER : { stackDelta = 1; double num = node.getDouble(); int inum = (int)num; if (inum == num) { if (inum == 0) { iCodeTop = addToken(Token.ZERO, iCodeTop); // Check for negative zero if (1.0 / num < 0.0) { iCodeTop = addToken(Token.NEG, iCodeTop); } } else if (inum == 1) { iCodeTop = addToken(Token.ONE, iCodeTop); } else if ((short)inum == inum) { iCodeTop = addIcode(Icode_SHORTNUMBER, iCodeTop); iCodeTop = addShort(inum, iCodeTop); } else { iCodeTop = addIcode(Icode_INTNUMBER, iCodeTop); iCodeTop = addInt(inum, iCodeTop); } } else { int index = getDoubleIndex(num); iCodeTop = addIndexOp(Token.NUMBER, index, iCodeTop); } stackChange(1); break; } case Token.POPV : stackShouldBeZero = true; // fallthrough case Token.POP : iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(type, iCodeTop); itsStackDepth--; break; case Token.ENTERWITH : stackShouldBeZero = true; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.ENTERWITH, iCodeTop); itsStackDepth--; break; case Token.CATCH_SCOPE : stackDelta = 1; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addStringOp(Token.CATCH_SCOPE, node.getString(), iCodeTop); break; case Token.LEAVEWITH : stackShouldBeZero = true; iCodeTop = addToken(Token.LEAVEWITH, iCodeTop); break; case Token.TRY : { stackShouldBeZero = true; Node.Jump tryNode = (Node.Jump)node; int exceptionObjectLocal = getLocalBlockRef(tryNode); Node catchTarget = tryNode.target; Node finallyTarget = tryNode.getFinally(); int tryStart = iCodeTop; int tryEnd = -1; int catchStart = -1; int finallyStart = -1; while (child != null) { boolean generated = false; if (child == catchTarget) { if (tryEnd >= 0) Kit.codeBug(); tryEnd = iCodeTop; catchStart = iCodeTop; markTargetLabel((Node.Target)child, iCodeTop); generated = true; } else if (child == finallyTarget) { if (tryEnd < 0) { tryEnd = iCodeTop; } finallyStart = iCodeTop; markTargetLabel((Node.Target)child, iCodeTop); generated = true; } if (!generated) { iCodeTop = generateICode(child, iCodeTop); } child = child.getNext(); } // [tryStart, tryEnd) contains GOSUB to call finally when it // presents at the end of try code and before return, break // continue that transfer control outside try. // After finally is executed the control will be // transfered back into [tryStart, tryEnd) and exception // handling assumes that the only code executed after // finally returns will be a jump outside try which could not // trigger exceptions. // It does not hold if instruction observer throws during // goto. Currently it may lead to double execution of finally. addExceptionHandler(tryStart, tryEnd, catchStart, finallyStart, itsWithDepth, exceptionObjectLocal); break; } case Token.THROW : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.THROW, iCodeTop); iCodeTop = addShort(itsLineNumber, iCodeTop); itsStackDepth--; break; case Token.RETURN : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); if (child != null) { iCodeTop = generateICode(child, iCodeTop); iCodeTop = addToken(Token.RETURN, iCodeTop); itsStackDepth--; } else { iCodeTop = addIcode(Icode_RETUNDEF, iCodeTop); } break; case Token.RETURN_POPV : stackShouldBeZero = true; iCodeTop = updateLineNumber(node, iCodeTop); iCodeTop = addToken(Token.RETURN_POPV, iCodeTop); break; case Token.GETVAR : { stackDelta = 1; String name = node.getString(); if (itsData.itsNeedsActivation) { // SETVAR handled this by turning into a SETPROP, but // we can't do that to a GETVAR without manufacturing // bogus children. Instead we use a special op to // push the current scope. iCodeTop = addIcode(Icode_SCOPE, iCodeTop); iCodeTop = addStringOp(Token.STRING, name, iCodeTop); itsStackDepth += 2; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; iCodeTop = addToken(Token.GETPROP, iCodeTop); itsStackDepth--; } else { int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addToken(Token.GETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; } break; } case Token.SETVAR : { stackDelta = 1; if (itsData.itsNeedsActivation) { child.setType(Token.BINDNAME); node.setType(Token.SETNAME); iCodeTop = generateICode(node, iCodeTop); } else { String name = child.getString(); child = child.getNext(); iCodeTop = generateICode(child, iCodeTop); int index = scriptOrFn.getParamOrVarIndex(name); iCodeTop = addToken(Token.SETVAR, iCodeTop); iCodeTop = addByte(index, iCodeTop); } break; } case Token.NULL: case Token.THIS: case Token.THISFN: case Token.FALSE: case Token.TRUE: case Token.UNDEFINED: stackDelta = 1; iCodeTop = addToken(type, iCodeTop); itsStackDepth++; if (itsStackDepth > itsData.itsMaxStack) itsData.itsMaxStack = itsStackDepth; break; case Token.ENUM_INIT : stackShouldBeZero = true; iCodeTop = generateICode(child, iCodeTop); iCodeTop = addIndexOp(Token.ENUM_INIT, getLocalBlockRef(node), iCodeTop); stackChange(-1); break; case Token.ENUM_NEXT : case Token.ENUM_ID : stackDelta = 1; iCodeTop = addIndexOp(type, getLocalBlockRef(node), iCodeTop); stackChange(1); break; case Token.REGEXP : { stackDelta = 1; int index = node.getExistingIntProp(Node.REGEXP_PROP); iCodeTop = addIndexOp(Token.REGEXP, index, iCodeTop); stackChange(1); break; } case Token.ARRAYLIT: case Token.OBJECTLIT: stackDelta = 1; iCodeTop = visitLiteral(iCodeTop, node, child); break; default : throw badTree(node); } if (stackDelta != itsStackDepth - savedStackDepth) { //System.out.println("Bad stack delta: type="+Token.name(type)+" expected="+stackDelta+" real="+ (itsStackDepth - savedStackDepth)); Kit.codeBug(); } if (stackShouldBeZero && !(stackDelta == 0 && itsStackDepth == 0)) { Kit.codeBug(); } return iCodeTop; } | 51275 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51275/bf289c63543f0cc34416017db6f071919cda9b64/Interpreter.java/clean/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
509,
2103,
45,
1085,
12,
907,
756,
16,
509,
277,
1085,
3401,
13,
565,
288,
3639,
509,
618,
273,
756,
18,
588,
559,
5621,
3639,
2029,
1151,
273,
756,
18,
588,
3759,
1763,
5621,
3... |
NativeArray h = global.history; h.put((int)h.getLength(), h, source); | public static void processSource(Context cx, String filename) { if (filename == null || filename.equals("-")) { if (filename == null) { // print implementation version getOut().println(cx.getImplementationVersion()); } // Use the interpreter for interactive input cx.setOptimizationLevel(-1); BufferedReader in = new BufferedReader (new InputStreamReader(global.getIn())); int lineno = 1; boolean hitEOF = false; while (!hitEOF) { int startline = lineno; if (filename == null) global.getErr().print("js> "); global.getErr().flush(); String source = ""; // Collect lines of source to compile. while (true) { String newline; try { newline = in.readLine(); } catch (IOException ioe) { global.getErr().println(ioe.toString()); break; } if (newline == null) { hitEOF = true; break; } source = source + newline + "\n"; lineno++; if (cx.stringIsCompilableUnit(source)) break; } Object result = evaluateScript(cx, global, null, source, "<stdin>", startline, null); if (result != cx.getUndefinedValue()) { try { global.getErr().println(cx.toString(result)); } catch (RhinoException rex) { errorReporter.reportException(rex); } } NativeArray h = global.history; h.put((int)h.getLength(), h, source); } global.getErr().println(); } else { processFile(cx, global, filename); } System.gc(); } | 11366 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11366/12199852d5fcaa82430cdfb4712a2f716538c607/Main.java/buggy/js/rhino/toolsrc/org/mozilla/javascript/tools/shell/Main.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1207,
1830,
12,
1042,
9494,
16,
514,
1544,
13,
565,
288,
3639,
309,
261,
3459,
422,
446,
747,
1544,
18,
14963,
2932,
10951,
3719,
288,
5411,
309,
261,
3459,
422,
446,
13... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
760,
918,
1207,
1830,
12,
1042,
9494,
16,
514,
1544,
13,
565,
288,
3639,
309,
261,
3459,
422,
446,
747,
1544,
18,
14963,
2932,
10951,
3719,
288,
5411,
309,
261,
3459,
422,
446,
13... | |
private AnAction processGroupElement(Element element, final ClassLoader loader, PluginId pluginId) { final Application app = ApplicationManager.getApplication(); final IdeaPluginDescriptor plugin = app.getPlugin(pluginId); @NonNls final String resBundleName = plugin != null ? plugin.getResourceBundleBaseName() : ACTIONS_BUNDLE; ResourceBundle bundle = null; if (resBundleName != null) { bundle = ResourceBundle.getBundle(resBundleName, Locale.getDefault(), loader); } if (LOG.isDebugEnabled()) { LOG.debug("enter: processGroupElement(" + element.getName() + ")"); } if (!GROUP_ELEMENT_NAME.equals(element.getName())) { LOG.error("unexpected name of element \"" + element.getName() + "\""); return null; } String className = element.getAttributeValue(CLASS_ATTR_NAME); if (className == null) { // use default group if class isn't specified className = DefaultActionGroup.class.getName(); } try { Class aClass = Class.forName(className, true, loader); Object obj = new ConstructorInjectionComponentAdapter(className, aClass).getComponentInstance(ApplicationManager.getApplication().getPicoContainer()); if (!(obj instanceof ActionGroup)) { LOG.error("class with name \"" + className + "\" should be instance of " + ActionGroup.class.getName()); return null; } if (element.getChildren().size() != element.getChildren(ADD_TO_GROUP_ELEMENT_NAME).size() ) { // if (!(obj instanceof DefaultActionGroup)) { LOG.error("class with name \"" + className + "\" should be instance of " + DefaultActionGroup.class.getName() + " because there are children specified"); return null; } } ActionGroup group = (ActionGroup)obj; // read ID and register loaded group String id = element.getAttributeValue(ID_ATTR_NAME); if (id != null && id.length() == 0) { LOG.error("ID of the group cannot be an empty string"); return null; } if (Boolean.valueOf(element.getAttributeValue(INTERNAL_ATTR_NAME)).booleanValue() && !ApplicationManagerEx.getApplicationEx().isInternal()) { myNotRegisteredInternalActionIds.add(id); return null; } if (id != null) { registerAction(id, group); } // text Presentation presentation = group.getTemplatePresentation(); String text = loadTextForElement(element, bundle, id, GROUP_ELEMENT_NAME); presentation.setText(text); // description String description = loadDescriptionForElement(element, bundle, id, GROUP_ELEMENT_NAME); presentation.setDescription(description); // icon setIcon(element.getAttributeValue(ICON_ATTR_NAME), className, loader, presentation); // popup String popup = element.getAttributeValue(POPAP_ATTR_NAME); if (popup != null) { group.setPopup(Boolean.valueOf(popup).booleanValue()); } // process all group's children. There are other groups, actions, references and links for (final Object o : element.getChildren()) { Element child = (Element)o; String name = child.getName(); if (ACTION_ELEMENT_NAME.equals(name)) { AnAction action = processActionElement(child, loader, pluginId); if (action != null) { assertActionIsGroupOrStub(action); ((DefaultActionGroup)group).add(action, this); } } else if (SEPARATOR_ELEMENT_NAME.equals(name)) { processSeparatorNode((DefaultActionGroup)group, child); } else if (GROUP_ELEMENT_NAME.equals(name)) { AnAction action = processGroupElement(child, loader, pluginId); if (action != null) { ((DefaultActionGroup)group).add(action, this); } } else if (ADD_TO_GROUP_ELEMENT_NAME.equals(name)) { processAddToGroupNode(group, child); } else if (REFERENCE_ELEMENT_NAME.equals(name)) { AnAction action = processReferenceElement(child); if (action != null) { ((DefaultActionGroup)group).add(action, this); } } else { LOG.error("unexpected name of element \"" + name + "\n"); return null; } } return group; } catch (ClassNotFoundException e) { LOG.error("class with name \"" + className + "\" not found"); return null; } catch (Exception e) { LOG.error("cannot create class \"" + className + "\"", e); return null; } } | 17306 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/17306/4972de74093751aa507c641e7a852c8feb15d5e3/ActionManagerImpl.java/clean/action-system/impl/com/intellij/openapi/actionSystem/impl/ActionManagerImpl.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
979,
1803,
2567,
1114,
1046,
12,
1046,
2956,
16,
6385,
7805,
6714,
16,
3773,
548,
4094,
548,
15329,
6385,
3208,
2910,
33,
3208,
1318,
18,
588,
3208,
5621,
6385,
45,
323,
69,
3773,
3187,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
3238,
979,
1803,
2567,
1114,
1046,
12,
1046,
2956,
16,
6385,
7805,
6714,
16,
3773,
548,
4094,
548,
15329,
6385,
3208,
2910,
33,
3208,
1318,
18,
588,
3208,
5621,
6385,
45,
323,
69,
3773,
3187,
... | ||
return s39; | return s43; | public DFA.State transition(IntStream input) throws RecognitionException { switch ( input.LA(1) ) { case 23: return s30; case 22: return s39; case EOL: case 15: return s63; case ID: return s67; default: NoViableAltException nvae = new NoViableAltException("", 4, 63, input); throw nvae; } } | 31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/31d63bcc9d3d8766c62d2c237554a38462a57456/RuleParser.java/clean/drools-compiler/src/main/java/org/drools/lang/RuleParser.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
10213,
30,
10792,
327,
272,
5082,
31,
7734,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
2398,
1071,
463,
2046,
18,
1119,
6007,
12,
1702,
1228,
810,
13,
1216,
9539,
288,
7734,
1620,
261,
810,
18,
2534,
12,
21,
13,
262,
288,
7734,
648,
10213,
30,
10792,
327,
272,
5082,
31,
7734,
... |
applyBuildingDamage(); | private void endCurrentPhase() { switch (game.getPhase()) { case Game.PHASE_LOUNGE : changePhase(Game.PHASE_EXCHANGE); break; case Game.PHASE_EXCHANGE : changePhase(Game.PHASE_SET_ARTYAUTOHITHEXES); break; case Game.PHASE_STARTING_SCENARIO : changePhase(Game.PHASE_SET_ARTYAUTOHITHEXES); break; case Game.PHASE_SET_ARTYAUTOHITHEXES : Enumeration e = game.getPlayers(); boolean mines = false; while (e.hasMoreElements()) { Player p = (Player) e.nextElement(); if (p.hasMinefields()) { mines = true; } } if (mines) { changePhase(Game.PHASE_DEPLOY_MINEFIELDS); } else { changePhase(Game.PHASE_INITIATIVE); } break; case Game.PHASE_DEPLOY_MINEFIELDS : changePhase(Game.PHASE_INITIATIVE); break; case Game.PHASE_DEPLOYMENT : game.clearDeploymentThisRound(); game.checkForCompleteDeployment(); changePhase(Game.PHASE_INITIATIVE); break; case Game.PHASE_INITIATIVE : boolean doDeploy = game.shouldDeployThisRound() && (game.getLastPhase() != Game.PHASE_DEPLOYMENT); if ( doDeploy ) { changePhase(Game.PHASE_DEPLOYMENT); } else { changePhase(Game.PHASE_TARGETING); } break; case Game.PHASE_MOVEMENT : addMovementHeat(); checkFor20Damage(); resolveCrewDamage(); resolvePilotingRolls(); // Skids cause damage in movement phase resolveCrewDamage(); // again, I guess checkForFlamingDeath(); applyBuildingDamage(); // check phase report if (phaseReport.length() > 0) { roundReport.append(phaseReport.toString()); changePhase(Game.PHASE_MOVEMENT_REPORT); } else { roundReport.append("<nothing>\n"); changePhase(Game.PHASE_OFFBOARD); } break; case Game.PHASE_MOVEMENT_REPORT : changePhase(Game.PHASE_OFFBOARD); break; case Game.PHASE_FIRING : resolveAllButWeaponAttacks(); assignAMS(); resolveOnlyWeaponAttacks(); checkFor20Damage(); resolveCrewDamage(); resolvePilotingRolls(); resolveCrewDamage(); // again, I guess applyBuildingDamage(); // check phase report if (phaseReport.length() > 0) { roundReport.append(phaseReport.toString()); changePhase(Game.PHASE_FIRING_REPORT); } else { roundReport.append("<nothing>\n"); changePhase(Game.PHASE_PHYSICAL); } break; case Game.PHASE_FIRING_REPORT : changePhase(Game.PHASE_PHYSICAL); break; case Game.PHASE_PHYSICAL : resolvePhysicalAttacks(); checkFor20Damage(); resolveCrewDamage(); resolvePilotingRolls(); resolveCrewDamage(); // again, I guess resolveSinkVees(); applyBuildingDamage(); // check phase report if (phaseReport.length() > 0) { roundReport.append(phaseReport.toString()); } else { roundReport.append("<nothing>\n"); } changePhase(Game.PHASE_END); break; case Game.PHASE_TARGETING : enqueueIndirectArtilleryAttacks(); changePhase(Game.PHASE_MOVEMENT); break; case Game.PHASE_OFFBOARD : roundReport.append("\nOffboard Attack Phase\n-----------------\n"); resolveIndirectArtilleryAttacks(); checkFor20Damage(); resolveCrewDamage(); resolvePilotingRolls(); resolveCrewDamage(); // again, I guess applyBuildingDamage(); if (phaseReport.length() > 0) { roundReport.append(phaseReport.toString()); changePhase(Game.PHASE_OFFBOARD_REPORT); } else { roundReport.append("<nothing>\n"); changePhase(Game.PHASE_FIRING); } break; case Game.PHASE_OFFBOARD_REPORT: changePhase(Game.PHASE_FIRING); break; case Game.PHASE_END : if (victory()) { changePhase(Game.PHASE_VICTORY); } else { changePhase(Game.PHASE_INITIATIVE); } break; case Game.PHASE_VICTORY : resetGame(); break; } } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/71c2d3a74bad0db9b4aeb419b8c16c88b6e96c3f/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
679,
3935,
11406,
1435,
288,
3639,
1620,
261,
13957,
18,
588,
11406,
10756,
288,
5411,
648,
14121,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
2549,
11406,
12,
12496,
18,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
679,
3935,
11406,
1435,
288,
3639,
1620,
261,
13957,
18,
588,
11406,
10756,
288,
5411,
648,
14121,
18,
8939,
4429,
67,
1502,
2124,
7113,
294,
7734,
2549,
11406,
12,
12496,
18,
... | |
if (nameName.equals(name)) | if (nameName.equalsIgnoreCase(name)) | public int getNameIndex(String name) { int retval = -1; for (int k = 0; k < names.size(); k++) { String nameName = getNameName(k); if (nameName.equals(name)) { retval = k; break; } } return retval; } | 509 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/509/2ece1574eb34bcb764a4dba87c174b9891cd4f6f/HSSFWorkbook.java/clean/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1723,
1016,
12,
780,
508,
13,
565,
288,
3639,
509,
5221,
273,
300,
21,
31,
3639,
364,
261,
474,
417,
273,
374,
31,
417,
411,
1257,
18,
1467,
5621,
417,
27245,
3639,
288,
54... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
509,
1723,
1016,
12,
780,
508,
13,
565,
288,
3639,
509,
5221,
273,
300,
21,
31,
3639,
364,
261,
474,
417,
273,
374,
31,
417,
411,
1257,
18,
1467,
5621,
417,
27245,
3639,
288,
54... |
public void testUpgradeRevision3952ToCurrent() throws Exception { if (!isDBTestEnabled()) { return; } String newCreate = m_installer.m_create_sql; URL sql = getClass().getResource("/create.sql-revision-3952"); assertNotNull("Could not find create.sql", sql); m_installer.m_create_sql = sql.getFile(); // First pass. m_installer.createSequences(); m_installer.createTables(); m_installer.m_create_sql = newCreate; // Second pass. m_installer.createSequences(); m_installer.createTables(); } | 25465 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/25465/28ec8d0f53c305460681fe922d064c060141774d/InstallerDBTest.java/buggy/opennms-install/src/test/java/org/opennms/install/InstallerDBTest.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10784,
7939,
5520,
9401,
774,
3935,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
7734,
514,
394,
1684,
273,
312,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1842,
10784,
7939,
5520,
9401,
774,
3935,
1435,
1216,
1185,
288,
3639,
309,
16051,
291,
2290,
4709,
1526,
10756,
288,
5411,
327,
31,
3639,
289,
7734,
514,
394,
1684,
273,
312,
... | ||
public void loadPage(String url_text) throws Exception { logger.info("Loading Page: " + url_text); current_url = url_text; DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance(); fact.setValidating(true); DocumentBuilder builder = fact.newDocumentBuilder(); builder.setErrorHandler(root.error_handler);/* new ErrorHandler() { public void warning(SAXParseException ex) throws SAXException { logger.info("warning: " + ex); } public void error(SAXParseException ex) throws SAXException { logger.info("error: " + ex); logger.info("error on line: " + ex.getLineNumber() + " column: " + ex.getColumnNumber()); setStatus("Error Loading Document"); } public void fatalError(SAXParseException ex) throws SAXException { logger.info("fatal error: " + ex); logger.info("error on line: " + ex.getLineNumber() + " column: " + ex.getColumnNumber()); setStatus("Error Loading Document"); } }); */ Document doc = null; URL ref = null; if(url_text.startsWith("demo:")) { DemoMarker marker = new DemoMarker(); String short_url = url_text.substring(5); if(!short_url.startsWith("/")) { short_url = "/" + short_url; } doc = builder.parse(marker.getClass().getResourceAsStream(short_url)); ref = marker.getClass().getResource(short_url); } else if(url_text.startsWith("http")) { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } else if(url_text.startsWith("file: File file = new File(new URI(url_text)); if(file.isDirectory()) { doc = new DirectoryLister().list(file); ref = file.toURL(); } else { doc = builder.parse(file); ref = file.toURL(); } } else { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } loadPage(doc,ref); setStatus("Successfully loaded: " + url_text); if ( listener != null ) { listener.pageLoadSuccess(url_text, view.getDocumentTitle()); } | public void loadPage(Document doc, URL url) throws Exception { view.setDocument(doc,url); view.addDocumentListener(this); root.history.goNewDocument(doc); updateButtons(); | public void loadPage(String url_text) throws Exception { logger.info("Loading Page: " + url_text); current_url = url_text; DocumentBuilderFactory fact = DocumentBuilderFactory.newInstance(); fact.setValidating(true); DocumentBuilder builder = fact.newDocumentBuilder(); builder.setErrorHandler(root.error_handler);/* new ErrorHandler() { public void warning(SAXParseException ex) throws SAXException { logger.info("warning: " + ex); } public void error(SAXParseException ex) throws SAXException { logger.info("error: " + ex); logger.info("error on line: " + ex.getLineNumber() + " column: " + ex.getColumnNumber()); setStatus("Error Loading Document"); } public void fatalError(SAXParseException ex) throws SAXException { logger.info("fatal error: " + ex); logger.info("error on line: " + ex.getLineNumber() + " column: " + ex.getColumnNumber()); setStatus("Error Loading Document"); } }); */ Document doc = null; URL ref = null; if(url_text.startsWith("demo:")) { DemoMarker marker = new DemoMarker(); //u.p("marker = " + marker); String short_url = url_text.substring(5); //u.p("sub = " + short_url); if(!short_url.startsWith("/")) { short_url = "/" + short_url; } doc = builder.parse(marker.getClass().getResourceAsStream(short_url)); ref = marker.getClass().getResource(short_url); } else if(url_text.startsWith("http")) { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } else if(url_text.startsWith("file://")) { File file = new File(new URI(url_text)); if(file.isDirectory()) { doc = new DirectoryLister().list(file); ref = file.toURL(); } else { doc = builder.parse(file); ref = file.toURL(); } } else { doc = builder.parse(url_text); ref = new File(url_text).toURL(); } loadPage(doc,ref); setStatus("Successfully loaded: " + url_text); if ( listener != null ) { listener.pageLoadSuccess(url_text, view.getDocumentTitle()); } } | 57883 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57883/26f5d912c90d7e3336b7d1b0aa076c1e30cf293e/BrowserPanel.java/buggy/src/java/org/joshy/html/app/browser/BrowserPanel.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
1964,
12,
780,
880,
67,
955,
13,
1216,
1185,
288,
3639,
1194,
18,
1376,
2932,
10515,
3460,
30,
315,
397,
880,
67,
955,
1769,
3639,
783,
67,
718,
273,
880,
67,
955,
31... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
1262,
1964,
12,
780,
880,
67,
955,
13,
1216,
1185,
288,
3639,
1194,
18,
1376,
2932,
10515,
3460,
30,
315,
397,
880,
67,
955,
1769,
3639,
783,
67,
718,
273,
880,
67,
955,
31... |
protected void addPages() { try { MenuManager manager = new MenuManager(); IMenuListener listener = new IMenuListener() { public void menuAboutToShow(IMenuManager manager) { contextMenuAboutToShow(manager); } }; manager.setRemoveAllWhenShown(true); manager.addMenuListener(listener); contextMenu = manager.createContextMenu(getContainer()); getContainer().setMenu(contextMenu); int index = -1; if (getEditorInput() instanceof TaskEditorInput) { addPage(taskPlanningEditor); index++; taskEditorInput = (TaskEditorInput) getEditorInput(); task = taskEditorInput.getTask(); setPartName(taskEditorInput.getLabel()); } int selectedIndex = index; for (ITaskEditorFactory factory : TasksUiPlugin.getDefault().getTaskEditorFactories()) { if ((task != null && factory.canCreateEditorFor(task)) || factory.canCreateEditorFor(getEditorInput())) { try { IEditorPart editor = factory.createEditor(this); IEditorInput input = task != null ? factory.createEditorInput(task) : getEditorInput(); if (editor != null && input != null) { if (editor instanceof AbstractRepositoryTaskEditor) { TaskFormPage repositoryTaskEditor = (TaskFormPage) editor; // repositoryTaskEditor.setParentEditor(this); editor.init(getEditorSite(), input); repositoryTaskEditor.createPartControl(getContainer()); index = addPage(repositoryTaskEditor); if(getEditorInput() instanceof ExistingBugEditorInput) { ExistingBugEditorInput existingInput = (ExistingBugEditorInput)getEditorInput(); setPartName(existingInput.getId()+": "+existingInput.getName()); } } else { index = addPage(editor, input); } selectedIndex = index; setPageText(index++, factory.getTitle()); } // HACK: overwrites if multiple present if (factory.providesOutline()) { contentOutlineProvider = editor; } } catch (Exception e) { MylarStatusHandler.fail(e, "Could not create editor via factory: " + factory, true); } } } String urlToOpen = getUrl(); if (urlToOpen != null && !urlToOpen.equals("")) { browserPageIndex = createBrowserPage(urlToOpen); if (selectedIndex == 0 && taskEditorInput != null && !taskEditorInput.isNewTask()) { selectedIndex = browserPageIndex; } } if (selectedIndex != -1) { setActivePage(selectedIndex); } if (task instanceof AbstractRepositoryTask) { setTitleImage(TaskListImages.getImage(TaskListImages.TASK_REPOSITORY)); } else if(getEditorInput() instanceof AbstractBugEditorInput) { this.setTitleImage(TaskListImages.getImage(TaskListImages.TASK_REMOTE)); } else if (getUrl() != null) { setTitleImage(TaskListImages.getImage(TaskListImages.TASK_WEB)); } } catch (PartInitException e) { MylarStatusHandler.fail(e, "failed to create task editor pages", false); } } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/f8c6bd688afb67785eb13bd8202c8bde35912ccb/MylarTaskEditor.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/editors/MylarTaskEditor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
5716,
1435,
288,
202,
202,
698,
288,
1082,
202,
4599,
1318,
3301,
273,
394,
9809,
1318,
5621,
1082,
202,
3445,
2104,
2223,
2991,
273,
394,
467,
4599,
2223,
1435,
288,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
527,
5716,
1435,
288,
202,
202,
698,
288,
1082,
202,
4599,
1318,
3301,
273,
394,
9809,
1318,
5621,
1082,
202,
3445,
2104,
2223,
2991,
273,
394,
467,
4599,
2223,
1435,
288,... | ||
errors.inc(new Integer(e.mode), ((SingleFileFetcher)state).getRetryCount()); | errors.inc(new Integer(e.mode), state == null ? 1 : ((SingleFileFetcher)state).getRetryCount()); | public synchronized void onFailure(FetchException e, ClientGetState state) { Integer token = (Integer) ((SingleFileFetcher)state).getToken(); int blockNo = token.intValue(); if(blockNo < dataBlocks.length) { if(dataBlocks[blockNo] == null) { Logger.error(this, "Block already finished: "+blockNo); return; } dataBlocks[blockNo] = null; } else if(blockNo < checkBlocks.length) { if(checkBlocks[blockNo-dataBlocks.length] == null) { Logger.error(this, "Block already finished: "+blockNo); return; } checkBlocks[blockNo-dataBlocks.length] = null; } else Logger.error(this, "Unrecognized block number: "+blockNo, new Exception("error")); // :( Logger.minor(this, "Permanently failed: "+state+" on "+this); if(e.isFatal()) fatallyFailedBlocks++; else failedBlocks++; // FIXME this may not be accurate across all the retries? if(e.errorCodes != null) errors.merge(e.errorCodes); else errors.inc(new Integer(e.mode), ((SingleFileFetcher)state).getRetryCount()); if(failedBlocks + fatallyFailedBlocks > (dataBlocks.length + checkBlocks.length - minFetched)) { fail(new FetchException(FetchException.SPLITFILE_ERROR, errors)); } } | 49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/f1e1ccfc4cacd0065808ad5458fabedc486f2ca2/SplitFileFetcherSegment.java/clean/src/freenet/client/async/SplitFileFetcherSegment.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
27748,
12,
5005,
503,
425,
16,
2445,
967,
1119,
919,
13,
288,
202,
202,
4522,
1147,
273,
261,
4522,
13,
14015,
5281,
812,
16855,
13,
2019,
2934,
588,
1345,
5621,
20... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
3852,
918,
27748,
12,
5005,
503,
425,
16,
2445,
967,
1119,
919,
13,
288,
202,
202,
4522,
1147,
273,
261,
4522,
13,
14015,
5281,
812,
16855,
13,
2019,
2934,
588,
1345,
5621,
20... |
public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final Stylesheet stylesheet = classGen.getStylesheet(); final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); // Push a new parameter frame if (stylesheet.hasLocalParams() || hasContents()) { il.append(classGen.loadTranslet()); // push param frame il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS, PUSH_PARAM_FRAME, PUSH_PARAM_FRAME_SIG) )); // translate with-params translateContents(classGen, methodGen); } final String className = stylesheet.getClassName(); // Generate a valid Java method name String methodName = _name.toString(); methodName = methodName.replace('.', '$'); methodName = methodName.replace('-', '$'); il.append(classGen.loadTranslet()); il.append(methodGen.loadDOM()); il.append(methodGen.loadIterator()); il.append(methodGen.loadHandler()); il.append(methodGen.loadCurrentNode()); il.append(new INVOKEVIRTUAL(cpg.addMethodref(className, methodName, "(" + DOM_INTF_SIG + NODE_ITERATOR_SIG + TRANSLET_OUTPUT_SIG + NODE_SIG +")V"))); // Pop parameter frame if (stylesheet.hasLocalParams() || hasContents()) { il.append(classGen.loadTranslet()); // pop param frame il.append(new INVOKEVIRTUAL(cpg.addMethodref(TRANSLET_CLASS, POP_PARAM_FRAME, POP_PARAM_FRAME_SIG) )); } } | 46591 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46591/e3296098c50df9e4a5c3e7109a406fe731973984/CallTemplate.java/clean/src/org/apache/xalan/xsltc/compiler/CallTemplate.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4204,
12,
797,
3908,
667,
7642,
16,
2985,
3908,
707,
7642,
13,
288,
202,
6385,
29483,
2963,
13820,
273,
667,
7642,
18,
588,
24656,
5621,
202,
6385,
10551,
2864,
7642,
3283,
75,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
918,
4204,
12,
797,
3908,
667,
7642,
16,
2985,
3908,
707,
7642,
13,
288,
202,
6385,
29483,
2963,
13820,
273,
667,
7642,
18,
588,
24656,
5621,
202,
6385,
10551,
2864,
7642,
3283,
75,... | ||
Float loadValue = SystemCollections.getLoadInfo().getLoadScoreValue(loadScore); String formula = SystemCollections.getLoadInfo().getLoadModifierFormula(); if (formula.length() != 0) { formula = CoreUtility.replaceAll(formula, "$$SCORE$$", new Float(loadValue.doubleValue() * getLoadMultForSize(aPC)).toString()); return new Float(aPC.getVariableValue(formula, "").intValue()); } return new Float(loadValue.doubleValue() * getLoadMultForSize(aPC)); | return maxLoadForLoadScore(loadScore, aPC, new Float(1.0)); | public static Float maxLoadForLoadScore(final int loadScore, final PlayerCharacter aPC) { Float loadValue = SystemCollections.getLoadInfo().getLoadScoreValue(loadScore); String formula = SystemCollections.getLoadInfo().getLoadModifierFormula(); if (formula.length() != 0) { formula = CoreUtility.replaceAll(formula, "$$SCORE$$", new Float(loadValue.doubleValue() * getLoadMultForSize(aPC)).toString()); return new Float(aPC.getVariableValue(formula, "").intValue()); } return new Float(loadValue.doubleValue() * getLoadMultForSize(aPC)); } | 48301 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48301/746f9fbe7d3bb98c609b2f38fbc5ffad4e685726/Globals.java/clean/code/src/java/pcgen/core/Globals.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
5450,
943,
2563,
1290,
2563,
7295,
12,
6385,
509,
1262,
7295,
16,
727,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
4723,
1262,
620,
273,
2332,
15150,
18,
588,
2563,
96... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
760,
5450,
943,
2563,
1290,
2563,
7295,
12,
6385,
509,
1262,
7295,
16,
727,
19185,
7069,
279,
3513,
13,
202,
95,
202,
202,
4723,
1262,
620,
273,
2332,
15150,
18,
588,
2563,
96... |
public int seek(int n, int whence) throws IOException { switch(whence) { case SEEK_SET: break; case SEEK_CUR: n += data.pos(); break; case SEEK_END: n += data.length(); break; default: return -1; | public int seek(int n, int whence) throws ErrnoException { try { switch(whence) { case SEEK_SET: break; case SEEK_CUR: n += data.pos(); break; case SEEK_END: n += data.length(); break; default: return -1; } data.seek(n); return n; } catch(IOException e) { throw new ErrnoException(ESPIPE); | public int seek(int n, int whence) throws IOException { switch(whence) { case SEEK_SET: break; case SEEK_CUR: n += data.pos(); break; case SEEK_END: n += data.length(); break; default: return -1; } data.seek(n); return n; } | 34858 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/34858/98f786ce8ee1fcd9568d1c367160851d32e1c786/Runtime.java/buggy/src/org/ibex/nestedvm/Runtime.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
6520,
12,
474,
290,
16,
509,
23692,
13,
1216,
1860,
288,
5411,
1620,
12,
3350,
802,
13,
288,
7734,
648,
19201,
67,
4043,
30,
898,
31,
7734,
648,
19201,
67,
7509,
30,
290,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
540,
1071,
509,
6520,
12,
474,
290,
16,
509,
23692,
13,
1216,
1860,
288,
5411,
1620,
12,
3350,
802,
13,
288,
7734,
648,
19201,
67,
4043,
30,
898,
31,
7734,
648,
19201,
67,
7509,
30,
290,
1... |
handleMessage(ms.getMessage(), ms.getSeverity(), provider); | handleMessage(ms.fMessage, ms.fSeverity, ms.fShowField, provider); | private static boolean imageEntryInternalValidate(IEditorValidationProvider provider, IProduct product, ValidationInfo info, int validationType) { if (containsEmptyField(provider)) return true; ImageData[] idata = getImageData(provider, product); if (idata == null) return false; ValidationMessage ms = null; switch(validationType) { case F_MAX_IMAGE_SIZE: ms = getMS_maxImageSize(idata[0], info.maxWidth, info.maxHeight, info.warningWidth, info.warningHeight); break; case F_ICO_IMAGE: ms = getMS_icoImage(idata); break; case F_IMAGE_DEPTH: // do not break after F_IMAGEDEPTH since we are also checking exact size ms = getMS_imageDepth(idata[0], info.requiredDepth); case F_EXACT_IMAGE_SIZE: if (ms == null) ms = getMS_exactImageSize(idata[0], info.maxWidth, info.maxHeight); break; } if (ms != null) handleMessage(ms.getMessage(), ms.getSeverity(), provider); return ms == null; } | 14404 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/14404/fb8c4ef1d26d1835feb42f13714640021ce078d5/EditorUtilities.java/clean/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/EditorUtilities.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
1250,
1316,
1622,
3061,
4270,
12,
45,
6946,
4354,
2249,
2893,
16,
467,
4133,
3017,
16,
5684,
966,
1123,
16,
509,
3379,
559,
13,
288,
202,
202,
430,
261,
12298,
1921,
974... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
1250,
1316,
1622,
3061,
4270,
12,
45,
6946,
4354,
2249,
2893,
16,
467,
4133,
3017,
16,
5684,
966,
1123,
16,
509,
3379,
559,
13,
288,
202,
202,
430,
261,
12298,
1921,
974... |
InteractionEvent interactionEvent = InteractionEvent.makeCommand(getWindowOrigin(window), WINDOW_DEACTIVATED); MylarPlugin.getDefault().notifyInteractionObserved(interactionEvent); | public void windowDeactivated(IWorkbenchWindow window) { // Do nothing } | 51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/e5dab796c6efd0dc2b845a7eaada8eb3254ee0c8/WindowChangeMonitor.java/buggy/org.eclipse.mylyn.monitor.ui/src/org/eclipse/mylyn/internal/monitor/monitors/WindowChangeMonitor.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
17419,
1133,
13581,
1133,
273,
5294,
1128,
1133,
18,
6540,
2189,
12,
588,
3829,
7571,
12,
5668,
3631,
24482,
7306,
67,
1639,
22271,
6344,
1769,
8005,
7901,
3773,
18,
588,
1868,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
17419,
1133,
13581,
1133,
273,
5294,
1128,
1133,
18,
6540,
2189,
12,
588,
3829,
7571,
12,
5668,
3631,
24482,
7306,
67,
1639,
22271,
6344,
1769,
8005,
7901,
3773,
18,
588,
1868,
... | |
rv.addLast(pnick); | rv.addLast(pnick); | public LinkedList nickCompleteAll(String pnick, String channel) { LinkedList rv = new LinkedList(); if (getChannel(channel) != null) { Set users = getChannel(channel).getAllUsers(); Iterator i = users.iterator(); while (i.hasNext()) { User temp = (User)i.next(); if (temp.getNick().length() >= pnick.length()) { if (temp.getNick().toLowerCase().substring(0, pnick.length()).equals(pnick.toLowerCase())) { rv.addFirst(temp.getNick()); } else if (temp.getNick().toLowerCase().indexOf(pnick.toLowerCase()) > -1 && (!temp.getNick().toLowerCase().equals(getMyNick().toLowerCase()))) { rv.addLast(temp.getNick()); } } } } rv.addLast(pnick); return rv; } | 12160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12160/40a96df91c6aa5499068a15d7923454620c58a1f/InternalDataList.java/clean/rero/src/rero/ircfw/InternalDataList.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10688,
10909,
6322,
1595,
12,
780,
11059,
1200,
16,
514,
1904,
13,
565,
288,
4202,
10688,
5633,
273,
394,
10688,
5621,
4202,
309,
261,
588,
2909,
12,
4327,
13,
480,
446,
13,
4202,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
10688,
10909,
6322,
1595,
12,
780,
11059,
1200,
16,
514,
1904,
13,
565,
288,
4202,
10688,
5633,
273,
394,
10688,
5621,
4202,
309,
261,
588,
2909,
12,
4327,
13,
480,
446,
13,
4202,
... |
protected IStatus computeMoveOrCopyStatus() { // Check for error conditions first so that we do not prompt the user // on warnings that eventually will not matter anyway. if (resources == null || !hasDestinationPath()) { markInvalid(); return getErrorStatus(UndoMessages.AbstractResourcesOperation_NotEnoughInfo); } for (int i = 0; i < resources.length; i++) { IResource resource = resources[i]; // Does the resource still exist? if (!resource.exists()) { markInvalid(); return getErrorStatus(UndoMessages.MoveOrCopyResourceOperation_ResourceDoesNotExist); } // Are we really trying to move it to a different name? IPath proposedPath = getDestinationPath(resource, i, false); if (resource.getFullPath().equals(proposedPath)) { markInvalid(); return getErrorStatus(UndoMessages.MoveOrCopyResourceOperation_SameNameOrLocation); } // Is the proposed name valid? IStatus status = getWorkspace().validateName( proposedPath.lastSegment(), resource.getType()); if (status.getSeverity() == IStatus.ERROR) { markInvalid(); } if (!status.isOK()) { return status; } } for (int i = 0; i < resources.length; i++) { // No error conditions. Check and warn for any overwrites that may // occur. IResource newResource = null; if (resources[i].getType() == IResource.PROJECT) { // Projects may be moved to a new location or copied to a new // name. To cover both cases, we consider matching location // paths, including name, to represent an overwrite. IPath proposedPath = getDestinationPath(resources[i], i, true); IPath existingPath = resources[i].getLocation().append( resources[i].getName()); if (proposedPath.equals(existingPath)) { newResource = resources[i]; } } else { IPath proposedPath = getDestinationPath(resources[i], i, false); newResource = getWorkspace().getRoot().findMember(proposedPath); } if (newResource != null) { int result = queryOverwrite(newResource, null); if (result == IDialogConstants.YES_TO_ALL_ID) { return Status.OK_STATUS; } else if (result == IDialogConstants.CANCEL_ID) { return Status.CANCEL_STATUS; } else if (result == IDialogConstants.NO_ID) { markInvalid(); return getErrorStatus(UndoMessages.AbstractResourcesOperation_overwriteError); } // Otherwise (YES_ID) we continue checking each one // individually. } } return Status.OK_STATUS; } | 57470 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57470/97ef6dcf33ba5bdca2e9f1069bc34ae96b207337/AbstractCopyOrMoveResourcesOperation.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/ide/undo/AbstractCopyOrMoveResourcesOperation.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
1482,
3671,
7607,
1162,
2951,
1482,
1435,
288,
202,
202,
759,
2073,
364,
555,
4636,
1122,
1427,
716,
732,
741,
486,
6866,
326,
729,
202,
202,
759,
603,
5599,
716,
18011,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
467,
1482,
3671,
7607,
1162,
2951,
1482,
1435,
288,
202,
202,
759,
2073,
364,
555,
4636,
1122,
1427,
716,
732,
741,
486,
6866,
326,
729,
202,
202,
759,
603,
5599,
716,
18011,
... | ||
break; | continue Loop; | static Object interpret(Context cx, Scriptable scope, Scriptable thisObj, Object[] args, double[] argsDbl, int argShift, int argCount, NativeFunction fnOrScript, InterpreterData idata) throws JavaScriptException { if (cx.interpreterSecurityDomain != idata.securityDomain) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); } SecurityController sc = idata.securityController; Object savedDomain = cx.interpreterSecurityDomain; cx.interpreterSecurityDomain = idata.securityDomain; try { return sc.callWithDomain(idata.securityDomain, cx, fnOrScript, scope, thisObj, args); } finally { cx.interpreterSecurityDomain = savedDomain; } } final Object DBL_MRK = Interpreter.DBL_MRK; final Scriptable undefined = Undefined.instance; final int VAR_SHFT = 0; final int maxVars = idata.itsMaxVars; final int LOCAL_SHFT = VAR_SHFT + maxVars; final int STACK_SHFT = LOCAL_SHFT + idata.itsMaxLocals;// stack[VAR_SHFT <= i < LOCAL_SHFT]: variables// stack[LOCAL_SHFT <= i < TRY_STACK_SHFT]: used for newtemp/usetemp// stack[STACK_SHFT <= i < STACK_SHFT + idata.itsMaxStack]: stack data// sDbl[i]: if stack[i] is DBL_MRK, sDbl[i] holds the number value int maxFrameArray = idata.itsMaxFrameArray; if (maxFrameArray != STACK_SHFT + idata.itsMaxStack) Kit.codeBug(); Object[] stack = new Object[maxFrameArray]; double[] sDbl = new double[maxFrameArray]; int stackTop = STACK_SHFT - 1; int withDepth = 0; int definedArgs = fnOrScript.argCount; if (definedArgs > argCount) { definedArgs = argCount; } for (int i = 0; i != definedArgs; ++i) { Object arg = args[argShift + i]; stack[VAR_SHFT + i] = arg; if (arg == DBL_MRK) { sDbl[VAR_SHFT + i] = argsDbl[argShift + i]; } } for (int i = definedArgs; i != maxVars; ++i) { stack[VAR_SHFT + i] = undefined; } DebugFrame debuggerFrame = null; if (cx.debugger != null) { debuggerFrame = cx.debugger.getFrame(cx, idata); } if (idata.itsFunctionType != 0) { InterpretedFunction f = (InterpretedFunction)fnOrScript; if (!idata.useDynamicScope) { scope = fnOrScript.getParentScope(); } if (idata.itsCheckThis) { thisObj = ScriptRuntime.getThis(thisObj); } if (idata.itsNeedsActivation) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } } else { ScriptRuntime.initScript(cx, scope, fnOrScript, thisObj, idata.itsFromEvalCode); } if (idata.itsNestedFunctions != null) { if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) Kit.codeBug(); for (int i = 0; i < idata.itsNestedFunctions.length; i++) { InterpreterData fdata = idata.itsNestedFunctions[i]; if (fdata.itsFunctionType == FunctionNode.FUNCTION_STATEMENT) { createFunction(cx, scope, fdata, idata.itsFromEvalCode); } } } // Wrapped regexps for functions are stored in InterpretedFunction // but for script which should not contain references to scope // the regexps re-wrapped during each script execution Scriptable[] scriptRegExps = null; boolean useActivationVars = false; if (debuggerFrame != null) { if (argsDbl != null) { args = getArgsArray(args, argsDbl, argShift, argCount); argShift = 0; argsDbl = null; } if (idata.itsFunctionType != 0 && !idata.itsNeedsActivation) { useActivationVars = true; scope = ScriptRuntime.initVarObj(cx, scope, fnOrScript, thisObj, args); } debuggerFrame.onEnter(cx, scope, thisObj, args); } InterpreterData savedData = cx.interpreterData; cx.interpreterData = idata; Object result = undefined; // If javaException != null on exit, it will be throw instead of // normal return Throwable javaException = null; int exceptionPC = -1; byte[] iCode = idata.itsICode; String[] strings = idata.itsStringTable; int pc = 0; int pcPrevBranch = pc; final int instructionThreshold = cx.instructionThreshold; // During function call this will be set to -1 so catch can properly // adjust it int instructionCount = cx.instructionCount; // arbitrary number to add to instructionCount when calling // other functions final int INVOCATION_COST = 100; Loop: for (;;) { try { int op = 0xFF & iCode[pc++]; switch (op) { // Back indent to ease imlementation reading case Icode_CATCH: { // The following code should be executed inside try/catch inside main // loop, not in the loop catch block itself to deal with exceptions // from observeInstructionCount. A special bytecode is used only to // simplify logic. if (javaException == null) Kit.codeBug(); int pcNew = -1; boolean doCatch = false; int handlerOffset = getExceptionHandler(idata.itsExceptionTable, exceptionPC); if (handlerOffset >= 0) { final int SCRIPT_CAN_CATCH = 0, ONLY_FINALLY = 1, OTHER = 2; int exType; if (javaException instanceof JavaScriptException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EcmaError) { // an offical ECMA error object, exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof EvaluatorException) { exType = SCRIPT_CAN_CATCH; } else if (javaException instanceof RuntimeException) { exType = ONLY_FINALLY; } else { // Error instance exType = OTHER; } if (exType != OTHER) { // Do not allow for JS to interfere with Error instances // (exType == OTHER), as they can be used to terminate // long running script if (exType == SCRIPT_CAN_CATCH) { // Allow JS to catch only JavaScriptException and // EcmaError pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_CATCH_SLOT]; if (pcNew >= 0) { // Has catch block doCatch = true; } } if (pcNew < 0) { pcNew = idata.itsExceptionTable[handlerOffset + EXCEPTION_FINALLY_SLOT]; } } } if (debuggerFrame != null && !(javaException instanceof Error)) { debuggerFrame.onExceptionThrown(cx, javaException); } if (pcNew < 0) { break Loop; } // We caught an exception // restore scope at try point int tryWithDepth = idata.itsExceptionTable[ handlerOffset + EXCEPTION_WITH_DEPTH_SLOT]; while (tryWithDepth != withDepth) { if (scope == null) Kit.codeBug(); scope = ScriptRuntime.leaveWith(scope); --withDepth; } if (doCatch) { stackTop = STACK_SHFT - 1; int exLocal = idata.itsExceptionTable[ handlerOffset + EXCEPTION_LOCAL_SLOT]; stack[LOCAL_SHFT + exLocal] = ScriptRuntime.getCatchObject( cx, scope, javaException); } else { stackTop = STACK_SHFT; // Call finally handler with javaException on stack top to // distinguish from normal invocation through GOSUB // which would contain DBL_MRK on the stack stack[stackTop] = javaException; } // clear exception javaException = null; // Notify instruction observer if necessary // and point pc and pcPrevBranch to start of catch/finally block if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { // Note: this can throw Error cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = pcNew; continue Loop; } case Token.THROW: { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int sourceLine = getShort(iCode, pc); javaException = new JavaScriptException(value, idata.itsSourceFile, sourceLine); exceptionPC = pc - 1; if (instructionThreshold != 0) { instructionCount += pc - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getJavaCatchPC(iCode); continue Loop; } case Token.GE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl <= lDbl); } else { valBln = ScriptRuntime.cmp_LE(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LE : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl <= rDbl); } else { valBln = ScriptRuntime.cmp_LE(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.GT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (rDbl < lDbl); } else { valBln = ScriptRuntime.cmp_LT(rhs, lhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.LT : { --stackTop; Object rhs = stack[stackTop + 1]; Object lhs = stack[stackTop]; boolean valBln; if (rhs == DBL_MRK || lhs == DBL_MRK) { double rDbl = stack_double(stack, sDbl, stackTop + 1); double lDbl = stack_double(stack, sDbl, stackTop); valBln = (lDbl < rDbl); } else { valBln = ScriptRuntime.cmp_LT(lhs, rhs); } stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IN : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.in(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.INSTANCEOF : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); boolean valBln = ScriptRuntime.instanceOf(lhs, rhs, scope); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.EQ : { --stackTop; boolean valBln = do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.NE : { --stackTop; boolean valBln = !do_eq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHEQ : { --stackTop; boolean valBln = do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.SHNE : { --stackTop; boolean valBln = !do_sheq(stack, sDbl, stackTop); stack[stackTop] = valBln ? Boolean.TRUE : Boolean.FALSE; break; } case Token.IFNE : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (!valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Token.IFEQ : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; } pc += 2; break; } case Icode_IFEQ_POP : { boolean valBln = stack_boolean(stack, sDbl, stackTop); --stackTop; if (valBln) { if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); stack[stackTop--] = null; continue Loop; } pc += 2; break; } case Token.GOTO : if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_GOSUB : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = pc + 2; if (instructionThreshold != 0) { instructionCount += pc + 2 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } pcPrevBranch = pc = getTarget(iCode, pc); continue Loop; case Icode_RETSUB : { int slot = (iCode[pc] & 0xFF); if (instructionThreshold != 0) { instructionCount += pc + 1 - pcPrevBranch; if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } } int newPC; Object value = stack[LOCAL_SHFT + slot]; if (value != DBL_MRK) { // Invocation from exception handler, restore object to rethrow javaException = (Throwable)value; exceptionPC = pc - 1; newPC = getJavaCatchPC(iCode); } else { // Normal return from GOSUB newPC = (int)sDbl[LOCAL_SHFT + slot]; } pcPrevBranch = pc = newPC; continue Loop; } case Token.POP : stack[stackTop] = null; stackTop--; break; case Icode_DUP : stack[stackTop + 1] = stack[stackTop]; sDbl[stackTop + 1] = sDbl[stackTop]; stackTop++; break; case Icode_DUPSECOND : { stack[stackTop + 1] = stack[stackTop - 1]; sDbl[stackTop + 1] = sDbl[stackTop - 1]; stackTop++; break; } case Icode_SWAP : { Object o = stack[stackTop]; stack[stackTop] = stack[stackTop - 1]; stack[stackTop - 1] = o; double d = sDbl[stackTop]; sDbl[stackTop] = sDbl[stackTop - 1]; sDbl[stackTop - 1] = d; break; } case Token.POPV : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); stack[stackTop] = null; --stackTop; break; case Token.RETURN : result = stack[stackTop]; if (result == DBL_MRK) result = doubleWrap(sDbl[stackTop]); --stackTop; break Loop; case Token.RETURN_POPV : break Loop; case Icode_RETUNDEF : result = undefined; break Loop; case Token.BITNOT : { int rIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ~rIntValue; break; } case Token.BITAND : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue & rIntValue; break; } case Token.BITOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue | rIntValue; break; } case Token.BITXOR : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue ^ rIntValue; break; } case Token.LSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue << rIntValue; break; } case Token.RSH : { int rIntValue = stack_int32(stack, sDbl, stackTop); --stackTop; int lIntValue = stack_int32(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lIntValue >> rIntValue; break; } case Token.URSH : { int rIntValue = stack_int32(stack, sDbl, stackTop) & 0x1F; --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = ScriptRuntime.toUint32(lDbl) >>> rIntValue; break; } case Token.ADD : --stackTop; do_add(stack, sDbl, stackTop); break; case Token.SUB : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl - rDbl; break; } case Token.NEG : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = -rDbl; break; } case Token.POS : { double rDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = rDbl; break; } case Token.MUL : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl * rDbl; break; } case Token.DIV : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; // Detect the divide by zero or let Java do it ? sDbl[stackTop] = lDbl / rDbl; break; } case Token.MOD : { double rDbl = stack_double(stack, sDbl, stackTop); --stackTop; double lDbl = stack_double(stack, sDbl, stackTop); stack[stackTop] = DBL_MRK; sDbl[stackTop] = lDbl % rDbl; break; } case Token.NOT : { stack[stackTop] = stack_boolean(stack, sDbl, stackTop) ? Boolean.FALSE : Boolean.TRUE; break; } case Token.BINDNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.bind(scope, name); pc += 2; break; } case Token.SETNAME : { String name = strings[getIndex(iCode, pc)]; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Scriptable lhs = (Scriptable)stack[stackTop]; stack[stackTop] = ScriptRuntime.setName(lhs, rhs, scope, name); pc += 2; break; } case Token.DELPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.delete(cx, scope, lhs, rhs); break; } case Token.GETPROP : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.getProp(lhs, name, scope); break; } case Token.SETPROP : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.setProp(lhs, name, rhs, scope); break; } case Token.GETELEM : do_getElem(cx, stack, sDbl, stackTop, scope); --stackTop; break; case Token.SETELEM : do_setElem(cx, stack, sDbl, stackTop, scope); stackTop -= 2; break; case Icode_PROPINC : case Icode_PROPDEC : { String name = (String)stack[stackTop]; --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecr(lhs, name, scope, op == Icode_PROPINC); break; } case Icode_ELEMINC : case Icode_ELEMDEC : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.postIncrDecrElem(lhs, rhs, scope, op == Icode_ELEMINC); break; } case Token.LOCAL_SAVE : { int slot = (iCode[pc] & 0xFF); stack[LOCAL_SHFT + slot] = stack[stackTop]; sDbl[LOCAL_SHFT + slot] = sDbl[stackTop]; --stackTop; ++pc; break; } case Token.LOCAL_LOAD : { int slot = (iCode[pc] & 0xFF); ++stackTop; stack[stackTop] = stack[LOCAL_SHFT + slot]; sDbl[stackTop] = sDbl[LOCAL_SHFT + slot]; ++pc; break; } case Icode_CALLSPECIAL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int callType = iCode[pc] & 0xFF; boolean isNew = (iCode[pc + 1] != 0); int sourceLine = getShort(iCode, pc + 2); int count = getIndex(iCode, pc + 4); stackTop -= count; Object[] outArgs = getArgsArray(stack, sDbl, stackTop + 1, count); Object functionThis; if (isNew) { functionThis = null; } else { functionThis = stack[stackTop]; if (functionThis == DBL_MRK) { functionThis = doubleWrap(sDbl[stackTop]); } --stackTop; } Object function = stack[stackTop]; if (function == DBL_MRK) function = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.callSpecial( cx, function, isNew, functionThis, outArgs, scope, thisObj, callType, idata.itsSourceFile, sourceLine); instructionCount = cx.instructionCount; pc += 6; break; } case Token.CALL : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; Scriptable calleeScope = scope; if (idata.itsNeedsActivation) { calleeScope = ScriptableObject.getTopLevelScope(scope); } Scriptable calleeThis; if (rhs instanceof Scriptable || rhs == null) { calleeThis = (Scriptable)rhs; } else { calleeThis = ScriptRuntime.toObject(cx, calleeScope, rhs); } if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.call not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; stack[stackTop] = interpret(cx, calleeScope, calleeThis, stack, sDbl, calleeArgShft, count, f, f.itsData); } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.call(cx, calleeScope, calleeThis, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.NEW : { if (instructionThreshold != 0) { instructionCount += INVOCATION_COST; cx.instructionCount = instructionCount; instructionCount = -1; } int count = getIndex(iCode, pc + 2); stackTop -= count; int calleeArgShft = stackTop + 1; Object lhs = stack[stackTop]; if (lhs instanceof InterpretedFunction) { // Inlining of InterpretedFunction.construct not to create // argument array InterpretedFunction f = (InterpretedFunction)lhs; Scriptable newInstance = f.createObject(cx, scope); Object callResult = interpret(cx, scope, newInstance, stack, sDbl, calleeArgShft, count, f, f.itsData); if (callResult instanceof Scriptable && callResult != undefined) { stack[stackTop] = callResult; } else { stack[stackTop] = newInstance; } } else if (lhs instanceof Function) { Function f = (Function)lhs; Object[] outArgs = getArgsArray(stack, sDbl, calleeArgShft, count); stack[stackTop] = f.construct(cx, scope, outArgs); } else { if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); else if (lhs == undefined) { // special code for better error message for call // to undefined lhs = strings[getIndex(iCode, pc)]; if (lhs == null) lhs = undefined; } throw ScriptRuntime.typeError1("msg.isnt.function", ScriptRuntime.toString(lhs)); } instructionCount = cx.instructionCount; pc += 4; break; } case Token.TYPEOF : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[stackTop] = ScriptRuntime.typeof(lhs); break; } case Icode_TYPEOFNAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.typeofName(scope, name); pc += 2; break; } case Icode_NAME_AND_THIS : { String name = strings[getIndex(iCode, pc)]; boolean skipGetThis = (0 != iCode[pc + 2]); stackTop = do_nameAndThis(stack, stackTop, scope, name, skipGetThis); pc += 3; break; } case Token.STRING : stack[++stackTop] = strings[getIndex(iCode, pc)]; pc += 2; break; case Icode_SHORTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getShort(iCode, pc); pc += 2; break; case Icode_INTNUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = getInt(iCode, pc); pc += 4; break; case Token.NUMBER : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = idata.itsDoubleTable[getIndex(iCode, pc)]; pc += 2; break; case Token.NAME : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.name(scope, name); pc += 2; break; } case Icode_NAMEINC : case Icode_NAMEDEC : { String name = strings[getIndex(iCode, pc)]; stack[++stackTop] = ScriptRuntime.postIncrDecr(scope, name, op == Icode_NAMEINC); pc += 2; break; } case Token.SETVAR : { int slot = (iCode[pc] & 0xFF); if (!useActivationVars) { stack[VAR_SHFT + slot] = stack[stackTop]; sDbl[VAR_SHFT + slot] = sDbl[stackTop]; } else { Object val = stack[stackTop]; if (val == DBL_MRK) val = doubleWrap(sDbl[stackTop]); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.GETVAR : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { stack[stackTop] = stack[VAR_SHFT + slot]; sDbl[stackTop] = sDbl[VAR_SHFT + slot]; } else { stack[stackTop] = activationGet(fnOrScript, scope, slot); } ++pc; break; } case Icode_VARINC : case Icode_VARDEC : { int slot = (iCode[pc] & 0xFF); ++stackTop; if (!useActivationVars) { Object val = stack[VAR_SHFT + slot]; stack[stackTop] = val; double d; if (val == DBL_MRK) { d = sDbl[VAR_SHFT + slot]; sDbl[stackTop] = d; } else { d = ScriptRuntime.toNumber(val); } stack[VAR_SHFT + slot] = DBL_MRK; sDbl[VAR_SHFT + slot] = (op == Icode_VARINC) ? d + 1.0 : d - 1.0; } else { Object val = activationGet(fnOrScript, scope, slot); stack[stackTop] = val; double d = ScriptRuntime.toNumber(val); val = doubleWrap((op == Icode_VARINC) ? d + 1.0 : d - 1.0); activationPut(fnOrScript, scope, slot, val); } ++pc; break; } case Token.ZERO : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 0; break; case Token.ONE : ++stackTop; stack[stackTop] = DBL_MRK; sDbl[stackTop] = 1; break; case Token.NULL : stack[++stackTop] = null; break; case Token.THIS : stack[++stackTop] = thisObj; break; case Token.THISFN : stack[++stackTop] = fnOrScript; break; case Token.FALSE : stack[++stackTop] = Boolean.FALSE; break; case Token.TRUE : stack[++stackTop] = Boolean.TRUE; break; case Token.UNDEFINED : stack[++stackTop] = Undefined.instance; break; case Token.ENTERWITH : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; scope = ScriptRuntime.enterWith(lhs, scope); ++withDepth; break; } case Token.LEAVEWITH : scope = ScriptRuntime.leaveWith(scope); --withDepth; break; case Token.CATCH_SCOPE : { String name = strings[getIndex(iCode, pc)]; stack[stackTop] = ScriptRuntime.newCatchScope(name, stack[stackTop]); pc += 2; break; } case Token.ENUM_INIT : { int slot = (iCode[pc] & 0xFF); Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); --stackTop; stack[LOCAL_SHFT + slot] = ScriptRuntime.enumInit(lhs, scope); ++pc; break; } case Token.ENUM_NEXT : case Token.ENUM_ID : { int slot = (iCode[pc] & 0xFF); Object val = stack[LOCAL_SHFT + slot]; ++stackTop; stack[stackTop] = (op == Token.ENUM_NEXT) ? (Object)ScriptRuntime.enumNext(val) : (Object)ScriptRuntime.enumId(val); ++pc; break; } case Icode_PUSH_PARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); stack[++stackTop] = ScriptRuntime.getParent(lhs); break; } case Icode_GETPROTO : case Icode_GETSCOPEPARENT : { Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_GETPROTO) { val = ScriptRuntime.getProto(lhs, scope); } else { val = ScriptRuntime.getParent(lhs, scope); } stack[stackTop] = val; break; } case Icode_SETPROTO : case Icode_SETPARENT : { Object rhs = stack[stackTop]; if (rhs == DBL_MRK) rhs = doubleWrap(sDbl[stackTop]); --stackTop; Object lhs = stack[stackTop]; if (lhs == DBL_MRK) lhs = doubleWrap(sDbl[stackTop]); Object val; if (op == Icode_SETPROTO) { val = ScriptRuntime.setProto(lhs, rhs, scope); } else { val = ScriptRuntime.setParent(lhs, rhs, scope); } stack[stackTop] = val; break; } case Icode_SCOPE : stack[++stackTop] = scope; break; case Icode_CLOSURE : { int i = getIndex(iCode, pc); InterpreterData closureData = idata.itsNestedFunctions[i]; stack[++stackTop] = createFunction(cx, scope, closureData, idata.itsFromEvalCode); pc += 2; break; } case Token.REGEXP : { int i = getIndex(iCode, pc); Scriptable regexp; if (idata.itsFunctionType != 0) { regexp = ((InterpretedFunction)fnOrScript).itsRegExps[i]; } else { if (scriptRegExps == null) { scriptRegExps = wrapRegExps(cx, scope, idata); } regexp = scriptRegExps[i]; } stack[++stackTop] = regexp; pc += 2; break; } case Icode_LITERAL_NEW : { int i = getInt(iCode, pc); ++stackTop; stack[stackTop] = new Object[i]; sDbl[stackTop] = 0; pc += 4; break; } case Icode_LITERAL_SET : { Object value = stack[stackTop]; if (value == DBL_MRK) value = doubleWrap(sDbl[stackTop]); --stackTop; int i = (int)sDbl[stackTop]; ((Object[])stack[stackTop])[i] = value; sDbl[stackTop] = i + 1; break; } case Token.ARRAYLIT : case Token.OBJECTLIT : { int offset = getInt(iCode, pc); Object[] data = (Object[])stack[stackTop]; Object val; if (op == Token.ARRAYLIT) { int[] skipIndexces = null; if (offset >= 0) { skipIndexces = (int[])idata.literalIds[offset]; } val = ScriptRuntime.newArrayLiteral(data, skipIndexces, cx, scope); } else { Object[] ids = (Object[])idata.literalIds[offset]; val = ScriptRuntime.newObjectLiteral(ids, data, cx, scope); } stack[stackTop] = val; pc += 4; break; } case Icode_LINE : { cx.interpreterLineIndex = pc; if (debuggerFrame != null) { int line = getShort(iCode, pc); debuggerFrame.onLineChange(cx, line); } pc += 2; break; } default : { dumpICode(idata); throw new RuntimeException("Unknown icode : "+op+" @ pc : "+(pc-1)); } // end of interpreter switch } } catch (Throwable ex) { if (instructionThreshold != 0) { if (instructionCount < 0) { // throw during function call instructionCount = cx.instructionCount; } else { // throw during any other operation instructionCount += pc - pcPrevBranch; cx.instructionCount = instructionCount; } } javaException = ex; exceptionPC = pc; pc = getJavaCatchPC(iCode); continue Loop; } } cx.interpreterData = savedData; if (debuggerFrame != null) { if (javaException != null) { debuggerFrame.onExit(cx, true, javaException); } else { debuggerFrame.onExit(cx, false, result); } } if (idata.itsNeedsActivation || debuggerFrame != null) { ScriptRuntime.popActivation(cx); } if (instructionThreshold != 0) { if (instructionCount > instructionThreshold) { cx.observeInstructionCount(instructionCount); instructionCount = 0; } cx.instructionCount = instructionCount; } if (javaException != null) { if (javaException instanceof JavaScriptException) { throw (JavaScriptException)javaException; } else if (javaException instanceof RuntimeException) { throw (RuntimeException)javaException; } else { // Must be instance of Error or code bug throw (Error)javaException; } } return result; } | 54155 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54155/34e9dc56b7553f450b9015c8f4135584139686cf/Interpreter.java/buggy/js/rhino/src/org/mozilla/javascript/Interpreter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
760,
1033,
10634,
12,
1042,
9494,
16,
22780,
2146,
16,
22780,
15261,
16,
18701,
1033,
8526,
833,
16,
1645,
8526,
833,
40,
3083,
16,
18701,
509,
1501,
10544,
16,
509,
1501,
1380,
16,
18701... |
long[] data = new long[170]; | long[] data = new long[18]; | private static final long[] mk_tokenSet_22() { long[] data = new long[170]; data[0]=-9223372036854775294L; data[5]=281474976710656L; data[7]=4611686018427392000L; return data; } | 13952 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13952/865876f0e6319c071fef156818ff116c276cfdff/TreeParser03.java/buggy/trunk/org.prorefactor.core/src/org/prorefactor/treeparser03/TreeParser03.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
1525,
8526,
5028,
67,
2316,
694,
67,
3787,
1435,
288,
202,
202,
5748,
8526,
501,
273,
394,
1525,
63,
31779,
15533,
202,
202,
892,
63,
20,
65,
29711,
29,
3787,
3707,... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
727,
1525,
8526,
5028,
67,
2316,
694,
67,
3787,
1435,
288,
202,
202,
5748,
8526,
501,
273,
394,
1525,
63,
31779,
15533,
202,
202,
892,
63,
20,
65,
29711,
29,
3787,
3707,... |
parent = t.getParentNCBITaxID(); } else parent = null; | if (t.getParentNCBITaxID().equals(new Integer(t.getNCBITaxID()))) parent = null; else parent = t.getParentNCBITaxID(); } else parent = null; | public String getNameHierarchy() { StringBuffer sb = new StringBuffer(); boolean first = true; Integer parent = this.getParentNCBITaxID(); while (parent!=null) { NCBITaxon t = (NCBITaxon)RichObjectFactory.getObject(SimpleNCBITaxon.class, new Object[]{parent}); Set sciNames = t.getNames(NCBITaxon.SCIENTIFIC); if (sciNames.size()>0) { if (!first) sb.insert(0,"; "); else first = false; sb.insert(0,(String)sciNames.iterator().next()); parent = t.getParentNCBITaxID(); } else parent = null; } sb.append("."); return sb.toString(); } | 50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/2819559b91c6b4ed4b7a67b612652a35b5e87937/SimpleNCBITaxon.java/buggy/src/org/biojavax/bio/taxa/SimpleNCBITaxon.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1723,
12074,
1435,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
2144,
982,
273,
333,
18,
588,
3054,
50,
8876,
1285,
651,
734,
5621,
3639,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
1071,
514,
1723,
12074,
1435,
288,
3639,
6674,
2393,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
2144,
982,
273,
333,
18,
588,
3054,
50,
8876,
1285,
651,
734,
5621,
3639,
... |
for (Iterator iterator = exceptionsList.iterator(); iterator.hasNext();) { if (first) { | for(Object aExceptionsList : exceptionsList){ if(first){ | private void formatCallCheckString() { final StringBuffer buffer = new StringBuffer(); boolean first = true; for (Iterator iterator = exceptionsList.iterator(); iterator.hasNext();) { if (first) { first = false; } else { buffer.append(','); } final String exceptionName = (String) iterator.next(); buffer.append(exceptionName); } exceptionCheckString = buffer.toString(); } | 12814 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12814/2d46d291193579a7564649b4881c7ea8e02eda5b/BadExceptionThrownInspection.java/buggy/plugins/InspectionGadgets/src/com/siyeh/ig/errorhandling/BadExceptionThrownInspection.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
1477,
1564,
780,
1435,
288,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
364,
261,
3198,
2775,
273,
4798,
682,
18,
9838,
5621,
2775,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
740,
1477,
1564,
780,
1435,
288,
3639,
727,
6674,
1613,
273,
394,
6674,
5621,
3639,
1250,
1122,
273,
638,
31,
3639,
364,
261,
3198,
2775,
273,
4798,
682,
18,
9838,
5621,
2775,
... |
if (omitCheck || !canSee(p, game.getEntity(r.subject))) { | if (omitCheck || !canSee(p, entity)) { | private Report filterReport(Report r, Player p, boolean omitCheck) { if (r.subject == Entity.NONE && r.type != Report.PUBLIC) { //Reports that don't have a subject should be public. System.err.println("Error: Attempting to filter a Report object that is not public yet has no subject.\n\t\tmessageId: " + r.messageId); return r; } if (r.type == Report.PUBLIC || (p == null && !omitCheck)) { return r; } Report copy = new Report(r); for (int j = 0; j < copy.dataCount(); j++) { if (omitCheck || !canSee(p, game.getEntity(r.subject))) { if (r.isValueObscured(j)) { copy.hideData(j); //Mark the original report to indicate which players // received an obscured version of it. if (p != null) r.addObscuredRecipient(p.getName()); } //simulate hiding the report for *true* double-blind play //***DEBUG*** TESTING ONLY //copy.markForTesting(); } } return copy; } | 3464 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3464/2ae3038249bd69f4221ebe1ec60b58de618849a9/Server.java/clean/megamek/src/megamek/server/Server.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
8706,
1034,
4820,
12,
4820,
436,
16,
19185,
293,
16,
1250,
14088,
1564,
13,
288,
3639,
309,
261,
86,
18,
7857,
422,
3887,
18,
9826,
597,
436,
18,
723,
480,
8706,
18,
14939,
13,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
8706,
1034,
4820,
12,
4820,
436,
16,
19185,
293,
16,
1250,
14088,
1564,
13,
288,
3639,
309,
261,
86,
18,
7857,
422,
3887,
18,
9826,
597,
436,
18,
723,
480,
8706,
18,
14939,
13,
... |
while ( restart ) | while ( restart && n < max_loop ) | protected void overlapSwap( List rtList ) { for ( int i = 0; i < rtList.size( ); i++ ) { Object event = rtList.get( i ); Object3D far = getObjectFromEvent( event ); if ( far.getViewerVectors( ).length < 3 ) continue; boolean restart = true; while ( restart ) { restart = false; event = rtList.get( i ); far = getObjectFromEvent( event ); for ( int j = i; j < rtList.size( ); j++ ) { Object event2 = rtList.get( j ); Object3D near = getObjectFromEvent( event2 ); if ( near.getViewerVectors( ).length < 3 ) continue; if ( far.testZOverlap( near ) ) { if ( far.testSwap( near ) ) { rtList.set( i, event2 ); rtList.set( j, event ); restart = true; break; } } else { continue; } } } } } | 15160 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/15160/d084af14717299b1ad7672061fcb59f86002265e/Engine3D.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/Engine3D.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
7227,
12521,
12,
987,
8253,
682,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
8253,
682,
18,
1467,
12,
11272,
277,
9904,
262,
202,
202,
95,
108... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1117,
918,
7227,
12521,
12,
987,
8253,
682,
262,
202,
95,
202,
202,
1884,
261,
509,
277,
273,
374,
31,
277,
411,
8253,
682,
18,
1467,
12,
11272,
277,
9904,
262,
202,
202,
95,
108... |
if (result[0] instanceof IWorkbenchPage) | if (result[0] instanceof IWorkbenchPage) { | public IWorkbenchPage openPage(final String perspId, final IAdaptable input) throws WorkbenchException { Assert.isNotNull(perspId); // Run op in busy cursor. final Object[] result = new Object[1]; BusyIndicator.showWhile(null, new Runnable() { public void run() { try { result[0] = busyOpenPage(perspId, input); } catch (WorkbenchException e) { result[0] = e; } } }); if (result[0] instanceof IWorkbenchPage) return (IWorkbenchPage) result[0]; else if (result[0] instanceof WorkbenchException) throw (WorkbenchException) result[0]; else throw new WorkbenchException( WorkbenchMessages.WorkbenchWindow_exceptionMessage); } | 55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/fa4a8cff0e027f8d3c6b1fcb92b30f46767dd191/WorkbenchWindow.java/clean/bundles/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/WorkbenchWindow.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2421,
22144,
1964,
1696,
1964,
12,
6385,
514,
13508,
84,
548,
16,
727,
467,
13716,
429,
810,
13,
1082,
202,
15069,
4147,
22144,
503,
288,
202,
202,
8213,
18,
291,
5962,
1... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
467,
2421,
22144,
1964,
1696,
1964,
12,
6385,
514,
13508,
84,
548,
16,
727,
467,
13716,
429,
810,
13,
1082,
202,
15069,
4147,
22144,
503,
288,
202,
202,
8213,
18,
291,
5962,
1... |
if (vehicle.getDriver() == null) { System.out.println(vehicle.getName() + " driver is null"); System.out.println(vehicle.getName() + " status: " + vehicle.getStatus()); } | private void drivingPhase(Person person) { if (vehicle.getName().equals("Sandstorm")) { System.out.println(person.getName() + " drivingPhase()"); } // Record starting time and distance to destination. if ((startingTime == null) || (startingDistance == 0D)) { startingTime = (MarsClock) mars.getMasterClock().getMarsClock().clone(); startingDistance = vehicle.getCoordinates().getDistance(destination); } // If vehicle has reached destination, transition to Collecting Rock Samples or Disembarking phase. if (person.getCoordinates().equals(destination)) { if (siteIndex == collectionSites.size()) { phase = DISEMBARK; } else { phase = COLLECTSAMPLES + " from Site " + (siteIndex + 1); } return; } // If vehicle doesn't currently have a driver, start drive task for person. // Can't be immediate last driver and can't be at night time. if (mars.getSurfaceFeatures().getSurfaceSunlight(vehicle.getCoordinates()) > 0D) { if (person == lastDriver) { lastDriver = null; } else { if (vehicle.getDriver() == null) { System.out.println(vehicle.getName() + " driver is null"); System.out.println(vehicle.getName() + " status: " + vehicle.getStatus()); } if ((vehicle.getDriver() == null) && (vehicle.getStatus() == Vehicle.PARKED)) { System.out.println(vehicle.getName() + " new driver: " + person.getName()); DriveGroundVehicle driveTask = new DriveGroundVehicle(person, mars, (GroundVehicle) vehicle, destination, startingTime, startingDistance); person.getMind().getTaskManager().addTask(driveTask); lastDriver = person; } } } } | 49678 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49678/5ee83055f29d6849bbd68aafad8c8b8626f4c3bf/CollectRockSamplesMission.java/clean/org/mars_sim/msp/simulation/person/ai/CollectRockSamplesMission.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5081,
9288,
11406,
12,
8346,
6175,
13,
288,
3639,
309,
261,
537,
18870,
18,
17994,
7675,
14963,
2932,
55,
464,
31607,
6,
3719,
288,
202,
565,
2332,
18,
659,
18,
8222,
12,
124... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3238,
918,
5081,
9288,
11406,
12,
8346,
6175,
13,
288,
3639,
309,
261,
537,
18870,
18,
17994,
7675,
14963,
2932,
55,
464,
31607,
6,
3719,
288,
202,
565,
2332,
18,
659,
18,
8222,
12,
124... | |
String lastfile = null; | public Vector getFolderTree(int projectId) throws CmsException { Vector folders = new Vector(); CmsFolder folder; String lastfile = null; ResultSet res = null; PreparedStatement statement = null; try { // read file data from database statement = m_pool.getPreparedStatement(m_cq.C_RESOURCES_GET_FOLDERTREE_KEY); statement.setInt(1, projectId); res = statement.executeQuery(); // create new file while (res.next()) { int resId = res.getInt(m_cq.C_RESOURCES_RESOURCE_ID); int parentId = res.getInt(m_cq.C_RESOURCES_PARENT_ID); String resName = res.getString(m_cq.C_RESOURCES_RESOURCE_NAME); // only add this folder, if it was not in the last offline-project already// if (!resName.equals(lastfile)) { int resType = res.getInt(m_cq.C_RESOURCES_RESOURCE_TYPE); int resFlags = res.getInt(m_cq.C_RESOURCES_RESOURCE_FLAGS); int userId = res.getInt(m_cq.C_RESOURCES_USER_ID); int groupId = res.getInt(m_cq.C_RESOURCES_GROUP_ID); int projectID = res.getInt(m_cq.C_RESOURCES_PROJECT_ID); int fileId = res.getInt(m_cq.C_RESOURCES_FILE_ID); int accessFlags = res.getInt(m_cq.C_RESOURCES_ACCESS_FLAGS); int state = res.getInt(m_cq.C_RESOURCES_STATE); int lockedBy = res.getInt(m_cq.C_RESOURCES_LOCKED_BY); int launcherType = res.getInt(m_cq.C_RESOURCES_LAUNCHER_TYPE); String launcherClass = res.getString(m_cq.C_RESOURCES_LAUNCHER_CLASSNAME); long created = SqlHelper.getTimestamp(res, m_cq.C_RESOURCES_DATE_CREATED).getTime(); long modified = SqlHelper.getTimestamp(res, m_cq.C_RESOURCES_DATE_LASTMODIFIED).getTime(); int resSize = res.getInt(m_cq.C_RESOURCES_SIZE); int modifiedBy = res.getInt(m_cq.C_RESOURCES_LASTMODIFIED_BY); folder = new CmsFolder(resId, parentId, fileId, resName, resType, resFlags, userId, groupId, projectID, accessFlags, state, lockedBy, created, modified, modifiedBy); folders.addElement(folder);// } lastfile = resName; } } catch (SQLException e) { throw new CmsException("[" + this.getClass().getName() + "]" + e.getMessage(), CmsException.C_SQL_ERROR, e); } catch (Exception ex) { throw new CmsException("[" + this.getClass().getName() + "]", ex); } finally { if (res != null) { try { res.close(); } catch (SQLException se) { } } if (statement != null) { m_pool.putPreparedStatement(m_cq.C_RESOURCES_GET_FOLDERTREE_KEY, statement); } } return folders;} | 51784 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51784/63a5b372b1cd7cd124bd94b199c56ee2968e2cee/CmsDbAccess.java/clean/src/com/opencms/file/genericSql/CmsDbAccess.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
5589,
29001,
2471,
12,
474,
9882,
13,
1216,
11228,
288,
202,
5018,
9907,
273,
394,
5589,
5621,
202,
4747,
3899,
3009,
31,
202,
780,
1142,
768,
273,
446,
31,
202,
13198,
400,
273,
446,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
1071,
5589,
29001,
2471,
12,
474,
9882,
13,
1216,
11228,
288,
202,
5018,
9907,
273,
394,
5589,
5621,
202,
4747,
3899,
3009,
31,
202,
780,
1142,
768,
273,
446,
31,
202,
13198,
400,
273,
446,
... | |
if ((mappedType.isArray() && (mappedType.getJavaClass() == ArrayTypes.byteArrayClass || mappedType.getJavaClass() == ArrayTypes.byteArrayArrayClass)) || (mappedType.isVoidPointerType())) { | if (mappedType.isCVoidPointerType() || mappedType.isCCharPointerType() || (mappedType.isArray() && mappedType.getJavaClass() == ArrayTypes.byteArrayArrayClass)) { | private MethodBinding bindFunction(FunctionSymbol sym, JavaType containingType, Type containingCType) { MethodBinding binding = new MethodBinding(sym, containingType, containingCType); if (cfg.returnsString(binding.getName())) { PointerType prt = sym.getReturnType().asPointer(); if (prt == null || prt.getTargetType().asInt() == null || prt.getTargetType().getSize() != 1) { throw new RuntimeException( "Cannot apply ReturnsString configuration directive to \"" + sym + "\". ReturnsString requires native method to have return type \"char *\""); } binding.setJavaReturnType(JavaType.createForClass(java.lang.String.class)); } else { binding.setJavaReturnType(typeToJavaType(sym.getReturnType(), false)); } // List of the indices of the arguments in this function that should be // converted from byte[] to String List stringArgIndices = cfg.stringArguments(binding.getName()); for (int i = 0; i < sym.getNumArguments(); i++) { Type cArgType = sym.getArgumentType(i); JavaType mappedType = typeToJavaType(cArgType, true); //System.out.println("C arg type -> \"" + cArgType + "\"" ); //System.out.println(" Java -> \"" + mappedType + "\"" ); // Take into account any ArgumentIsString configuration directives that apply if (stringArgIndices != null && stringArgIndices.contains(new Integer(i))) { //System.out.println("Forcing conversion of " + binding.getName() + " arg #" + i + " from byte[] to String "); if ((mappedType.isArray() && (mappedType.getJavaClass() == ArrayTypes.byteArrayClass || mappedType.getJavaClass() == ArrayTypes.byteArrayArrayClass)) || (mappedType.isVoidPointerType())) { // convert mapped type from void* and byte[] to String, or byte[][] to String[] if (mappedType.getJavaClass() == ArrayTypes.byteArrayArrayClass) { mappedType = javaType(ArrayTypes.stringArrayClass); } else { mappedType = javaType(String.class); } } else { throw new RuntimeException( "Cannot apply ArgumentIsString configuration directive to " + "argument " + i + " of \"" + sym + "\": argument type is not " + "a \"void*\", \"char *\", or \"char**\" equivalent"); } } binding.addJavaArgumentType(mappedType); //System.out.println("During binding of [" + sym + "], added mapping from C type: " + cArgType + " to Java type: " + mappedType); } //System.err.println("---> " + binding); //System.err.println(" ---> " + binding.getCSymbol()); return binding; } | 46690 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46690/0f2fa98495ce75434fc011e7ba2976c78edd38d0/JavaEmitter.java/buggy/src/net/java/games/gluegen/JavaEmitter.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
2985,
5250,
1993,
2083,
12,
2083,
5335,
5382,
16,
19694,
5110,
559,
4191,
559,
16,
19694,
1412,
4191,
39,
559,
13,
288,
565,
2985,
5250,
5085,
273,
394,
2985,
5250,
12,
8117,
16,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
282,
3238,
2985,
5250,
1993,
2083,
12,
2083,
5335,
5382,
16,
19694,
5110,
559,
4191,
559,
16,
19694,
1412,
4191,
39,
559,
13,
288,
565,
2985,
5250,
5085,
273,
394,
2985,
5250,
12,
8117,
16,
... |
public SpringBeanLocator(String beanId, Class beanType, ISpringContextLocator locator) | public SpringBeanLocator(Class beanType, ISpringContextLocator locator) | public SpringBeanLocator(String beanId, Class beanType, ISpringContextLocator locator) { if (locator == null) { throw new IllegalArgumentException("[locator] argument cannot be null"); } if (beanType == null) { throw new IllegalArgumentException("[beanType] argument cannot be null"); } this.beanTypeCache = beanType; this.beanTypeName = beanType.getName(); this.beanId = beanId; this.springContextLocator = locator; } | 46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/51618ab52fcae651753d0c10412d1d95ef9acd74/SpringBeanLocator.java/buggy/wicket-spring/src/main/java/wicket/spring/SpringBeanLocator.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
22751,
3381,
5786,
12,
780,
3931,
548,
16,
1659,
29881,
16,
4437,
11638,
1042,
5786,
8871,
13,
202,
95,
202,
202,
430,
261,
20048,
422,
446,
13,
202,
202,
95,
1082,
202,
12849... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
22751,
3381,
5786,
12,
780,
3931,
548,
16,
1659,
29881,
16,
4437,
11638,
1042,
5786,
8871,
13,
202,
95,
202,
202,
430,
261,
20048,
422,
446,
13,
202,
202,
95,
1082,
202,
12849... |
ACLMessage cfp = new ACLMessage("cfp"); | ACLMessage cfp = new ACLMessage(ACLMessage.CFP); | protected void fixAppointment(Appointment a) { System.err.println("fix Appointment" + a.toString()); ACLMessage cfp = new ACLMessage("cfp"); //FIXME only for Seoul // cfp.setContent(a.toString()); cfp.setSource(getName()); cfp.setReplyBy(REPLYBY); AgentGroup ag = new AgentGroup(); Enumeration e = a.getInvitedPersons(); int numberOfInvited = 0; String name; String listOfNames = ""; while (e.hasMoreElements()) { numberOfInvited++; name = ((Person)e.nextElement()).getAgentName(); //if (name.endsWith(getAddress())) /* it belongs to my platform. so remove platform name otherwise fipacontractnetinitiatorbheaviour does not work */ //ag.addMember(name.substring(0,name.indexOf('@'))); //else ag.addMember(name); listOfNames = listOfNames + name + " "; } if (numberOfInvited == 0) { // ci sono solo io // devo solo trovare un giorno libero Date goodDate = findADate(a); if (goodDate == null) mf.showErrorMessage("No free date for "+a.toString()); else { a.setFixedDate(goodDate); addAppointment(a); } } else { if (numberOfInvited > 1) listOfNames = "(" + listOfNames + ")"; // becomes a list String possibleAppList = possibleAppointments(a); if (possibleAppList != null) { cfp.setContent("( (action " + " * " + " (possible-appointments " + possibleAppList + ")) true )"); addBehaviour(new myFipaContractNetInitiatorBehaviour(this,cfp,ag)); } else mf.showErrorMessage("No free date for "+a.toString()); }} | 5505 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5505/50c90d709422a9df981fe8663628ab9b530f37cd/MeetingSchedulerAgent.java/buggy/src/demo/MeetingScheduler/MeetingSchedulerAgent.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2917,
1294,
29815,
12,
1294,
29815,
279,
13,
288,
225,
2332,
18,
370,
18,
8222,
2932,
904,
1716,
29815,
6,
397,
279,
18,
10492,
10663,
3639,
10098,
1079,
6080,
84,
273,
394,
10098,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
4750,
918,
2917,
1294,
29815,
12,
1294,
29815,
279,
13,
288,
225,
2332,
18,
370,
18,
8222,
2932,
904,
1716,
29815,
6,
397,
279,
18,
10492,
10663,
3639,
10098,
1079,
6080,
84,
273,
394,
10098,
... |
Collection handles = null; if (((JtdsPreparedStatement) statement).handles != null) { handles = ((JtdsPreparedStatement) statement).handles.values(); } handles = statementCache.getObsoleteHandles(handles); | Collection handles = statementCache.getObsoleteHandles( ((JtdsPreparedStatement) statement).handles); | synchronized void removeStatement(JtdsStatement statement) throws SQLException { // Remove the JtdsStatement from the statement list synchronized (statements) { for (int i = 0; i < statements.size(); i++) { WeakReference wr = (WeakReference) statements.get(i); if (wr != null) { Statement stmt = (Statement) wr.get(); if (stmt != null && stmt == statement) { statements.set(i, null); break; } } } } if (statement instanceof JtdsPreparedStatement) { // Clean up the prepared statement cache; getObsoleteHandles will // decrement the usage count for the set of used handles Collection handles = null; if (((JtdsPreparedStatement) statement).handles != null) { handles = ((JtdsPreparedStatement) statement).handles.values(); } handles = statementCache.getObsoleteHandles(handles); if (handles != null) { if (serverType == Driver.SQLSERVER) { // SQL Server unprepare StringBuffer cleanupSql = new StringBuffer(handles.size() * 32); for (Iterator iterator = handles.iterator(); iterator.hasNext(); ) { ProcEntry pe = (ProcEntry) iterator.next(); // Could get put back if in a transaction that is // rolled back pe.appendDropSQL(cleanupSql); } if (cleanupSql.length() > 0) { baseTds.executeSQL(cleanupSql.toString(), null, null, true, 0, -1, -1, true); baseTds.clearResponseQueue(); } } else { // Sybase unprepare for (Iterator iterator = handles.iterator(); iterator.hasNext(); ) { ProcEntry pe = (ProcEntry)iterator.next(); if (pe.toString() != null) { // Remove the Sybase light weight proc baseTds.sybaseUnPrepare(pe.toString()); } } } } } } | 5753 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5753/caa3c9ede45d07c63e919d530c2a477596f58a7e/ConnectionJDBC2.java/buggy/src/main/net/sourceforge/jtds/jdbc/ConnectionJDBC2.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
1206,
3406,
12,
46,
88,
2377,
3406,
3021,
13,
5411,
1216,
6483,
288,
3639,
368,
3581,
326,
804,
88,
2377,
3406,
628,
326,
3021,
666,
3639,
3852,
261,
18393,
13,
288,
5411,
36... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
3852,
918,
1206,
3406,
12,
46,
88,
2377,
3406,
3021,
13,
5411,
1216,
6483,
288,
3639,
368,
3581,
326,
804,
88,
2377,
3406,
628,
326,
3021,
666,
3639,
3852,
261,
18393,
13,
288,
5411,
36... |
PreparedStatement addUserStatement = | addUserStatement = | protected void doAddUser(User user) { Connection conn = openConnection(); // Insert into the database. try { // Get a PreparedStatement for the insert. PreparedStatement addUserStatement = conn.prepareStatement(m_insertUserSql); setUserForInsertStatement(user, addUserStatement); addUserStatement.execute(); addUserStatement.close(); } catch ( SQLException sqlExc) { sqlExc.printStackTrace(); throw new CascadingRuntimeException("Error accessing database", sqlExc); } finally { closeConnection(conn); } } | 47102 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47102/2557fc80c334a8bf037aa78d48c3d733651ee9a9/AbstractJdbcUsersRepository.java/clean/trunk/src/java/org/apache/james/userrepository/AbstractJdbcUsersRepository.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
986,
1299,
12,
1299,
729,
13,
288,
3639,
4050,
1487,
273,
24982,
5621,
3639,
368,
8040,
1368,
326,
2063,
18,
3639,
775,
288,
5411,
368,
968,
279,
16913,
364,
326,
2243,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
377,
4750,
918,
741,
986,
1299,
12,
1299,
729,
13,
288,
3639,
4050,
1487,
273,
24982,
5621,
3639,
368,
8040,
1368,
326,
2063,
18,
3639,
775,
288,
5411,
368,
968,
279,
16913,
364,
326,
2243,
... |
((Text) getPresentationObject()).setFontSize(s); | ((Text) _obj).setFontSize(s); | public void setFontSize(String s) { if (isText()) { ((Text) getPresentationObject()).setFontSize(s); } } | 52001 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52001/cb7478305deba4267935f6a444b7e6f6f806689c/Link.java/buggy/src/java/com/idega/presentation/text/Link.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20454,
1225,
12,
780,
272,
13,
288,
202,
202,
430,
261,
291,
1528,
10756,
288,
1082,
202,
12443,
1528,
13,
1689,
1581,
367,
921,
1435,
2934,
542,
22688,
12,
87,
1769,
202... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
918,
20454,
1225,
12,
780,
272,
13,
288,
202,
202,
430,
261,
291,
1528,
10756,
288,
1082,
202,
12443,
1528,
13,
1689,
1581,
367,
921,
1435,
2934,
542,
22688,
12,
87,
1769,
202... |
adviceMethodInfo.adviceMethodInvokationStmts.add( bindings.get(old)); | adviceMethodInfo.adviceMethodInvokationStmts.add(bindings.get(old)); | private static void updateSavedReferencesToStatements(HashMap bindings) { Collection values = state.adviceMethods.values(); Iterator it = values.iterator(); // all advice methods while (it.hasNext()) { AdviceMethod adviceMethodInfo = (AdviceMethod) it.next(); Set keys2 = bindings.keySet(); Iterator it2 = keys2.iterator(); // all bindings while (it2.hasNext()) { Object old = it2.next(); if (!(old instanceof Value) && !(old instanceof Stmt)) continue; if (adviceMethodInfo .adviceMethodInvokationStmts .contains(old)) { adviceMethodInfo.adviceMethodInvokationStmts.remove(old); adviceMethodInfo.adviceMethodInvokationStmts.add( bindings.get(old)); // replace with new } // this is only necessary if proceed calls are ever part of a shadow, // for example if the advice body were to be matched by an adviceexecution pointcut. // TODO: does this kind of thing ever happen? if (adviceMethodInfo.interfaceInvokationStmts.contains(old)) { adviceMethodInfo.interfaceInvokationStmts.remove(old); adviceMethodInfo.interfaceInvokationStmts.add( bindings.get(old)); // replace with new } if (adviceMethodInfo.directInvokationStmts.contains(old)) { adviceMethodInfo.directInvokationStmts.remove(old); adviceMethodInfo.directInvokationStmts.add( bindings.get(old)); } } } } | 236 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/236/6f8eb0cf436a1f3dac35c49214c75f80d0443b74/AroundWeaver.java/buggy/aop/abc/src/abc/weaving/weaver/AroundWeaver.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1089,
16776,
8221,
774,
14663,
12,
8658,
7394,
13,
288,
202,
202,
2532,
924,
273,
919,
18,
361,
633,
4712,
18,
2372,
5621,
202,
202,
3198,
518,
273,
924,
18,
9838,
... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
1152,
760,
918,
1089,
16776,
8221,
774,
14663,
12,
8658,
7394,
13,
288,
202,
202,
2532,
924,
273,
919,
18,
361,
633,
4712,
18,
2372,
5621,
202,
202,
3198,
518,
273,
924,
18,
9838,
... |
public Graphics draw(Graphics g) { Graphics clientg = super.draw(g); if(!isMinimized()) { int i = 0; RPObject object = StendhalClient.get().getPlayer(); if (object != null) { RPSlot slot = object.getSlot("!buddy"); RPObject buddy = slot.getFirst(); buddies.clear(); for (String key : buddy) { if (key.startsWith("_")) { buddies.add(key.substring(1)); if (buddy.getInt(key) == 0) { clientg.setColor(Color.RED); offline.draw(clientg, 3, 2 + i * 20); clientg.drawString(key.substring(1), 24, 16 + i * 20); } else { clientg.setColor(Color.GREEN); online.draw(clientg, 3, 2 + i * 20); clientg.drawString(key.substring(1), 24, 16 + i * 20); } i++; } } } resizeToFitClientArea(132, i * 20 + 3); } return clientg; } | 4438 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4438/5647b293a3291529beeb6bbd858ef447bf7e41bd/Buddies.java/clean/src/games/stendhal/client/gui/wt/Buddies.java | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
17558,
9446,
12,
29459,
1055,
15329,
202,
202,
29459,
1017,
676,
75,
33,
9565,
18,
9446,
12,
75,
1769,
9506,
202,
430,
12,
5,
291,
2930,
381,
1235,
10756,
95,
474,
77,
33,
2... | [
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1... | [
1,
8585,
326,
22398,
316,
326,
981,
30,
225,
202,
482,
17558,
9446,
12,
29459,
1055,
15329,
202,
202,
29459,
1017,
676,
75,
33,
9565,
18,
9446,
12,
75,
1769,
9506,
202,
430,
12,
5,
291,
2930,
381,
1235,
10756,
95,
474,
77,
33,
2... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.