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
String lang_prefix = user.getLangPrefix();
if( req.getParameter( "ADD_USER" ) != null ) { redirectAddUser( res ); } else if( req.getParameter( "CHANGE_USER" ) != null ) {
public void doPost( HttpServletRequest req, HttpServletResponse res ) throws ServletException, IOException { IMCServiceInterface imcref = IMCServiceRMI.getIMCServiceInterface( req ); // Lets validate the session if( super.checkSession( req, res ) == false ) return; // Get the session HttpSession session = req.getSession( false ); //lets clear old session attribute try { session.removeAttribute( "userToChange" ); session.removeAttribute( "next_url" ); session.removeAttribute( "Ok_phoneNumbers" ); } catch( IllegalStateException ise ) { log( "session has been invalidated so no need to remove parameters" ); } // Lets get an user object imcode.server.user.User user = super.getUserObj( req, res ); if( user == null ) { String header = "Error in AdminCounter."; String msg = "Couldnt create an user object." + "<BR>"; this.log( header + msg ); AdminError err = new AdminError( req, res, header, msg ); return; } // check if user is a Useradmin, adminRole = 2 boolean isUseradmin = imcref.checkUserAdminrole( user.getUserId(), 2 ); // check if user is a Superadmin, adminRole = 1 boolean isSuperadmin = imcref.checkUserAdminrole( user.getUserId(), 1 ); // Lets check if the user is an admin, otherwise throw him out. if( !isSuperadmin && !isUseradmin ) { String header = "Error in AdminCounter."; String msg = "The user is not an administrator." + "<BR>"; this.log( header + msg ); AdminError err = new AdminError( req, res, header, msg ); return; } if( req.getParameter( "searchstring" ) != null ) { res.sendRedirect( "AdminUser?search=" + req.getParameter( "searchstring" ) + "&category=" + req.getParameter( "user_categories" ) + "&showall=" + req.getParameter( "showall" ) ); return; } //Lets get the prefered lang prefix String lang_prefix = user.getLangPrefix(); // ******* GENERATE AN ADD_USER PAGE ********** if( req.getParameter( "ADD_USER" ) != null ) { log( "Add_User" ); VariableManager vm = new VariableManager(); Html htm = new Html(); // Lets redirect to AdminUserProps and get the HTML page to add a new user. res.sendRedirect( "AdminUserProps?ADD_USER=true" ); return; } // ******* GENERATE AN CHANGE_USER PAGE********** if( req.getParameter( "CHANGE_USER" ) != null ) { log( "Change_User" ); // Lets get the user which should be changed // lets first get userId for the user to be changed String userToChangeId = getCurrentUserId( req, res ); /* // else we try to get userId from the requset object. if (userToChangeId == null){ userToChangeId = this.getCurrentUserId(req,res) ; } */ // return if we dont get a user if( userToChangeId == null ) return; // Lets check if the user has right to do changes // only if he is an superadmin, useradmin or if he try to change his own values // otherwise throw him out. if( imcref.checkAdminRights( user ) == false && !isUseradmin && !userToChangeId.equals( "" + user.getUserId() ) ) { String header = "Error in AdminCounter."; String msg = "The user has no rights to change user values." + "<BR>"; this.log( header + msg ); AdminError err = new AdminError( req, res, header, msg ); return; } // get a user object by userToChangeId imcode.server.user.User userToChange = imcref.getUserById( Integer.parseInt( userToChangeId ) ); session.setAttribute( "userToChange", userToChangeId ); // Lets redirect to AdminUserProps and get the HTML page to change a user. res.sendRedirect( "AdminUserProps?CHANGE_USER=true" ); return; } //******* DELETE A USER *********** if( req.getParameter( "DELETE_USER" ) != null ) { return; } // ***** RETURN TO ADMIN MANAGER ***** if( req.getParameter( "GO_BACK" ) != null ) { res.sendRedirect( "AdminManager" ); return; } doGet( req, res ); } // end HTTP POST
8781 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8781/0eb66b7f4f8fccab5b976b92ec84c265924140e4/AdminUser.java/clean/servlets/AdminUser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 741, 3349, 12, 9984, 1111, 16, 12446, 400, 262, 1216, 16517, 16, 1860, 288, 1377, 6246, 39, 18348, 709, 71, 1734, 273, 6246, 39, 1179, 54, 7492, 18, 588, 3445, 39, 18348, 12,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 741, 3349, 12, 9984, 1111, 16, 12446, 400, 262, 1216, 16517, 16, 1860, 288, 1377, 6246, 39, 18348, 709, 71, 1734, 273, 6246, 39, 1179, 54, 7492, 18, 588, 3445, 39, 18348, 12,...
final String text = statements[0].getText();
final PsiStatement statement = statements[0]; final PsiElement parent = blockStatement.getParent(); assert parent != null; final PsiElement grandParent = parent.getParent(); assert grandParent != null; PsiElement sibling = codeBlock.getFirstChild(); assert sibling != null; sibling = sibling.getNextSibling(); while (sibling != null && !sibling.equals(statement)) { if (sibling instanceof PsiComment) { grandParent.addBefore(sibling, parent); } sibling = sibling.getNextSibling(); } final PsiElement lastChild = blockStatement.getLastChild(); if (lastChild instanceof PsiComment) { final PsiElement nextSibling = parent.getNextSibling(); grandParent.addAfter(lastChild, nextSibling); } final String text = statement.getText();
protected void processIntention(@NotNull PsiElement element) throws IncorrectOperationException { final PsiBlockStatement blockStatement = (PsiBlockStatement)element; final PsiCodeBlock codeBlock = blockStatement.getCodeBlock(); final PsiStatement[] statements = codeBlock.getStatements(); final String text = statements[0].getText(); replaceStatement(text, blockStatement); }
56627 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56627/e18d0579520f2a4cc2fda23898cb3293ae208478/RemoveBracesIntention.java/clean/plugins/IntentionPowerPak/src/com/siyeh/ipp/braces/RemoveBracesIntention.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1117, 918, 1207, 1702, 5054, 26964, 5962, 453, 7722, 1046, 930, 13, 202, 202, 15069, 657, 6746, 10602, 202, 95, 202, 202, 6385, 453, 7722, 1768, 3406, 1203, 3406, 273, 261, 52, 7722,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1207, 1702, 5054, 26964, 5962, 453, 7722, 1046, 930, 13, 202, 202, 15069, 657, 6746, 10602, 202, 95, 202, 202, 6385, 453, 7722, 1768, 3406, 1203, 3406, 273, 261, 52, 7722,...
rowUpdater = new FBRowUpdater(c, xsqlvars);
rowUpdater = new FBRowUpdater(c, xsqlvars, this);
protected FBResultSet(AbstractConnection c, AbstractStatement fbStatement, isc_stmt_handle stmt, FBObjectListener.ResultSetListener listener, boolean trimStrings, int rsType, int rsConcurrency, boolean cached) throws SQLException { this.c = c; this.cursorName = fbStatement.getCursorName(); this.listener = listener; this.rsType = rsType; this.rsConcurrency = rsConcurrency; this.trimStrings = trimStrings; // check if we are running in paranoia mode checkParanoiaMode(c); this.xsqlvars = stmt.getOutSqlda().sqlvar; this.maxRows = fbStatement.getMaxRows(); this.fbStatement = fbStatement; boolean updatableCursor = fbStatement.isUpdatableCursor(); //prepareVars((!updatableCursor && rsType == ResultSet.TYPE_SCROLL_INSENSITIVE) || cached); if (cached || rsType == ResultSet.TYPE_SCROLL_INSENSITIVE) { prepareVars(true); fbFetcher = new FBCachedFetcher(this.c, fbStatement, stmt, this); } else { prepareVars(false); if (rsType == ResultSet.TYPE_SCROLL_SENSITIVE) { c.addWarning(new FBSQLWarning( "Result set type changed. " + "ResultSet.TYPE_SCROLL_SENSITIVE is not supported.")); rsType = ResultSet.TYPE_SCROLL_INSENSITIVE; } if (updatableCursor) fbFetcher = new FBUpdatableCursorFetcher(this.c, fbStatement, stmt, this); else fbFetcher = new FBStatementFetcher(this.c, fbStatement, stmt, this); } if (rsConcurrency == ResultSet.CONCUR_UPDATABLE) { try { rowUpdater = new FBRowUpdater(c, xsqlvars); } catch (FBResultSetNotUpdatableException ex) { c.addWarning(new FBSQLWarning( "Result set concurrency changed to READ ONLY.")); rsConcurrency = ResultSet.CONCUR_READ_ONLY; } } }
6960 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6960/189e930c7f3dbca350f28724128a7670ec5cb0c3/FBResultSet.java/clean/src/main/org/firebirdsql/jdbc/FBResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 478, 38, 13198, 12, 7469, 1952, 276, 16, 21821, 4115, 3406, 12754, 3406, 16, 21821, 353, 71, 67, 10589, 67, 4110, 3480, 16, 21821, 478, 38, 921, 2223, 18, 13198, 2223, 2991, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 478, 38, 13198, 12, 7469, 1952, 276, 16, 21821, 4115, 3406, 12754, 3406, 16, 21821, 353, 71, 67, 10589, 67, 4110, 3480, 16, 21821, 478, 38, 921, 2223, 18, 13198, 2223, 2991, 16, 1...
AST tmp223_AST = null; tmp223_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp223_AST);
AST tmp226_AST = null; tmp226_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp226_AST);
public final void multiplicativeExpr() throws RecognitionException, TokenStreamException { returnAST = null; ASTPair currentAST = new ASTPair(); AST multiplicativeExpr_AST = null; unaryExpr(); astFactory.addASTChild(currentAST, returnAST); { _loop121: do { if ((_tokenSet_5.member(LA(1)))) { { switch ( LA(1)) { case STAR: { AST tmp222_AST = null; tmp222_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp222_AST); match(STAR); break; } case LITERAL_div: { AST tmp223_AST = null; tmp223_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp223_AST); match(LITERAL_div); break; } case LITERAL_idiv: { AST tmp224_AST = null; tmp224_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp224_AST); match(LITERAL_idiv); break; } case LITERAL_mod: { AST tmp225_AST = null; tmp225_AST = astFactory.create(LT(1)); astFactory.makeASTRoot(currentAST, tmp225_AST); match(LITERAL_mod); break; } default: { throw new NoViableAltException(LT(1), getFilename()); } } } unaryExpr(); astFactory.addASTChild(currentAST, returnAST); } else { break _loop121; } } while (true); } multiplicativeExpr_AST = (AST)currentAST.root; returnAST = multiplicativeExpr_AST; }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/d31ac0d651739cc32d55579c14a0786f6bfb4200/XPathParser2.java/clean/src/org/exist/parser/XPathParser2.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 918, 3309, 28884, 4742, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 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, 3309, 28884, 4742, 1435, 1216, 9539, 16, 3155, 1228, 503, 288, 9506, 202, 2463, 9053, 273, 446, 31, 202, 202, 9053, 4154, 783, 9053, 273, 394, 9183, 4154, 5621, 202, ...
cnvType.addMouseListener( this );
cnvType.addListener( SWT.MouseDown, this );
private void placeComponents( ) { GridLayout glDropDown = new GridLayout( ); this.setLayout( glDropDown ); this.addKeyListener( this ); this.addFocusListener( this ); btnMarkerVisible = new Button( this, SWT.CHECK ); { btnMarkerVisible.setText( Messages.getString( "LineSeriesAttributeComposite.Lbl.IsVisible" ) ); //$NON-NLS-1$ btnMarkerVisible.setSelection( getMarker( ).isVisible( ) ); btnMarkerVisible.addSelectionListener( this ); btnMarkerVisible.addFocusListener( this ); } cmpType = new Composite( this, SWT.NONE ); { GridLayout layout = new GridLayout( ); layout.numColumns = MARKER_ROW_MAX_NUMBER; layout.marginHeight = 0; layout.marginWidth = 0; layout.horizontalSpacing = 0; layout.verticalSpacing = 0; cmpType.setLayout( layout ); cmpType.setLayoutData( new GridData( GridData.FILL_BOTH ) ); } String[] typeDisplayNameSet = LiteralHelper.markerTypeSet.getDisplayNames( ); int modifiedSize = ( typeDisplayNameSet.length / MARKER_ROW_MAX_NUMBER + 1 ) * MARKER_ROW_MAX_NUMBER; for ( int i = 0; i < modifiedSize; i++ ) { Canvas cnvType = new Canvas( cmpType, SWT.NONE ); GridData gd = new GridData( ); gd.heightHint = MARKER_BLOCK_HEIGHT; gd.widthHint = MARKER_BLOCK_WIDTH; cnvType.setLayoutData( gd ); cnvType.setData( new Integer( i ) ); cnvType.addPaintListener( this ); if ( i < typeDisplayNameSet.length ) { // Fake node to make borders more smooth cnvType.setToolTipText( typeDisplayNameSet[i] ); cnvType.addMouseListener( this ); } } grpSize = new Group( this, SWT.NONE ); { grpSize.setLayout( new GridLayout( ) ); grpSize.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); grpSize.setText( Messages.getString( "LineSeriesAttributeComposite.Lbl.Size" ) ); //$NON-NLS-1$ } iscMarkerSize = new Spinner( grpSize, SWT.BORDER ); { iscMarkerSize.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) ); iscMarkerSize.setMinimum( 0 ); iscMarkerSize.setMaximum( 100 ); iscMarkerSize.addSelectionListener( this ); iscMarkerSize.addFocusListener( this ); iscMarkerSize.setSelection( getMarker( ).getSize( ) ); } setEnabledState( btnMarkerVisible.getSelection( ) ); }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/ef2a0b6feee211ea43a51b0ad6d6ba6d03100953/MarkerEditorComposite.java/buggy/chart/org.eclipse.birt.chart.ui.extension/src/org/eclipse/birt/chart/ui/swt/composites/MarkerEditorComposite.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 1152, 918, 3166, 7171, 12, 262, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 7544, 4164, 273, 394, 7145, 3744, 12, 11272, 1082, 202, 2211, 18, 542, 3744, 12, 5118, 7544, 4164, 11272, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3196, 202, 1152, 918, 3166, 7171, 12, 262, 202, 202, 95, 1082, 202, 6313, 3744, 5118, 7544, 4164, 273, 394, 7145, 3744, 12, 11272, 1082, 202, 2211, 18, 542, 3744, 12, 5118, 7544, 4164, 11272, ...
dH = itm.getFullHeight( );
BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, la, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } dH = bb.getHeight( );
public final Size compute( IDisplayServer xs, Chart cm, SeriesDefinition[] seda, RunTimeContext rtc ) throws ChartException { // THREE CASES: // 1. ALL SERIES IN ONE ARRAYLIST // 2. ONE SERIES PER ARRAYLIST // 3. ALL OTHERS final Legend lg = cm.getLegend( ); if ( !lg.isSetOrientation( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.orientation.horzvert", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } if ( !lg.isSetDirection( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.legend.direction.tblr", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // INITIALIZATION OF VARS USED IN FOLLOWING LOOPS final Orientation orientation = lg.getOrientation( ); final Direction direction = lg.getDirection( ); final double maxWrappingSize = lg.getWrappingSize( ); Label la = LabelImpl.create( ); la.setCaption( TextImpl.copyInstance( lg.getText( ) ) ); ClientArea ca = lg.getClientArea( ); LineAttributes lia = ca.getOutline( ); double dSeparatorThickness = lia.getThickness( ); double dWidth = 0, dHeight = 0; la.getCaption( ).setValue( "X" ); //$NON-NLS-1$ final ITextMetrics itm = xs.getTextMetrics( la ); double dItemHeight = itm.getFullHeight( ); Series se; ArrayList al; double dScale = xs.getDpiResolution( ) / 72d; Insets insCA = ca.getInsets( ).scaledInstance( dScale ); final boolean bPaletteByCategory = ( cm.getLegend( ) .getItemType( ) .getValue( ) == LegendItemType.CATEGORIES ); Series seBase; final List legendItems = new ArrayList( ); // Get maximum block width/height available Block bl = cm.getBlock( ); Bounds boFull = bl.getBounds( ).scaledInstance( dScale ); Insets ins = bl.getInsets( ).scaledInstance( dScale ); Insets lgIns = lg.getInsets( ).scaledInstance( dScale ); double dAvailableWidth = boFull.getWidth( ) - ins.getLeft( ) - ins.getRight( ) - lgIns.getLeft( ) - lgIns.getRight( ); double dAvailableHeight = boFull.getHeight( ) - ins.getTop( ) - ins.getBottom( ) - lgIns.getTop( ) - lgIns.getBottom( ) - cm.getTitle( ) .getBounds( ) .scaledInstance( dScale ) .getHeight( ); // Calculate if minSlice applicable. boolean bMinSliceDefined = false; String sMinSliceLabel = null; boolean bMinSliceApplied = false; int[] filteredMinSliceEntry = null; if ( cm instanceof ChartWithoutAxes ) { bMinSliceDefined = ( (ChartWithoutAxes) cm ).isSetMinSlice( ); sMinSliceLabel = ( (ChartWithoutAxes) cm ).getMinSliceLabel( ); if ( sMinSliceLabel == null || sMinSliceLabel.length( ) == 0 ) { sMinSliceLabel = IConstants.UNDEFINED_STRING; } else { sMinSliceLabel = rtc.externalizedMessage( sMinSliceLabel ); } } // calculate if need an extra legend item when minSlice defined. if ( bMinSliceDefined && bPaletteByCategory && cm instanceof ChartWithoutAxes ) { Map renders = rtc.getSeriesRenderers( ); if ( renders != null && !( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS SeriesDefinition sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); SeriesDefinition[] sdOrtho = (SeriesDefinition[]) sdBase.getSeriesDefinitions( ) .toArray( new SeriesDefinition[0] ); DataSetIterator dsiOrtho = null; BaseRenderer br; boolean started = false; ENTRANCE: for ( int i = 0; i < sdOrtho.length; i++ ) { Series[] alRuntimeSeries = (Series[]) sdOrtho[i].getRunTimeSeries( ) .toArray( new Series[0] ); for ( int j = 0; j < alRuntimeSeries.length; j++ ) { try { dsiOrtho = new DataSetIterator( alRuntimeSeries[j].getDataSet( ) ); LegendItemRenderingHints lirh = (LegendItemRenderingHints) renders.get( alRuntimeSeries[j] ); if ( lirh == null ) { filteredMinSliceEntry = null; break ENTRANCE; } br = lirh.getRenderer( ); // ask each render for filtered min slice info int[] fsa = br.getFilteredMinSliceEntry( dsiOrtho ); if ( fsa != null && fsa.length > 0 ) { bMinSliceApplied = true; } if ( !started ) { started = true; filteredMinSliceEntry = fsa; } else { // get duplicate indices for all renderers filteredMinSliceEntry = getDuplicateIndices( fsa, filteredMinSliceEntry ); if ( filteredMinSliceEntry == null || filteredMinSliceEntry.length == 0 ) { filteredMinSliceEntry = null; break ENTRANCE; } } } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, ex ); } } } // assign a zero-length array for successive convenience if ( filteredMinSliceEntry == null ) { filteredMinSliceEntry = new int[0]; } } } // COMPUTATIONS HERE MUST BE IN SYNC WITH THE ACTUAL RENDERER if ( orientation.getValue( ) == Orientation.VERTICAL ) { double dW, dMaxW = 0; double dRealHeight = 0, dExtraWidth = 0, dDeltaHeight; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { return SizeImpl.create( 0, 0 ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dWidth + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dWidth = dFWidth; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dWidth = Math.max( dFWidth, dWidth ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dWidth += insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (VERTICAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += dExtraHeight + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth, dHeight - dSeparatorThickness / 2 ), dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2, 0, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + MAX // ITEM WIDTH + RIGHT INSETS dWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing + dMaxW + insCA.getRight( ) + dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (VERTICAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dW = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); double dExtraHeight = 0; String extraText = null; dDeltaHeight = insCA.getTop( ) + dFHeight + insCA.getBottom( ); if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dW = Math.max( dW, itm.getFullWidth( ) ); dExtraHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dDeltaHeight += itm.getFullHeight( ) + 2; } } if ( dHeight + dDeltaHeight > dAvailableHeight ) { dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = dW; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = dDeltaHeight; } else { dMaxW = Math.max( dW, dMaxW ); dHeight += dDeltaHeight; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dExtraWidth, dHeight - dDeltaHeight ), dW, dFHeight, la.getCaption( ).getValue( ), dExtraHeight, extraText ) ); } dExtraWidth += dMaxW + insCA.getLeft( ) + insCA.getRight( ) + ( 3 * dItemHeight ) / 2 + dHorizontalSpacing; dMaxW = 0; dRealHeight = Math.max( dRealHeight, dHeight ); dHeight = 0; // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dExtraWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dExtraWidth - dSeparatorThickness / 2, 0 ), 0, dRealHeight, null, 0, null ) ); } } // LEFT INSETS + LEGEND ITEM WIDTH + HORIZONTAL SPACING + // MAX ITEM WIDTH + RIGHT INSETS dWidth += dExtraWidth; dHeight = Math.max( dRealHeight, dHeight ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction.getName( ) }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else if ( orientation.getValue( ) == Orientation.HORIZONTAL ) { double dH, dMaxH = 0; double dRealWidth = 0, dExtraHeight = 0, dDeltaWidth; if ( bPaletteByCategory ) { SeriesDefinition sdBase = null; if ( cm instanceof ChartWithAxes ) { // ONLY SUPPORT 1 BASE AXIS FOR NOW final Axis axPrimaryBase = ( (ChartWithAxes) cm ).getBaseAxes( )[0]; if ( axPrimaryBase.getSeriesDefinitions( ).isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) axPrimaryBase.getSeriesDefinitions( ) .get( 0 ); } else if ( cm instanceof ChartWithoutAxes ) { if ( ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .isEmpty( ) ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.base.axis.no.series.definitions", //$NON-NLS-1$ Messages.getResourceBundle( xs.getULocale( ) ) ); } // OK TO ASSUME THAT 1 BASE SERIES DEFINITION EXISTS sdBase = (SeriesDefinition) ( (ChartWithoutAxes) cm ).getSeriesDefinitions( ) .get( 0 ); } // OK TO ASSUME THAT 1 BASE RUNTIME SERIES EXISTS seBase = (Series) sdBase.getRunTimeSeries( ).get( 0 ); DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( seBase.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } FormatSpecifier fs = null; if ( sdBase != null ) { fs = sdBase.getFormatSpecifier( ); } int pos = -1; while ( dsiBase.hasNext( ) ) { Object obj = dsiBase.next( ); pos++; // filter the not-used legend. if ( bMinSliceApplied && Arrays.binarySearch( filteredMinSliceEntry, pos ) >= 0 ) { continue; } String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), pos ) ); } // compute the extra MinSlice legend item if applicable. if ( bMinSliceApplied ) { la.getCaption( ).setValue( sMinSliceLabel ); itm.reuse( la, maxWrappingSize ); double dFWidth = itm.getFullWidth( ); double dFHeight = itm.getFullHeight( ); dDeltaWidth = insCA.getLeft( ) + dFWidth + ( 3 * dItemHeight ) / 2 + insCA.getRight( ); if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dHeight = dFHeight; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dHeight = Math.max( dFHeight, dHeight ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_MINSLICE_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dsiBase.size( ) ) ); } dHeight += dExtraHeight + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dWidth = Math.max( dWidth, dRealWidth ); } else if ( direction.getValue( ) == Direction.TOP_BOTTOM ) { // (HORIZONTAL => TB) dSeparatorThickness += dVerticalSpacing; for ( int j = 0; j < seda.length; j++ ) { dWidth = 0; al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); double dFHeight = dH; double dFWidth = itm.getFullWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = 0; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = 0; // SETUP HORIZONTAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dHeight += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( 0, dExtraHeight - dSeparatorThickness / 2 ), dRealWidth, 0, null, 0, null ) ); } } dHeight += dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else if ( direction.getValue( ) == Direction.LEFT_RIGHT ) { // (HORIZONTAL => LR) dSeparatorThickness += dHorizontalSpacing; for ( int j = 0; j < seda.length; j++ ) { al = seda[j].getRunTimeSeries( ); FormatSpecifier fs = seda[j].getFormatSpecifier( ); for ( int i = 0; i < al.size( ); i++ ) { se = (Series) al.get( i ); Object obj = se.getSeriesIdentifier( ); String lgtext = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } la.getCaption( ).setValue( lgtext ); itm.reuse( la, maxWrappingSize ); dH = itm.getFullHeight( ); double dFHeight = dH; double dFWidth = itm.getFullWidth( ); double dEHeight = 0; String extraText = null; dDeltaWidth = insCA.getLeft( ) + ( 3 * dItemHeight ) / 2 + dFWidth + insCA.getRight( ) + dHorizontalSpacing; if ( lg.isShowValue( ) ) { DataSetIterator dsiBase = null; try { dsiBase = new DataSetIterator( se.getDataSet( ) ); } catch ( Exception ex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, ex ); } // Use first value for each series. if ( dsiBase.hasNext( ) ) { obj = dsiBase.next( ); String valueText = String.valueOf( obj ); if ( fs != null ) { try { lgtext = ValueFormatter.format( obj, fs, rtc.getULocale( ), null ); } catch ( ChartException e ) { // ignore, use original text. } } Label seLabel = LabelImpl.copyInstance( se.getLabel( ) ); seLabel.getCaption( ).setValue( valueText ); itm.reuse( seLabel ); dEHeight = itm.getFullHeight( ); extraText = seLabel.getCaption( ).getValue( ); dH += dEHeight + 2; dDeltaWidth = Math.max( dDeltaWidth, itm.getFullWidth( ) ); } } if ( dWidth + dDeltaWidth > dAvailableWidth ) { dExtraHeight += dMaxH + insCA.getTop( ) + insCA.getBottom( ) + dVerticalSpacing; dMaxH = dH; dRealWidth = Math.max( dRealWidth, dWidth ); dWidth = dDeltaWidth; } else { dMaxH = Math.max( dH, dMaxH ); dWidth += dDeltaWidth; } legendItems.add( new LegendItemHints( LEGEND_ENTRY, new Point( dWidth - dDeltaWidth, dExtraHeight ), dFWidth, dFHeight, la.getCaption( ).getValue( ), dEHeight, extraText ) ); } // SETUP VERTICAL SEPARATOR SPACING if ( j < seda.length - 1 && ( lg.getSeparator( ) == null || lg.getSeparator( ) .isVisible( ) ) ) { dWidth += dSeparatorThickness; legendItems.add( new LegendItemHints( LEGEND_SEPERATOR, new Point( dWidth - dSeparatorThickness / 2, dExtraHeight ), 0, dMaxH, null, 0, null ) ); } } dHeight += insCA.getTop( ) + dVerticalSpacing + insCA.getBottom( ) + dMaxH + dExtraHeight; dWidth = Math.max( dRealWidth, dWidth ); } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.direction", //$NON-NLS-1$ new Object[]{ direction }, Messages.getResourceBundle( xs.getULocale( ) ) ); } } else { throw new ChartException( ChartEnginePlugin.ID, ChartException.GENERATION, "exception.illegal.rendering.orientation", //$NON-NLS-1$ new Object[]{ orientation }, Messages.getResourceBundle( xs.getULocale( ) ) ); } // consider legend title size. Label lgTitle = lg.getTitle( ); Size titleSize = null; if ( lgTitle != null && lgTitle.isSetVisible( ) && lgTitle.isVisible( ) ) { lgTitle = LabelImpl.copyInstance( lgTitle ); // handle external resource string final String sPreviousValue = lgTitle.getCaption( ).getValue( ); lgTitle.getCaption( ) .setValue( rtc.externalizedMessage( sPreviousValue ) ); BoundingBox bb = null; try { bb = Methods.computeBox( xs, IConstants.ABOVE, lgTitle, 0, 0 ); } catch ( IllegalArgumentException uiex ) { throw new ChartException( ChartEnginePlugin.ID, ChartException.RENDERING, uiex ); } int iTitlePos = lg.getTitlePosition( ).getValue( ); // swap left/right if ( rtc.isRightToLeft( ) ) { if ( iTitlePos == Position.LEFT ) { iTitlePos = Position.RIGHT; } else if ( iTitlePos == Position.RIGHT ) { iTitlePos = Position.LEFT; } } switch ( iTitlePos ) { case Position.ABOVE : case Position.BELOW : dHeight += bb.getHeight( ); dWidth = Math.max( dWidth, bb.getWidth( ) ); break; case Position.LEFT : case Position.RIGHT : dWidth += bb.getWidth( ); dHeight = Math.max( dHeight, bb.getHeight( ) ); break; } titleSize = SizeImpl.create( bb.getWidth( ), bb.getHeight( ) ); } itm.dispose( ); // DISPOSE RESOURCE AFTER USE if ( rtc != null ) { LegendItemHints[] liha = (LegendItemHints[]) legendItems.toArray( new LegendItemHints[0] ); // update context hints here. LegendLayoutHints lilh = new LegendLayoutHints( SizeImpl.create( dWidth, dHeight ), titleSize, bMinSliceApplied, sMinSliceLabel, liha ); rtc.setLegendLayoutHints( lilh ); } sz = SizeImpl.create( dWidth, dHeight ); return sz; }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/6491ad887cb29bead35eb8bdf4e54c9edb5a0a0a/LegendBuilder.java/clean/chart/org.eclipse.birt.chart.engine/src/org/eclipse/birt/chart/computation/LegendBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 727, 6321, 3671, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 1082, 202, 6485, 1852, 8526, 24336, 69, 16, 1939, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 6321, 3671, 12, 1599, 291, 1601, 2081, 9280, 16, 14804, 5003, 16, 1082, 202, 6485, 1852, 8526, 24336, 69, 16, 1939, 950, 1042, 436, 5111, 262, 1216, 14804, 503, 202, 95, ...
public void addTransaction(SIPTransaction transaction) { SIPRequest sipRequest = (SIPRequest) transaction.getOriginalRequest(); // Proessing a re-invite. if (firstTransaction != null && firstTransaction != transaction && transaction.getMethod().equals (firstTransaction.getMethod())) { this.reInviteFlag = true; } // Set state to Completed if we are processing a // BYE transaction for the dialog. // Will be set to TERMINATED after the BYE // transaction completes. if (sipRequest.getMethod().equals(Request.BYE)) { this.setState(COMPLETED_STATE); } if (firstTransaction == null) { // Record the local and remote sequenc // numbers and the from and to tags for future // use on this dialog. firstTransaction = transaction; this.setLocalParty(sipRequest); this.setRemoteParty(sipRequest); this.setCallId(sipRequest); this.originalRequest = sipRequest; if (transaction instanceof SIPServerTransaction) { hisTag = sipRequest.getFrom().getTag(); // My tag is assigned when sending response } else { setLocalSequenceNumber( sipRequest.getCSeq().getSequenceNumber()); // his tag is known when receiving response myTag = sipRequest.getFrom().getTag(); if (myTag == null) throw new RuntimeException("bad message tag missing!"); } } else if ( transaction.getMethod().equals(firstTransaction.getMethod()) && (((firstTransaction instanceof SIPServerTransaction) && (transaction instanceof SIPClientTransaction)) || ((firstTransaction instanceof SIPClientTransaction) && (transaction instanceof SIPServerTransaction)))) { // Switch from client side to server side for re-invite // (put the other side on hold). firstTransaction = transaction; this.setLocalParty(sipRequest); this.setRemoteParty(sipRequest); this.setCallId(sipRequest); this.originalRequest = sipRequest; } if (transaction instanceof SIPServerTransaction) setRemoteSequenceNumber( sipRequest.getCSeq().getSequenceNumber()); // If this is a server transaction record the remote // sequence number to avoid re-processing of requests // with the same sequence number directed towards this // dialog. this.lastTransaction = transaction; // set a back ptr in the incoming dialog. transaction.setDialog(this); if (LogWriter.needsLogging) { sipStack.logWriter.logMessage( "Transaction Added " + this +myTag + "/" + hisTag); sipStack.logWriter.logMessage( "TID = " + transaction.getTransactionId() + "/" + transaction.IsServerTransaction()); sipStack.logWriter.logStackTrace(); } }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/48d0f5aefaaec7a6c6f768504e4d3fcffcc8313f/SIPDialog.java/clean/trunk/src/gov/nist/javax/sip/stack/SIPDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 527, 3342, 12, 17739, 3342, 2492, 13, 288, 8227, 348, 2579, 691, 10341, 691, 273, 261, 17739, 691, 13, 3639, 2492, 18, 588, 8176, 691, 5621, 7734, 368, 1186, 403, 310, 279, 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, 527, 3342, 12, 17739, 3342, 2492, 13, 288, 8227, 348, 2579, 691, 10341, 691, 273, 261, 17739, 691, 13, 3639, 2492, 18, 588, 8176, 691, 5621, 7734, 368, 1186, 403, 310, 279, 2...
EOModelEditor.this.setPageText(1, Messages.getString("EOModelEditor.noEntitySelected"));
EOModelEditor.this.setPageText(EOModelEditor.EOENTITY_PAGE, Messages.getString("EOModelEditor.noEntitySelected"));
public void setSelectedEntity(EOEntity _selectedEntity) { if (!ComparisonUtils.equals(mySelectedEntity, _selectedEntity)) { mySelectedEntity = _selectedEntity; myEntitiesTableEditor.setSelectedEntity(_selectedEntity); myEntityEditor.setEntity(_selectedEntity); if (_selectedEntity == null) { EOModelEditor.this.setPageText(1, Messages.getString("EOModelEditor.noEntitySelected")); //$NON-NLS-1$ } else { EOModelEditor.this.setPageText(1, _selectedEntity.getName()); } updatePartName(); } }
47899 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47899/d928b49aa0253c6ecb4869ae5c835c8362ad2cc8/EOModelEditor.java/clean/wolips/plugins/org.objectstyle.wolips.eomodeler/java/org/objectstyle/wolips/eomodeler/editors/EOModelEditor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 23006, 1943, 12, 41, 51, 1943, 389, 8109, 1943, 13, 288, 565, 309, 16051, 16059, 1989, 18, 14963, 12, 4811, 7416, 1943, 16, 389, 8109, 1943, 3719, 288, 1377, 3399, 7416, 1943, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 23006, 1943, 12, 41, 51, 1943, 389, 8109, 1943, 13, 288, 565, 309, 16051, 16059, 1989, 18, 14963, 12, 4811, 7416, 1943, 16, 389, 8109, 1943, 3719, 288, 1377, 3399, 7416, 1943, ...
int count = fNamespaceContext.getDeclaredPrefixCount(); for (int i = count - 1; i >= 0; i--) { String prefix = fNamespaceContext.getDeclaredPrefixAt(i); fDocumentHandler.endPrefixMapping(prefix, null); }
protected int scanEndElement() throws IOException, XNIException { if (DEBUG_CONTENT_SCANNING) System.out.println(">>> scanEndElement()"); // pop context fElementStack.popElement(fElementQName) ; // Take advantage of the fact that next string _should_ be "fElementQName.rawName", //In scanners most of the time is consumed on checks done for XML characters, we can // optimize on it and avoid the checks done for endElement, //we will also avoid symbol table lookup - neeraj.bajaj@sun.com // this should work both for namespace processing true or false... //REVISIT: if the string is not the same as expected.. we need to do better error handling.. //We can skip this for now... In any case if the string doesn't match -- document is not well formed. if (!fEntityScanner.skipString(fElementQName.rawname)) { reportFatalError("ETagRequired", new Object[]{fElementQName.rawname}); } // end fEntityScanner.skipSpaces(); if (!fEntityScanner.skipChar('>')) { reportFatalError("ETagUnterminated", new Object[]{fElementQName.rawname}); } fMarkupDepth--; //we have increased the depth for two markup "<" characters fMarkupDepth--; // check that this element was opened in the same entity if (fMarkupDepth < fEntityStack[fEntityDepth - 1]) { reportFatalError("ElementEntityMismatch", new Object[]{fCurrentElement.rawname}); } // call handler if (fDocumentHandler != null ) { fDocumentHandler.endElement(fElementQName, null); if (fBindNamespaces) { int count = fNamespaceContext.getDeclaredPrefixCount(); for (int i = count - 1; i >= 0; i--) { String prefix = fNamespaceContext.getDeclaredPrefixAt(i); fDocumentHandler.endPrefixMapping(prefix, null); } fNamespaceContext.popContext(); } } return fMarkupDepth; } // scanEndElement():int
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/41a9eddf1f69a94ac4334a19d85b1a0424c4bcae/XMLNSDocumentScannerImpl.java/clean/src/org/apache/xerces/impl/XMLNSDocumentScannerImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 509, 4135, 1638, 1046, 1435, 1216, 1860, 16, 1139, 50, 45, 503, 288, 3639, 309, 261, 9394, 67, 9689, 67, 2312, 11489, 1360, 13, 2332, 18, 659, 18, 8222, 2932, 23012, 4135, 1638, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 509, 4135, 1638, 1046, 1435, 1216, 1860, 16, 1139, 50, 45, 503, 288, 3639, 309, 261, 9394, 67, 9689, 67, 2312, 11489, 1360, 13, 2332, 18, 659, 18, 8222, 2932, 23012, 4135, 1638, 1...
am.registerAction(Constants.ACTION_DIRECTACCESS,new DirectAccessAction());
am.registerAction(Constants.ACTION_GOTOSTEP,new DirectAccessAction());
private ApplicationManager() { try { String applicationPath = FilesManager.getInstance().getRootPath(); // si le repertoire des Langues n'existe pas File languagesDirectory = new File(applicationPath + Constants.LANGUAGES_OUTPUT_DIRECTORY); if (!languagesDirectory.exists()) { // on cr?e le repertoire languagesDirectory.mkdir(); } // on extrait le fichier de langue par defaut File defaultLanguageFile = new File(applicationPath + Constants.LANGUAGES_OUTPUT_FILE + ".properties"); InputStream defaultInputStream = ClassLoader .getSystemResourceAsStream(Constants.LANGUAGES_FILE + ".properties"); OutputStream defaultOutputStream = new FileOutputStream( defaultLanguageFile); FilesManager.getInstance().copyFile(defaultInputStream, defaultOutputStream); // on extrait le fichier de langue fr File frLanguageFile = new File(applicationPath + Constants.LANGUAGES_OUTPUT_FILE + "_fr.properties"); InputStream frInputStream = ClassLoader .getSystemResourceAsStream(Constants.LANGUAGES_FILE + "_fr.properties"); OutputStream frOutputStream = new FileOutputStream(frLanguageFile); FilesManager.getInstance().copyFile(frInputStream, frOutputStream); // on extrait le fichier de langue en File enLanguageFile = new File(applicationPath + Constants.LANGUAGES_OUTPUT_FILE + "_en.properties"); InputStream enInputStream = ClassLoader .getSystemResourceAsStream(Constants.LANGUAGES_FILE + "_en.properties"); OutputStream enOutputStream = new FileOutputStream(enLanguageFile); FilesManager.getInstance().copyFile(enInputStream, enOutputStream); // Definition de la locale URL urls[] = { languagesDirectory.toURL() }; LanguagesManager.getInstance().setResourceFile( Constants.LANGUAGES_FILE_PREFIXE, new Locale(PreferencesManager.getInstance().getLanguage()), new URLClassLoader(urls)); // Definition du Chemin contenant les Icones de l'applications ImagesManager.getInstance() .setImagePath(Constants.IMAGES_DIRECTORY); // Creation et enregistrement des actions de l'application ActionManager am = ActionManager.getInstance(); am.registerAction(Constants.ACTION_QUIT, new QuitAction()); am.registerAction(Constants.ACTION_OPEN, new OpenAction()); am.registerAction(Constants.ACTION_ABOUT, new AboutAction()); am.registerAction(Constants.ACTION_RUN_ACTIVITY, new RunActivityAction()); am.registerAction(Constants.ACTION_NEXT, new NextAction()); am.registerAction(Constants.ACTION_PREVIOUS, new PreviousAction()); am.registerAction(Constants.ACTION_TERMINATE,new TerminateAction()); am.registerAction(Constants.ACTION_DIRECTACCESS,new DirectAccessAction()); am.registerAction(Constants.ACTION_PREFERENCES, new PreferencesAction()); am.registerAction(Constants.ACTION_TOOLSSETTINGS, new ToolsSettingsAction()); // creation de la fenetre principale this.mfPagod = new MainFrame(); // mettre a jour l'etat de l'application this.state = State.LOADED; } catch (Exception ex) { ExceptionManager.getInstance().manage(ex); } }
9158 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9158/8602ad45fd13f054f9801abed1decf5174daa018/ApplicationManager.java/clean/PAGOD/src/pagod/wizard/control/ApplicationManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 4257, 1318, 1435, 565, 288, 3639, 775, 3639, 288, 5411, 514, 2521, 743, 273, 6471, 1318, 18, 588, 1442, 7675, 588, 21302, 5621, 5411, 368, 7533, 884, 283, 672, 19847, 2832, 511, 156...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4257, 1318, 1435, 565, 288, 3639, 775, 3639, 288, 5411, 514, 2521, 743, 273, 6471, 1318, 18, 588, 1442, 7675, 588, 21302, 5621, 5411, 368, 7533, 884, 283, 672, 19847, 2832, 511, 156...
setNextState(req, DO_VIEW_USER_EDIT);
if (newuser.equals("true")) { setNextState(req, "doNewUser"); } else { setNextState(req, DO_VIEW_USER_EDIT); }
public void doConfirmEditUser(FormEvent evt) throws PortletException { PortletRequest req = evt.getPortletRequest(); //User user = loadUser(evt); try { User user; HiddenFieldBean hf = evt.getHiddenFieldBean("newuser"); String newuser = hf.getValue(); log.debug("in doConfirmEditUser: " + newuser); if (newuser.equals("true")) { validateUser(evt, true); user = saveUser(evt, null); HiddenFieldBean userHF = evt.getHiddenFieldBean("userID"); userHF.setValue(user.getID()); createSuccessMessage(evt, this.getLocalizedText(req, "USER_NEW_SUCCESS")); } else { validateUser(evt, false); // load in User values HiddenFieldBean userHF = evt.getHiddenFieldBean("userID"); String userID = userHF.getValue(); User thisuser = this.userManagerService.getUser(userID); user = saveUser(evt, thisuser); createSuccessMessage(evt, this.getLocalizedText(req, "USER_EDIT_SUCCESS")); } req.setAttribute("user", user); setNextState(req, "doListUsers"); } catch (PortletException e) { createErrorMessage(evt, e.getMessage()); PortalConfigSettings settings = portalConfigService.getPortalConfigSettings(); if (settings.getAttribute(LoginPortlet.SAVE_PASSWORDS).equals(Boolean.TRUE.toString())) { req.setAttribute("savePass", "true"); } setNextState(req, DO_VIEW_USER_EDIT); } }
49343 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49343/1d97526e3354c533cf8eb7a05b81412426ae956f/UserManagerPortlet.java/clean/src/org/gridlab/gridsphere/portlets/core/admin/users/UserManagerPortlet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 741, 11269, 4666, 1299, 12, 1204, 1133, 6324, 13, 5411, 1216, 21305, 503, 288, 3639, 21305, 691, 1111, 273, 6324, 18, 588, 18566, 691, 5621, 3639, 368, 1299, 729, 273, 1262, 12...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 741, 11269, 4666, 1299, 12, 1204, 1133, 6324, 13, 5411, 1216, 21305, 503, 288, 3639, 21305, 691, 1111, 273, 6324, 18, 588, 18566, 691, 5621, 3639, 368, 1299, 729, 273, 1262, 12...
return !Float.isNaN(absoluteY); }
return !Float.isNaN(absoluteY); }
public boolean hasAbsolutePosition() { return !Float.isNaN(absoluteY); }
6653 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6653/d03ff727435ad394b0b46a5732d21c4e3e684a4e/Image.java/clean/src/com/lowagie/text/Image.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 711, 10368, 2555, 1435, 288, 3639, 327, 401, 4723, 18, 291, 21172, 12, 12547, 61, 1769, 565, 289, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 711, 10368, 2555, 1435, 288, 3639, 327, 401, 4723, 18, 291, 21172, 12, 12547, 61, 1769, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
updatechecks.add (uc); }
updatechecks.add(uc); }
public void run() { instances.add(this); try { // // Initialisations FileOutputStream out = null; ArrayList parsables = new ArrayList(); ArrayList executables = new ArrayList(); ArrayList updatechecks = new ArrayList(); List packs = idata.selectedPacks; int npacks = packs.size(); handler.startAction ("Unpacking", npacks); udata = UninstallData.getInstance(); // Specific to the web installers if (idata.kind.equalsIgnoreCase("web") || idata.kind.equalsIgnoreCase("web-kunststoff")) { InputStream kin = getClass().getResourceAsStream("/res/WebInstallers.url"); BufferedReader kreader = new BufferedReader(new InputStreamReader(kin)); jarLocation = kreader.readLine(); } // We unpack the selected packs for (int i = 0; i < npacks; i++) { // We get the pack stream int n = idata.allPacks.indexOf(packs.get(i)); ObjectInputStream objIn = new ObjectInputStream(getPackAsStream(n)); // We unpack the files int nfiles = objIn.readInt(); handler.nextStep (((Pack) packs.get(i)).name, i+1, nfiles); for (int j = 0; j < nfiles; j++) { // We read the header PackFile pf = (PackFile) objIn.readObject(); if (OsConstraint.oneMatchesCurrentSystem(pf.osConstraints)) { // We translate & build the path String path = translatePath(pf.targetPath); File pathFile = new File(path); File dest = pathFile.getParentFile(); if (!dest.exists()) { if (! dest.mkdirs()) { handler.emitError("Error creating directories", "Could not create directory\n"+dest.getPath()); handler.stopAction (); return; } } // We add the path to the log, udata.addFile(path); handler.progress (j, path); //if this file exists and should not be overwritten, check //what to do if ((pathFile.exists ()) && (pf.override != PackFile.OVERRIDE_TRUE)) { boolean overwritefile = false; // don't overwrite file if the user said so if (pf.override != PackFile.OVERRIDE_FALSE) { if (pf.override == PackFile.OVERRIDE_TRUE) { overwritefile = true; } else if (pf.override == PackFile.OVERRIDE_UPDATE) { // check mtime of involved files // (this is not 100% perfect, because the already existing file might // still be modified but the new installed is just a bit newer; we would // need the creation time of the existing file or record with which mtime // it was installed...) overwritefile = (pathFile.lastModified() < pf.mtime); } else { int def_choice = -1; if (pf.override == PackFile.OVERRIDE_ASK_FALSE) def_choice = AbstractUIHandler.ANSWER_NO; if (pf.override == PackFile.OVERRIDE_ASK_TRUE) def_choice = AbstractUIHandler.ANSWER_YES; int answer = handler.askQuestion ( idata.langpack.getString ("InstallPanel.overwrite.title") + pathFile.getName (), idata.langpack.getString ("InstallPanel.overwrite.question") + pathFile.getAbsolutePath(), AbstractUIHandler.CHOICES_YES_NO, def_choice); overwritefile = (answer == AbstractUIHandler.ANSWER_YES); } } if (! overwritefile) { if (!pf.isBackReference()) objIn.skip(pf.length); continue; } } // We copy the file out = new FileOutputStream(pathFile); byte[] buffer = new byte[5120]; long bytesCopied = 0; ObjectInputStream pis = objIn; if (pf.isBackReference()) { InputStream is = getPackAsStream(pf.previousPackNumber); pis = new ObjectInputStream(is);//must wrap for blockdata use by objectstream (otherwise strange result) //skip on underlaying stream (for some reason not possible on ObjectStream) is.skip(pf.offsetInPreviousPack - 4); //but the stream header is now already read (== 4 bytes) } while (bytesCopied < pf.length) { int maxBytes = (pf.length - bytesCopied < buffer.length ? (int) (pf.length - bytesCopied) : buffer.length); int bytesInBuffer = pis.read(buffer, 0, maxBytes); if (bytesInBuffer == -1) throw new IOException("Unexpected end of stream"); out.write(buffer, 0, bytesInBuffer); bytesCopied += bytesInBuffer; } // Cleanings out.close(); if (pis != objIn) pis.close(); // Set file modification time if specified if (pf.mtime >= 0) pathFile.setLastModified (pf.mtime); // Empty dirs restoring String _n = pathFile.getName(); if (_n.startsWith("izpack-keepme") && _n.endsWith(".tmp")) pathFile.delete(); } else { if (!pf.isBackReference()) objIn.skip(pf.length); } } // Load information about parsable files int numParsables = objIn.readInt(); for (int k = 0; k < numParsables; k++) { ParsableFile pf = (ParsableFile) objIn.readObject(); pf.path = translatePath(pf.path); parsables.add(pf); } // Load information about executable files int numExecutables = objIn.readInt(); for (int k = 0; k < numExecutables; k++) { ExecutableFile ef = (ExecutableFile) objIn.readObject(); ef.path = translatePath(ef.path); if (null != ef.argList && !ef.argList.isEmpty()) { String arg = null; for (int j = 0; j < ef.argList.size(); j++) { arg = (String) ef.argList.get(j); arg = translatePath(arg); ef.argList.set(j, arg); } } executables.add(ef); if(ef.executionStage == ExecutableFile.UNINSTALL) { udata.addExecutable(ef); } } // Load information about updatechecks int numUpdateChecks = objIn.readInt(); for (int k = 0; k < numUpdateChecks; k++) { UpdateCheck uc = (UpdateCheck) objIn.readObject(); updatechecks.add (uc); } objIn.close(); } // We use the scripts parser ScriptParser parser = new ScriptParser(parsables, vs); parser.parseFiles(); // We use the file executor FileExecutor executor = new FileExecutor(executables); if (executor.executeFiles(ExecutableFile.POSTINSTALL, handler) != 0) handler.emitError ("File execution failed", "The installation was not completed"); // We put the uninstaller (it's not yet complete...) if (idata.info.getWriteUninstaller()) putUninstaller(); // update checks _after_ uninstaller was put, so we don't delete it performUpdateChecks (updatechecks); // The end :-) handler.stopAction(); } catch (Exception err) { // TODO: finer grained error handling with useful error messages handler.stopAction(); handler.emitError ("An error occured", err.toString()); err.printStackTrace (); } finally { instances.remove(instances.indexOf(this)); } }
54145 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/54145/6e8ab3930a21f787bcd0f3cf0b9937f9d50c80c0/Unpacker.java/clean/src/lib/com/izforge/izpack/installer/Unpacker.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1086, 1435, 225, 288, 565, 3884, 18, 1289, 12, 2211, 1769, 565, 775, 565, 288, 1377, 368, 1377, 368, 10188, 291, 1012, 1377, 12942, 596, 273, 446, 31, 1377, 2407, 13249, 1538, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 1435, 225, 288, 565, 3884, 18, 1289, 12, 2211, 1769, 565, 775, 565, 288, 1377, 368, 1377, 368, 10188, 291, 1012, 1377, 12942, 596, 273, 446, 31, 1377, 2407, 13249, 1538, ...
manager.add(new Separator()); manager.add(clearSelectedTaskscapeAction); MenuManager subMenuManager = new MenuManager("Choose Highlighter"); final Object selectedObject = ((IStructuredSelection)viewer.getSelection()).getFirstElement(); manager.add(subMenuManager);
void fillContextMenu(IMenuManager manager) { manager.add(completeTask); manager.add(incompleteTask); manager.add(delete); manager.add(new Separator()); manager.add(createTask);// manager.add(new Separator()); if (MylarTasksPlugin.getDefault().getContributor() != null) { for (IAction action : MylarTasksPlugin.getDefault().getContributor().getPopupActions(this)) { manager.add(action); } } manager.add(new Separator()); manager.add(clearSelectedTaskscapeAction); MenuManager subMenuManager = new MenuManager("Choose Highlighter"); final Object selectedObject = ((IStructuredSelection)viewer.getSelection()).getFirstElement(); // XXX refactored highlighters// for (Iterator<Highlighter> it = MylarUiPlugin.getDefault().getHighlighters().iterator(); it.hasNext();) {// final Highlighter highlighter = it.next();// if (selectedObject instanceof Task){// Action action = new Action() {// // @Override// public void run() { // Task task = (Task)selectedObject;// MylarUiPlugin.getDefault().setHighlighterMapping(task.getHandle(), highlighter.getName());// TaskListView.this.viewer.refresh();// MylarPlugin.getTaskscapeManager().notifyPostPresentationSettingsChange(ITaskscapeListener.UpdateKind.HIGHLIGHTER);//// taskscapeComponent.getTableViewer().refresh();// }// };// if (highlighter.isGradient()) {// action.setImageDescriptor(new HighlighterImageDescriptor(highlighter.getBase(), highlighter.getLandmarkColor()));// } else {// action.setImageDescriptor(new HighlighterImageDescriptor(highlighter.getLandmarkColor(), highlighter.getLandmarkColor()));// }// action.setText(highlighter.toString());// subMenuManager.add(action);// } else {//// showMessage("Select task before choosing highlighter");// }// } manager.add(subMenuManager); manager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS)); updateActionEnablement(selectedObject); }
51989 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51989/3b17263b60250a970b45c9bbac341b7439694361/TaskListView.java/buggy/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/tasks/ui/views/TaskListView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 3636, 27315, 12, 3445, 2104, 1318, 3301, 13, 288, 3639, 3301, 18, 1289, 12, 6226, 2174, 1769, 3639, 3301, 18, 1289, 12, 17624, 2174, 1769, 3639, 3301, 18, 1289, 12, 3733, 1769, 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, 918, 3636, 27315, 12, 3445, 2104, 1318, 3301, 13, 288, 3639, 3301, 18, 1289, 12, 6226, 2174, 1769, 3639, 3301, 18, 1289, 12, 17624, 2174, 1769, 3639, 3301, 18, 1289, 12, 3733, 1769, 3639,...
public org.quickfix.field.UnderlyingCreditRating getUnderlyingCreditRating() throws FieldNotFound { org.quickfix.field.UnderlyingCreditRating value = new org.quickfix.field.UnderlyingCreditRating();
public quickfix.field.UnderlyingCreditRating getUnderlyingCreditRating() throws FieldNotFound { quickfix.field.UnderlyingCreditRating value = new quickfix.field.UnderlyingCreditRating();
public org.quickfix.field.UnderlyingCreditRating getUnderlyingCreditRating() throws FieldNotFound { org.quickfix.field.UnderlyingCreditRating value = new org.quickfix.field.UnderlyingCreditRating(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/NewOrderList.java/clean/src/java/src/quickfix/fix44/NewOrderList.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 16520, 20388, 10833, 765, 6291, 16520, 20388, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 16520...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16520, 20388, 10833, 765, 6291, 16520, 20388, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 14655, 6291, 16520...
return (commonName != null && commonName.equals(((X500DistinguishedName) o).commonName)) && (country != null && country.equals(((X500DistinguishedName) o).country)) && (locality != null && locality.equals(((X500DistinguishedName) o).locality)) && (orgUnit != null && orgUnit.equals(((X500DistinguishedName) o).orgUnit)) && (organization != null && organization.equals(((X500DistinguishedName) o).organization)) && (street != null && street.equals(((X500DistinguishedName) o).street)) && (state != null && state.equals(((X500DistinguishedName) o).state)) && (domainComponent != null && domainComponent.equals(((X500DistinguishedName) o).domainComponent)) && (title != null && title.equals(((X500DistinguishedName) o).title)) && (dnQualifier != null && dnQualifier.equals(((X500DistinguishedName) o).dnQualifier)) && (surname != null && surname.equals(((X500DistinguishedName) o).surname)) && (givenName != null && givenName.equals(((X500DistinguishedName) o).givenName)) && (initials != null && initials.equals(((X500DistinguishedName) o).initials)) && (generation != null && generation.equals(((X500DistinguishedName) o).generation)) && (email != null && email.equals(((X500DistinguishedName) o).email)) && (userid != null && userid.equals(((X500DistinguishedName) o).userid));
if (!(o instanceof X500DistinguishedName)) return false; if (size() != ((X500DistinguishedName) o).size()) return false; for (int i = 0; i < size(); i++) { Map m = (Map) components.get(i); for (Iterator it2 = m.entrySet().iterator(); it2.hasNext(); ) { Map.Entry e = (Map.Entry) it2.next(); OID oid = (OID) e.getKey(); String v1 = (String) e.getValue(); String v2 = ((X500DistinguishedName) o).getComponent(oid, i); if (!compressWS(v1).equalsIgnoreCase(compressWS(v2))) return false; } } return true;
public boolean equals(Object o) { return (commonName != null && commonName.equals(((X500DistinguishedName) o).commonName)) && (country != null && country.equals(((X500DistinguishedName) o).country)) && (locality != null && locality.equals(((X500DistinguishedName) o).locality)) && (orgUnit != null && orgUnit.equals(((X500DistinguishedName) o).orgUnit)) && (organization != null && organization.equals(((X500DistinguishedName) o).organization)) && (street != null && street.equals(((X500DistinguishedName) o).street)) && (state != null && state.equals(((X500DistinguishedName) o).state)) && (domainComponent != null && domainComponent.equals(((X500DistinguishedName) o).domainComponent)) && (title != null && title.equals(((X500DistinguishedName) o).title)) && (dnQualifier != null && dnQualifier.equals(((X500DistinguishedName) o).dnQualifier)) && (surname != null && surname.equals(((X500DistinguishedName) o).surname)) && (givenName != null && givenName.equals(((X500DistinguishedName) o).givenName)) && (initials != null && initials.equals(((X500DistinguishedName) o).initials)) && (generation != null && generation.equals(((X500DistinguishedName) o).generation)) && (email != null && email.equals(((X500DistinguishedName) o).email)) && (userid != null && userid.equals(((X500DistinguishedName) o).userid)); }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/ec415b5ab69e9516c29619bb561ab024d22ce1f2/X500DistinguishedName.java/clean/core/src/classpath/gnu/gnu/java/security/x509/X500DistinguishedName.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1250, 1606, 12, 921, 320, 13, 225, 288, 565, 327, 4202, 261, 6054, 461, 480, 446, 597, 4202, 2975, 461, 18, 14963, 12443, 12, 60, 12483, 5133, 14344, 5992, 461, 13, 320, 2934, 605...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1250, 1606, 12, 921, 320, 13, 225, 288, 565, 327, 4202, 261, 6054, 461, 480, 446, 597, 4202, 2975, 461, 18, 14963, 12443, 12, 60, 12483, 5133, 14344, 5992, 461, 13, 320, 2934, 605...
if (index==0 || index > rows.size())
if (index > rows.size())
public boolean absolute(int index) throws SQLException { // Peter: Added because negative indices read from the end of the // ResultSet if(index<0) index=rows.size()+index; if (index==0 || index > rows.size()) return false; this_row = (byte [][])rows.elementAt(index); return true; }
52628 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52628/d42f9b59e93f5b85cb1f7b31f192e8acebfa1e12/ResultSet.java/clean/src/interfaces/jdbc/org/postgresql/jdbc2/ResultSet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 4967, 12, 474, 770, 13, 1216, 6483, 565, 288, 202, 759, 453, 847, 30, 25808, 2724, 6092, 4295, 855, 628, 326, 679, 434, 326, 202, 759, 10842, 202, 430, 12, 1615, 32, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 4967, 12, 474, 770, 13, 1216, 6483, 565, 288, 202, 759, 453, 847, 30, 25808, 2724, 6092, 4295, 855, 628, 326, 679, 434, 326, 202, 759, 10842, 202, 430, 12, 1615, 32, 20, 1...
CmsXmlUtils.validateXmlStructure(content.getBytes(UTF8), UTF8, resolver);
CmsXmlUtils.validateXmlStructure(content.getBytes(UTF8), UTF8, resolver);
public void testValidateXmlPageWithSchema() throws Exception { CmsXmlContentTypeManager typeManager = OpenCms.getXmlContentTypeManager(); typeManager.addContentType(CmsXmlHtmlValue.class); // create a XML entity resolver CmsXmlEntityResolver resolver = new CmsXmlEntityResolver(null); String content; content = CmsFileUtil.readFile("org/opencms/xml/page/xmlpage.xsd", UTF8); // store schema in entitiy resolver CmsXmlEntityResolver.cacheSystemId(C_XMLPAGE_SCHEMA_SYSTEM_ID, content.getBytes(UTF8)); // validate the minimal xmlpage content = CmsFileUtil.readFile("org/opencms/xml/page/xmlpage-minimal.xml", UTF8); CmsXmlUtils.validateXmlStructure(content.getBytes(UTF8), UTF8, resolver); // validate the xmlpage 2 content = CmsFileUtil.readFile("org/opencms/xml/page/xmlpage-1.xml", UTF8); CmsXmlUtils.validateXmlStructure(content.getBytes(UTF8), UTF8, resolver); // validate the xmlpage 3 content = CmsFileUtil.readFile("org/opencms/xml/page/xmlpage-2.xml", UTF8); CmsXmlUtils.validateXmlStructure(content.getBytes(UTF8), UTF8, resolver); }
8585 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8585/6f754ad872cb162fb0d29d167cdd6d159d8112a0/TestCmsXmlPage.java/buggy/test/org/opencms/xml/page/TestCmsXmlPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 4270, 4432, 1964, 1190, 3078, 1435, 1216, 1185, 288, 5411, 16084, 8046, 1318, 618, 1318, 273, 10319, 18, 588, 4432, 8046, 1318, 5621, 3639, 618, 1318, 18, 1289, 8046, 12, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4270, 4432, 1964, 1190, 3078, 1435, 1216, 1185, 288, 5411, 16084, 8046, 1318, 618, 1318, 273, 10319, 18, 588, 4432, 8046, 1318, 5621, 3639, 618, 1318, 18, 1289, 8046, 12, ...
frame.setTitle(thisSource.getSourceFile());
frame.setSourceTabTitle(thisSource.getSourceFile());
public void run() { while (true) { BugInstance myBug; SourceLineAnnotation mySourceLine; synchronized (this) { while (!pendingUpdate) { try { wait(); } catch (InterruptedException e) { // we don't use these } } myBug = bugToDisplay; mySourceLine = sourceToHighlight; bugToDisplay = null; sourceToHighlight = null; pendingUpdate = false; } try { final JavaSourceDocument src = getDocument(mySourceLine); src.getHighlightInformation().clear(); String primaryKind = mySourceLine.getDescription(); // Display myBug and mySourceLine for(Iterator<BugAnnotation> i = myBug.annotationIterator(); i.hasNext(); ) { BugAnnotation annotation = i.next(); if (annotation instanceof SourceLineAnnotation) { SourceLineAnnotation sourceAnnotation = (SourceLineAnnotation) annotation; if (sourceAnnotation == mySourceLine) continue; if (sourceAnnotation.getDescription().equals(primaryKind)) highlight(src, sourceAnnotation, MAIN_HIGHLIGHT_MORE); else highlight(src, sourceAnnotation, ALTERNATIVE_HIGHLIGHT); } } highlight(src, mySourceLine, MAIN_HIGHLIGHT); final BugInstance thisBug = myBug; final SourceLineAnnotation thisSource = mySourceLine; javax.swing.SwingUtilities.invokeLater(new Runnable() { public void run() { frame.sourceCodeTextPane.setEditorKit(src.getEditorKit()); StyledDocument document = src.getDocument(); frame.sourceCodeTextPane.setDocument(document); frame.setTitle(thisSource.getSourceFile()); show(frame.sourceCodeTextPane, document, thisSource); for(Iterator<BugAnnotation> i = thisBug.annotationIterator(); i.hasNext(); ) { BugAnnotation annotation = i.next(); if (annotation instanceof SourceLineAnnotation) { SourceLineAnnotation sourceAnnotation = (SourceLineAnnotation) annotation; if (sourceAnnotation != thisSource) show(frame.sourceCodeTextPane, document, sourceAnnotation); } } show(frame.sourceCodeTextPane, document, thisSource); } }); } catch (Exception e) { e.printStackTrace(); } } }
7352 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7352/b6d316d0b4e0e7bb641a43cd573674d840c0c7c6/SourceCodeDisplay.java/buggy/findbugs/src/java5/edu/umd/cs/findbugs/gui2/SourceCodeDisplay.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 17523, 261, 3767, 13, 288, 1082, 202, 19865, 1442, 3399, 19865, 31, 1082, 202, 1830, 1670, 3257, 3399, 1830, 1670, 31, 1082, 202, 22043, 261, 221...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 1435, 288, 202, 202, 17523, 261, 3767, 13, 288, 1082, 202, 19865, 1442, 3399, 19865, 31, 1082, 202, 1830, 1670, 3257, 3399, 1830, 1670, 31, 1082, 202, 22043, 261, 221...
MarkupSection section = new MarkupSection(new Paragraph(""), 1);
MarkupSection section = new MarkupSection();
public MarkupSection addMarkupSection(Properties attributes) { MarkupSection section = new MarkupSection(new Paragraph(""), 1); section.set(attributes); add(section); return section; }
3506 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/3506/84b492dcb267df1d7a38a05ed73a12af04143361/MarkupChapter.java/clean/itext/src/com/lowagie/text/markup/MarkupChapter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 26420, 5285, 527, 13111, 5285, 12, 2297, 1677, 13, 288, 3639, 26420, 5285, 2442, 273, 394, 26420, 5285, 5621, 3639, 2442, 18, 542, 12, 4350, 1769, 3639, 527, 12, 3464, 1769, 3639, 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, 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, 26420, 5285, 527, 13111, 5285, 12, 2297, 1677, 13, 288, 3639, 26420, 5285, 2442, 273, 394, 26420, 5285, 5621, 3639, 2442, 18, 542, 12, 4350, 1769, 3639, 527, 12, 3464, 1769, 3639, 3...
public void compareRefillProjections(ArrayList newRefillProjs, ArrayList oldRefillProjs, Inventory inv) {
public void compareRefillProjections(ArrayList newRefillProjs, ArrayList oldRefillProjs, Inventory inv) {
public void compareRefillProjections(ArrayList newRefillProjs, ArrayList oldRefillProjs, Inventory inv) { //Rescind all old Refill Projection Tasks Iterator oldIter = oldRefillProjs.iterator(); while (oldIter.hasNext()) { Task oldRefillProj = (Task) oldIter.next(); // add in a check for a null - nulls and tasks are put in the // refill lists so make sure we don't publish null! if (oldRefillProj != null) { // remove this from the workflow's sub task list first ((NewWorkflow)oldRefillProj.getWorkflow()).removeTask(oldRefillProj); inventoryPlugin.publishRemove(oldRefillProj); } } //Process all new Refill Projection Tasks LogisticsInventoryPG thePG = (LogisticsInventoryPG)inv. searchForPropertyGroup(LogisticsInventoryPG.class); Iterator newIter = newRefillProjs.iterator(); while (newIter.hasNext()) { Task newRefillProj = (Task) newIter.next(); // apply the Task to the LogisticsInventoryBG thePG.addRefillProjection(newRefillProj); // hook the task in with the MaintainInventory workflow and publish inventoryPlugin.publishRefillTask(newRefillProj, inv); } }
11319 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/11319/87ecd368e64086da7f066c30a13dc24cc1cd8e20/RefillComparator.java/clean/bbn/src/org/cougaar/logistics/plugin/inventory/RefillComparator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 3400, 1957, 737, 14789, 87, 12, 19558, 394, 1957, 737, 626, 2924, 16, 4405, 202, 19558, 1592, 1957, 737, 626, 2924, 16, 4405, 202, 15059, 2198, 13, 288, 565, 368, 607, 71, 72...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3400, 1957, 737, 14789, 87, 12, 19558, 394, 1957, 737, 626, 2924, 16, 4405, 202, 19558, 1592, 1957, 737, 626, 2924, 16, 4405, 202, 15059, 2198, 13, 288, 565, 368, 607, 71, 72...
lastIPAddress = new FreenetInetAddress(best);
lastIPAddress = best == null ? null : new FreenetInetAddress(best);
FreenetInetAddress detectPrimaryIPAddress() { if(overrideIPAddress != null) { Logger.minor(this, "Returning overridden address: "+overrideIPAddress); lastIPAddress = overrideIPAddress; return overrideIPAddress; } Logger.minor(this, "IP address not overridden"); InetAddress addr = ipDetector.getAddress(); if(addr != null) { FreenetInetAddress a = new FreenetInetAddress(addr); lastIPAddress = a; return a; } // Try to pick it up from our connections if(peers != null) { PeerNode[] peerList = peers.connectedPeers; HashMap countsByPeer = new HashMap(); // FIXME use a standard mutable int object, we have one somewhere for(int i=0;i<peerList.length;i++) { Peer p = peerList[i].getRemoteDetectedPeer(); if(p == null || p.isNull()) continue; // DNSRequester doesn't deal with our own node InetAddress ip = p.getAddress(true); if(!IPUtil.checkAddress(ip)) continue; if(countsByPeer.containsKey(ip)) { Integer count = (Integer) countsByPeer.get(ip); Integer newCount = new Integer(count.intValue()+1); countsByPeer.put(ip, newCount); } else { countsByPeer.put(ip, new Integer(1)); } } if(countsByPeer.size() == 0) return null; Iterator it = countsByPeer.keySet().iterator(); if(countsByPeer.size() == 1) { FreenetInetAddress a = new FreenetInetAddress((InetAddress)it.next()); lastIPAddress = a; return a; } // Pick most popular address // FIXME use multi-homing here InetAddress best = null; int bestPopularity = 0; while(it.hasNext()) { InetAddress cur = (InetAddress) it.next(); int curPop = ((Integer) (countsByPeer.get(cur))).intValue(); if(curPop > bestPopularity) { bestPopularity = curPop; best = cur; } } lastIPAddress = new FreenetInetAddress(best); } else { lastIPAddress = new FreenetInetAddress(oldIPAddress); } if (lastIPAddress == null) { this.alerts.register(primaryIPUndetectedAlert); } else { this.alerts.unregister(primaryIPUndetectedAlert); } return lastIPAddress; }
46731 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46731/cfb3d124bd90a30dd2d248980142647bd3400281/Node.java/clean/src/freenet/node/Node.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 478, 2842, 278, 382, 278, 1887, 5966, 6793, 22507, 1435, 288, 3639, 309, 12, 10601, 22507, 480, 446, 13, 288, 5411, 4242, 18, 17364, 12, 2211, 16, 315, 28365, 11000, 1758, 30, 13773, 1060...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 478, 2842, 278, 382, 278, 1887, 5966, 6793, 22507, 1435, 288, 3639, 309, 12, 10601, 22507, 480, 446, 13, 288, 5411, 4242, 18, 17364, 12, 2211, 16, 315, 28365, 11000, 1758, 30, 13773, 1060...
public void drop(DropTargetDropEvent e) { if(e.getDropAction() == DnDConstants.ACTION_COPY) { System.out.println("Dropping a Copy..."); } else if(e.getDropAction() == DnDConstants.ACTION_MOVE) { System.out.println("Dropping a Move..."); } else { System.out.println("Dropping Something else: " + e.getDropAction()); } try { TreeModel model = this.getModel(); ConfigContextModel config_model = (ConfigContextModel)model; DataFlavor my_flavor = new DataFlavor(ConfigElement.class, "VR Juggler Config Element"); Transferable tr = e.getTransferable(); // If this JTree has a valid JTreeModel and the incoming drop supports // the DataFlavor that we are trying to use. if(model instanceof ConfigContextModel && e.isDataFlavorSupported(my_flavor)) { // Get the ConfigElement that we are transfering. ConfigElement elm = (ConfigElement)tr.getTransferData(my_flavor); // Make sure that we are not trying to add an element to ourselves. ConfigBroker broker = new ConfigBrokerProxy(); java.util.List data_sources = config_model.getContext().getResources(); for(Iterator itr = data_sources.iterator() ; itr.hasNext() ; ) { java.util.List elm_list = broker.getElementsIn((String)itr.next()); if(elm_list.contains(elm)) { System.out.println("You can not drag an Element into a " + "context in which it already exists."); e.rejectDrop(); return; } } // Accept whatever action was sent to us. e.acceptDrop(e.getDropAction()); // Make sure this add goes through successfully if (!broker.add(config_model.getContext(), elm)) { e.rejectDrop(); throw new Exception("Could not add dropped ConfigElement into context."); } System.out.println("Drop completed..."); e.dropComplete(true); } else { e.rejectDrop(); } } catch(Exception ex) { System.out.println(ex); ex.printStackTrace(); } }
7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/b04bf75693ebb48de502e187ede5f4f33fdc76c5/ElementTree.java/clean/modules/jackal/editors/org/vrjuggler/jccl/editors/ElementTree.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 918, 3640, 12, 7544, 2326, 7544, 1133, 425, 13, 282, 288, 1377, 309, 12, 73, 18, 588, 7544, 1803, 1435, 422, 463, 82, 40, 2918, 18, 12249, 67, 24875, 13, 1377, 288, 540, 2332, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 3640, 12, 7544, 2326, 7544, 1133, 425, 13, 282, 288, 1377, 309, 12, 73, 18, 588, 7544, 1803, 1435, 422, 463, 82, 40, 2918, 18, 12249, 67, 24875, 13, 1377, 288, 540, 2332, 1...
Object[] args = { ((NativeFunction) funObj).names[0] }; String msg = Context.getMessage("msg.incompat.call", args);
String name = ((NativeFunction) funObj).names[0]; String msg = Context.getMessage1("msg.incompat.call", name);
private static NativeDate checkInstance(Scriptable obj, Function funObj) { if (obj == null || !(obj instanceof NativeDate)) { Context cx = Context.getCurrentContext(); Object[] args = { ((NativeFunction) funObj).names[0] }; String msg = Context.getMessage("msg.incompat.call", args); throw NativeGlobal.constructError(cx, "TypeError", msg, funObj); } return (NativeDate) obj; }
47609 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47609/e737c6d867e82d4ba7fd00e7e388c9c8da824ff0/NativeDate.java/clean/js/rhino/src/org/mozilla/javascript/NativeDate.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 760, 16717, 1626, 866, 1442, 12, 3651, 429, 1081, 16, 4766, 5411, 4284, 9831, 2675, 13, 288, 3639, 309, 261, 2603, 422, 446, 747, 401, 12, 2603, 1276, 16717, 1626, 3719, 288, 5411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 16717, 1626, 866, 1442, 12, 3651, 429, 1081, 16, 4766, 5411, 4284, 9831, 2675, 13, 288, 3639, 309, 261, 2603, 422, 446, 747, 401, 12, 2603, 1276, 16717, 1626, 3719, 288, 5411, ...
public static int breadthFirstTargetSearch(AtomContainer ac, Vector sphere, Atom target, int pathLength, int cutOff) { pathLength++; if (pathLength > cutOff) { return -1; } Atom atom = null; Atom nextAtom = null; Vector newSphere = new Vector(); for (int f = 0; f < sphere.size(); f++) { atom = (Atom) sphere.elementAt(f); Bond[] bonds = ac.getConnectedBonds(atom); for (int g = 0; g < bonds.length; g++) { if (!bonds[g].flags[VISITED]) { bonds[g].flags[VISITED] = true; } nextAtom = bonds[g].getConnectedAtom(atom); if (!nextAtom.flags[VISITED]) { if (nextAtom == target) { return pathLength; } newSphere.addElement(nextAtom); nextAtom.flags[VISITED] = true; } } } if (newSphere.size() > 0) { return breadthFirstTargetSearch(ac, newSphere, target, pathLength, cutOff); } return -1; }
45167 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45167/047add52eb9bac7efb1cd80d52e6bf8b3bbe2702/PathTools.java/buggy/org/openscience/cdk/tools/PathTools.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3845, 474, 70, 25254, 3759, 2326, 2979, 12, 3641, 2170, 1077, 16, 21680, 9346, 16, 3641, 3299, 16, 474, 803, 1782, 16, 474, 5150, 7210, 15329, 202, 202, 803, 1782, 9904, 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, 225, 202, 482, 3845, 474, 70, 25254, 3759, 2326, 2979, 12, 3641, 2170, 1077, 16, 21680, 9346, 16, 3641, 3299, 16, 474, 803, 1782, 16, 474, 5150, 7210, 15329, 202, 202, 803, 1782, 9904, 31, 2...
CameraParameters params = viewer.getCameraParameters();
CameraParameters params = viewer.getCameraParameters();
public void run(String[] args) { canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities()); canvas.addGLEventListener(new Listener()); canvas.setNoAutoRedrawMode(true); Frame frame = new Frame("ARB_shadow Shadows"); frame.setLayout(new BorderLayout()); canvas.setSize(512, 512); frame.add(canvas, BorderLayout.CENTER); frame.pack(); frame.show(); canvas.requestFocus(); frame.addWindowListener(new WindowAdapter() { public void windowClosing(WindowEvent e) { quit = true; } }); while (!quit) { if (viewer != null) { viewer.update(); // Grab these values once per render to avoid multithreading // issues with their values being changed by manipulation from // the AWT thread during the render CameraParameters params = viewer.getCameraParameters(); cameraPerspective.set(params.getProjectionMatrix()); cameraInverseTransform.set(params.getModelviewMatrix()); cameraTransform.set(cameraInverseTransform); cameraTransform.invertRigid(); spotlightTransform.set(spotlight.getTransform()); spotlightInverseTransform.set(spotlightTransform); spotlightInverseTransform.invertRigid(); objectTransform.set(object.getTransform()); } if (displayMode == RENDER_SCENE_FROM_CAMERA_VIEW_SHADOWED || !fullyInitialized) { if (pbuffer != null) { pbuffer.display(); } } canvas.display(); } System.exit(0); }
56950 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56950/beaca5fa8a64e8b7c5e9452fa9828eb9a217bd2e/HWShadowmapsSimple.java/buggy/src/demos/hwShadowmapsSimple/HWShadowmapsSimple.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 1086, 12, 780, 8526, 833, 13, 288, 565, 5953, 273, 10252, 16149, 1733, 18, 588, 1733, 7675, 2640, 11261, 12971, 12, 2704, 10252, 14012, 10663, 565, 5953, 18, 1289, 43, 900, 616...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 780, 8526, 833, 13, 288, 565, 5953, 273, 10252, 16149, 1733, 18, 588, 1733, 7675, 2640, 11261, 12971, 12, 2704, 10252, 14012, 10663, 565, 5953, 18, 1289, 43, 900, 616...
if (upgrade) lookup = database.getOneRow("SELECT ID_LOGLEVEL FROM " + tablename + " WHERE CODE = '" + code[i] + "'");
if (upgrade) lookup = database.getOneRow("SELECT ID_LOGLEVEL FROM " + tablename + " WHERE " + database.getDatabaseMeta().quoteField("CODE") + " = '" + code[i] + "'");
public void createRepositorySchema(IProgressMonitor monitor, boolean upgrade) throws KettleDatabaseException { Row table; String sql; String tablename; String indexname; String keyfield[]; String user[], pass[], code[], desc[], prof[]; int KEY = 9; // integer, no need for bigint! log.logBasic(toString(), "Starting to create or modify the repository tables..."); if (monitor!=null) monitor.beginTask((upgrade?"Upgrading ":"Creating")+" the Kettle repository...", 31); setAutoCommit(true); ////////////////////////////////////////////////////////////////////////////////// // R_DATABASE_TYPE // // Create table... // boolean ok_database_type = true; table = new Row(); tablename = "R_DATABASE_TYPE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DATABASE_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DATABASE_TYPE", false); if (sql != null && sql.length() > 0) { try { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created/altered table " + tablename); } catch (KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to create or modify table " + tablename, dbe); } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_database_type) { // // Populate... // code = DatabaseMeta.getDBTypeDescList(); desc = DatabaseMeta.getDBTypeDescLongList(); database.prepareInsert(table, tablename); for (int i = 1; i < code.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_DATABASE_TYPE FROM " + tablename + " WHERE CODE = '" + code[i] + "'"); if (lookup == null) { long nextid = getNextDatabaseTypeID(); table = new Row(); table.addValue(new Value("ID_DATABASE_TYPE", nextid)); table.addValue(new Value("CODE", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); database.setValuesInsert(table); database.insertRow(); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch (KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_DATABASE_CONTYPE // // Create table... // boolean ok_database_contype = true; table = new Row(); tablename = "R_DATABASE_CONTYPE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DATABASE_CONTYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DATABASE_CONTYPE", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_database_contype) { // // Populate with data... // code = DatabaseMeta.access_type_desc; desc = DatabaseMeta.db_access_desc_long; database.prepareInsert(table, tablename); for (int i = 0; i < code.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_DATABASE_CONTYPE FROM " + tablename + " WHERE CODE = '" + code[i] + "'"); if (lookup == null) { long nextid = getNextDatabaseConnectionTypeID(); table = new Row(); table.addValue(new Value("ID_DATABASE_CONTYPE", nextid)); table.addValue(new Value("CODE", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); database.setValuesInsert(table); database.insertRow(); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_NOTE // // Create table... table = new Row(); tablename = "R_NOTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_NOTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); table.addValue(new Value("GUI_LOCATION_X", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_LOCATION_Y", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_LOCATION_WIDTH", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_LOCATION_HEIGHT", Value.VALUE_TYPE_INTEGER, 6, 0)); sql = database.getDDL(tablename, table, null, false, "ID_NOTE", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_DATABASE // // Create table... table = new Row(); tablename = "R_DATABASE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DATABASE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ID_DATABASE_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DATABASE_CONTYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("HOST_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DATABASE_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("PORT", Value.VALUE_TYPE_INTEGER, 7, 0)); table.addValue(new Value("USERNAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("PASSWORD", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("SERVERNAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DATA_TBS", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("INDEX_TBS", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DATABASE", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_DATABASE_ATTRIBUTE // // Create table... table = new Row(); tablename = "R_DATABASE_ATTRIBUTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DATABASE_ATTRIBUTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DATABASE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DATABASE_ATTRIBUTE", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_AK"; keyfield = new String[] { "ID_DIRECTORY_PARENT", "DIRECTORY_NAME" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_DIRECTORY // // Create table... table = new Row(); tablename = "R_DIRECTORY"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DIRECTORY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DIRECTORY_PARENT", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("DIRECTORY_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DIRECTORY", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_AK"; keyfield = new String[] { "ID_DIRECTORY_PARENT", "DIRECTORY_NAME" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_TRANSFORMATION // // Create table... table = new Row(); tablename = "R_TRANSFORMATION"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DIRECTORY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ID_STEP_READ", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_WRITE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_INPUT", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_OUTPUT", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_UPDATE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DATABASE_LOG", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("TABLE_NAME_LOG", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("USE_BATCHID", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("USE_LOGFIELD", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("ID_DATABASE_MAXDATE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("TABLE_NAME_MAXDATE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("FIELD_NAME_MAXDATE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("OFFSET_MAXDATE", Value.VALUE_TYPE_NUMBER, 12, 2)); table.addValue(new Value("DIFF_MAXDATE", Value.VALUE_TYPE_NUMBER, 12, 2)); table.addValue(new Value("MODIFIED_USER", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("MODIFIED_DATE", Value.VALUE_TYPE_DATE, 20, 0)); table.addValue(new Value("SIZE_ROWSET", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, "ID_TRANSFORMATION", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } // In case of an update, the added column R_TRANSFORMATION.ID_DIRECTORY == NULL!!! database.execStatement("UPDATE " + tablename + " SET ID_DIRECTORY=0 WHERE ID_DIRECTORY IS NULL"); if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_TRANS_ATTRIBUTE // // Create table... table = new Row(); tablename = "R_TRANS_ATTRIBUTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_TRANS_ATTRIBUTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NR", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_NUM", Value.VALUE_TYPE_NUMBER, 13, 2)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_TRANS_ATTRIBUTE", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_TRANS_ATTRIBUTE_LOOKUP"; keyfield = new String[] { "ID_TRANSFORMATION", "CODE", "NR" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_DEPENDENCY // // Create table... table = new Row(); tablename = "R_DEPENDENCY"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_DEPENDENCY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DATABASE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("TABLE_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("FIELD_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_DEPENDENCY", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); // // R_TRANS_HOP // // Create table... table = new Row(); tablename = "R_TRANS_HOP"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_TRANS_HOP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_FROM", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP_TO", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ENABLED", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_TRANS_HOP", false); if (sql != null && sql.length() > 0) { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); /////////////////////////////////////////////////////////////////////////////// // R_TRANS_STEP_CONDITION // table = new Row(); tablename = "R_TRANS_STEP_CONDITION"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_CONDITION", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, null, false); if (sql != null && sql.length() > 0) // Doesn't exists: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); /////////////////////////////////////////////////////////////////////////////// // R_CONDITION // table = new Row(); tablename = "R_CONDITION"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_CONDITION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_CONDITION_PARENT", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NEGATED", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("OPERATOR", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("LEFT_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("CONDITION_FUNCTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("RIGHT_NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ID_VALUE_RIGHT", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, "ID_CONDITION", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); /////////////////////////////////////////////////////////////////////////////// // R_VALUE // tablename = "R_VALUE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table = new Row(); table.addValue(new Value("ID_VALUE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_TYPE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("IS_NULL", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_VALUE", false); if (sql != null && sql.length() > 0) // Doesn't exists: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_STEP_TYPE // // Create table... boolean ok_step_type = true; table = new Row(); tablename = "R_STEP_TYPE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_STEP_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("HELPTEXT", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_STEP_TYPE", false); if (sql != null && sql.length() > 0) // Doesn't exists: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_step_type) { updateStepTypes(); log.logDetailed(toString(), "Populated table " + tablename); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_STEP // // Create table table = new Row(); tablename = "R_STEP"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_STEP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); table.addValue(new Value("ID_STEP_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("DISTRIBUTE", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("COPIES", Value.VALUE_TYPE_INTEGER, 3, 0)); table.addValue(new Value("GUI_LOCATION_X", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_LOCATION_Y", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_DRAW", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_STEP", false); if (sql != null && sql.length() > 0) // Doesn't exists: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_STEP_ATTRIBUTE // // Create table... tablename = "R_STEP_ATTRIBUTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table = new Row(); table.addValue(new Value("ID_STEP_ATTRIBUTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NR", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_NUM", Value.VALUE_TYPE_NUMBER, 13, 2)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_STEP_ATTRIBUTE", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_LOOKUP"; keyfield = new String[] { "ID_STEP", "CODE", "NR" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_STEP_DATABASE // // Keeps the links between transformation steps and databases. // That way investigating dependencies becomes easier to program. // // Create table... tablename = "R_STEP_DATABASE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table = new Row(); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_STEP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DATABASE", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, null, false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_LU1"; keyfield = new String[] { "ID_TRANSFORMATION" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, false, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } try { indexname = "IDX_" + tablename.substring(2) + "_LU2"; keyfield = new String[] { "ID_DATABASE" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, false, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_TRANS_NOTE // // Create table... table = new Row(); tablename = "R_TRANS_NOTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_TRANSFORMATION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_NOTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, null, false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_LOGLEVEL // // Create table... boolean ok_loglevel = true; tablename = "R_LOGLEVEL"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table = new Row(); table.addValue(new Value("ID_LOGLEVEL", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_LOGLEVEL", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_loglevel) { // // Populate with data... // code = LogWriter.logLevelDescription; desc = LogWriter.log_level_desc_long; database.prepareInsert(table, tablename); for (int i = 1; i < code.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_LOGLEVEL FROM " + tablename + " WHERE CODE = '" + code[i] + "'"); if (lookup == null) { long nextid = getNextLoglevelID(); table = new Row(); table.addValue(new Value("ID_LOGLEVEL", nextid)); table.addValue(new Value("CODE", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); database.setValuesInsert(table); database.insertRow(); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_LOG // // Create table... table = new Row(); tablename = "R_LOG"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_LOG", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ID_LOGLEVEL", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("LOGTYPE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("FILENAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("FILEEXTENTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ADD_DATE", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("ADD_TIME", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("ID_DATABASE_LOG", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("TABLE_NAME_LOG", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_LOG", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOB // // Create table... table = new Row(); tablename = "R_JOB"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_DIRECTORY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ID_DATABASE_LOG", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("TABLE_NAME_LOG", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("MODIFIED_USER", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("MODIFIED_DATE", Value.VALUE_TYPE_DATE, 20, 0)); table.addValue(new Value("USE_BATCH_ID", Value.VALUE_TYPE_BOOLEAN, 0, 0)); table.addValue(new Value("PASS_BATCH_ID", Value.VALUE_TYPE_BOOLEAN, 0, 0)); table.addValue(new Value("USE_LOGFIELD", Value.VALUE_TYPE_BOOLEAN, 0, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOB", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOBENTRY_TYPE // // Create table... boolean ok_jobentry_type = true; table = new Row(); tablename = "R_JOBENTRY_TYPE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOBENTRY_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOBENTRY_TYPE", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_jobentry_type) { // // Populate with data... // updateJobEntryTypes(); log.logDetailed(toString(), "Populated table " + tablename); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOBENTRY // // Create table... table = new Row(); tablename = "R_JOBENTRY"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOBENTRY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOBENTRY", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOBENTRY_COPY // // Create table... table = new Row(); tablename = "R_JOBENTRY_COPY"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOBENTRY_COPY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY_TYPE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NR", Value.VALUE_TYPE_INTEGER, 4, 0)); table.addValue(new Value("GUI_LOCATION_X", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_LOCATION_Y", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("GUI_DRAW", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("PARALLEL", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOBENTRY_COPY", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOBENTRY_ATTRIBUTE // // Create table... table = new Row(); tablename = "R_JOBENTRY_ATTRIBUTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOBENTRY_ATTRIBUTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NR", Value.VALUE_TYPE_INTEGER, 6, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("VALUE_NUM", Value.VALUE_TYPE_NUMBER, 13, 2)); table.addValue(new Value("VALUE_STR", Value.VALUE_TYPE_STRING, REP_STRING_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOBENTRY_ATTRIBUTE", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_LOOKUP"; keyfield = new String[] { "ID_JOBENTRY_ATTRIBUTE", "CODE", "NR" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOB_HOP // // Create table... table = new Row(); tablename = "R_JOB_HOP"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOB_HOP", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY_COPY_FROM", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_JOBENTRY_COPY_TO", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ENABLED", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("EVALUATION", Value.VALUE_TYPE_BOOLEAN, 1, 0)); table.addValue(new Value("UNCONDITIONAL", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_JOB_HOP", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_JOB_NOTE // // Create table... table = new Row(); tablename = "R_JOB_NOTE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_JOB", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_NOTE", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, null, false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (monitor!=null) monitor.worked(1); /////////////////////////////////////////////////////////////////////////////////// // // User tables... // /////////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////////// // // R_PROFILE // // Create table... Map profiles = new Hashtable(); boolean ok_profile = true; tablename = "R_PROFILE"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table = new Row(); table.addValue(new Value("ID_PROFILE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_PROFILE", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_profile) { // // Populate with data... // code = new String[] { "Administrator", "User", "Read-only" }; desc = new String[] { "Administrator profile, manage users", "Normal user, all tools", "Read-only users" }; database.prepareInsert(table, tablename); for (int i = 0; i < code.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_PROFILE FROM " + tablename + " WHERE NAME = '" + code[i] + "'"); if (lookup == null) { long nextid = getNextProfileID(); table = new Row(); table.addValue(new Value("ID_PROFILE", nextid)); table.addValue(new Value("NAME", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); database.setValuesInsert(table); database.insertRow(); log.logDetailed(toString(), "Inserted new row into table "+tablename+" : "+table); profiles.put(code[i], new Long(nextid)); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_USER // // Create table... Map users = new Hashtable(); boolean ok_user = true; table = new Row(); tablename = "R_USER"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_USER", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_PROFILE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("LOGIN", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("PASSWORD", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("NAME", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("ENABLED", Value.VALUE_TYPE_BOOLEAN, 1, 0)); sql = database.getDDL(tablename, table, null, false, "ID_USER", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_user) { // // Populate with data... // user = new String[] { "admin", "guest" }; pass = new String[] { "admin", "guest" }; code = new String[] { "Administrator", "Guest account" }; desc = new String[] { "User manager", "Read-only guest account" }; prof = new String[] { "Administrator", "Read-only" }; database.prepareInsert(table, tablename); for (int i = 0; i < user.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_USER FROM " + tablename + " WHERE LOGIN = '" + user[i] + "'"); if (lookup == null) { long nextid = getNextUserID(); String password = Encr.encryptPassword(pass[i]); Long profileID = (Long)profiles.get( prof[i] ); long id_profile = -1L; if (profileID!=null) id_profile = profileID.longValue(); table = new Row(); table.addValue(new Value("ID_USER", nextid)); table.addValue(new Value("ID_PROFILE", id_profile)); table.addValue(new Value("LOGIN", user[i])); table.addValue(new Value("PASSWORD", password)); table.addValue(new Value("NAME", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); table.addValue(new Value("ENABLED", true)); database.setValuesInsert(table); database.insertRow(); users.put(user[i], new Long(nextid)); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_PERMISSION // // Create table... Map permissions = new Hashtable(); boolean ok_permission = true; table = new Row(); tablename = "R_PERMISSION"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_PERMISSION", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("CODE", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); table.addValue(new Value("DESCRIPTION", Value.VALUE_TYPE_STRING, REP_STRING_CODE_LENGTH, 0)); sql = database.getDDL(tablename, table, null, false, "ID_PERMISSION", false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_permission) { // // Populate with data... // code = PermissionMeta.permission_type_desc; desc = PermissionMeta.permissionTypeLongDesc; database.prepareInsert(table, tablename); for (int i = 1; i < code.length; i++) { Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_PERMISSION FROM " + tablename + " WHERE CODE = '" + code[i] + "'"); if (lookup == null) { long nextid = getNextPermissionID(); table = new Row(); table.addValue(new Value("ID_PERMISSION", nextid)); table.addValue(new Value("CODE", code[i])); table.addValue(new Value("DESCRIPTION", desc[i])); database.setValuesInsert(table); database.insertRow(); log.logDetailed(toString(), "Inserted new row into table "+tablename+" : "+table); permissions.put(code[i], new Long(nextid)); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); ////////////////////////////////////////////////////////////////////////////////// // // R_PROFILE_PERMISSION // // Create table... boolean ok_profile_permission = true; table = new Row(); tablename = "R_PROFILE_PERMISSION"; if (monitor!=null) monitor.subTask("Checking table "+tablename); table.addValue(new Value("ID_PROFILE", Value.VALUE_TYPE_INTEGER, KEY, 0)); table.addValue(new Value("ID_PERMISSION", Value.VALUE_TYPE_INTEGER, KEY, 0)); sql = database.getDDL(tablename, table, null, false, null, false); if (sql != null && sql.length() > 0) // Doesn't exist: create the table... { log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created or altered table " + tablename); try { indexname = "IDX_" + tablename.substring(2) + "_PK"; keyfield = new String[] { "ID_PROFILE", "ID_PERMISSION" }; if (!database.checkIndexExists(tablename, keyfield)) { sql = database.getCreateIndexStatement(tablename, indexname, keyfield, false, true, false, false); log.logDetailed(toString(), "executing SQL statements: "+Const.CR+sql); database.execStatements(sql); log.logDetailed(toString(), "Created lookup index " + indexname + " on " + tablename); } } catch(KettleDatabaseException kdbe) { // Ignore this one: index is not properly detected, it already exists... } } else { log.logDetailed(toString(), "Table " + tablename + " is OK."); } if (ok_profile_permission) { database.prepareInsert(table, tablename); // Administrator default: Long profileID = (Long)profiles.get( "Administrator"); long id_profile = -1L; if (profileID!=null) id_profile = profileID.longValue(); log.logDetailed(toString(), "Administrator profile id = "+id_profile); String perms[] = new String[] { PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_ADMIN], PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_TRANSFORMATION], PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_JOB], PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_SCHEMA] }; for (int i=0;i < perms.length ; i++) { Long permissionID = (Long) permissions.get(perms[i]); long id_permission = -1L; if (permissionID!=null) id_permission = permissionID.longValue(); log.logDetailed(toString(), "Permission id for '"+perms[i]+"' = "+id_permission); Row lookup = null; if (upgrade) { String lookupSQL = "SELECT ID_PROFILE FROM " + tablename + " WHERE ID_PROFILE=" + id_profile + " AND ID_PERMISSION=" + id_permission; log.logDetailed(toString(), "Executing SQL: "+lookupSQL); lookup = database.getOneRow(lookupSQL); } if (lookup == null) // if the combination is not yet there, insert... { String insertSQL="INSERT INTO "+tablename+"(ID_PROFILE, ID_PERMISSION) VALUES("+id_profile+","+id_permission+")"; database.execStatement(insertSQL); log.logDetailed(toString(), "insertSQL = ["+insertSQL+"]"); } else { log.logDetailed(toString(), "Found id_profile="+id_profile+", id_permission="+id_permission); } } // User profile profileID = (Long)profiles.get( "User" ); id_profile = -1L; if (profileID!=null) id_profile = profileID.longValue(); log.logDetailed(toString(), "User profile id = "+id_profile); perms = new String[] { PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_TRANSFORMATION], PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_JOB], PermissionMeta.permission_type_desc[PermissionMeta.TYPE_PERMISSION_SCHEMA] }; for (int i = 0; i < perms.length; i++) { Long permissionID = (Long) permissions.get(perms[i]); long id_permission = -1L; if (permissionID!=null) id_permission = permissionID.longValue(); Row lookup = null; if (upgrade) lookup = database.getOneRow("SELECT ID_PROFILE FROM " + tablename + " WHERE ID_PROFILE=" + id_profile + " AND ID_PERMISSION=" + id_permission); if (lookup == null) // if the combination is not yet there, insert... { table = new Row(); table.addValue(new Value("ID_PROFILE", id_profile)); table.addValue(new Value("ID_PERMISSION", id_permission)); database.setValuesInsert(table); database.insertRow(); } } try { database.closeInsert(); log.logDetailed(toString(), "Populated table " + tablename); } catch(KettleDatabaseException dbe) { throw new KettleDatabaseException("Unable to close insert after populating table " + tablename, dbe); } } if (monitor!=null) monitor.worked(1); if (monitor!=null) monitor.done(); log.logBasic(toString(), (upgrade?"Upgraded":"Created")+ " "+repositoryTableNames.length+" repository tables."); }
58146 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/58146/df56d54301bd7b5755ca499797f6d9bd4bb6f86f/Repository.java/clean/kettle/src/be/ibridge/kettle/repository/Repository.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 752, 3305, 3078, 12, 45, 5491, 7187, 6438, 16, 1250, 8400, 13, 1216, 1475, 278, 5929, 4254, 503, 202, 95, 202, 202, 1999, 1014, 31, 202, 202, 780, 1847, 31, 202, 202, 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, 225, 202, 482, 918, 752, 3305, 3078, 12, 45, 5491, 7187, 6438, 16, 1250, 8400, 13, 1216, 1475, 278, 5929, 4254, 503, 202, 95, 202, 202, 1999, 1014, 31, 202, 202, 780, 1847, 31, 202, 202, 7...
{ mT69(); if (failed) return ;
{ mT72(); if (failed) return ;
public void mTokens() throws RecognitionException { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: ( T26 | T27 | T28 | T29 | T30 | T31 | T32 | T33 | T34 | T35 | T36 | T37 | T38 | T39 | T40 | T41 | T42 | T43 | T44 | T45 | T46 | T47 | T48 | T49 | T50 | T51 | T52 | T53 | T54 | T55 | T56 | T57 | T58 | T59 | T60 | T61 | T62 | T63 | T64 | T65 | T66 | T67 | T68 | T69 | T70 | T71 | T72 | T73 | RHS | WS | INT | FLOAT | STRING | BOOL | ID | SH_STYLE_SINGLE_LINE_COMMENT | C_STYLE_SINGLE_LINE_COMMENT | CURLY_CHUNK | LEFT_PAREN | RIGHT_PAREN | LEFT_SQUARE | RIGHT_SQUARE | MULTI_LINE_COMMENT | MISC ) int alt21=64; alt21 = dfa21.predict(input); switch (alt21) { case 1 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:10: T26 { mT26(); if (failed) return ; } break; case 2 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:14: T27 { mT27(); if (failed) return ; } break; case 3 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:18: T28 { mT28(); if (failed) return ; } break; case 4 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:22: T29 { mT29(); if (failed) return ; } break; case 5 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:26: T30 { mT30(); if (failed) return ; } break; case 6 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:30: T31 { mT31(); if (failed) return ; } break; case 7 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:34: T32 { mT32(); if (failed) return ; } break; case 8 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:38: T33 { mT33(); if (failed) return ; } break; case 9 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:42: T34 { mT34(); if (failed) return ; } break; case 10 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:46: T35 { mT35(); if (failed) return ; } break; case 11 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:50: T36 { mT36(); if (failed) return ; } break; case 12 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:54: T37 { mT37(); if (failed) return ; } break; case 13 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:58: T38 { mT38(); if (failed) return ; } break; case 14 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:62: T39 { mT39(); if (failed) return ; } break; case 15 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:66: T40 { mT40(); if (failed) return ; } break; case 16 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:70: T41 { mT41(); if (failed) return ; } break; case 17 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:74: T42 { mT42(); if (failed) return ; } break; case 18 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:78: T43 { mT43(); if (failed) return ; } break; case 19 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:82: T44 { mT44(); if (failed) return ; } break; case 20 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:86: T45 { mT45(); if (failed) return ; } break; case 21 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:90: T46 { mT46(); if (failed) return ; } break; case 22 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:94: T47 { mT47(); if (failed) return ; } break; case 23 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:98: T48 { mT48(); if (failed) return ; } break; case 24 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:102: T49 { mT49(); if (failed) return ; } break; case 25 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:106: T50 { mT50(); if (failed) return ; } break; case 26 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:110: T51 { mT51(); if (failed) return ; } break; case 27 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:114: T52 { mT52(); if (failed) return ; } break; case 28 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:118: T53 { mT53(); if (failed) return ; } break; case 29 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:122: T54 { mT54(); if (failed) return ; } break; case 30 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:126: T55 { mT55(); if (failed) return ; } break; case 31 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:130: T56 { mT56(); if (failed) return ; } break; case 32 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:134: T57 { mT57(); if (failed) return ; } break; case 33 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:138: T58 { mT58(); if (failed) return ; } break; case 34 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:142: T59 { mT59(); if (failed) return ; } break; case 35 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:146: T60 { mT60(); if (failed) return ; } break; case 36 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:150: T61 { mT61(); if (failed) return ; } break; case 37 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:154: T62 { mT62(); if (failed) return ; } break; case 38 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:158: T63 { mT63(); if (failed) return ; } break; case 39 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:162: T64 { mT64(); if (failed) return ; } break; case 40 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:166: T65 { mT65(); if (failed) return ; } break; case 41 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:170: T66 { mT66(); if (failed) return ; } break; case 42 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:174: T67 { mT67(); if (failed) return ; } break; case 43 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:178: T68 { mT68(); if (failed) return ; } break; case 44 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:182: T69 { mT69(); if (failed) return ; } break; case 45 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:186: T70 { mT70(); if (failed) return ; } break; case 46 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:190: T71 { mT71(); if (failed) return ; } break; case 47 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:194: T72 { mT72(); if (failed) return ; } break; case 48 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:198: T73 { mT73(); if (failed) return ; } break; case 49 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:202: RHS { mRHS(); if (failed) return ; } break; case 50 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:206: WS { mWS(); if (failed) return ; } break; case 51 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:209: INT { mINT(); if (failed) return ; } break; case 52 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:213: FLOAT { mFLOAT(); if (failed) return ; } break; case 53 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:219: STRING { mSTRING(); if (failed) return ; } break; case 54 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:226: BOOL { mBOOL(); if (failed) return ; } break; case 55 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:231: ID { mID(); if (failed) return ; } break; case 56 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:234: SH_STYLE_SINGLE_LINE_COMMENT { mSH_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ; } break; case 57 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:263: C_STYLE_SINGLE_LINE_COMMENT { mC_STYLE_SINGLE_LINE_COMMENT(); if (failed) return ; } break; case 58 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:291: CURLY_CHUNK { mCURLY_CHUNK(); if (failed) return ; } break; case 59 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:303: LEFT_PAREN { mLEFT_PAREN(); if (failed) return ; } break; case 60 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:314: RIGHT_PAREN { mRIGHT_PAREN(); if (failed) return ; } break; case 61 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:326: LEFT_SQUARE { mLEFT_SQUARE(); if (failed) return ; } break; case 62 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:338: RIGHT_SQUARE { mRIGHT_SQUARE(); if (failed) return ; } break; case 63 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:351: MULTI_LINE_COMMENT { mMULTI_LINE_COMMENT(); if (failed) return ; } break; case 64 : // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1:370: MISC { mMISC(); if (failed) return ; } break; } }
31577 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/31577/63bc7036e62ae854cec463d59712c173f74e984c/DRLLexer.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLLexer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 312, 5157, 1435, 1216, 9539, 288, 3639, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 312, 5157, 1435, 1216, 9539, 288, 3639, 368, 463, 31027, 14915, 1695, 10649, 8464, 1695, 10649, 8464, 7482, 1695, 12215, 17, 9576, 1695, 4816, 1695, 5254, 1695, 4683, 1695, 3341, ...
String colName = ( columns[i] ).getAlias( ); if ( colName == null || colName.trim( ).length( ) == 0 ) { colName = ( columns[i] ).getName( ); } queryExpr = DEUtil.getResultSetColumnExpression( colName ); selectedColumn = columns[i];
queryExpr = DEUtil.getResultSetColumnExpression( column.getColumnName( ) ); selectedColumn = column;
private void refreshValues( ) { resultList.clear( ); if ( columnChooser.isEnabled( ) ) { DataSetItemModel selectedColumn = null; try { BaseQueryDefinition query = (BaseQueryDefinition) DataSetManager.getCurrentInstance( ) .getPreparedQuery( getDataSetHandle( ) ) .getReportQueryDefn( ); String queryExpr = null; for ( int i = 0; i < columns.length; i++ ) { if ( columns[i].getName( ) .equals( columnChooser.getText( ) ) ) { String colName = ( columns[i] ).getAlias( ); if ( colName == null || colName.trim( ).length( ) == 0 ) { colName = ( columns[i] ).getName( ); } queryExpr = DEUtil.getResultSetColumnExpression( colName ); selectedColumn = columns[i]; break; } } if ( queryExpr == null ) { return; } ScriptExpression expression = new ScriptExpression( queryExpr ); String columnBindingName = "_$_COLUMNBINDINGNAME_$_"; query.addResultSetExpression( columnBindingName, expression ); //query.addExpression( expression, BaseTransform.ON_EACH_ROW ); IPreparedQuery preparedQuery = DataSetManager.getCurrentInstance( ) .getEngine( ) .prepare( (IQueryDefinition) query ); IQueryResults results = preparedQuery.execute( null ); if ( results != null ) { IResultIterator iter = results.getResultIterator( ); if ( iter != null ) { DateFormatter formatter = new DateFormatter( DATE_TIME_PATTERN ); while ( iter.next( ) ) { String result = null; if ( selectedColumn.getDataType( ) == DataType.DATE_TYPE ) { result = formatter.format( iter.getDate( columnBindingName ) ); } else { result = iter.getString( columnBindingName ); } if ( !StringUtil.isBlank( result ) && !resultList.contains( result ) ) { resultList.add( result ); } } } results.close( ); } } catch ( Exception e ) { ExceptionHandler.handle( e ); valueList.removeAll( ); valueList.deselectAll( ); updateButtons( ); } filteValues( ); } else { valueList.removeAll( ); valueList.deselectAll( ); updateButtons( ); } }
12803 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12803/2f8ed06fa90dc641e3bc351fa8bb23dd5eb33af8/ImportValueDialog.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/internal/ui/dialogs/ImportValueDialog.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 4460, 1972, 12, 262, 202, 95, 202, 202, 2088, 682, 18, 8507, 12, 11272, 202, 202, 430, 261, 1057, 17324, 18, 291, 1526, 12, 262, 262, 202, 202, 95, 1082, 202, 13676, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4460, 1972, 12, 262, 202, 95, 202, 202, 2088, 682, 18, 8507, 12, 11272, 202, 202, 430, 261, 1057, 17324, 18, 291, 1526, 12, 262, 262, 202, 202, 95, 1082, 202, 13676, 1...
throw new RemoteException(ex.getMessage());
throw new RemoteException(ex.getMessage());
public org.exist.soap.CollectionDesc getCollectionDesc(java.lang.String sessionId, java.lang.String collectionName) throws java.rmi.RemoteException { DBBroker broker = null; Session session = getSession(sessionId); Collection collection = null; try { broker = pool.get(session.getUser()); ///TODO : use dedicated function in XmldbURI if (collectionName == null) collectionName = DBBroker.ROOT_COLLECTION; collection = broker.openCollection(collectionName, Lock.READ_LOCK); if (collection == null) throw new EXistException("collection " + collectionName + " not found!"); CollectionDesc desc = new CollectionDesc(); Vector docs = new Vector(); Vector collections = new Vector(); if (collection.getPermissions().validate(session.getUser(), Permission.READ)) { DocumentImpl doc;// Hashtable hash; Permission perms; for (Iterator i = collection.iterator(broker); i.hasNext(); ) { doc = (DocumentImpl) i.next(); perms = doc.getPermissions(); DocumentDesc dd = new DocumentDesc();// hash = new Hashtable(4); dd.setName(doc.getFileName()); dd.setOwner(perms.getOwner()); dd.setGroup(perms.getOwnerGroup()); dd.setPermissions(perms.getPermissions()); dd.setType(doc.getResourceType() == DocumentImpl.BINARY_FILE ? DocumentType.BinaryResource : DocumentType.XMLResource); docs.addElement(dd); } for (Iterator i = collection.collectionIterator(); i.hasNext(); ) collections.addElement((String) i.next()); } Permission perms = collection.getPermissions(); desc.setCollections(new Strings((String[]) collections.toArray(new String[collections.size()]))); desc.setDocuments(new DocumentDescs((DocumentDesc[])docs.toArray(new DocumentDesc[docs.size()]))); desc.setName(collection.getName()); desc.setCreated(collection.getCreationTime()); desc.setOwner(perms.getOwner()); desc.setGroup(perms.getOwnerGroup()); desc.setPermissions(perms.getPermissions()); return desc; } catch (Exception ex){ throw new RemoteException(ex.getMessage()); } finally { if(collection != null) collection.release(); pool.release(broker); } }
2909 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2909/0909f8eb97be3b101ad96c593d2586e12ad0fd81/AdminSoapBindingImpl.java/clean/src/org/exist/soap/AdminSoapBindingImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2358, 18, 7398, 18, 19215, 18, 2532, 4217, 12075, 4217, 12, 6290, 18, 4936, 18, 780, 10338, 16, 2252, 18, 4936, 18, 780, 17137, 13, 1216, 2252, 18, 8864, 77, 18, 5169, 503, 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, 377, 1071, 2358, 18, 7398, 18, 19215, 18, 2532, 4217, 12075, 4217, 12, 6290, 18, 4936, 18, 780, 10338, 16, 2252, 18, 4936, 18, 780, 17137, 13, 1216, 2252, 18, 8864, 77, 18, 5169, 503, 288, ...
public IRubyObject initialize(RubyFixnum descriptor, IRubyObject[] args) { int fileno = RubyNumeric.fix2int(descriptor); String mode = null; if (args.length > 0) { mode = ((RubyString) args[0]).getValue(); } // See if we already have this descriptor open. // If so then we can mostly share the handler (keep open // file, but possibly change the mode). IOHandler existingIOHandler = getIOHandlerByFileno(fileno); if (existingIOHandler == null) { if (mode == null) { mode = "r"; } handler = new IOHandlerUnseekable(getRuntime(), fileno, mode); modes = new IOModes(getRuntime(), mode); registerIOHandler(handler); } else { // We are creating a new IO object that shares the same // IOHandler (and fileno). handler = existingIOHandler; // Inherit if no mode specified otherwise create new one modes = mode == null ? handler.getModes() : new IOModes(getRuntime(), mode); // Reset file based on modes. handler.reset(modes); } return this; }
50993 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50993/ae3178fbb3656e01c3d379a6255e1af956725271/RubyIO.java/clean/src/org/jruby/RubyIO.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 15908, 10340, 921, 4046, 12, 54, 10340, 8585, 2107, 4950, 16, 15908, 10340, 921, 8526, 833, 13, 288, 3639, 509, 24256, 273, 19817, 9902, 18, 904, 22, 474, 12, 12628, 1769, 3639, 514...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 15908, 10340, 921, 4046, 12, 54, 10340, 8585, 2107, 4950, 16, 15908, 10340, 921, 8526, 833, 13, 288, 3639, 509, 24256, 273, 19817, 9902, 18, 904, 22, 474, 12, 12628, 1769, 3639, 514...
public IOutputFolderQuery getOutputFolderQuery();
public OutputFolderQuery getOutputFolderQuery();
public IOutputFolderQuery getOutputFolderQuery();
9698 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9698/29a7e67182f4aa52eacbcf48fe8d0468c0194823/ClasspathModifierQueries.java/buggy/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/wizards/buildpaths/newsourcepage/ClasspathModifierQueries.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 467, 1447, 3899, 1138, 11062, 3899, 1138, 5621, 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, 0, 0, 0, 0, 0...
[ 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, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 467, 1447, 3899, 1138, 11062, 3899, 1138, 5621, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, ...
System.out.println("Couldn't get property desc for row: "+row);
public TableCellEditor getCellEditor(int row, int col) { // The first column is the tree; use the default editor if (col == 0) { return super.getCellEditor(row, col); } // Get the property desc for the row in question PropertyDesc prop_desc = getPropertyDescForRow(row); if (prop_desc == null) { System.out.println("Couldn't get property desc for row: "+row); return super.getCellEditor(row, col); } chunkCellEditor.setPropertyDesc(prop_desc); return chunkCellEditor; }
7933 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7933/f9e883a3917bb9deda9d9b553724efdb1f20cd06/ConfigChunkPropertySheet.java/clean/modules/jackal/editors/org/vrjuggler/jccl/editors/ConfigChunkPropertySheet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 565, 1071, 3555, 4020, 6946, 16458, 6946, 12, 474, 1027, 16, 509, 645, 13, 282, 288, 1377, 368, 1021, 1122, 1057, 353, 326, 2151, 31, 999, 326, 805, 4858, 1377, 309, 261, 1293, 422, 374, 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, 565, 1071, 3555, 4020, 6946, 16458, 6946, 12, 474, 1027, 16, 509, 645, 13, 282, 288, 1377, 368, 1021, 1122, 1057, 353, 326, 2151, 31, 999, 326, 805, 4858, 1377, 309, 261, 1293, 422, 374, 13,...
private void removeEdgeGraph(Object edge) { //System.err.println("Update " + edge); Object previousNode = getSource(edge); Map attributes = getAttributes(edge); List nodeChain = GraphConstants.getPoints(attributes); for (int index = 1; index < nodeChain.size(); index++) { Object currentNode = GraphUtilities.getRoot(model, nodeChain.get(index)); positionLayout.removeIntermediateNode(previousNode, currentNode, edge); previousNode = currentNode; } }
7616 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7616/5c358c8ed2d5c3d5c3e4ccdd92928173ede89561/RowLayout.java/buggy/trunk/taverna1.0/src/org/embl/ebi/escience/scuflui/graph/RowLayout.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 1206, 6098, 4137, 12, 921, 3591, 13, 202, 95, 202, 202, 759, 3163, 18, 370, 18, 8222, 2932, 1891, 315, 397, 3591, 1769, 202, 202, 921, 2416, 907, 273, 7889, 12, 7126, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1206, 6098, 4137, 12, 921, 3591, 13, 202, 95, 202, 202, 759, 3163, 18, 370, 18, 8222, 2932, 1891, 315, 397, 3591, 1769, 202, 202, 921, 2416, 907, 273, 7889, 12, 7126, ...
if (head == oldHead) { head = newHead; return true;
if (head == oldHead) { head = newHead; return true; } else return false;
protected synchronized boolean CASHead(Node oldHead, Node newHead) { if (head == oldHead) { head = newHead; return true; } else return false; }
4082 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4082/a6a25004fd5e24a1bc5f053aa539d01dc2553fbf/WaitFreeQueue.java/clean/src/java/org/logicalcobwebs/concurrent/WaitFreeQueue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 3852, 1250, 18293, 1414, 12, 907, 1592, 1414, 16, 2029, 394, 1414, 13, 288, 565, 309, 261, 1978, 422, 1592, 1414, 13, 288, 1377, 910, 273, 394, 1414, 31, 1377, 327, 638, 31, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 3852, 1250, 18293, 1414, 12, 907, 1592, 1414, 16, 2029, 394, 1414, 13, 288, 565, 309, 261, 1978, 422, 1592, 1414, 13, 288, 1377, 910, 273, 394, 1414, 31, 1377, 327, 638, 31, 565, ...
setAttribute("href", newValue); }
setAttribute("href", newValue); }
public void setHref(String newValue) { setAttribute("href", newValue); }
46079 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46079/a0ba982304fe9f3700209293da4d2533e292e5d2/WMLGoElementImpl.java/buggy/src/org/apache/wml/dom/WMLGoElementImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 15962, 12, 780, 6129, 13, 288, 565, 4730, 2932, 7547, 3113, 6129, 1769, 225, 289, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 444, 15962, 12, 780, 6129, 13, 288, 565, 4730, 2932, 7547, 3113, 6129, 1769, 225, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -1...
u3 = newIterNode; }
u3 = newIterNode; }
public void setIterNode(Node newIterNode) { u3 = newIterNode; }
47273 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47273/d31a76ee29d5978a9bec41e3ac9134cee024bcab/Node.java/clean/org/jruby/nodes/Node.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 2360, 907, 12, 907, 394, 2360, 907, 13, 288, 202, 202, 89, 23, 273, 394, 2360, 907, 31, 202, 97, 2, 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, 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, 225, 202, 482, 918, 444, 2360, 907, 12, 907, 394, 2360, 907, 13, 288, 202, 202, 89, 23, 273, 394, 2360, 907, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -10...
bugReporter.reportBug(new BugInstance("UW_UNCOND_WAIT",
bugReporter.reportBug(new BugInstance(this, "UW_UNCOND_WAIT",
public void sawOpcode(int seen) { switch (stage) { case 0: if (seen == MONITORENTER) stage = 1; break; case 1: if (seen == INVOKEVIRTUAL && getNameConstantOperand().equals("wait")) { bugReporter.reportBug(new BugInstance("UW_UNCOND_WAIT", getSigConstantOperand().equals("()V") ? NORMAL_PRIORITY : LOW_PRIORITY) .addClassAndMethod(this) .addSourceLine(this)); stage = 2; } break; } }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/471821a5392b2c785504cd8da1e82a1014496f4c/FindUnconditionalWait.java/clean/findbugs/src/java/edu/umd/cs/findbugs/detect/FindUnconditionalWait.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 19821, 22808, 12, 474, 5881, 13, 288, 202, 202, 9610, 261, 12869, 13, 288, 202, 202, 3593, 374, 30, 1082, 202, 430, 261, 15156, 422, 30215, 1285, 51, 7480, 654, 13, 9506,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 19821, 22808, 12, 474, 5881, 13, 288, 202, 202, 9610, 261, 12869, 13, 288, 202, 202, 3593, 374, 30, 1082, 202, 430, 261, 15156, 422, 30215, 1285, 51, 7480, 654, 13, 9506,...
for(Iterator i = alphabet.iterator(); i.hasNext(); ) { weight.put(i.next(), new Double(Double.NaN)); }
public SimpleDistribution(FiniteAlphabet alphabet) { this.alphabet = alphabet; this.weight = new HashMap(); for(Iterator i = alphabet.iterator(); i.hasNext(); ) { weight.put(i.next(), new Double(Double.NaN)); } try { setNullModel(new UniformDistribution(alphabet)); } catch (Exception e) { throw new BioError(e, "This should never fail. Something is screwed!"); } }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/3569b5a791e5c1ac021dbb0e4970dd36bb065d82/SimpleDistribution.java/buggy/src/org/biojava/bio/dist/SimpleDistribution.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 4477, 9003, 12, 26491, 27316, 10877, 13, 288, 565, 333, 18, 287, 8907, 273, 10877, 31, 565, 333, 18, 4865, 273, 394, 4317, 5621, 565, 364, 12, 3198, 277, 273, 10877, 18, 9838, 562...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4477, 9003, 12, 26491, 27316, 10877, 13, 288, 565, 333, 18, 287, 8907, 273, 10877, 31, 565, 333, 18, 4865, 273, 394, 4317, 5621, 565, 364, 12, 3198, 277, 273, 10877, 18, 9838, 562...
public ClassHash computeHash(JavaClass javaClass) { this.className = javaClass.getClassName(); Method[] methodList = new Method[javaClass.getMethods().length]; // Sort methods System.arraycopy(javaClass.getMethods(), 0, methodList, 0, javaClass.getMethods().length); Arrays.sort(methodList, new Comparator<Method>() { public int compare(Method o1, Method o2) { // sort by name, then signature int cmp = o1.getName().compareTo(o2.getName()); if (cmp != 0) return cmp; return o1.getSignature().compareTo(o2.getSignature()); } }); MessageDigest digest; try { digest = MessageDigest.getInstance("MD5"); } catch (NoSuchAlgorithmException e) { throw new IllegalStateException("No algorithm for computing class hash", e); } // Compute digest of names and signatures, in order. // Also, compute method hashes. CharsetEncoder encoder = Charset.forName("UTF-8").newEncoder(); for (int i = 0; i < methodList.length; ++i) { Method method = methodList[i]; work(digest, method.getName(), encoder); work(digest, method.getSignature(), encoder); MethodHash methodHash = new MethodHash().computeHash(method); methodHashMap.put(XMethodFactory.createXMethod(javaClass, method), methodHash); } classHash = digest.digest(); return this; }
10715 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10715/fce827b3fdaabc8f0ebf08c7537c2cdfbb6c0c75/ClassHash.java/buggy/findbugs/src/java/edu/umd/cs/findbugs/ba/ClassHash.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 1659, 2310, 3671, 2310, 12, 5852, 797, 2252, 797, 13, 288, 202, 202, 2211, 18, 12434, 273, 2252, 797, 18, 588, 3834, 5621, 9506, 202, 1305, 8526, 707, 682, 273, 394, 2985, 63,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1659, 2310, 3671, 2310, 12, 5852, 797, 2252, 797, 13, 288, 202, 202, 2211, 18, 12434, 273, 2252, 797, 18, 588, 3834, 5621, 9506, 202, 1305, 8526, 707, 682, 273, 394, 2985, 63,...
super( name ); }
super( name ); }
public TestPrivilegedAccessor( String name ) { super( name ); }
8150 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8150/41d0c555143b32264d17b23a852c72b3c230c394/TestPrivilegedAccessor.java/clean/test/src/org/lockss/test/TestPrivilegedAccessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7766, 18845, 8235, 12, 514, 508, 262, 288, 3639, 2240, 12, 508, 11272, 565, 289, 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, ...
[ 1, 1, 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, 0, 0, 0, 0, 0, 0, 0, 0...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 7766, 18845, 8235, 12, 514, 508, 262, 288, 3639, 2240, 12, 508, 11272, 565, 289, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -...
comment = rs.getString("comments");
comment = rs.getString("comment");
public java.sql.ResultSet getRow(int in_id) { comprator = 4; id = in_id; try { registerParameters(); rs = CStm.executeQuery(); while(rs.next()) { id_group = rs.getInt("id_group"); egn = rs.getString("egn"); nomlk = rs.getString("nomlk"); name = rs.getString("name"); comment = rs.getString("comments"); } } catch(java.sql.SQLException sqle) { sqle.printStackTrace(); } return rs; }
12667 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12667/610187d75e071b5c3acdee5e300ccfbc9072ab75/dbPerson.java/clean/src/nom/dbPerson.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 2252, 18, 4669, 18, 13198, 11835, 12, 474, 316, 67, 350, 13, 288, 3639, 532, 683, 639, 273, 1059, 31, 3639, 612, 273, 316, 67, 350, 31, 3639, 775, 288, 5411, 1744, 2402, 5621, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 2252, 18, 4669, 18, 13198, 11835, 12, 474, 316, 67, 350, 13, 288, 3639, 532, 683, 639, 273, 1059, 31, 3639, 612, 273, 316, 67, 350, 31, 3639, 775, 288, 5411, 1744, 2402, 5621, 5...
break;
break;
public void update(float secondsPassed) { if (isActive()) { secondsPassed *= getSpeed(); currentTime += secondsPassed; timePassed = currentTime - prevTime; if (timePassed < precision) return; prevTime = currentTime; // Update the current rotation matrix if needed. updateRotationMatrix(); if (currentTime >= getMinTime() && currentTime <= getMaxTime()) { if (controlFlow) { if (currentTime - releaseTime > 1.0f) { released = 0; releaseTime = currentTime; } particlesToCreate = (int) ((float) releaseRate * timePassed * (1.0f + releaseVariance * (FastMath.nextRandomFloat() - 0.5f))); if (particlesToCreate <= 0) particlesToCreate = 1; if (releaseRate - released <= 0) particlesToCreate = 0; } invScale.set(particlesGeometry.getLocalScale()); invScale.set(1f / invScale.x, 1f / invScale.y, 1f / invScale.z); int i = 0; boolean dead = true; needUpdateVerts = true; while (i < noParticles) { if (particles[i].updateAndCheck(timePassed) && (!controlFlow || particlesToCreate > 0)) { if (particles[i].status == Particle.DEAD && getRepeatType() == RT_CLAMP) { ; } else { dead = false; if (controlFlow) { released++; particlesToCreate--; } getRandomSpeed(particleSpeed); particles[i].recreateParticle(particleSpeed, getRandomLifeSpan()); particles[i].status = Particle.ALIVE; switch (getGeometry()) { case GS_LINE: particles[i].location.set(getLine().random()); break; case GS_RECTANGLE: particles[i].location.set(getRectangle() .random()); break; case GS_MESH: particles[i].location.set(getGeoMesh() .randomVertice()); break; case GS_POINT: default: particles[i].location.set(originCenter); break; } particles[i].location.multLocal(invScale); } } else dead = false; i++; } particlesGeometry.setVertices(geometryCoordinates); particlesGeometry.setColors(appearanceColors); if (dead) setActive(false); } if (particlesGeometry.getModelBound() != null) { particlesGeometry.getModelBound().computeFromPoints( particlesGeometry.getVertices()); } } }
19503 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/19503/1ab8bb9043a0f2de6664e88a56dd1c779ede45fc/ParticleManager.java/buggy/src/com/jmex/effects/ParticleManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1089, 12, 5659, 3974, 22530, 13, 288, 3639, 309, 261, 291, 3896, 10756, 288, 5411, 3974, 22530, 6413, 1322, 5868, 5621, 5411, 6680, 1011, 3974, 22530, 31, 5411, 813, 22530, 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, 1089, 12, 5659, 3974, 22530, 13, 288, 3639, 309, 261, 291, 3896, 10756, 288, 5411, 3974, 22530, 6413, 1322, 5868, 5621, 5411, 6680, 1011, 3974, 22530, 31, 5411, 813, 22530, 273, ...
public org.quickfix.field.IssueDate getIssueDate() throws FieldNotFound { org.quickfix.field.IssueDate value = new org.quickfix.field.IssueDate();
public quickfix.field.IssueDate getIssueDate() throws FieldNotFound { quickfix.field.IssueDate value = new quickfix.field.IssueDate();
public org.quickfix.field.IssueDate getIssueDate() throws FieldNotFound { org.quickfix.field.IssueDate value = new org.quickfix.field.IssueDate(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/OrderMassCancelReport.java/clean/src/java/src/quickfix/fix44/OrderMassCancelReport.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 12956, 1626, 336, 12956, 1626, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 12956, 1626, 460, 273, 394, 2358, 18, 19525,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 12956, 1626, 336, 12956, 1626, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 12956, 1626, 460, 273, 394, 2358, 18, 19525,...
Node array; array = new Node(Token.NEW, Node.newString(Token.NAME, "Array")); Node list = new Node(Token.INIT_LIST, array); Node elem = null; int i = 0; for (Node cursor = ((Node) obj).getFirstChild(); cursor != null;) { elem = cursor; cursor = cursor.getNext(); if (elem.getType() == Token.UNDEFINED) { i++; continue;
int length = elems.size(); int[] skipIndexes = null; if (skipCount != 0) { skipIndexes = new int[skipCount]; } Node array = new Node(Token.ARRAYLIT); for (int i = 0, j = 0; i != length; ++i) { Node elem = (Node)elems.get(i); if (elem != null) { array.addChildToBack(elem); } else { skipIndexes[j] = i; ++j;
Object createArrayLiteral(Object obj) { Node array; array = new Node(Token.NEW, Node.newString(Token.NAME, "Array")); Node list = new Node(Token.INIT_LIST, array); Node elem = null; int i = 0; for (Node cursor = ((Node) obj).getFirstChild(); cursor != null;) { // Move cursor to cursor.next before elem.next can be // altered in new Node constructor elem = cursor; cursor = cursor.getNext(); if (elem.getType() == Token.UNDEFINED) { i++; continue; } Node addelem = new Node(Token.SETELEM, new Node(Token.USE_STACK), Node.newNumber(i), elem); i++; list.addChildToBack(addelem); } /* * If the version is 120, then new Array(4) means create a new * array with 4 as the first element. In this case, we might * need to explicitly check against trailing undefined * elements in the array literal, and set the length manually * if these occur. Otherwise, we can add an argument to the * node specifying new Array() to provide the array length. * (Which will make Array optimizations involving allocating a * Java array to back the javascript array work better.) */ if (parser.compilerEnv.languageVersion == Context.VERSION_1_2) { /* When last array element is empty, we need to set the * length explicitly, because we can't depend on SETELEM * to do it for us - because empty [,,] array elements * never set anything at all. */ if (elem != null && elem.getType() == Token.UNDEFINED) { Node setlength = new Node(Token.SETPROP, new Node(Token.USE_STACK), Node.newString("length"), Node.newNumber(i)); list.addChildToBack(setlength); } } else { array.addChildToBack(Node.newNumber(i)); } return list; }
12904 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/12904/61f8b426d60087cfa77b544de71fee0d1523ba7e/IRFactory.java/buggy/js/rhino/src/org/mozilla/javascript/IRFactory.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1033, 752, 1076, 6177, 12, 921, 1081, 13, 565, 288, 3639, 2029, 526, 31, 3639, 526, 273, 394, 2029, 12, 1345, 18, 12917, 16, 2029, 18, 2704, 780, 12, 1345, 18, 1985, 16, 315, 1076, 79...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1033, 752, 1076, 6177, 12, 921, 1081, 13, 565, 288, 3639, 2029, 526, 31, 3639, 526, 273, 394, 2029, 12, 1345, 18, 12917, 16, 2029, 18, 2704, 780, 12, 1345, 18, 1985, 16, 315, 1076, 79...
} catch (Throwable t) {
} catch (LowLevelFilterException t) {
public void send(PeerContext destination, Message m) throws NotConnectedException { if(m.getSpec().isInternalOnly()) { Logger.error(this, "Trying to send internal-only message "+m+" of spec "+m.getSpec(), new Exception("debug")); return; } if (m.getSpec().equals(DMT.ping) || m.getSpec().equals(DMT.pong)) { Logger.debug(this, "" + (System.currentTimeMillis() % 60000) + " " + _sock.getPort() + " -> " + destination + " : " + m); } else { Logger.minor(this, "" + (System.currentTimeMillis() % 60000) + " " + _sock.getPort() + " -> " + destination + " : " + m); } byte[] blockToSend = m.encodeToPacket(lowLevelFilter, destination); if(lowLevelFilter != null) { try { lowLevelFilter.processOutgoing(blockToSend, 0, blockToSend.length, destination); return; } catch (Throwable t) { Logger.error(this, "Caught "+t+" sending "+m+" to "+destination, t); destination.forceDisconnect(); throw new NotConnectedException("Error "+t.toString()+" forced disconnect"); } } else { sendPacket(blockToSend, destination.getPeer()); } }
49933 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49933/b65da6d7400224aceca597e3463b9ed8ec21e4b9/UdpSocketManager.java/buggy/src/freenet/io/comm/UdpSocketManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1366, 12, 6813, 1042, 2929, 16, 2350, 312, 13, 1216, 31541, 503, 288, 202, 565, 309, 12, 81, 18, 588, 1990, 7675, 291, 3061, 3386, 10756, 288, 202, 3639, 4242, 18, 1636, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1366, 12, 6813, 1042, 2929, 16, 2350, 312, 13, 1216, 31541, 503, 288, 202, 565, 309, 12, 81, 18, 588, 1990, 7675, 291, 3061, 3386, 10756, 288, 202, 3639, 4242, 18, 1636, ...
in.unread();
in.unread(); } } else { identifierStart = Character.isJavaIdentifierStart((char)c); if (identifierStart) { stringBufferTop = 0; addToString(c); }
public int getToken() throws IOException { int c; tokenno++; // Check for pushed-back token if (this.pushbackToken != EOF) { int result = this.pushbackToken; this.pushbackToken = EOF; return result; } // Eat whitespace, possibly sensitive to newlines. do { c = in.read(); if (c == '\n') if ((flags & TSF_NEWLINES) != 0) break; } while (isJSSpace(c) || c == '\n'); if (c == EOF_CHAR) return EOF; // identifier/keyword/instanceof? // watch out for starting with a <backslash> boolean isUnicodeEscapeStart = false; if (c == '\\') { c = in.read(); if (c == 'u') isUnicodeEscapeStart = true; else c = '\\'; // always unread the 'u' or whatever, we need // to start the string below at the <backslash>. in.unread(); } if (isUnicodeEscapeStart || Character.isJavaIdentifierStart((char)c)) { in.startString(); boolean containsEscape = isUnicodeEscapeStart; do { c = in.read(); if (c == '\\') { c = in.read(); containsEscape = (c == 'u'); } } while (Character.isJavaIdentifierPart((char)c)); in.unread(); int result; String str = in.getString(); // OPT we shouldn't have to make a string (object!) to // check if it's a keyword. // strictly speaking we should probably push-back // all the bad characters if the <backslash>uXXXX // sequence is malformed. But since there isn't a // correct context(is there?) for a bad Unicode // escape sequence after an identifier, we can report // an error here. if (containsEscape) { char ca[] = str.toCharArray(); int L = str.length(); int destination = 0; for (int i = 0; i != L;) { c = ca[i]; ++i; if (c == '\\' && i != L && ca[i] == 'u') { boolean goodEscape = false; if (i + 4 < L) { int val = xDigitToInt(ca[i + 1]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 2]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 3]); if (val >= 0) { val = (val << 4) | xDigitToInt(ca[i + 4]); if (val >= 0) { c = (char)val; i += 5; goodEscape = true; } } } } } if (!goodEscape) { reportSyntaxError("msg.invalid.escape", null); return ERROR; } } ca[destination] = (char)c; ++destination; } str = new String(ca, 0, destination); } else { // Return the corresponding token if it's a keyword result = stringToKeyword(str); if (result != EOF) { if (result != RESERVED) { return result; } else if (!Context.getContext().hasFeature( Context.FEATURE_RESERVED_KEYWORD_AS_IDENTIFIER)) { return result; } else { // If implementation permits to use future reserved // keywords in violation with the EcmaScript standard, // treat it as name but issue warning Object[] errArgs = { str }; reportSyntaxWarning("msg.reserved.keyword", errArgs); result = EOF; } } } this.string = str; return NAME; } // is it a number? if (isDigit(c) || (c == '.' && isDigit(in.peek()))) { int base = 10; in.startString(); if (c == '0') { c = in.read(); if (c == 'x' || c == 'X') { c = in.read(); base = 16; // restart the string, losing leading 0x in.startString(); } else if (isDigit(c)) { base = 8; } } while (0 <= xDigitToInt(c)) { if (base < 16) { if (isAlpha(c)) break; /* * We permit 08 and 09 as decimal numbers, which * makes our behavior a superset of the ECMA * numeric grammar. We might not always be so * permissive, so we warn about it. */ if (base == 8 && c >= '8') { Object[] errArgs = { c == '8' ? "8" : "9" }; reportSyntaxWarning("msg.bad.octal.literal", errArgs); base = 10; } } c = in.read(); } boolean isInteger = true; if (base == 10 && (c == '.' || c == 'e' || c == 'E')) { isInteger = false; if (c == '.') { do { c = in.read(); } while (isDigit(c)); } if (c == 'e' || c == 'E') { c = in.read(); if (c == '+' || c == '-') { c = in.read(); } if (!isDigit(c)) { in.getString(); // throw away string in progress reportSyntaxError("msg.missing.exponent", null); return ERROR; } do { c = in.read(); } while (isDigit(c)); } } in.unread(); String numString = in.getString(); double dval; if (base == 10 && !isInteger) { try { // Use Java conversion to number from string... dval = (Double.valueOf(numString)).doubleValue(); } catch (NumberFormatException ex) { Object[] errArgs = { ex.getMessage() }; reportSyntaxError("msg.caught.nfe", errArgs); return ERROR; } } else { dval = ScriptRuntime.stringToNumber(numString, 0, base); } this.number = dval; return NUMBER; } // is it a string? if (c == '"' || c == '\'') { // We attempt to accumulate a string the fast way, by // building it directly out of the reader. But if there // are any escaped characters in the string, we revert to // building it out of a StringBuffer. StringBuffer stringBuf = null; int quoteChar = c; int val = 0; c = in.read(); in.startString(); // start after the first " while(c != quoteChar) { if (c == '\n' || c == EOF_CHAR) { in.unread(); in.getString(); // throw away the string in progress reportSyntaxError("msg.unterminated.string.lit", null); return ERROR; } if (c == '\\') { // We've hit an escaped character; revert to the // slow method of building a string. if (stringBuf == null) { // Don't include the backslash in.unread(); stringBuf = new StringBuffer(in.getString()); in.read(); } switch (c = in.read()) { case 'b': c = '\b'; break; case 'f': c = '\f'; break; case 'n': c = '\n'; break; case 'r': c = '\r'; break; case 't': c = '\t'; break; case 'v': c = '\u000B'; break; // \v a late addition to the ECMA spec. // '\v' doesn't seem to be valid Java. default: if (isDigit(c) && c < '8') { val = c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); if (isDigit(c) && c < '8') { val = 8 * val + c - '0'; c = in.read(); } } in.unread(); if (val > 0377) { reportSyntaxError("msg.oct.esc.too.large", null); return ERROR; } c = val; } else if (c == 'u') { /* * Get 4 hex digits; if the u escape is not * followed by 4 hex digits, use 'u' + the literal * character sequence that follows. Do some manual * match (OK because we're in a string) to avoid * multi-char match on the underlying stream. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'u'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('u'); c = c1; } else { int c3 = in.read(); c = (c << 4) | xDigitToInt(c3); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); c = c2; } else { int c4 = in.read(); c = (c << 4) | xDigitToInt(c4); if (c < 0) { in.unread(); stringBuf.append('u'); stringBuf.append((char)c1); stringBuf.append((char)c2); c = c3; } else { // got 4 hex digits! Woo Hoo! } } } } } else if (c == 'x') { /* Get 2 hex digits, defaulting to 'x' + literal * sequence, as above. */ int c1 = in.read(); c = xDigitToInt(c1); if (c < 0) { in.unread(); c = 'x'; } else { int c2 = in.read(); c = (c << 4) | xDigitToInt(c2); if (c < 0) { in.unread(); stringBuf.append('x'); c = c1; } else { // got 2 hex digits } } } } } if (stringBuf != null) stringBuf.append((char) c); c = in.read(); } if (stringBuf != null) this.string = stringBuf.toString(); else { in.unread(); // miss the trailing " this.string = in.getString(); in.read(); } return STRING; } switch (c) { case '\n': return EOL; case ';': return SEMI; case '[': return LB; case ']': return RB; case '{': return LC; case '}': return RC; case '(': return LP; case ')': return RP; case ',': return COMMA; case '?': return HOOK; case ':': return COLON; case '.': return DOT; case '|': if (in.match('|')) { return OR; } else if (in.match('=')) { this.op = BITOR; return ASSIGN; } else { return BITOR; } case '^': if (in.match('=')) { this.op = BITXOR; return ASSIGN; } else { return BITXOR; } case '&': if (in.match('&')) { return AND; } else if (in.match('=')) { this.op = BITAND; return ASSIGN; } else { return BITAND; } case '=': if (in.match('=')) { if (in.match('=')) this.op = SHEQ; else this.op = EQ; return EQOP; } else { this.op = NOP; return ASSIGN; } case '!': if (in.match('=')) { if (in.match('=')) this.op = SHNE; else this.op = NE; return EQOP; } else { this.op = NOT; return UNARYOP; } case '<': /* NB:treat HTML begin-comment as comment-till-eol */ if (in.match('!')) { if (in.match('-')) { if (in.match('-')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); // in place of 'goto retry' } in.unread(); } in.unread(); } if (in.match('<')) { if (in.match('=')) { this.op = LSH; return ASSIGN; } else { this.op = LSH; return SHOP; } } else { if (in.match('=')) { this.op = LE; return RELOP; } else { this.op = LT; return RELOP; } } case '>': if (in.match('>')) { if (in.match('>')) { if (in.match('=')) { this.op = URSH; return ASSIGN; } else { this.op = URSH; return SHOP; } } else { if (in.match('=')) { this.op = RSH; return ASSIGN; } else { this.op = RSH; return SHOP; } } } else { if (in.match('=')) { this.op = GE; return RELOP; } else { this.op = GT; return RELOP; } } case '*': if (in.match('=')) { this.op = MUL; return ASSIGN; } else { return MUL; } case '/': // is it a // comment? if (in.match('/')) { while ((c = in.read()) != EOF_CHAR && c != '\n') /* skip to end of line */; in.unread(); return getToken(); } if (in.match('*')) { while ((c = in.read()) != -1 && !(c == '*' && in.match('/'))) { ; // empty loop body } if (c == EOF_CHAR) { reportSyntaxError("msg.unterminated.comment", null); return ERROR; } return getToken(); // `goto retry' } // is it a regexp? if ((flags & TSF_REGEXP) != 0) { // We don't try to use the in.startString/in.getString // approach, because escaped characters (which break it) // seem likely to be common. StringBuffer re = new StringBuffer(); while ((c = in.read()) != '/') { if (c == '\n' || c == EOF_CHAR) { in.unread(); reportSyntaxError("msg.unterminated.re.lit", null); return ERROR; } if (c == '\\') { re.append((char) c); c = in.read(); } re.append((char) c); } StringBuffer flagsBuf = new StringBuffer(); while (true) { if (in.match('g')) flagsBuf.append('g'); else if (in.match('i')) flagsBuf.append('i'); else if (in.match('m')) flagsBuf.append('m'); else break; } if (isAlpha(in.peek())) { reportSyntaxError("msg.invalid.re.flag", null); return ERROR; } this.string = re.toString(); this.regExpFlags = flagsBuf.toString(); return OBJECT; } if (in.match('=')) { this.op = DIV; return ASSIGN; } else { return DIV; } case '%': this.op = MOD; if (in.match('=')) { return ASSIGN; } else { return MOD; } case '~': this.op = BITNOT; return UNARYOP; case '+': case '-': if (in.match('=')) { if (c == '+') { this.op = ADD; return ASSIGN; } else { this.op = SUB; return ASSIGN; } } else if (in.match((char) c)) { if (c == '+') { return INC; } else { return DEC; } } else if (c == '-') { return SUB; } else { return ADD; } default: reportSyntaxError("msg.illegal.character", null); return ERROR; } }
47345 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47345/5220fdb55a7afd4a0c4a0d02f8a489ee87fa676c/TokenStream.java/buggy/src/org/mozilla/javascript/TokenStream.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 509, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 9162, 1435, 1216, 1860, 288, 3639, 509, 276, 31, 3639, 1147, 2135, 9904, 31, 3639, 368, 2073, 364, 18543, 17, 823, 1147, 3639, 309, 261, 2211, 18, 6206, 823, 1345, 480, 6431, ...
EventObject sipEvent = null;
public void run() { while (true) { EventObject sipEvent = null; EventWrapper eventWrapper = null; LinkedList eventsToDeliver; synchronized (this.eventMutex) { // First, wait for some events to become available. while (pendingEvents.isEmpty()) { // There's nothing in the list, check to make sure we // haven't // been stopped. If we have, then let the thread die. if (this.isStopped) { if (LogWriter.needsLogging) sipStackImpl.logMessage("Stopped event scanner!!"); return; } // We haven't been stopped, and the event list is indeed // rather empty. Wait for some events to come along. try { eventMutex.wait(); } catch (InterruptedException ex) { // Let the thread die a normal death sipStackImpl.logMessage("Interrupted!"); return; } } // There are events in the 'pending events list' that need // processing. Hold onto the old 'pending Events' list, but // make a new one for the other methods to operate on. This // tap-dancing is to avoid deadlocks and also to ensure that // the list is not modified while we are iterating over it. eventsToDeliver = pendingEvents; pendingEvents = new LinkedList(); } ListIterator iterator = eventsToDeliver.listIterator(); while (iterator.hasNext()) { eventWrapper = (EventWrapper) iterator.next(); if (LogWriter.needsLogging) { sipStackImpl.logMessage("Processing " + eventWrapper + "nevents " + eventsToDeliver.size()); } deliverEvent(eventWrapper); } } // end While }
7607 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7607/d3bce65e49e71ee7df15bd72fd338535d4501bc1/EventScanner.java/clean/trunk/src/gov/nist/javax/sip/EventScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1086, 1435, 288, 202, 202, 17523, 261, 3767, 13, 288, 1082, 202, 1133, 921, 10341, 1133, 273, 446, 31, 1082, 202, 1133, 3611, 871, 3611, 273, 446, 31, 1082, 202, 13174, 6...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 1435, 288, 202, 202, 17523, 261, 3767, 13, 288, 1082, 202, 1133, 921, 10341, 1133, 273, 446, 31, 1082, 202, 1133, 3611, 871, 3611, 273, 446, 31, 1082, 202, 13174, 6...
out.putNextEntry(entry);
private static void addFile(File file, JarOutputStream out, CRC32 crc, int sourceDirLength, byte[] buffer) throws FileNotFoundException, IOException { if (file.isDirectory()) { File[] fileNames = file.listFiles(); for (int i = 0; i < fileNames.length; i++) { addFile( fileNames[i], out, crc, sourceDirLength, buffer ); } } else { String entryName = file.getAbsolutePath().substring(sourceDirLength); if (IS_WINDOWS) { entryName = StringUtil.replace( entryName, '\\', '/' ); } JarEntry entry = new JarEntry( entryName ); out.putNextEntry(entry); // read file: FileInputStream in = new FileInputStream( file ); int read; long size = 0; while (( read = in.read(buffer)) != -1) { crc.update(buffer, 0, read); out.write(buffer, 0, read); size += read; } entry.setCrc( crc.getValue() ); entry.setSize( size ); in.close(); out.closeEntry(); crc.reset(); } }
9804 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/9804/e326ec334bf48a3c7056527050be42e9876533b9/JarUtil.java/clean/build/source/src/de/enough/polish/util/JarUtil.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 18671, 12, 812, 585, 16, 15644, 4632, 596, 16, 21773, 1578, 10619, 16, 509, 26844, 1782, 16, 1160, 8526, 1613, 13, 225, 202, 15069, 13707, 16, 1860, 225, 202, 95, 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, 1152, 760, 918, 18671, 12, 812, 585, 16, 15644, 4632, 596, 16, 21773, 1578, 10619, 16, 509, 26844, 1782, 16, 1160, 8526, 1613, 13, 225, 202, 15069, 13707, 16, 1860, 225, 202, 95, 2...
public void setHomePage(Class clazz)
public void setHomePage(Class clazz)
public void setHomePage(Class clazz) { homePage = clazz; }
46434 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46434/0fdf3c0295a9652408915ea02c10f339dc24347f/MockWebApplication.java/buggy/wicket/src/java/wicket/protocol/http/MockWebApplication.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 8684, 1964, 12, 797, 4003, 13, 225, 202, 95, 202, 202, 8712, 1964, 273, 4003, 31, 202, 97, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 444, 8684, 1964, 12, 797, 4003, 13, 225, 202, 95, 202, 202, 8712, 1964, 273, 4003, 31, 202, 97, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
fileList += "&nbsp;-" + linesRemoved;
fileList += "&#160;-" + linesRemoved;
private String getAffectedFiles(Commit commit) { String result = " <ul class=\"commitdetails\">\n"; FileCollectionFormatter formatter = new FileCollectionFormatter(commit.getAffectedFiles()); Iterator it = formatter.getDirectories().iterator(); while (it.hasNext()) { result += " <li>\n"; String directory = (String) it.next(); if (!directory.equals("")) { result += " <strong>" + directory.substring(0, directory.length() - 1) + "</strong>:\n"; } Iterator files = formatter.getFiles(directory).iterator(); String fileList = ""; while (files.hasNext()) { if (!fileList.equals("")) { fileList += ",\n"; } fileList += " "; String file = (String) files.next(); Revision revision = (Revision) commitHashMap.get(directory + file); if (webRepository != null) { Revision previous = revision.getPreviousRevision(); String url; if (previous == null || revision.isInitialRevision()) { url = webRepository.getFileViewUrl(revision); } else if (revision.isDead()) { url = webRepository.getFileViewUrl(previous); } else { url = webRepository.getDiffUrl(previous, revision); } fileList += "<a href=\"" + OutputUtils.escapeHtml(url) + "\" class=\"webrepository\">" + file + "</a>"; } else { fileList += file; } if (revision.isInitialRevision()) { int linesAdded = revision.getLines(); fileList += "&nbsp;<span class=\"new\">(new"; if (linesAdded > 0) { fileList += "&nbsp;" + linesAdded; } fileList += ")</span>"; } else if (revision.isDead()) { fileList += "&nbsp;<span class=\"del\">(del)</span>"; } else { int delta = revision.getLinesDelta(); int linesAdded = revision.getReplacedLines() + ((delta > 0) ? delta : 0); int linesRemoved = revision.getReplacedLines() - ((delta < 0) ? delta : 0); fileList += "&nbsp;<span class=\"change\">("; if (linesAdded > 0) { fileList += "+" + linesAdded; if (linesRemoved > 0) { fileList += "&nbsp;-" + linesRemoved; } } else if (linesRemoved > 0) { fileList += "-" + linesRemoved; } else { // linesAdded == linesRemoved == 0 // should be binary file or keyword subst change fileList += "changed"; } fileList += ")</span>"; } } result += fileList + "\n </li>\n"; } result += " </ul>\n"; return result; }
49097 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49097/7d3a00492c31029a574a320d2e3b769ff2849b12/CommitLogRenderer.java/buggy/src/net/sf/statcvs/renderer/CommitLogRenderer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 514, 4506, 1403, 828, 2697, 12, 5580, 3294, 13, 288, 202, 202, 780, 563, 273, 315, 565, 411, 332, 667, 5189, 7371, 6395, 28219, 82, 14432, 202, 202, 812, 2532, 5074, 4453, 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, 514, 4506, 1403, 828, 2697, 12, 5580, 3294, 13, 288, 202, 202, 780, 563, 273, 315, 565, 411, 332, 667, 5189, 7371, 6395, 28219, 82, 14432, 202, 202, 812, 2532, 5074, 4453, 27...
public org.quickfix.field.ClientBidID getClientBidID() throws FieldNotFound { org.quickfix.field.ClientBidID value = new org.quickfix.field.ClientBidID();
public quickfix.field.ClientBidID getClientBidID() throws FieldNotFound { quickfix.field.ClientBidID value = new quickfix.field.ClientBidID();
public org.quickfix.field.ClientBidID getClientBidID() throws FieldNotFound { org.quickfix.field.ClientBidID value = new org.quickfix.field.ClientBidID(); getField(value); return value; }
5926 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5926/fecc27f98261270772ff182a1d4dfd94b5daa73d/BidResponse.java/buggy/src/java/src/quickfix/fix44/BidResponse.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 1227, 17763, 734, 7635, 17763, 734, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 1227, 17763, 734, 460, 273, 394, 2358, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 1227, 17763, 734, 7635, 17763, 734, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 1227, 17763, 734, 460, 273, 394, 2358, ...
else if (c == '\r') {
else if (c == '\n' || c == '\r') {
protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) throws IOException, XNIException { // quote int quote = fEntityScanner.peekChar(); if (quote != '\'' && quote != '"') { reportFatalError("OpenQuoteExpected", new Object[]{atName}); } fEntityScanner.scanChar(); int entityDepth = fEntityDepth; int c = fEntityScanner.scanLiteral(quote, value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** scanLiteral -> \"" + value.toString() + "\""); } fStringBuffer2.clear(); fStringBuffer2.append(value); normalizeWhitespace(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** normalizeWhitespace -> \"" + value.toString() + "\""); } if (c != quote) { fScanningAttribute = true; fStringBuffer.clear(); do { fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value2: \"" + fStringBuffer.toString() + "\""); } if (c == '&') { fEntityScanner.skipChar('&'); if (entityDepth == fEntityDepth) { fStringBuffer2.append('&'); } if (fEntityScanner.skipChar('#')) { if (entityDepth == fEntityDepth) { fStringBuffer2.append('#'); } int ch = scanCharReferenceValue(fStringBuffer, fStringBuffer2); if (ch != -1) { if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value3: \"" + fStringBuffer.toString() + "\""); } } } else { String entityName = fEntityScanner.scanName(); if (entityName == null) { reportFatalError("NameRequiredInReference", null); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(entityName); } if (!fEntityScanner.skipChar(';')) { reportFatalError("SemicolonRequiredInReference", new Object []{entityName}); } else if (entityDepth == fEntityDepth) { fStringBuffer2.append(';'); } if (entityName == fAmpSymbol) { fStringBuffer.append('&'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value5: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fAposSymbol) { fStringBuffer.append('\''); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value7: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fLtSymbol) { fStringBuffer.append('<'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** value9: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fGtSymbol) { fStringBuffer.append('>'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueB: \"" + fStringBuffer.toString() + "\""); } } else if (entityName == fQuotSymbol) { fStringBuffer.append('"'); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueD: \"" + fStringBuffer.toString() + "\""); } } else { if (fEntityManager.isExternalEntity(entityName)) { reportFatalError("ReferenceToExternalEntity", new Object[] { entityName }); } else { if (!fEntityManager.isDeclaredEntity(entityName)) { //WFC & VC: Entity Declared if (checkEntities) { if (fValidation) { fErrorReporter.reportError(XMLMessageFormatter.XML_DOMAIN, "EntityNotDeclared", new Object[]{entityName}, XMLErrorReporter.SEVERITY_ERROR); } } else { reportFatalError("EntityNotDeclared", new Object[]{entityName}); } } fEntityManager.startEntity(entityName, true); } } } } else if (c == '<') { reportFatalError("LessthanInAttValue", new Object[] { null, atName }); } else if (c == '%' || c == ']') { fEntityScanner.scanChar(); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueF: \"" + fStringBuffer.toString() + "\""); } } else if (c == '\r') { // This happens when parsing the entity replacement text of // an entity which had a character reference &#13; in its // literal entity value. The character is normalized to // #x20 and collapsed per the normal rules. fEntityScanner.scanChar(); fStringBuffer.append(' '); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueG: \"" + fStringBuffer.toString() + "\""); } } else if (c != -1 && XMLChar.isHighSurrogate(c)) { if (scanSurrogates(fStringBuffer3)) { fStringBuffer.append(fStringBuffer3); if (entityDepth == fEntityDepth) { fStringBuffer2.append(fStringBuffer3); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueI: \"" + fStringBuffer.toString() + "\""); } } } else if (c != -1 && XMLChar.isInvalid(c)) { reportFatalError("InvalidCharInAttValue", new Object[] {Integer.toString(c, 16)}); fEntityScanner.scanChar(); } // the following is to handle quotes we get from entities // which we must not confused with the end quote while (true) { c = fEntityScanner.scanLiteral(quote, value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("scanLiteral -> \"" + value.toString() + "\""); } //fStringBuffer2.append(value); normalizeWhitespace(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("normalizeWhitespace -> \"" + value.toString() + "\""); } // this is: !(c == quote && entityDepth != fEntityDepth) if (c != quote || entityDepth == fEntityDepth) { break; } fStringBuffer.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueK: \"" + fStringBuffer.toString() + "\""); } fEntityScanner.scanChar(); fStringBuffer.append((char)c); if (entityDepth == fEntityDepth) { fStringBuffer2.append((char)c); } if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueL: \"" + fStringBuffer.toString() + "\""); } } } while (c != quote); fStringBuffer.append(value); fStringBuffer2.append(value); if (DEBUG_ATTR_NORMALIZATION) { System.out.println("** valueN: \"" + fStringBuffer.toString() + "\""); } value.setValues(fStringBuffer); fScanningAttribute = false; } nonNormalizedValue.setValues(fStringBuffer2); // quote int cquote = fEntityScanner.scanChar(); if (cquote != quote) { reportFatalError("CloseQuoteExpected", new Object[]{atName}); } } // scanAttributeValue()
4434 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4434/79f57f4a4f2770836c3b726ab0a3249599e0d3ef/XMLScanner.java/buggy/src/org/apache/xerces/impl/XMLScanner.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 4135, 14942, 12, 4201, 780, 460, 16, 4766, 4202, 3167, 780, 1661, 15577, 620, 16, 4766, 1377, 514, 622, 461, 16, 4766, 1377, 3167, 2498, 1677, 16, 509, 1604, 1016, 16, 4766, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4135, 14942, 12, 4201, 780, 460, 16, 4766, 4202, 3167, 780, 1661, 15577, 620, 16, 4766, 1377, 514, 622, 461, 16, 4766, 1377, 3167, 2498, 1677, 16, 509, 1604, 1016, 16, 4766, ...
setBetweenNearestPoints(true); ((FigPoly)_fig).setRectilinear(false); ArgoEventPump.addListener(ArgoEvent.ANY_NOTATION_EVENT, this); }
setBetweenNearestPoints(true); ((FigPoly)_fig).setRectilinear(false); ArgoEventPump.addListener(ArgoEvent.ANY_NOTATION_EVENT, this); }
public FigEdgeModelElement() { _name = new FigText(10, 30, 90, 20); _name.setFont(LABEL_FONT); _name.setTextColor(Color.black); _name.setTextFilled(false); _name.setFilled(false); _name.setLineWidth(0); _name.setExpandOnly(false); _name.setMultiLine(false); _name.setAllowsTab(false); _stereo.setFont(LABEL_FONT); _stereo.setTextColor(Color.black); _stereo.setTextFilled(false); _stereo.setFilled(false); _stereo.setLineWidth(0); _stereo.setExpandOnly(false); _stereo.setMultiLine(false); _stereo.setAllowsTab(false); setBetweenNearestPoints(true); ((FigPoly)_fig).setRectilinear(false); ArgoEventPump.addListener(ArgoEvent.ANY_NOTATION_EVENT, this); }
7166 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7166/f2b494bf0adb5fdbc0546385ddcbe587be41badb/FigEdgeModelElement.java/buggy/src_new/org/argouml/uml/diagram/ui/FigEdgeModelElement.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 478, 360, 6098, 1488, 1046, 1435, 288, 565, 389, 529, 273, 394, 478, 360, 1528, 12, 2163, 16, 5196, 16, 8566, 16, 4200, 1769, 565, 389, 529, 18, 542, 5711, 12, 13545, 67, 25221, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 478, 360, 6098, 1488, 1046, 1435, 288, 565, 389, 529, 273, 394, 478, 360, 1528, 12, 2163, 16, 5196, 16, 8566, 16, 4200, 1769, 565, 389, 529, 18, 542, 5711, 12, 13545, 67, 25221, ...
System.out.println(prop + " -> " + val);
private void writeFileIDs() throws BioException, IOException, ChangeVetoException { for(int i = 0; i < fileCount; i++) { RAF file = fileIDToRAF[i]; long length = file.length(); String prop = "fileid_" + i; String val = file.getFile().toString() + "\t" + length; metaData.setProperty(prop, val); System.out.println(prop + " -> " + val); } }
50115 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50115/641e2c8f86c2afccf913eed88a69c660cbf8bcee/BioStore.java/buggy/src/org/biojava/bio/program/indexdb/BioStore.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 3238, 918, 13286, 5103, 1435, 225, 1216, 21209, 503, 16, 1860, 16, 7576, 58, 11453, 503, 288, 565, 364, 12, 474, 277, 273, 374, 31, 277, 411, 585, 1380, 31, 277, 27245, 288, 1377, 534, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 13286, 5103, 1435, 225, 1216, 21209, 503, 16, 1860, 16, 7576, 58, 11453, 503, 288, 565, 364, 12, 474, 277, 273, 374, 31, 277, 411, 585, 1380, 31, 277, 27245, 288, 1377, 534, ...
unit.edit(unitName, unitCostCenter, beginDate, endDate, type, parentUnit);
setDepartment(departmentID, suportePersistente, unit);
public void run(Integer unitID, Integer parentUnitID, String unitName, String unitCostCenter, Date beginDate, Date endDate, UnitType type) throws ExcepcaoPersistencia, FenixServiceException { ISuportePersistente suportePersistente = PersistenceSupportFactory.getDefaultPersistenceSupport(); IUnit unit = null; if(unitID == null){ unit = DomainFactory.makeUnit(); } else{ unit = (IUnit) suportePersistente.getIPersistentObject().readByOID(Unit.class, unitID); if(unit == null){ throw new FenixServiceException("error.noUnit"); } } IUnit parentUnit = null; if(parentUnitID != null){ parentUnit = (IUnit) suportePersistente.getIPersistentObject().readByOID(Unit.class, parentUnitID); if(unit.getParentUnits().contains(parentUnit)){ unit.removeParentUnits(parentUnit); parentUnit = null; } } unit.edit(unitName, unitCostCenter, beginDate, endDate, type, parentUnit); }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/36a62f5929c95c71ca49c2d6a60129f7deb005d3/CreateNewUnit.java/buggy/src/net/sourceforge/fenixedu/applicationTier/Servico/manager/organizationalStructureManagement/CreateNewUnit.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1086, 12, 4522, 2836, 734, 16, 2144, 982, 2802, 734, 16, 514, 2836, 461, 16, 514, 2836, 8018, 8449, 16, 2167, 2376, 1626, 16, 2167, 13202, 16, 5411, 8380, 559, 618, 13, 1216,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1086, 12, 4522, 2836, 734, 16, 2144, 982, 2802, 734, 16, 514, 2836, 461, 16, 514, 2836, 8018, 8449, 16, 2167, 2376, 1626, 16, 2167, 13202, 16, 5411, 8380, 559, 618, 13, 1216,...
if (children == null)
if ( children == null )
public List getChildren( ) { if (children == null) { children = new ArrayList(); } return children; }
5230 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5230/83de512a7dc3a128ad54fa2607c01f0ef928234c/TOCNode.java/buggy/engine/org.eclipse.birt.report.engine/src/org/eclipse/birt/report/engine/api/TOCNode.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 987, 10268, 12, 262, 202, 95, 202, 202, 430, 261, 5906, 422, 446, 13, 202, 202, 95, 1082, 202, 5906, 273, 394, 2407, 5621, 202, 202, 97, 202, 202, 2463, 2325, 31, 202, 97, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 987, 10268, 12, 262, 202, 95, 202, 202, 430, 261, 5906, 422, 446, 13, 202, 202, 95, 1082, 202, 5906, 273, 394, 2407, 5621, 202, 202, 97, 202, 202, 2463, 2325, 31, 202, 97, ...
protected void processMessage(Message message, DatagramPacket datagram, MessageRouter router) { updateState(message,datagram); router.handleUDPMessage(message, datagram);
protected void processMessage(Message message, InetSocketAddress addr) { updateState(message, addr); MessageDispatcher.instance().dispatchUDP(message, addr);
protected void processMessage(Message message, DatagramPacket datagram, MessageRouter router) { updateState(message,datagram); router.handleUDPMessage(message, datagram); }
5134 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5134/38b95e5f74a21fabe25ac9de13623971487128e8/UDPService.java/clean/components/gnutella-core/src/main/java/com/limegroup/gnutella/UDPService.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1207, 1079, 12, 1079, 883, 16, 6168, 17049, 6667, 1150, 17049, 16, 2350, 8259, 4633, 13, 288, 3639, 1089, 1119, 12, 2150, 16, 3404, 17049, 1769, 3639, 4633, 18, 4110, 20352, 10...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 918, 1207, 1079, 12, 1079, 883, 16, 6168, 17049, 6667, 1150, 17049, 16, 2350, 8259, 4633, 13, 288, 3639, 1089, 1119, 12, 2150, 16, 3404, 17049, 1769, 3639, 4633, 18, 4110, 20352, 10...
log.error("Number of incorrect retransmission timeouts: " + num_non_correct_entries);
System.err.println("Number of incorrect retransmission timeouts: " + num_non_correct_entries);
public void testRetransmits() { Entry entry; int num_non_correct_entries=0; // 1. Add NUM_MSGS messages: System.out.println("-- adding " + NUM_MSGS + " messages:"); for(long i=0; i < NUM_MSGS; i++) { entry=new Entry(i); msgs.put(new Long(i), entry); timer.add(entry); } System.out.println("-- done"); // 2. Wait for at least 4 xmits/msg: total of 1000 + 2000 + 4000 + 8000ms = 15000ms; wait for 20000ms System.out.println("-- waiting for 20 secs for all retransmits"); Util.sleep(20000); // 3. Check whether all Entries have correct retransmission times for(long i=0; i < NUM_MSGS; i++) { entry=(Entry)msgs.get(new Long(i)); if(!entry.isCorrect()) { num_non_correct_entries++; } } if(num_non_correct_entries > 0) log.error("Number of incorrect retransmission timeouts: " + num_non_correct_entries); else { for(long i=0; i < NUM_MSGS; i++) { entry=(Entry)msgs.get(new Long(i)); if(entry != null) System.out.println(i + ": " + entry); } } assertTrue(num_non_correct_entries == 0); }
51463 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51463/13de68466e3cf7fde6ee0bde0cee09a33e837e89/TimeSchedulerTest.java/buggy/tests/junit/org/jgroups/tests/TimeSchedulerTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 7055, 28001, 22679, 1435, 288, 3639, 3841, 1241, 31, 3639, 509, 818, 67, 5836, 67, 6746, 67, 8219, 33, 20, 31, 3639, 368, 404, 18, 1436, 9443, 67, 11210, 55, 2743, 30, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 7055, 28001, 22679, 1435, 288, 3639, 3841, 1241, 31, 3639, 509, 818, 67, 5836, 67, 6746, 67, 8219, 33, 20, 31, 3639, 368, 404, 18, 1436, 9443, 67, 11210, 55, 2743, 30, ...
match(input,72,FOLLOW_72_in_lhs_eval3090); if (failed) return d; pushFollow(FOLLOW_paren_chunk_in_lhs_eval3094);
match(input,72,FOLLOW_72_in_lhs_eval3216); if (failed) return d; pushFollow(FOLLOW_paren_chunk_in_lhs_eval3220);
public BaseDescr lhs_eval() throws RecognitionException { BaseDescr d = null; Token loc=null; String c = null; d = null; try { // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1243:4: (loc= 'eval' c= paren_chunk ) // D:\\workspace\\jboss\\jbossrules\\drools-compiler\\src\\main\\resources\\org\\drools\\lang\\DRL.g:1243:4: loc= 'eval' c= paren_chunk { loc=(Token)input.LT(1); match(input,72,FOLLOW_72_in_lhs_eval3090); if (failed) return d; pushFollow(FOLLOW_paren_chunk_in_lhs_eval3094); c=paren_chunk(); _fsp--; if (failed) return d; if ( backtracking==0 ) { String body = c.substring(1, c.length()-1); checkTrailingSemicolon( body, offset(loc.getLine()) ); d = new EvalDescr( body ); } } } catch (RecognitionException re) { reportError(re); recover(input,re); } finally { } return d; }
5490 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5490/158de3e3177d9b48d45fb4c3fae8404e0f01f690/DRLParser.java/clean/drools-compiler/src/main/java/org/drools/lang/DRLParser.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 3360, 16198, 8499, 67, 8622, 1435, 1216, 9539, 288, 6647, 3360, 16198, 302, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 514, 276, 273, 446, 31, 1171, 202, 202, 72, 273, 44...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3360, 16198, 8499, 67, 8622, 1435, 1216, 9539, 288, 6647, 3360, 16198, 302, 273, 446, 31, 3639, 3155, 1515, 33, 2011, 31, 3639, 514, 276, 273, 446, 31, 1171, 202, 202, 72, 273, 44...
assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a NameValue",
assertTrue("canSetProperty(String propertyName, Value value) must return " + "true if the property is of type Path and value is a NameValue",
public void testConversions() throws NotExecutableException, RepositoryException { PropertyDef propDef = NodeTypeUtil.locatePropertyDef(session, PropertyType.PATH, false, false, false, false); if (propDef == null) { throw new NotExecutableException("No path property def that meets the " + "requirements of the test has been found"); } NodeType nodeType = propDef.getDeclaringNodeType(); Value pathStringValue = new StringValue("abc"); assertTrue("canSetProperty(String propertyName, Value value) must return " + "true if the property is of type Path and value is a StringValue " + "that is convertible to a PathValue", nodeType.canSetProperty(propDef.getName(), pathStringValue)); Value noPathStringValue = new StringValue("a:b:c"); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a StringValue " + "that is not convertible to a PathValue", nodeType.canSetProperty(propDef.getName(), noPathStringValue)); Value pathBinaryValue = new BinaryValue("abc"); assertTrue("canSetProperty(String propertyName, Value value) must return " + "true if the property is of type Path and value is a UTF-8 " + "BinaryValue that is convertible to a PathValue", nodeType.canSetProperty(propDef.getName(), pathBinaryValue)); Value noPathBinaryValue = new BinaryValue("a:b:c"); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a BinaryValue" + "that is not convertible to a PathValue", nodeType.canSetProperty(propDef.getName(), noPathBinaryValue)); Value dateValue = NodeTypeUtil.getValueOfType(PropertyType.DATE); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a DateValue", nodeType.canSetProperty(propDef.getName(), dateValue)); Value doubleValue = NodeTypeUtil.getValueOfType(PropertyType.DOUBLE); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a DoubleValue", nodeType.canSetProperty(propDef.getName(), doubleValue)); Value longValue = NodeTypeUtil.getValueOfType(PropertyType.LONG); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a LongValue", nodeType.canSetProperty(propDef.getName(), longValue)); Value booleanValue = NodeTypeUtil.getValueOfType(PropertyType.BOOLEAN); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a BooleanValue", nodeType.canSetProperty(propDef.getName(), booleanValue)); Value pathValue = NodeTypeUtil.getValueOfType(PropertyType.NAME); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a NameValue", nodeType.canSetProperty(propDef.getName(), pathValue)); Value pathPathValue = PathValue.valueOf("abc"); assertTrue("canSetProperty(String propertyName, Value value) must return " + "true if the property is of type Path and value is a PathValue " + "if Path is relative, is one element long and has no index", nodeType.canSetProperty(propDef.getName(), pathPathValue)); Value noPathPathValue = PathValue.valueOf("/abc"); assertFalse("canSetProperty(String propertyName, Value value) must return " + "false if the property is of type Path and value is a PathValue " + "if Path is not relative, is more than one element long or has an index", nodeType.canSetProperty(propDef.getName(), noPathPathValue)); }
48761 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48761/46eb500e56ce9f77ff5116b9b093013ded5298a1/CanSetPropertyPathTest.java/clean/src/test/org/apache/jackrabbit/test/api/nodetype/CanSetPropertyPathTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 29287, 1435, 5411, 1216, 2288, 17709, 503, 16, 13367, 288, 3639, 4276, 3262, 2270, 3262, 273, 7734, 20896, 1304, 18, 25450, 1396, 3262, 12, 3184, 16, 22983, 18, 4211, 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, 377, 1071, 918, 1842, 29287, 1435, 5411, 1216, 2288, 17709, 503, 16, 13367, 288, 3639, 4276, 3262, 2270, 3262, 273, 7734, 20896, 1304, 18, 25450, 1396, 3262, 12, 3184, 16, 22983, 18, 4211, 16, ...
public static List getElements(Element elem, String path) { List list = new ArrayList(); if (elem == null) return list; int ndx = path.indexOf("/"); if (ndx != -1) { Element child = getElement(elem, path.substring(0, ndx)); return getElements(child, path.substring(ndx + 1)); } NodeList nl = elem.getChildNodes(); for (int i = 0, len = nl.getLength(); i < len; i++) { Node node = nl.item(i); if (node.getNodeType() == Node.ELEMENT_NODE && node.getNodeName().equals(path)) { list.add(node); } } return list; }
8610 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8610/6c6a574b8da6a8f7989e99ea78e4db5cb63abe6b/Util.java/buggy/tag-doc/src/java/org/apache/struts/taskdefs/Util.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 3845, 682, 588, 3471, 12, 1046, 10037, 16, 780, 803, 15329, 202, 202, 682, 1098, 33, 2704, 19558, 5621, 202, 202, 430, 12, 10037, 631, 2011, 13, 1082, 202, 2463, 1098, 31, 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, 3845, 682, 588, 3471, 12, 1046, 10037, 16, 780, 803, 15329, 202, 202, 682, 1098, 33, 2704, 19558, 5621, 202, 202, 430, 12, 10037, 631, 2011, 13, 1082, 202, 2463, 1098, 31, 202...
this.clientGet.continueSaveFileTo(this.dir);
clientGet.continueSaveFileTo(dir);
public void run() { connection.addToWriterQueue(); FCPClientGet.this.isLockOwner = true; Logger.debug(this, "I take the lock !"); if(this.dir == null) { Logger.warning(this, "UnlockWaiter.run() : Wtf ?"); } this.clientGet.continueSaveFileTo(this.dir); return; }
47012 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47012/0458430a0dc8a713aa2b4d64f000cbbaaeb4adea/FCPClientGet.java/buggy/src/thaw/fcp/FCPClientGet.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 918, 1086, 1435, 288, 1082, 202, 4071, 18, 1289, 774, 2289, 3183, 5621, 1082, 202, 42, 4258, 1227, 967, 18, 2211, 18, 291, 2531, 5541, 273, 638, 31, 1082, 202, 3328, 18, 4148...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3196, 202, 482, 918, 1086, 1435, 288, 1082, 202, 4071, 18, 1289, 774, 2289, 3183, 5621, 1082, 202, 42, 4258, 1227, 967, 18, 2211, 18, 291, 2531, 5541, 273, 638, 31, 1082, 202, 3328, 18, 4148...
private ISiteComponent getInfoSiteEvaluationMarks(InfoSiteEvaluationMarks component, Site site) {
private ISiteComponent getInfoSiteEvaluationMarks(InfoSiteEvaluationMarks component, ExecutionCourseSite site) {
private ISiteComponent getInfoSiteEvaluationMarks(InfoSiteEvaluationMarks component, Site site) { final Integer evaluationID = component.getEvaluationID(); final ExecutionCourse executionCourse = site.getExecutionCourse(); final List<Evaluation> evaluations = executionCourse.getAssociatedEvaluations(); for (final Evaluation evaluation : evaluations) { if (evaluationID.equals(evaluation.getIdInternal())) { component.setEvaluation(evaluation); break; } } return component; }
2645 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2645/0109c25dd214d2427e911066a1345afb9ddc8372/ExecutionCourseSiteComponentBuilder.java/clean/src/net/sourceforge/fenixedu/applicationTier/Factory/ExecutionCourseSiteComponentBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 4437, 1137, 1841, 17142, 4956, 13468, 20981, 12, 966, 4956, 13468, 20981, 1794, 16, 9063, 2834, 13, 288, 202, 6385, 2144, 9873, 734, 273, 1794, 18, 588, 13468, 734, 5621, 202, 6385, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4437, 1137, 1841, 17142, 4956, 13468, 20981, 12, 966, 4956, 13468, 20981, 1794, 16, 9063, 2834, 13, 288, 202, 6385, 2144, 9873, 734, 273, 1794, 18, 588, 13468, 734, 5621, 202, 6385, ...
if ( namespaceURI == null )
if ( !hasNamespaceURI )
public void startElement( String namespaceURI, String localName, String rawName, Attributes attrs ) throws SAXException { int i; boolean preserveSpace; ElementState state; String name; String value; String htmlName; boolean addNSAttr = false; try { if ( _printer == null ) throw new IllegalStateException( DOMMessageFormatter.formatMessage( DOMMessageFormatter.SERIALIZER_DOMAIN, "NoWriterSupplied", null)); state = getElementState(); if ( isDocumentState() ) { // If this is the root element handle it differently. // If the first root element in the document, serialize // the document's DOCTYPE. Space preserving defaults // to that of the output format. if ( ! _started ) startDocument( localName == null ? rawName : localName ); } else { // For any other element, if first in parent, then // close parent's opening tag and use the parnet's // space preserving. if ( state.empty ) _printer.printText( '>' ); // Indent this element on a new line if the first // content of the parent element or immediately // following an element. if ( _indenting && ! state.preserveSpace && ( state.empty || state.afterElement ) ) _printer.breakLine(); } preserveSpace = state.preserveSpace; // Do not change the current element state yet. // This only happens in endElement(). if ( rawName == null ) { rawName = localName; if ( namespaceURI != null ) { String prefix; prefix = getPrefix( namespaceURI ); if ( prefix.length() > 0 ) rawName = prefix + ":" + localName; } addNSAttr = true; } if ( namespaceURI == null ) htmlName = rawName; else { if ( namespaceURI.equals( XHTMLNamespace ) || (fUserXHTMLNamespace != null && fUserXHTMLNamespace.equals(namespaceURI)) ) htmlName = localName; else htmlName = null; } // XHTML: element names are lower case, DOM will be different _printer.printText( '<' ); if ( _xhtml ) _printer.printText( rawName.toLowerCase(Locale.ENGLISH) ); else _printer.printText( rawName ); _printer.indent(); // For each attribute serialize it's name and value as one part, // separated with a space so the element can be broken on // multiple lines. if ( attrs != null ) { for ( i = 0 ; i < attrs.getLength() ; ++i ) { _printer.printSpace(); name = attrs.getQName( i ).toLowerCase(Locale.ENGLISH);; value = attrs.getValue( i ); if ( _xhtml || namespaceURI != null ) { // XHTML: print empty string for null values. if ( value == null ) { _printer.printText( name ); _printer.printText( "=\"\"" ); } else { _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); } } else { // HTML: Empty values print as attribute name, no value. // HTML: URI attributes will print unescaped if ( value == null ) { value = ""; } if ( !_format.getPreserveEmptyAttributes() && value.length() == 0 ) _printer.printText( name ); else if ( HTMLdtd.isURI( rawName, name ) ) { _printer.printText( name ); _printer.printText( "=\"" ); _printer.printText( escapeURI( value ) ); _printer.printText( '"' ); } else if ( HTMLdtd.isBoolean( rawName, name ) ) _printer.printText( name ); else { _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); } } } } if ( htmlName != null && HTMLdtd.isPreserveSpace( htmlName ) ) preserveSpace = true; if ( addNSAttr ) { Enumeration keys; keys = _prefixes.keys(); while ( keys.hasMoreElements() ) { _printer.printSpace(); value = (String) keys.nextElement(); name = (String) _prefixes.get( value ); if ( name.length() == 0 ) { _printer.printText( "xmlns=\"" ); printEscaped( value ); _printer.printText( '"' ); } else { _printer.printText( "xmlns:" ); _printer.printText( name ); _printer.printText( "=\"" ); printEscaped( value ); _printer.printText( '"' ); } } } // Now it's time to enter a new element state // with the tag name and space preserving. // We still do not change the curent element state. state = enterElementState( namespaceURI, localName, rawName, preserveSpace ); // Prevents line breaks inside A/TD if ( htmlName != null && ( htmlName.equalsIgnoreCase( "A" ) || htmlName.equalsIgnoreCase( "TD" ) ) ) { state.empty = false; _printer.printText( '>' ); } // Handle SCRIPT and STYLE specifically by changing the // state of the current element to CDATA (XHTML) or // unescaped (HTML). if ( htmlName != null && ( rawName.equalsIgnoreCase( "SCRIPT" ) || rawName.equalsIgnoreCase( "STYLE" ) ) ) { if ( _xhtml ) { // XHTML: Print contents as CDATA section state.doCData = true; } else { // HTML: Print contents unescaped state.unescaped = true; } } } catch ( IOException except ) { throw new SAXException( except ); } }
1831 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/1831/0a2476ba9e907c0bc29f7df9dc34636f35f70e1f/HTMLSerializer.java/buggy/src/org/apache/xml/serialize/HTMLSerializer.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 13591, 12, 514, 19421, 16, 514, 11927, 16, 17311, 514, 1831, 461, 16, 9055, 3422, 262, 3639, 1216, 14366, 565, 288, 3639, 509, 1850, 277, 31, 3639, 1250, 1377, 9420, 3819, 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, 13591, 12, 514, 19421, 16, 514, 11927, 16, 17311, 514, 1831, 461, 16, 9055, 3422, 262, 3639, 1216, 14366, 565, 288, 3639, 509, 1850, 277, 31, 3639, 1250, 1377, 9420, 3819, 31, ...
" public static void main(String[] args);\n" +
" public static void main(java.lang.String[] args);\n" +
public void test035() { String source = "public class A {\n" + " public static void main(String[] args) {\n" + " int i = 6;\n" + " if ((i == 6) \n" + " & false) { \n" + " System.out.println(i);\n" + " }\n" + " }\n" + "}"; String expectedOutput = " // Method descriptor #15 ([Ljava/lang/String;)V\n" + " // Stack: 1, Locals: 2\n" + " public static void main(String[] args);\n" + " 0 bipush 6\n" + " 2 istore_1 [i]\n" + " 3 return\n" + " Line numbers:\n" + " [pc: 0, line: 3]\n" + " [pc: 3, line: 8]\n" + " Local variable table:\n" + " [pc: 0, pc: 4] local: args index: 0 type: java.lang.String[]\n" + " [pc: 3, pc: 4] local: i index: 1 type: int\n"; checkClassFile("A", source, expectedOutput); }
10698 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10698/267a82506dfcd2b4938ade544a2160c1561cce40/ClassFileReaderTest.java/clean/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ClassFileReaderTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4630, 25, 1435, 288, 202, 202, 780, 1084, 273, 1082, 202, 6, 482, 667, 432, 18890, 82, 6, 397, 1082, 202, 6, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 1842, 4630, 25, 1435, 288, 202, 202, 780, 1084, 273, 1082, 202, 6, 482, 667, 432, 18890, 82, 6, 397, 1082, 202, 6, 202, 482, 760, 918, 2774, 12, 780, 8526, 833, 13, 1...
public void setPictures( Object[] pictures ) { this.pictures = pictures; if ( pictures == null || pictures.length == 0 ) { icon.setText("no picture selected"); icon.setIcon( mf.defaultThumbnail ); path.setText( "" ); album.setText( "" ); caption.setText( "" ); size.setText( "" ); up.setEnabled(false); down.setEnabled(false); delete.setEnabled(false); } else if ( pictures.length == 1) { Picture p = (Picture) pictures[0]; icon.setText( p.getSource().getName() ); icon.setIcon( mf.getThumbnail( p ) ); path.setText( p.getSource().getParent() ); album.setText( p.getAlbum().getName() ); caption.setText( p.getCaption() ); size.setText( String.valueOf( (int) p.getFileSize() ) + " bytes" ); up.setEnabled(true); down.setEnabled(true); delete.setEnabled(true); } else { Picture p = (Picture) pictures[0]; icon.setText( pictures.length + " elements selected" ); icon.setIcon( mf.defaultThumbnail ); path.setText( "" ); album.setText( p.getAlbum().getName() ); caption.setText( "" ); size.setText( Album.getObjectFileSize(pictures) + " bytes" ); up.setEnabled(false); down.setEnabled(false); delete.setEnabled(true); } }
5431 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/5431/36b8b27c38eb5db308ca536d3966078f9be7f19b/PictureInspector.java/buggy/gallery_remote/com/gallery/GalleryRemote/PictureInspector.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 918, 17004, 28636, 12, 1033, 8526, 293, 28636, 262, 288, 202, 202, 2211, 18, 84, 28636, 273, 293, 28636, 31, 202, 202, 430, 261, 293, 28636, 422, 446, 747, 293, 28636, 18, 246...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 17004, 28636, 12, 1033, 8526, 293, 28636, 262, 288, 202, 202, 2211, 18, 84, 28636, 273, 293, 28636, 31, 202, 202, 430, 261, 293, 28636, 422, 446, 747, 293, 28636, 18, 246...
return root.getChildren();
Object[] types = new Object[root.getChildren().length]; for (int i = 0; i < root.getChildren().length; i++) { types[i] = root.getChildren()[i].getElement(); } return types;
public Object[] getElements(Object parent) { return root.getChildren(); }
51151 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51151/b56051a2dcf1424d6ebf6d739542d5050abd6186/ActiveHierarchyView.java/clean/org.eclipse.mylyn.java.ui/src/org/eclipse/mylyn/java/ui/views/ActiveHierarchyView.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 3196, 202, 482, 1033, 8526, 8886, 12, 921, 982, 13, 288, 1082, 565, 1033, 8526, 1953, 273, 394, 1033, 63, 3085, 18, 588, 4212, 7675, 2469, 15533, 364, 261, 474, 277, 273, 374, 31, 277, 411, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3196, 202, 482, 1033, 8526, 8886, 12, 921, 982, 13, 288, 1082, 565, 1033, 8526, 1953, 273, 394, 1033, 63, 3085, 18, 588, 4212, 7675, 2469, 15533, 364, 261, 474, 277, 273, 374, 31, 277, 411, ...
Method[] methods = FunctionObject.getMethodList( NativeJavaPackage.class); Method m = FunctionObject.findSingleMethod(methods, "jsFunction_getClass"); FunctionObject f = new FunctionObject("getClass", m, scope);
JIFunction getClass = new JIFunction("getClass", 1) { public Object call(Context fcx, Scriptable fscope, Scriptable thisObj, Object[] args) { return js_getClass(fcx, fscope, packages, args); } };
public static Scriptable init(Scriptable scope) throws PropertyException { NativeJavaPackage packages = new NativeJavaPackage.TopLevelPackage(); packages.setPrototype(getObjectPrototype(scope)); packages.setParentScope(scope); // We want to get a real alias, and not a distinct JavaPackage // with the same packageName, so that we share classes and packages // that are underneath. NativeJavaPackage javaAlias = (NativeJavaPackage)packages.get("java", packages); for (int nameStart = 0; ;) { int nameEnd = commonPackages.indexOf(';', nameStart); if (nameEnd < 0) { break; } String packageName = commonPackages.substring(nameStart, nameEnd); packages.forcePackage(packageName); nameStart = nameEnd + 1; } Method[] methods = FunctionObject.getMethodList( NativeJavaPackage.class); Method m = FunctionObject.findSingleMethod(methods, "jsFunction_getClass"); FunctionObject f = new FunctionObject("getClass", m, scope); // It's safe to downcast here since initStandardObjects takes // a ScriptableObject. ScriptableObject global = (ScriptableObject) scope; global.defineProperty("getClass", f, ScriptableObject.DONTENUM); global.defineProperty("Packages", packages, ScriptableObject.DONTENUM); global.defineProperty("java", javaAlias, ScriptableObject.DONTENUM); // I think I'm supposed to return the prototype, but I don't have one. return packages; }
51996 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51996/b7d1664a5d03bd54df207a5ec86214ea4fb9f6d3/NativeJavaPackage.java/clean/js/rhino/src/org/mozilla/javascript/NativeJavaPackage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 22780, 1208, 12, 3651, 429, 2146, 13, 3639, 1216, 4276, 503, 565, 288, 3639, 16717, 5852, 2261, 5907, 273, 394, 16717, 5852, 2261, 18, 27046, 2261, 5621, 3639, 5907, 18, 542, 1...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 22780, 1208, 12, 3651, 429, 2146, 13, 3639, 1216, 4276, 503, 565, 288, 3639, 16717, 5852, 2261, 5907, 273, 394, 16717, 5852, 2261, 18, 27046, 2261, 5621, 3639, 5907, 18, 542, 1...
private static void log(CoreException exception) {
public static void log(CoreException exception) {
private static void log(CoreException exception) { IDEWorkbenchPlugin.getDefault().getLog().log(exception.getStatus()); }
55805 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/55805/cd30df30dfb88f9bda2fa203f31e3dd26ff697b7/Util.java/clean/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/Util.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 760, 918, 613, 12, 25341, 1520, 13, 288, 202, 202, 10385, 2421, 22144, 3773, 18, 588, 1868, 7675, 588, 1343, 7675, 1330, 12, 4064, 18, 588, 1482, 10663, 202, 97, 2, 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, 1, 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, 1152, 760, 918, 613, 12, 25341, 1520, 13, 288, 202, 202, 10385, 2421, 22144, 3773, 18, 588, 1868, 7675, 588, 1343, 7675, 1330, 12, 4064, 18, 588, 1482, 10663, 202, 97, 2, -100, -10...
sb.append(name.toJCRName(resolver)); int index = getIndex(); /** * FIXME the [1] subscript should only be suppressed if the item * in question can't have same-name siblings. */ if (index > 1) { sb.append('['); sb.append(index); sb.append(']'); }
toJCRName(resolver, sb);
public String toJCRName(NamespaceResolver resolver) throws NoPrefixDeclaredException { StringBuffer sb = new StringBuffer(); // name sb.append(name.toJCRName(resolver)); // index int index = getIndex(); /** * FIXME the [1] subscript should only be suppressed if the item * in question can't have same-name siblings. */ //if (index > 0) { if (index > 1) { sb.append('['); sb.append(index); sb.append(']'); } return sb.toString(); }
49304 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49304/cc398a58d6ffc03e36361c8b1f9e70198d3d8c44/Path.java/buggy/src/java/org/apache/jackrabbit/core/Path.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 540, 1071, 514, 358, 46, 5093, 461, 12, 3402, 4301, 5039, 13, 1216, 2631, 2244, 18888, 503, 288, 5411, 6674, 2393, 273, 394, 6674, 5621, 5411, 368, 508, 5411, 2393, 18, 6923, 12, 529, 18, 86...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 514, 358, 46, 5093, 461, 12, 3402, 4301, 5039, 13, 1216, 2631, 2244, 18888, 503, 288, 5411, 6674, 2393, 273, 394, 6674, 5621, 5411, 368, 508, 5411, 2393, 18, 6923, 12, 529, 18, 86...
assertTrue("Has no expectations", !myExpectation.hasExpectations()); }
assertTrue("Has no expectations", !myExpectation.hasExpectations()); }
public void testHasNoExpectations() { myExpectation.setActual(0.0); assertTrue("Has no expectations", !myExpectation.hasExpectations()); }
2796 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2796/065d08edd62599d5d244a9317db470157690f4f9/ExpectationDoubleValueTest.java/buggy/jmock/core/src/test/jmock/expectation/ExpectationDoubleValueTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5582, 2279, 11988, 1012, 1435, 288, 3639, 3399, 11988, 367, 18, 542, 11266, 12, 20, 18, 20, 1769, 3639, 1815, 5510, 2932, 5582, 1158, 26305, 3113, 7734, 401, 4811, 11988, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 5582, 2279, 11988, 1012, 1435, 288, 3639, 3399, 11988, 367, 18, 542, 11266, 12, 20, 18, 20, 1769, 3639, 1815, 5510, 2932, 5582, 1158, 26305, 3113, 7734, 401, 4811, 11988, ...
cons.gridy = 8;
cons.gridy = 9;
public EditorOptionPane() { super("editor"); GridBagLayout layout = new GridBagLayout(); setLayout(layout); GridBagConstraints cons = new GridBagConstraints(); cons.gridx = cons.gridy = 0; cons.gridwidth = 3; cons.gridheight = 1; cons.fill = GridBagConstraints.BOTH; cons.weightx = 1.0f; JLabel label = new JLabel(jEdit.getProperty("options.editor" + ".font"),SwingConstants.RIGHT); layout.setConstraints(label,cons); add(label); cons.gridx = 3; cons.gridwidth = 1; font = new JComboBox(getToolkit().getFontList()); font.setSelectedItem(jEdit.getProperty("view.font")); layout.setConstraints(font,cons); add(font); cons.gridx = 0; cons.gridy = 1; cons.gridwidth = 3; label = new JLabel(jEdit.getProperty("options.editor.fontsize"), SwingConstants.RIGHT); layout.setConstraints(label,cons); add(label); cons.gridx = 3; cons.gridwidth = 1; String[] sizes = { "9", "10", "12", "14", "18", "24" }; size = new JComboBox(sizes); size.setSelectedItem(jEdit.getProperty("view.fontsize")); layout.setConstraints(size,cons); add(size); cons.gridx = 0; cons.gridy = 2; cons.gridwidth = 3; label = new JLabel(jEdit.getProperty("options.editor.width"), SwingConstants.RIGHT); layout.setConstraints(label,cons); add(label); cons.gridx = 3; cons.gridwidth = 1; viewWidth = new JTextField(jEdit.getProperty("view.geometry.w")); layout.setConstraints(viewWidth,cons); add(viewWidth); cons.gridx = 0; cons.gridy = 3; cons.gridwidth = 3; label = new JLabel(jEdit.getProperty("options.editor.height"), SwingConstants.RIGHT); layout.setConstraints(label,cons); add(label); cons.gridx = 3; cons.gridwidth = 1; viewHeight = new JTextField(jEdit.getProperty("view.geometry.h")); layout.setConstraints(viewHeight,cons); add(viewHeight); cons.gridx = 0; cons.gridy = 4; cons.gridwidth = 3; label = new JLabel(jEdit.getProperty("options.editor.tabSize"), SwingConstants.RIGHT); layout.setConstraints(label,cons); add(label); cons.gridx = 3; cons.gridwidth = 1; tabSize = new JTextField(jEdit.getProperty("buffer.tabSize")); layout.setConstraints(tabSize,cons); add(tabSize); cons.gridx = 0; cons.gridy = 5; cons.gridwidth = cons.REMAINDER; lineHighlight = new JCheckBox(jEdit.getProperty("options.editor" + ".lineHighlight")); lineHighlight.getModel().setSelected("on".equals(jEdit .getProperty("view.lineHighlight"))); layout.setConstraints(lineHighlight,cons); add(lineHighlight); cons.gridy = 6; bracketHighlight = new JCheckBox(jEdit.getProperty("options.editor" + ".bracketHighlight")); bracketHighlight.getModel().setSelected("on".equals(jEdit .getProperty("view.bracketHighlight"))); layout.setConstraints(bracketHighlight,cons); add(bracketHighlight); cons.gridy = 7; syntax = new JCheckBox(jEdit.getProperty("options.editor" + ".syntax")); syntax.getModel().setSelected("on".equals(jEdit.getProperty( "buffer.syntax"))); layout.setConstraints(syntax,cons); add(syntax); cons.gridy = 8; autoIndent = new JCheckBox(jEdit.getProperty("options.editor" + ".autoIndent")); autoIndent.getModel().setSelected("on".equals(jEdit.getProperty( "view.autoindent"))); layout.setConstraints(autoIndent,cons); add(autoIndent); cons.gridy = 9; blinkCaret = new JCheckBox(jEdit.getProperty("options.editor" + ".blinkCaret")); blinkCaret.getModel().setSelected(!"0".equals(jEdit.getProperty( "view.caretBlinkRate"))); layout.setConstraints(blinkCaret,cons); add(blinkCaret); }
6564 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/6564/3dd880fa154feb10894aee38225042b80125b1bc/EditorOptionPane.java/buggy/org/gjt/sp/jedit/options/EditorOptionPane.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 18451, 1895, 8485, 1435, 202, 95, 202, 202, 9565, 2932, 9177, 8863, 202, 202, 6313, 5013, 3744, 3511, 273, 394, 7145, 5013, 3744, 5621, 202, 202, 542, 3744, 12, 6741, 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, 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, 18451, 1895, 8485, 1435, 202, 95, 202, 202, 9565, 2932, 9177, 8863, 202, 202, 6313, 5013, 3744, 3511, 273, 394, 7145, 5013, 3744, 5621, 202, 202, 542, 3744, 12, 6741, 1769, 202,...
this.log(LogService.LOG_INFO, "Remote Logger started "+version);
this.log(LogService.LOG_INFO, "Remote Logger started (logLvl="+logLvl+")"+version);
public void start(BundleContext bc) throws Exception{ this.version=(String)bc.getBundle().getHeaders().get(Constants.BUNDLE_VERSION); this.bc=bc; this.log(LogService.LOG_INFO, "Remote Logger starting "+version); try{ this.remoteLoggerON=new ObjectName(Logger.REMOTE_LOGGER_ON_STRING); }catch(MalformedObjectNameException e){ throw new BundleException("Logger.Logger:objectName invalid", e); } try{ bc.addServiceListener(this,"(|(objectClass="+LogReaderService.class.getName()+")"+ "(objectClass="+MBeanServer.class.getName()+"))"); }catch(InvalidSyntaxException e){ throw new BundleException("Logger.Logger:filtre LDAP", e); } ServiceReference sr=bc.getServiceReference(LogReaderService.class.getName()); if (sr!=null){ this.registerLogReaderService(sr); } ServiceReference sr2=bc.getServiceReference(MBeanServer.class.getName()); if (sr2!=null){ this.registerToAgent(sr2); } this.log(LogService.LOG_INFO, "Remote Logger started "+version); }
45948 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45948/c763302946f3f5c70b1178bc04bc32c42d35306d/Logger.java/buggy/mosgi.jmx.remotelogger/src/main/java/org/apache/felix/mosgi/jmx/remotelogger/Logger.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 918, 787, 12, 3405, 1042, 6533, 13, 1216, 1185, 95, 565, 333, 18, 1589, 28657, 780, 13, 13459, 18, 588, 3405, 7675, 588, 3121, 7675, 588, 12, 2918, 18, 30245, 67, 5757, 1769, 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, 918, 787, 12, 3405, 1042, 6533, 13, 1216, 1185, 95, 565, 333, 18, 1589, 28657, 780, 13, 13459, 18, 588, 3405, 7675, 588, 3121, 7675, 588, 12, 2918, 18, 30245, 67, 5757, 1769, 565,...
sourceViewer.configure( new JSSourceViewerConfiguration( ) );
JSSyntaxContext context = new JSSyntaxContext( ); try { context.setVariable( IReportGraphicConstants.REPORT_KEY_WORD, IReportDesign.class ); } catch ( ClassNotFoundException e ) { } sourceViewer.configure( new JSSourceViewerConfiguration( context ) );
private void createExpressionField( Composite parent ) { Composite expressionArea = new Composite( parent, SWT.NONE ); expressionArea.setLayout( new GridLayout( 2, false ) ); expressionArea.setLayoutData( new GridData( GridData.FILL_BOTH ) ); Composite composite = new Composite( expressionArea, SWT.BORDER ); composite.setLayoutData( new GridData( GridData.FILL_BOTH ) ); composite.setLayout( UIUtil.createGridLayoutWithoutMargin( ) ); CompositeRuler ruler = new CompositeRuler( ); ruler.addDecorator( 0, new LineNumberRulerColumn( ) ); sourceViewer = new SourceViewer( composite, ruler, SWT.H_SCROLL | SWT.V_SCROLL ); sourceViewer.configure( new JSSourceViewerConfiguration( ) ); // sourceViewer.configure( new SourceViewerConfiguration( ) ); // Document doc = new Document( expression ); // sourceViewer.setDocument( doc ); if ( expression != null ) { JSEditorInput editorInput = new JSEditorInput( expression ); JSDocumentProvider documentProvider = new JSDocumentProvider( ); try { documentProvider.connect( editorInput ); } catch ( CoreException e ) { ExceptionHandler.handle( e ); } IDocument document = documentProvider.getDocument( editorInput ); sourceViewer.setDocument( document ); } GridData gd = new GridData( GridData.FILL_BOTH ); gd.heightHint = 150; sourceViewer.getControl( ).setLayoutData( gd ); sourceViewer.getTextWidget( ).addKeyListener( new KeyAdapter( ) { public void keyPressed( KeyEvent e ) { if ( isUndoKeyPress( e ) ) { sourceViewer.doOperation( ITextOperationTarget.UNDO ); } else if ( isRedoKeyPress( e ) ) { sourceViewer.doOperation( ITextOperationTarget.REDO ); } } private boolean isUndoKeyPress( KeyEvent e ) { return ( ( e.stateMask & SWT.CONTROL ) > 0 ) && ( ( e.keyCode == 'z' ) || ( e.keyCode == 'Z' ) ); } private boolean isRedoKeyPress( KeyEvent e ) { return ( ( e.stateMask & SWT.CONTROL ) > 0 ) && ( ( e.keyCode == 'y' ) || ( e.keyCode == 'Y' ) ); } } ); buttonBar = new Composite( expressionArea, SWT.NONE ); buttonBar.setLayout( UIUtil.createGridLayoutWithoutMargin( ) ); buttonBar.setLayoutData( new GridData( GridData.FILL_VERTICAL ) ); }
46013 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46013/018ed60258a7970a95a6d310022fe87bdd503e3b/ExpressionBuilder.java/clean/UI/org.eclipse.birt.report.designer.ui/src/org/eclipse/birt/report/designer/ui/dialogs/ExpressionBuilder.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 752, 2300, 974, 12, 14728, 982, 262, 202, 95, 202, 202, 9400, 2652, 5484, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 8692, 5484, 18, 542, 3744, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 752, 2300, 974, 12, 14728, 982, 262, 202, 95, 202, 202, 9400, 2652, 5484, 273, 394, 14728, 12, 982, 16, 348, 8588, 18, 9826, 11272, 202, 202, 8692, 5484, 18, 542, 3744, ...
LOG.info("now building: " + nextProject.getName());
LOG.info("processing project: " + nextProject.getName());
void serviceQueue() { while (!queue.isEmpty()) { Project nextProject = null; synchronized (queue) { nextProject = (Project) queue.remove(0); } if (nextProject != null) { LOG.info("now building: " + nextProject.getName()); nextProject.execute(); } } }
52149 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/52149/baba2a39eef74c9d10e476034502bf110243bf01/BuildQueue.java/clean/main/src/net/sourceforge/cruisecontrol/BuildQueue.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 918, 1156, 3183, 1435, 288, 3639, 1323, 16051, 4000, 18, 291, 1921, 10756, 288, 5411, 5420, 1024, 4109, 273, 446, 31, 5411, 3852, 261, 4000, 13, 288, 7734, 1024, 4109, 273, 261, 4109, 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, 918, 1156, 3183, 1435, 288, 3639, 1323, 16051, 4000, 18, 291, 1921, 10756, 288, 5411, 5420, 1024, 4109, 273, 446, 31, 5411, 3852, 261, 4000, 13, 288, 7734, 1024, 4109, 273, 261, 4109, 13,...
}else if(inc.preferAlt!=null && altVal==null){
}else if(inc.alt!=null && altVal==null){
protected List computeConvertibleXPaths(List xpathList, boolean exemplarsContainA_Z, String localeName, String supplementalDir){ /* * Assumptions: * 1. Vetted nodes do not have draft attribute * 2. Nodes with draft attribute set and alt atrribute not set do not have a vetted counterpart * 3. Nodes with alt attribute may or may not have a draft attribute * 4. If no draft field is set in the preferences object assume vetted node is requested * * */ //fast path String draft = (String)localesMap.get(localeName+".xml"); XPathParts parts = new XPathParts(null, null); if(draft!=null){ for(int i=0; i<xpathList.size();i++){ parts = parts.set((String)xpathList.get(i)); Map attr = parts.getAttributes(parts.size()-1); String draftVal = (String)attr.get(LDMLConstants.DRAFT); if(draftVal!=null && !draftVal.matches(draft)){ xpathList.remove(i); } } // return xpathList; } if(pathList==null){ // include everything! return xpathList; } ArrayList myXPathList = new ArrayList(xpathList.size()); StandardCodes sc = StandardCodes.make(); // iterator of xpaths of the current CLDR file being processed // this map only contains xpaths of the leaf nodes for(int i=0; i<xpathList.size();i++){ String xpath = (String) xpathList.get(i); parts = parts.set(xpath); Map attr = parts.getAttributes(parts.size()-1); boolean include = false; for(int j=0; j<pathList.size(); j++){ Object obj = pathList.get(j); if(obj instanceof CLDRBuild.CoverageLevel){ initCoverageLevel(localeName, exemplarsContainA_Z, supplementalDir); CLDRBuild.CoverageLevel level = (CLDRBuild.CoverageLevel) obj; if(level.locales!=null && CLDRBuild.matchesLocale(level.locales, localeName)==false){ continue; } //process further only if the current locale is part of the given group and org if(level.group!=null && !sc.isLocaleInGroup(localeName, level.group, level.org) ){ continue; } CoverageLevel.Level cv = CoverageLevel.Level.get(level.level); // only include the xpaths that have the coverage level at least the coverage level // specified by the locale if(coverageLevel.getCoverageLevel(xpath).compareTo(cv)<=0){ String draftVal = (String)attr.get(LDMLConstants.DRAFT); if(level.draft!=null){ if( draftVal==null && (level.draft.equals("false")|| level.draft.equals(".*")) ){ include = true; }else if(draftVal!=null && draftVal.matches(level.draft)){ include = true; }else{ include = false; } }else{ if(draftVal==null){ include = true; } } } }else if(obj instanceof CLDRBuild.Exclude){ CLDRBuild.Exclude exc = (CLDRBuild.Exclude)obj; //fast path if locale attribute is set if(exc.locales!=null && CLDRBuild.matchesLocale(exc.locales, localeName)==false){ continue; } if(exc.xpath!=null && xpath.matches(exc.xpath)){ /* * Now starts struggle for figuring out which xpaths should be excluded * The following cases need to be handled: * 1. <exclude xpath="//ldml/localeDisplayNames/languages/.*" draft="false"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = true * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = false * 2. <exclude xpath="//ldml/localeDisplayNames/languages/.*" draft="true"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = false * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] then * include = true * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = true * 3. <exclude xpath="//ldml/localeDisplayNames/languages/.*" draft=".*"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = false * 4. <exclude xpath="//ldml/localeDisplayNames/languages/.*" draft="false" preferAlt='true'> * if xp of //ldml/localeDisplayNames/languages/language[@type='en' alt='.*'] exists then * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = true * else * apply rules for processing draft and alt attribute together. * else * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = false * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] then * include = true * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = true */ String draftVal = (String)attr.get(LDMLConstants.DRAFT); String altVal = (String)attr.get(LDMLConstants.ALT); boolean altExc = false, draftExc = false; if(exc.preferAlt==null && altVal==null){ altExc = true; }else if(exc.preferAlt==null && altVal!=null){ altExc = true; }else if(exc.preferAlt!=null && altVal==null){ altExc = false; }else{ //the current xpath does not have the alt attribute set // since the list is sorted we can be sure that if the // next xpath matches the the current one then additional // alt attribute should be set // now check if next xpath contains alt attribute String nxp = (String) xpathList.get(i+1); XPathParts nparts = (new XPathParts(null, null)).set(nxp); Map nattr = nparts.getAttributes(parts.size()-1); // make sure the type attribute is the same if(parts.isLike(nparts)){ altVal = (String)nattr.get(LDMLConstants.ALT); if(altVal.matches(exc.preferAlt)){ draftVal = (String)nattr.get(LDMLConstants.DRAFT); xpath = nxp; i++; altExc = true; } } } if(exc.draft==null && draftVal==null){ draftExc = true; }else if(exc.draft!=null && draftVal==null){ if((exc.draft.equals("false")|| exc.draft.equals(".*")) ){ draftExc = true; } }else if(exc.draft==null && draftVal!=null){ draftExc = false; }else{ if(draftVal.matches(exc.draft)){ draftExc = true; } } if(altExc==true && draftExc==true){ include = false; } } }else if(obj instanceof CLDRBuild.Include){ CLDRBuild.Include inc = (CLDRBuild.Include)obj; //fast path if locale attribute is set if(inc.locales!=null && CLDRBuild.matchesLocale(inc.locales, localeName)==false){ continue; } if(inc.xpath!=null && xpath.matches(inc.xpath)){ /* * The following cases need to be handled: * 1. <include xpath="//ldml/localeDisplayNames/languages/.*" draft="false"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = false * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = true * 2. <include xpath="//ldml/localeDisplayNames/languages/.*" draft="true"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = true * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] then * include = false * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = false * 3. <include xpath="//ldml/localeDisplayNames/languages/.*" draft=".*"> * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = true * 4. <include xpath="//ldml/localeDisplayNames/languages/.*" draft="false" preferAlt='true'> * if xp of //ldml/localeDisplayNames/languages/language[@type='en' alt='.*'] exists then * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] * or xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = false * else * apply rules for processing draft and alt attribute together. * else * if xp is //ldml/localeDisplayNames/languages/language[@type='en'] then * include = true * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='test'] then * include = false * if xp is //ldml/localeDisplayNames/languages/language[@type='en' and draft='true'] then * include = false */ String draftVal = (String)attr.get(LDMLConstants.DRAFT); String altVal = (String)attr.get(LDMLConstants.ALT); boolean altInc = false; if(inc.preferAlt==null && altVal==null){ altInc = true; }else if(inc.preferAlt==null && altVal!=null){ altInc = false; }else if(inc.preferAlt!=null && altVal==null){ // the current xpath does not have the alt attribute set // since the list is sorted we can be sure that if the // next xpath matches the the current one then additional // alt attribute should be set // now check if next xpath contains alt attribute String nxp = (String) xpathList.get(i+1); XPathParts nparts = (new XPathParts(null, null)).set(nxp); Map nattr = nparts.getAttributes(parts.size()-1); // make sure the type attribute is the same if(parts.isLike(nparts)){ altVal = (String)nattr.get(LDMLConstants.ALT); if(altVal.matches(inc.preferAlt)){ draftVal = (String)nattr.get(LDMLConstants.DRAFT); xpath = nxp; i++; altInc = true; } } }else{ if(altVal.matches(inc.preferAlt)){ altInc = true; } } boolean draftInc = false; if(inc.draft==null && draftVal==null){ draftInc = true; }else if(inc.draft!=null && draftVal==null){ if((inc.draft.equals("false")|| inc.draft.equals(".*")) ){ draftInc = true; } }else if(inc.draft==null && draftVal!=null){ draftInc = false; }else{ if(draftVal.matches(inc.draft)){ draftInc = true; } } if(altInc==true && draftInc==true){ include = true; } } }else{ System.err.println("ERROR: computeConvertibleXPath method cannot handle object of type: "+ obj.getClass().toString()); } } if(include==true){ myXPathList.add(xpath); } } return myXPathList; }
27800 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/27800/8402772988253040e71273e6b2b786686a850375/CLDRConverterTool.java/buggy/tools/java/org/unicode/cldr/ant/CLDRConverterTool.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 4750, 987, 3671, 2723, 1523, 60, 4466, 12, 682, 6748, 682, 16, 1250, 431, 351, 412, 5913, 22928, 37, 67, 62, 16, 514, 2573, 461, 16, 514, 1169, 23026, 1621, 15329, 3639, 1748, 540, 380,...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 987, 3671, 2723, 1523, 60, 4466, 12, 682, 6748, 682, 16, 1250, 431, 351, 412, 5913, 22928, 37, 67, 62, 16, 514, 2573, 461, 16, 514, 1169, 23026, 1621, 15329, 3639, 1748, 540, 380,...
public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName)
public static void installColorsAndFont(JComponent component, String defaultBgName, String defaultFgName, String defaultFontName)
public static void installColorsAndFont(JComponent c, String defaultBgName, String defaultFgName, String defaultFontName) { //Convenience method for initializing a components foreground background and font properties with values from the current defaults table. }
50763 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50763/2d7debfa0b9e176eb89b1dd2089f53cb5079cc16/LookAndFeel.java/clean/core/src/classpath/javax/javax/swing/LookAndFeel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 3799, 12570, 1876, 5711, 12, 46, 1841, 1794, 16, 514, 805, 24923, 461, 16, 514, 805, 42, 75, 461, 16, 514, 805, 5711, 461, 13, 565, 288, 202, 759, 14700, 707, 364, 225...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 760, 918, 3799, 12570, 1876, 5711, 12, 46, 1841, 1794, 16, 514, 805, 24923, 461, 16, 514, 805, 42, 75, 461, 16, 514, 805, 5711, 461, 13, 565, 288, 202, 759, 14700, 707, 364, 225...
public org.quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuerLen value = new org.quickfix.field.EncodedUnderlyingIssuerLen();
public quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { quickfix.field.EncodedUnderlyingIssuerLen value = new quickfix.field.EncodedUnderlyingIssuerLen();
public org.quickfix.field.EncodedUnderlyingIssuerLen getEncodedUnderlyingIssuerLen() throws FieldNotFound { org.quickfix.field.EncodedUnderlyingIssuerLen value = new org.quickfix.field.EncodedUnderlyingIssuerLen(); getField(value); return value; }
8803 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8803/fecc27f98261270772ff182a1d4dfd94b5daa73d/TradeCaptureReportRequestAck.java/buggy/src/java/src/quickfix/fix44/TradeCaptureReportRequestAck.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 14655, 6291, 16667, 2891, 28799, 14655, 6291, 16667, 2891, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 1465...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 10397, 14655, 6291, 16667, 2891, 28799, 14655, 6291, 16667, 2891, 1435, 1216, 2286, 2768, 225, 288, 2358, 18, 19525, 904, 18, 1518, 18, 10397, 1465...
private List getStylesheets() { java.io.Reader reader; List infos = new LinkedList(); long st = System.currentTimeMillis(); String uri = _nsh.getNamespace(); StylesheetInfo info = new StylesheetInfo(); info.setUri(_nsh.getNamespace()); info.setOrigin(StylesheetInfo.USER_AGENT); info.setMedia("all"); info.setType("text/css"); if (!_stylesheetFactory.containsStylesheet(uri)) { reader = _nsh.getDefaultStylesheet(); if (reader != null) { Stylesheet sheet = _stylesheetFactory.parse(reader, info); _stylesheetFactory.putStylesheet(uri, sheet); } } infos.add(info); StylesheetInfo[] refs = _nsh.getStylesheetLinks(_doc); if (refs != null) { for (int i = 0; i < refs.length; i++) { java.net.URL baseUrl = _context.getRenderingContext().getBaseURL(); try { uri = new java.net.URL(baseUrl, refs[i].getUri()).toString(); refs[i].setUri(uri); } catch (java.net.MalformedURLException e) { XRLog.exception("bad URL for associated stylesheet", e); } } } infos.addAll(Arrays.asList(refs)); uri = _context.getRenderingContext().getBaseURL().toString(); info = new StylesheetInfo(); info.setUri(uri); info.setOrigin(StylesheetInfo.AUTHOR); Stylesheet sheet = null; if (_stylesheetFactory.containsStylesheet(uri)) { sheet = _stylesheetFactory.getCachedStylesheet(uri); } else { InlineStyleInfo[] inlineStyle = _nsh.getInlineStyle(_doc); sheet = _stylesheetFactory.parseInlines(inlineStyle, info); _stylesheetFactory.putStylesheet(uri, sheet); } info.setStylesheet(sheet);//add it here because matcher cannot look it up, uri:s are in a twist infos.add(info); //here we should also get user stylesheet from userAgent long el = System.currentTimeMillis() - st; XRLog.load("TIME: parse stylesheets " + el + "ms"); return infos; }
8125 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8125/b0a50287e9dcf535f559755f5229ead863911423/StyleReference.java/clean/src/java/org/xhtmlrenderer/css/StyleReference.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 987, 336, 9725, 10245, 1435, 288, 3639, 2252, 18, 1594, 18, 2514, 2949, 31, 3639, 987, 10626, 273, 394, 10688, 5621, 3639, 1525, 384, 273, 2332, 18, 2972, 28512, 5621, 3639, 514, 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, 377, 3238, 987, 336, 9725, 10245, 1435, 288, 3639, 2252, 18, 1594, 18, 2514, 2949, 31, 3639, 987, 10626, 273, 394, 10688, 5621, 3639, 1525, 384, 273, 2332, 18, 2972, 28512, 5621, 3639, 514, 20...
return invokedObject.hashCode() ^ invokedMethod.hashCode() ^ parameterValues.hashCode(); }
return invokedObject.hashCode() ^ invokedMethod.hashCode() ^ parameterValues.hashCode(); }
public int hashCode() { return invokedObject.hashCode() ^ invokedMethod.hashCode() ^ parameterValues.hashCode(); }
57371 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/57371/c26c57f3ac4851e6bc9c5df8515ac73f4045eebf/Invocation.java/clean/jmock/core/src/org/jmock/core/Invocation.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 13374, 1435, 288, 202, 202, 2463, 8187, 921, 18, 2816, 1085, 1435, 3602, 1082, 4202, 8187, 1305, 18, 2816, 1085, 1435, 3602, 1082, 4202, 1569, 1972, 18, 2816, 1085, 5621, 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, 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, 509, 13374, 1435, 288, 202, 202, 2463, 8187, 921, 18, 2816, 1085, 1435, 3602, 1082, 4202, 8187, 1305, 18, 2816, 1085, 1435, 3602, 1082, 4202, 1569, 1972, 18, 2816, 1085, 5621, 2...
boolean seenNonWhitespace = false;
public int getFoldLevel(Buffer buffer, int lineIndex, Segment seg) { int tabSize = buffer.getTabSize(); buffer.getLineText(lineIndex,seg); int offset = seg.offset; int count = seg.count; int whitespace = 0; if(count == 0) { // empty line. inherit previous line's fold level if(lineIndex != 0) whitespace = buffer.getFoldLevel(lineIndex - 1); else whitespace = 0; } else { // this is so that lines consisting of only // whitespace don't cause disruptions boolean seenNonWhitespace = false;loop: for(int i = 0; i < count; i++) { switch(seg.array[offset + i]) { case ' ': whitespace++; break; case '\t': whitespace += (tabSize - whitespace % tabSize); break; default: seenNonWhitespace = true; break loop; } } if(!seenNonWhitespace) { if(lineIndex != 0) whitespace = buffer.getFoldLevel(lineIndex - 1); else whitespace = 0; } } return whitespace; } //}}}
8690 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8690/e51b05eddd74d15601a9c4c839820b00b44863d9/IndentFoldHandler.java/buggy/org/gjt/sp/jedit/buffer/IndentFoldHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 509, 2812, 1673, 2355, 12, 1892, 1613, 16, 509, 980, 1016, 16, 10807, 2291, 13, 202, 95, 202, 202, 474, 3246, 1225, 273, 1613, 18, 588, 5661, 1225, 5621, 202, 202, 4106, 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, 482, 509, 2812, 1673, 2355, 12, 1892, 1613, 16, 509, 980, 1016, 16, 10807, 2291, 13, 202, 95, 202, 202, 474, 3246, 1225, 273, 1613, 18, 588, 5661, 1225, 5621, 202, 202, 4106, 18, ...
public void write(Database database, Collection tables, boolean showRelationshipsGraph, boolean showOrphansGraph, LineWriter html) throws IOException, SQLException {
public void write(Database database, Collection tables, boolean showRelationshipsGraph, boolean showOrphansGraph, LineWriter html) throws IOException {
public void write(Database database, Collection tables, boolean showRelationshipsGraph, boolean showOrphansGraph, LineWriter html) throws IOException, SQLException { Set columns = new TreeSet(new Comparator() { public int compare(Object object1, Object object2) { TableColumn column1 = (TableColumn)object1; TableColumn column2 = (TableColumn)object2; int rc = column1.getName().compareTo(column2.getName()); if (rc == 0) rc = column1.getTable().getName().compareTo(column2.getTable().getName()); return rc; } }); Set primaryColumns = new HashSet(); Set indexedColumns = new HashSet(); Iterator iter = tables.iterator(); while (iter.hasNext()) { Table table = (Table)iter.next(); columns.addAll(table.getColumns()); primaryColumns.addAll(table.getPrimaryColumns()); Iterator indexIter = table.getIndexes().iterator(); while (indexIter.hasNext()) { TableIndex index = (TableIndex)indexIter.next(); indexedColumns.addAll(index.getColumns()); } } writeHeader(database, columns.size(), showRelationshipsGraph, showOrphansGraph, html); HtmlTablePage formatter = HtmlTablePage.getInstance(); iter = columns.iterator(); while (iter.hasNext()) { TableColumn column = (TableColumn)iter.next(); formatter.writeColumn(column, column.getTable().getName(), primaryColumns, indexedColumns, false, html); } writeFooter(html); }
30562 /local/tlutelli/issta_data/temp/all_java3context/java/2006_temp/2006/30562/dfaef205b164b3d5bfc17e46489011387dc2be71/HtmlColumnsPage.java/buggy/src/net/sourceforge/schemaspy/view/HtmlColumnsPage.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1045, 12, 4254, 2063, 16, 2200, 4606, 16, 1250, 2405, 17185, 4137, 16, 1250, 2405, 1162, 31574, 4137, 16, 5377, 2289, 1729, 13, 1216, 1860, 288, 3639, 1000, 2168, 273, 394, 194...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1045, 12, 4254, 2063, 16, 2200, 4606, 16, 1250, 2405, 17185, 4137, 16, 1250, 2405, 1162, 31574, 4137, 16, 5377, 2289, 1729, 13, 1216, 1860, 288, 3639, 1000, 2168, 273, 394, 194...
public static void error(Object o, String s, Throwable e) { logger.log(o, s, e, ERROR);
public static void error(Class c, String s) { logger.log(c, s, ERROR);
public static void error(Object o, String s, Throwable e) { logger.log(o, s, e, ERROR); }
8026 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/8026/01c14cd48d872bfb5d34b94395d44bb4bf44316e/Logger.java/buggy/src/freenet/support/Logger.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 482, 760, 918, 555, 12, 921, 320, 16, 514, 272, 16, 4206, 425, 13, 288, 202, 565, 1194, 18, 1330, 12, 83, 16, 272, 16, 425, 16, 5475, 1769, 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, 1, 1, 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, 760, 918, 555, 12, 921, 320, 16, 514, 272, 16, 4206, 425, 13, 288, 202, 565, 1194, 18, 1330, 12, 83, 16, 272, 16, 425, 16, 5475, 1769, 202, 97, 2, -100, -100, -100, -100, ...
if (result != null) { if (result instanceof Element || result instanceof Document) { Node node = (Node) result; DOMGenerator domGenerator = new DOMGenerator(node); ProcessorOutput domOutput = domGenerator.createOutput(OUTPUT_DATA); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { }
if ( result == null ) continue; final String strVal; if ( result instanceof org.dom4j.Element || result instanceof org.dom4j.Document ) { final org.dom4j.Element elt = result instanceof org.dom4j.Element ? ( org.dom4j.Element )result : ( ( org.dom4j.Document )result ).getRootElement(); final String sid = Dom4jUtils.makeSystemId( elt ); final DOMGenerator domGenerator = new DOMGenerator ( elt, "xpath result doc", DOMGenerator.ZeroValidity, sid ); final ProcessorOutput domOutput = domGenerator.createOutput( OUTPUT_DATA ); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { }
public void readImpl(org.orbeon.oxf.pipeline.api.PipelineContext context, ContentHandler contentHandler) { Config config = (Config) readCacheInputAsObject(context, getInputByName(INPUT_CONFIG), new CacheableInputReader() { public Object read(final org.orbeon.oxf.pipeline.api.PipelineContext context, final ProcessorInput input) { Document config = readInputAsDOM4J(context, INPUT_CONFIG); // Get declared namespaces Map namespaces = new HashMap(); for (Iterator i = config.getRootElement().selectNodes("/config/namespace").iterator(); i.hasNext();) { Element namespaceElement = (Element) i.next(); namespaces.put(namespaceElement.attributeValue("prefix"), namespaceElement.attributeValue("uri")); } // Create xpath object (Jaxen)// XPath xpath = XPathCache.createCacheXPath(context, (String) config.selectObject("string(/config/xpath)"));// xpath.setNamespaceContext(new SimpleNamespaceContext(namespaces));// xpath.setFunctionContext(new OXFFunctionContext());// return xpath; return new Config(namespaces, (String) config.selectObject("string(/config/xpath)")); } });// List results = xpath.selectNodes(readCacheInputAsDOM4J(context, INPUT_DATA)); DocumentWrapper wrapper = new DocumentWrapper(readCacheInputAsDOM4J(context, INPUT_DATA), null); PooledXPathExpression xpath = null; try { xpath = XPathCache.getXPathExpression(context, wrapper, config.getExpression(), config.getNamespaces()); List results = xpath.evaluate(); contentHandler.startDocument(); // WARNING: Here we break the rule that processors must output valid XML documents, because // we potentially output several root nodes. This works because the XPathProcessor is always // connected to an aggregator, which adds a new root node. for (Iterator i = results.iterator(); i.hasNext();) { Object result = i.next(); if (result != null) { if (result instanceof Element || result instanceof Document) { Node node = (Node) result; DOMGenerator domGenerator = new DOMGenerator(node); ProcessorOutput domOutput = domGenerator.createOutput(OUTPUT_DATA); domOutput.read(context, new ForwardingContentHandler(contentHandler) { public void startDocument() { } public void endDocument() { } }); } else if (result instanceof String) { String stringValue = (String) result; contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length()); } else if (result instanceof Double) { String stringValue = XMLUtils.removeScientificNotation(((Double) result).doubleValue()); contentHandler.characters(stringValue.toCharArray(), 0, stringValue.length()); } else { String message = "Unsupported type returned by XPath expression: " + (result == null ? "null" : result.getClass().getName()); throw new ValidationException(message, locationData); } } } contentHandler.endDocument(); }catch (XPathException xpe) { throw new OXFException(xpe); } catch (SAXException e) { throw new ValidationException(e, locationData); }finally{ if(xpath != null) xpath.returnToPool(); } }
10097 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/10097/558be30a09b76fdcd48f89d08b1308f894e34fcb/XPathProcessor.java/clean/src/java/org/orbeon/oxf/processor/transformer/XPathProcessor.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 2398, 1071, 918, 855, 2828, 12, 3341, 18, 280, 2196, 265, 18, 2409, 74, 18, 14511, 18, 2425, 18, 8798, 1042, 819, 16, 3697, 1503, 913, 1503, 13, 288, 9079, 1903, 642, 273, 261, 809, 13, 85...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 918, 855, 2828, 12, 3341, 18, 280, 2196, 265, 18, 2409, 74, 18, 14511, 18, 2425, 18, 8798, 1042, 819, 16, 3697, 1503, 913, 1503, 13, 288, 9079, 1903, 642, 273, 261, 809, 13, 85...
if (DEBUG && debuglevel > 8) { debug("padding: 0x" + Util.toString(result)); }
if (Configuration.DEBUG) log.fine("padding: 0x" + Util.toString(result));
public byte[] pad(byte[] in, int offset, int length) { int padLength = blockSize; if (length % blockSize != 0) { padLength = blockSize - length % blockSize; } byte[] result = new byte[padLength]; int lastBit = in[offset + length - 1] & 0x01; if (lastBit == 0) { for (int i = 0; i < padLength;) { result[i++] = 0x01; } } // else it's already set to zeroes by virtue of initialisation if (DEBUG && debuglevel > 8) { debug("padding: 0x" + Util.toString(result)); } return result; }
47947 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47947/8ace3af577b4314374a3cc74fdeae04a0733f7de/TBC.java/buggy/gnu/javax/crypto/pad/TBC.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 1160, 8526, 4627, 12, 7229, 8526, 316, 16, 509, 1384, 16, 509, 769, 13, 225, 288, 565, 509, 4627, 1782, 273, 13766, 31, 565, 309, 261, 2469, 738, 13766, 480, 374, 13, 1377, 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, 282, 1071, 1160, 8526, 4627, 12, 7229, 8526, 316, 16, 509, 1384, 16, 509, 769, 13, 225, 288, 565, 509, 4627, 1782, 273, 13766, 31, 565, 309, 261, 2469, 738, 13766, 480, 374, 13, 1377, 288, ...
assertEquals ("abab".lastIndexOf("ab", 1), sb.lastIndexOf("ab", 1));
assertEquals("abab".lastIndexOf("ab", 1), sb.lastIndexOf("ab", 1));
public void testLastIndexOfStringInt() { StrBuilder sb = new StrBuilder("abab"); assertEquals (0, sb.lastIndexOf("a", 1)); //should work like String#lastIndexOf assertEquals ("abab".lastIndexOf("a", 1), sb.lastIndexOf("a", 1)); assertEquals (0, sb.lastIndexOf("ab", 1)); //should work like String#lastIndexOf assertEquals ("abab".lastIndexOf("ab", 1), sb.lastIndexOf("ab", 1)); assertEquals(1, sb.lastIndexOf("b", 2)); assertEquals ("abab".lastIndexOf("b", 2), sb.lastIndexOf("b", 2)); assertEquals(1, sb.lastIndexOf("ba", 2)); assertEquals ("abab".lastIndexOf("ba", 2), sb.lastIndexOf("ba", 2)); assertEquals (-1, sb.lastIndexOf("z", 2)); sb = new StrBuilder("xyzabc"); assertEquals (2, sb.lastIndexOf("za", sb.length())); assertEquals (-1, sb.lastIndexOf("za", 1)); }
7060 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/7060/2f6b0b2c69b626d6a669aa8add3223417b3b274e/StrBuilderTest.java/clean/src/test/org/apache/commons/lang/text/StrBuilderTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3024, 31985, 780, 1702, 1435, 288, 3639, 3978, 1263, 2393, 273, 394, 3978, 1263, 2932, 378, 378, 8863, 7734, 1815, 8867, 261, 20, 16, 2393, 18, 2722, 31985, 2932, 69, 311...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 3024, 31985, 780, 1702, 1435, 288, 3639, 3978, 1263, 2393, 273, 394, 3978, 1263, 2932, 378, 378, 8863, 7734, 1815, 8867, 261, 20, 16, 2393, 18, 2722, 31985, 2932, 69, 311...
private void setupMaps(InputMap input_map, ActionMap action_map) { input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, 0, false), "left"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.SHIFT_MASK, false), "left"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.CTRL_MASK, false), "left"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_LEFT, Event.CTRL_MASK + Event.SHIFT_MASK, false), "left"); action_map.put("left", leftAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, 0, false), "right"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.SHIFT_MASK, false), "right"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.CTRL_MASK, false), "right"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT, Event.CTRL_MASK + Event.SHIFT_MASK, false), "right"); action_map.put("right", rightAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, 0, false), "down"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.SHIFT_MASK, false), "down"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.CTRL_MASK, false), "down"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_DOWN, Event.CTRL_MASK + Event.SHIFT_MASK, false), "down"); action_map.put("down", downAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, 0, false), "up"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.SHIFT_MASK, false), "up"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.CTRL_MASK, false), "up"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_UP, Event.CTRL_MASK + Event.SHIFT_MASK, false), "up"); action_map.put("up", upAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_X, Event.CTRL_MASK, false), "cut"); action_map.put("cut", cutAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_V, Event.CTRL_MASK, false), "paste"); action_map.put("paste", pasteAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_C, Event.CTRL_MASK, false), "copy"); action_map.put("copy", copyAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_END, 0, false), "end"); action_map.put("end", endAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_HOME, 0, false), "home"); action_map.put("home", homeAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0, false), "delete"); action_map.put("delete", deleteAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE, 0, false), "backspace"); action_map.put("backspace", backspaceAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_I, Event.CTRL_MASK, false), "select_inverse"); action_map.put("select_inverse", selectInverseAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, Event.CTRL_MASK, false), "select_all"); action_map.put("select_all", selectAllAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, 0, false), "change_focus"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_INSERT, Event.SHIFT_MASK, false), "change_focus"); action_map.put("change_focus", changeFocusAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, 0, false), "insert_and_split"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Event.SHIFT_MASK, false), "insert_and_split"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Event.CTRL_MASK, false), "insert_and_split"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_ENTER, Event.CTRL_MASK + Event.SHIFT_MASK, false), "insert_and_split"); action_map.put("insert_and_split", insertAndSplitAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0, false), "promote_demote"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, Event.SHIFT_MASK + Event.SHIFT_MASK, false), "promote_demote"); action_map.put("promote_demote", promoteDemoteAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_D, Event.CTRL_MASK, false), "select_none"); action_map.put("select_none", selectNoneAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK, false), "merge"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_M, Event.CTRL_MASK + Event.SHIFT_MASK, false), "merge"); action_map.put("merge", mergeAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, 0, false), "expansion"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.SHIFT_MASK, false), "expansion"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.CTRL_MASK, false), "expansion"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_DOWN, Event.CTRL_MASK + Event.SHIFT_MASK, false), "expansion"); action_map.put("expansion", toggleExpansionAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, 0, false), "comments"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.SHIFT_MASK, false), "comments"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.CTRL_MASK, false), "comments"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_PAGE_UP, Event.CTRL_MASK + Event.SHIFT_MASK, false), "comments"); action_map.put("comments", toggleCommentAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, 0, false), "editable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, Event.SHIFT_MASK, false), "editable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, Event.CTRL_MASK, false), "editable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F11, Event.CTRL_MASK + Event.SHIFT_MASK, false), "editable"); action_map.put("editable", toggleEditableAction); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, 0, false), "moveable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, Event.SHIFT_MASK, false), "moveable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, Event.CTRL_MASK, false), "moveable"); input_map.put(KeyStroke.getKeyStroke(KeyEvent.VK_F12, Event.CTRL_MASK + Event.SHIFT_MASK, false), "moveable"); action_map.put("moveable", toggleMoveableAction); }
49473 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/49473/a4ec3cc7cab9f76d30bbc493c279714e8fe417ba/OutlinerCellRendererImpl.java/clean/outliner/src/com/organic/maynard/outliner/OutlinerCellRendererImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 225, 202, 1152, 918, 3875, 8903, 12, 1210, 863, 810, 67, 1458, 16, 4382, 863, 1301, 67, 1458, 13, 288, 202, 202, 2630, 67, 1458, 18, 458, 12, 653, 14602, 18, 588, 653, 14602, 12, 653, 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, 225, 202, 1152, 918, 3875, 8903, 12, 1210, 863, 810, 67, 1458, 16, 4382, 863, 1301, 67, 1458, 13, 288, 202, 202, 2630, 67, 1458, 18, 458, 12, 653, 14602, 18, 588, 653, 14602, 12, 653, 1133...
hdrLabel = new JLabel(Pooka.getProperty("MessageDisplayPanel.Input.." + currentHeader + ".label", currentHeader) + ":", SwingConstants.RIGHT);
hdrLabel = new JLabel(Pooka.getProperty("MessageWindow.Input.." + currentHeader + ".label", currentHeader) + ":", SwingConstants.RIGHT);
public Container createHeaderInputPanel(MessageProxy aMsg, Hashtable proptDict) { Box inputPanel = new Box(BoxLayout.Y_AXIS); Box inputRow = new Box(BoxLayout.X_AXIS); // Create UserProfile DropDown JLabel userProfileLabel = new JLabel(Pooka.getProperty("UserProfile.label","User:"), SwingConstants.RIGHT); userProfileLabel.setPreferredSize(new Dimension(75,userProfileLabel.getPreferredSize().height)); JComboBox profileCombo = new JComboBox(UserProfile.getProfileList()); inputRow.add(userProfileLabel); inputRow.add(profileCombo); UserProfile selectedProfile = Pooka.getMainPanel().getCurrentUser(); if (selectedProfile != null) profileCombo.setSelectedItem(selectedProfile); profileCombo.addItemListener(this); proptDict.put("UserProfile", profileCombo); inputPanel.add(inputRow); // Create Address panel StringTokenizer tokens = new StringTokenizer(Pooka.getProperty("MessageDisplayPanel.Input.DefaultFields", "To:CC:BCC:Subject"), ":"); String currentHeader = null; JLabel hdrLabel = null; EntryTextArea inputField = null; while (tokens.hasMoreTokens()) { inputRow = new Box(BoxLayout.X_AXIS); currentHeader=tokens.nextToken(); hdrLabel = new JLabel(Pooka.getProperty("MessageDisplayPanel.Input.." + currentHeader + ".label", currentHeader) + ":", SwingConstants.RIGHT); hdrLabel.setPreferredSize(new Dimension(75,hdrLabel.getPreferredSize().height)); inputRow.add(hdrLabel); try { inputField = new net.suberic.util.swing.EntryTextArea(((NewMessageProxy)msg).getNewMessageInfo().getHeader(Pooka.getProperty("MessageDisplayPanel.Input." + currentHeader + ".MIMEHeader", "") , ","), 1, 30); } catch (MessagingException me) { inputField = new net.suberic.util.swing.EntryTextArea(1, 30); } inputField.setLineWrap(true); inputField.setWrapStyleWord(true); //inputField.setBorder(new javax.swing.plaf.basic.BasicBorders.FieldBorder(Color.black, Color.black, Color.black, Color.black)); inputField.setBorder(BorderFactory.createEtchedBorder()); inputRow.add(inputField); inputPanel.add(inputRow); proptDict.put(Pooka.getProperty("MessageDisplayPanel.Input." + currentHeader + ".value", currentHeader), inputField); } return inputPanel; }
967 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/967/e2a27372fc3ddb0662d85a5cd2a8168c7858696d/NewMessageDisplayPanel.java/buggy/net/suberic/pooka/gui/NewMessageDisplayPanel.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 4039, 752, 1864, 1210, 5537, 12, 1079, 3886, 279, 3332, 16, 18559, 450, 337, 5014, 13, 288, 202, 202, 3514, 810, 5537, 273, 394, 8549, 12, 3514, 3744, 18, 61, 67, 25614, 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, 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, 4039, 752, 1864, 1210, 5537, 12, 1079, 3886, 279, 3332, 16, 18559, 450, 337, 5014, 13, 288, 202, 202, 3514, 810, 5537, 273, 394, 8549, 12, 3514, 3744, 18, 61, 67, 25614, 1769, 202...
IEOAttribute targetAttribute = null; if (_keyPath != null && _keyPath.length() > 0) { int dotIndex = _keyPath.indexOf('.'); if (dotIndex == -1) { targetAttribute = getAttributeOrRelationshipNamed(_keyPath); } else { EORelationship relationship = getRelationshipNamed(_keyPath.substring(0, dotIndex)); EOEntity destination = relationship.getDestination(); if (destination != null) { targetAttribute = destination.resolveKeyPath(_keyPath.substring(dotIndex + 1)); } } }
IEOAttribute targetAttribute = resolveKeyPath(_keyPath, new HashSet());
public IEOAttribute resolveKeyPath(String _keyPath) { IEOAttribute targetAttribute = null; if (_keyPath != null && _keyPath.length() > 0) { int dotIndex = _keyPath.indexOf('.'); if (dotIndex == -1) { targetAttribute = getAttributeOrRelationshipNamed(_keyPath); } else { EORelationship relationship = getRelationshipNamed(_keyPath.substring(0, dotIndex)); EOEntity destination = relationship.getDestination(); if (destination != null) { targetAttribute = destination.resolveKeyPath(_keyPath.substring(dotIndex + 1)); } } } return targetAttribute; }
50596 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/50596/d433647244055d47ae73ba2d4735591bd5ef3c48/EOEntity.java/clean/wolips/plugins/org.objectstyle.wolips.eomodeler/java/org/objectstyle/wolips/eomodeler/model/EOEntity.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 10897, 51, 1499, 2245, 653, 743, 12, 780, 389, 856, 743, 13, 288, 565, 10897, 51, 1499, 1018, 1499, 273, 446, 31, 565, 309, 261, 67, 856, 743, 480, 446, 597, 389, 856, 743, 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, 10897, 51, 1499, 2245, 653, 743, 12, 780, 389, 856, 743, 13, 288, 565, 10897, 51, 1499, 1018, 1499, 273, 446, 31, 565, 309, 261, 67, 856, 743, 480, 446, 597, 389, 856, 743, 18, ...
if (settings == null) return;
if (settings == null) { return; }
public void saveState(IDialogSettings settings) { if (settings == null) return; for (int i = 0; i < priorities.length; i++) { settings.put("priority" + i, priorities[i]);//$NON-NLS-1$ settings.put("direction" + i, directions[i]);//$NON-NLS-1$ } }
56152 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/56152/e38d295ea613cf9f08aadb93a84a33d2e91abc5f/BookmarkSorter.java/buggy/bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/bookmarkexplorer/BookmarkSorter.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1923, 1119, 12, 734, 3529, 2628, 1947, 13, 288, 3639, 309, 261, 4272, 422, 446, 13, 5411, 327, 31, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 26783, 18, 2469, 31, 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, 377, 1071, 918, 1923, 1119, 12, 734, 3529, 2628, 1947, 13, 288, 3639, 309, 261, 4272, 422, 446, 13, 5411, 327, 31, 3639, 364, 261, 474, 277, 273, 374, 31, 277, 411, 26783, 18, 2469, 31, 27...
boolean replacePreviousBinding) throws IOException, ProActiveException;
boolean replacePreviousBinding) throws IOException, AlreadyBoundException, ProActiveException;
public void registerVirtualNode(String virtualNodeName, boolean replacePreviousBinding) throws IOException, ProActiveException;
23362 /local/tlutelli/issta_data/temp/all_java2context/java/2006_temp/2006/23362/4242d2f168af6f752c3ba2085f78c188e9c90086/RemoteProActiveRuntime.java/buggy/src/org/objectweb/proactive/core/runtime/RemoteProActiveRuntime.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1744, 6466, 907, 12, 780, 5024, 18948, 16, 3639, 1250, 1453, 8351, 5250, 13, 1216, 1860, 16, 1186, 3896, 503, 31, 2, 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, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1744, 6466, 907, 12, 780, 5024, 18948, 16, 3639, 1250, 1453, 8351, 5250, 13, 1216, 1860, 16, 1186, 3896, 503, 31, 2, -100, -100, -100, -100, -100, -100, -100, -100, -100, -100,...
final Element htmlElement = dom4jResult.getRootElement(); final Element bodyElement = htmlElement.element("body"); final Document bodyDocument = Dom4jUtils.createDocument(); bodyDocument.setRootElement((Element) bodyElement.detach());
public void end(String uri, String localname, String qName) throws SAXException { final ContentHandler contentHandler = handlerContext.getController().getOutput(); final String effectiveId = handlerContext.getEffectiveId(elementAttributes); final XFormsOutputControl xformsOutputControl = handlerContext.isGenerateTemplate() ? null : (XFormsOutputControl) containingDocument.getObjectById(pipelineContext, effectiveId); // The "control" is allowed to be null when xforms:output is in // xforms:label|xforms:hint|xforms:alert|xforms:help, because in that case currently we don't put the control in // the regular hierarchy of controls if (xformsOutputControl == null && !handlerContext.isGenerateTemplate()) return; // xforms:label handleLabelHintHelpAlert(effectiveId, "label", xformsOutputControl); final AttributesImpl newAttributes; final boolean isDateOrTime; final StringBuffer classes = getInitialClasses(localname, elementAttributes, xformsOutputControl); final String mediatypeValue = elementAttributes.getValue("mediatype"); final boolean isImageMediatype = mediatypeValue != null && mediatypeValue.startsWith("image/"); final boolean isHTMLMediaType = (mediatypeValue != null && mediatypeValue.equals("text/html")) || XFormsConstants.XXFORMS_HTML_APPEARANCE_QNAME.equals(getAppearance(elementAttributes)); if (!handlerContext.isGenerateTemplate()) { // Find classes to add isDateOrTime = isDateOrTime(xformsOutputControl.getType()); handleMIPClasses(classes, xformsOutputControl); newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } else { isDateOrTime = false; // Find classes to add newAttributes = getAttributes(elementAttributes, classes.toString(), effectiveId); } // Create xhtml:span or xhtml:div final String xhtmlPrefix = handlerContext.findXHTMLPrefix(); // For IE we need to generate a div here for IE, which doesn't support working with innterHTML on spans. final String enclosingElementLocalname = isHTMLMediaType ? "div" : "span"; final String enclosingElementQName = XMLUtils.buildQName(xhtmlPrefix, enclosingElementLocalname); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, enclosingElementLocalname, enclosingElementQName, newAttributes); { if (isImageMediatype) { // Case of image media type with URI final String imgQName = XMLUtils.buildQName(xhtmlPrefix, "img"); final AttributesImpl imgAttributes = new AttributesImpl(); // @src="..." // NOTE: If producing a template, we must point to an existing image final String srcValue = (xformsOutputControl != null) ? xformsOutputControl.getValue() : XFormsConstants.DUMMY_IMAGE_URI; imgAttributes.addAttribute("", "src", "src", ContentHandlerHelper.CDATA, srcValue); // @f:url-norewrite="true" final String formattingPrefix; final boolean isNewPrefix; { if (xformsOutputControl != null) { final String existingFormattingPrefix = handlerContext.findFormattingPrefix(); if (existingFormattingPrefix == null || "".equals(existingFormattingPrefix)) { // No prefix is currently mapped formattingPrefix = handlerContext.findNewPrefix(); isNewPrefix = true; } else { formattingPrefix = existingFormattingPrefix; isNewPrefix = false; } imgAttributes.addAttribute(XMLConstants.OPS_FORMATTING_URI, "url-norewrite", XMLUtils.buildQName(formattingPrefix, "url-norewrite"), ContentHandlerHelper.CDATA, "true"); } else { // In the case of a template, allow for rewriting formattingPrefix = null; isNewPrefix = false; } } if (isNewPrefix) contentHandler.startPrefixMapping(formattingPrefix, XMLConstants.OPS_FORMATTING_URI); contentHandler.startElement(XMLConstants.XHTML_NAMESPACE_URI, "img", imgQName, imgAttributes); contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, "img", imgQName); if (isNewPrefix) contentHandler.endPrefixMapping(formattingPrefix); } else if (isDateOrTime) { // Display formatted value for dates if (xformsOutputControl != null) { final String displayValue = xformsOutputControl.getDisplayValueOrValue(); if (displayValue != null) contentHandler.characters(displayValue.toCharArray(), 0, displayValue.length()); } } else if (isHTMLMediaType) { // HTML case if (xformsOutputControl != null) { final String displayValue = xformsOutputControl.getDisplayValueOrValue(); if (displayValue != null && displayValue.length() > 0) { // Create and configure Tidy instance final Tidy tidy = new Tidy(); tidy.setShowWarnings(false); tidy.setQuiet(true); tidy.setCharEncoding(TidyConfig.getTidyEncoding("utf-8")); // Parse and output to SAXResult final byte[] valueBytes; try { valueBytes = displayValue.getBytes("utf-8"); } catch (UnsupportedEncodingException e) { throw new OXFException(e); // will not happen } // TODO: optimize and skip creation of Dom4j document final Document dom4jResult; try { final InputStream is = new ByteArrayInputStream(valueBytes); final org.w3c.dom.Document result = tidy.parseDOM(is, null); dom4jResult = TransformerUtils.domToDom4jDocument(result); } catch (TransformerException e) { throw new OXFException(e); } // Create content document final Element htmlElement = dom4jResult.getRootElement(); final Element bodyElement = htmlElement.element("body"); final Document bodyDocument = Dom4jUtils.createDocument(); bodyDocument.setRootElement((Element) bodyElement.detach()); // Stream fragment to the output try { final Transformer identity = TransformerUtils.getIdentityTransformer(); identity.transform(new DocumentSource(bodyDocument), new SAXResult(new ForwardingContentHandler(contentHandler) { private int level = 0; public void startDocument() { } public void endDocument() { } public void startPrefixMapping(String s, String s1) { } public void endPrefixMapping(String s) { } public void setDocumentLocator(Locator locator) { } public void startElement(String uri, String localname, String qName, Attributes attributes) throws SAXException { if (level > 0) { final String xhtmlQName = XMLUtils.buildQName(xhtmlPrefix, localname); super.startElement(XMLConstants.XHTML_NAMESPACE_URI, localname, xhtmlQName, attributes); } level++; } public void endElement(String uri, String localname, String qName) throws SAXException { level--; if (level > 0) { final String xhtmlQName = XMLUtils.buildQName(xhtmlPrefix, localname); super.endElement(XMLConstants.XHTML_NAMESPACE_URI, localname, xhtmlQName); } } })); } catch (TransformerException e) { throw new OXFException(e); } } } } else { // Regular text case if (xformsOutputControl != null) { final String displayValue = xformsOutputControl.getDisplayValueOrValue(); if (displayValue != null && displayValue.length() > 0) contentHandler.characters(displayValue.toCharArray(), 0, displayValue.length()); } } } contentHandler.endElement(XMLConstants.XHTML_NAMESPACE_URI, enclosingElementLocalname, enclosingElementQName); // xforms:help handleLabelHintHelpAlert(effectiveId, "help", xformsOutputControl); // xforms:alert if (elementAttributes.getValue("value") == null) handleLabelHintHelpAlert(effectiveId, "alert", xformsOutputControl); // xforms:hint handleLabelHintHelpAlert(effectiveId, "hint", xformsOutputControl); }
51410 /local/tlutelli/issta_data/temp/all_java5context/java/2006_temp/2006/51410/0d3828a69b1e2dc69e779222b85eabb4a5811761/XFormsOutputHandler.java/clean/src/java/org/orbeon/oxf/xforms/processor/handlers/XFormsOutputHandler.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 679, 12, 780, 2003, 16, 514, 1191, 529, 16, 514, 22914, 13, 1216, 14366, 288, 3639, 727, 3697, 1503, 913, 1503, 273, 1838, 1042, 18, 588, 2933, 7675, 588, 1447, 5621, 3639, 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, 377, 1071, 918, 679, 12, 780, 2003, 16, 514, 1191, 529, 16, 514, 22914, 13, 1216, 14366, 288, 3639, 727, 3697, 1503, 913, 1503, 273, 1838, 1042, 18, 588, 2933, 7675, 588, 1447, 5621, 3639, 7...
coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[0]; coords[count++] = -half_height; coords[count++] = baseCoordinates[1]; coords[count++] = baseCoordinates[0]; coords[count++] = half_height; coords[count++] = baseCoordinates[1]; coords[count++] = baseCoordinates[0]; coords[count++] = half_height; coords[count++] = baseCoordinates[1]; coords[count++] = baseCoordinates[base_count]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1];
private void generateUnindexedTriCoordinates(GeometryData data) throws InvalidArraySizeException { int vtx_cnt = facetCount * 6; if(useTop) vtx_cnt += facetCount * 3; if(useBottom) vtx_cnt += facetCount * 3; if(data.coordinates == null) data.coordinates = new float[vtx_cnt * 3]; else if(data.coordinates.length < vtx_cnt * 3) throw new InvalidArraySizeException("Coordinates", data.coordinates.length, vtx_cnt * 3); float[] coords = data.coordinates; data.vertexCount = vtx_cnt; regenerateBase(); int count = 0; int i = 0; int base_count = 0; float half_height = cylinderHeight / 2; for(i = facetCount; --i > 0; ) { //side coords triangle 1 coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[base_count + 2]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 3]; coords[count++] = baseCoordinates[base_count + 2]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 3]; //side coords triangle 2 coords[count++] = baseCoordinates[base_count + 2]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 3]; coords[count++] = baseCoordinates[base_count]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; base_count += 2; } //side coords triangle 1 coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[0]; coords[count++] = -half_height; coords[count++] = baseCoordinates[1]; coords[count++] = baseCoordinates[0]; coords[count++] = half_height; coords[count++] = baseCoordinates[1]; //side coords triangle 2 coords[count++] = baseCoordinates[0]; coords[count++] = half_height; coords[count++] = baseCoordinates[1]; coords[count++] = baseCoordinates[base_count]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; if(useTop) { base_count = 0; // Top coordinates for(i = facetCount; --i > 0; ) { coords[count++] = baseCoordinates[base_count + 2]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 3]; coords[count++] = 0; coords[count++] = half_height; coords[count++] = 0; coords[count++] = baseCoordinates[base_count]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 1]; base_count += 2; } coords[count++] = baseCoordinates[0]; coords[count++] = half_height; coords[count++] = baseCoordinates[1]; coords[count++] = 0; coords[count++] = half_height; coords[count++] = 0; coords[count++] = baseCoordinates[base_count]; coords[count++] = half_height; coords[count++] = baseCoordinates[base_count + 1]; } if (useBottom) { // Bottom coordinates base_count = 0; for(i = facetCount; --i > 0; ) { coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = 0; coords[count++] = -half_height; coords[count++] = 0; coords[count++] = baseCoordinates[base_count + 2]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 3]; base_count += 2; } // bottom coords coords[count++] = baseCoordinates[base_count]; coords[count++] = -half_height; coords[count++] = baseCoordinates[base_count + 1]; coords[count++] = 0; coords[count++] = -half_height; coords[count++] = 0; coords[count++] = baseCoordinates[0]; coords[count++] = -half_height; coords[count++] = baseCoordinates[1]; } }
46075 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/46075/bd71dae6bd4e02896cff1fcd75a384661298a778/CylinderGenerator.java/clean/src/java/org/j3d/geom/CylinderGenerator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 2103, 984, 19626, 6251, 13431, 12, 9823, 751, 501, 13, 3639, 1216, 1962, 1076, 1225, 503, 565, 288, 3639, 509, 331, 978, 67, 13085, 273, 11082, 1380, 380, 1666, 31, 3639, 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, 377, 3238, 918, 2103, 984, 19626, 6251, 13431, 12, 9823, 751, 501, 13, 3639, 1216, 1962, 1076, 1225, 503, 565, 288, 3639, 509, 331, 978, 67, 13085, 273, 11082, 1380, 380, 1666, 31, 3639, 309, ...
list.add("Browse..."); list.add("New...");
list.add(Messages._UI_ACTION_BROWSE); list.add(Messages._UI_ACTION_NEW);
protected List computeComboContent() { List list = new ArrayList(); ComponentReferenceEditManager editManager = getComponentReferenceEditManager(); if (editManager != null) { list.add("Browse..."); list.add("New..."); ComponentSpecification[] quickPicks = editManager.getQuickPicks(); if (quickPicks != null) { for (int i=0; i < quickPicks.length; i++) { ComponentSpecification componentSpecification = quickPicks[i]; list.add(componentSpecification.getName()); } } ComponentSpecification[] history = editManager.getHistory(); if (history != null) { for (int i=0; i < history.length; i++) { ComponentSpecification componentSpecification = history[i]; list.add(componentSpecification.getName()); } } } return list; }
13989 /local/tlutelli/issta_data/temp/all_java1context/java/2006_temp/2006/13989/83beb0b65e1b8fab8bcdf61f8704a3e74eb23980/TypeReferenceDirectEditManager.java/clean/bundles/org.eclipse.wst.xsd.ui/src-adt/org/eclipse/wst/xsd/ui/internal/adt/design/directedit/TypeReferenceDirectEditManager.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 4750, 987, 3671, 16156, 1350, 1435, 225, 288, 565, 987, 666, 273, 394, 2407, 5621, 565, 5435, 2404, 4666, 1318, 3874, 1318, 273, 10322, 2404, 4666, 1318, 5621, 565, 309, 261, 4619, 1318, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4750, 987, 3671, 16156, 1350, 1435, 225, 288, 565, 987, 666, 273, 394, 2407, 5621, 565, 5435, 2404, 4666, 1318, 3874, 1318, 273, 10322, 2404, 4666, 1318, 5621, 565, 309, 261, 4619, 1318, ...
log.warning(this.getClass().getName() + ".next() not implemented");
hwnd = findWindow(); long res = Util.sendMessage(hwnd, WM_COMMAND, WM_NEXT, 0);
public void next() { log.warning(this.getClass().getName() + ".next() not implemented"); }
4416 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/4416/441807b29ce93f35ca72d5d66546f44ba52287b6/WinampControl.java/clean/src/incubator/mpcontrol/src/share/classes/org/jdesktop/jdic/mpcontrol/winamp/WinampControl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1024, 1435, 288, 3639, 16139, 4880, 273, 1104, 3829, 5621, 1525, 400, 273, 3564, 18, 4661, 1079, 12, 20701, 4880, 16, 678, 49, 67, 19104, 16, 678, 49, 67, 25539, 16, 374, 176...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 377, 1071, 918, 1024, 1435, 288, 3639, 16139, 4880, 273, 1104, 3829, 5621, 1525, 400, 273, 3564, 18, 4661, 1079, 12, 20701, 4880, 16, 678, 49, 67, 19104, 16, 678, 49, 67, 25539, 16, 374, 176...
assertIsBranch( parse( "enum {};" ), AstEnumSpecifier.class ); assertIsBranch( parse( "enum MyEnum {};" ), AstEnumSpecifier.class );
tree.add( "TranslationUnit" ); tree.add( " Declaration" ); tree.add( " EnumSpecifier" ); assertEquals( tree.toString(), parse( "enum {};" ) ); assertEquals( tree.toString(), parse( "enum MyEnum {};" ) );
public void testEnumDefinition() throws ParseException { assertIsBranch( parse( "enum {};" ), AstEnumSpecifier.class ); assertIsBranch( parse( "enum MyEnum {};" ), AstEnumSpecifier.class ); }
47917 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/47917/0fb5400407e5b1c31b6afdeee1fb00ec381af173/AstTest.java/buggy/src/test/java/cppast/AstTest.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3572, 1852, 1435, 1216, 10616, 565, 288, 3639, 1815, 2520, 7108, 12, 1109, 12, 315, 7924, 2618, 4868, 262, 16, 16614, 3572, 21416, 18, 1106, 11272, 3639, 1815, 2520, 7108, ...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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...
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 918, 1842, 3572, 1852, 1435, 1216, 10616, 565, 288, 3639, 1815, 2520, 7108, 12, 1109, 12, 315, 7924, 2618, 4868, 262, 16, 16614, 3572, 21416, 18, 1106, 11272, 3639, 1815, 2520, 7108, ...
if(log.isDebugEnabled()) log.debug("header is " + hdr);
if(log.isTraceEnabled()) log.trace("header is " + hdr);
public boolean receiveMessage(Message msg) { Object tmpHdr; Header hdr; Request req; RspCollector coll; java.util.Stack stack; java.util.List dests; // i. If header is not an instance of request correlator header, ignore // // ii. Check whether the message was sent by a request correlator with // the same name (there may be multiple request correlators in the same // protocol stack...) tmpHdr = msg.getHeader(name); if(tmpHdr == null || !(tmpHdr instanceof Header)) return(true); hdr=(Header)msg.getHeader(name); if(hdr.name == null || !hdr.name.equals(name)) { if(log.isDebugEnabled()) log.debug("name of request correlator header (" + hdr.name + ") is different from ours (" + name + "). Msg not accepted, passed up"); return(true); } // If the header contains a destination list, and we are not part of it, then we discard the // request (was addressed to other members) dests=hdr.dest_mbrs; if(dests != null && local_addr != null && !dests.contains(local_addr)) { if(log.isInfoEnabled()) log.info("discarded request from " + msg.getSrc() + " as we are not part of destination list (local_addr=" + local_addr + ", hdr=" + hdr + ")"); return false; } if(log.isDebugEnabled()) log.debug("header is " + hdr); // [Header.REQ]: // i. If there is no request handler, discard // ii. Check whether priority: if synchronous and call stack contains // address that equals local address -> add priority request. Else // add normal request. // // [Header.RSP]: // Remove the msg request correlator header and notify the associated // <tt>RspCollector</tt> that a reply has been received switch(hdr.type) { case Header.REQ: if(request_handler == null) { if(log.isWarnEnabled()) log.warn("there is no " + "request handler installed to deliver request !"); return(false); } req=new Request(msg); if(deadlock_detection) { stack=hdr.call_stack; if(hdr.rsp_expected && stack != null && local_addr != null) { if(stack.contains(local_addr)) { scheduler.addPrio(req); break; } } } scheduler.add(req); break; case Header.RSP: msg.removeHeader(name); coll=findEntry(hdr.id); if(coll != null) { coll.receiveResponse(msg); } break; default: msg.removeHeader(name); if(log.isErrorEnabled()) log.error("header's type is neither REQ nor RSP !"); break; } return(false); }
48949 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/48949/85b7a7c351493f88f1d6a3045b9cbd0b817f95cd/RequestCorrelator.java/buggy/src/org/jgroups/blocks/RequestCorrelator.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 1071, 1250, 6798, 1079, 12, 1079, 1234, 13, 288, 3639, 1033, 1850, 1853, 14659, 31, 3639, 4304, 1850, 7723, 31, 3639, 1567, 540, 1111, 31, 3639, 534, 1752, 7134, 565, 4508, 31, 3639, 2252...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 1250, 6798, 1079, 12, 1079, 1234, 13, 288, 3639, 1033, 1850, 1853, 14659, 31, 3639, 4304, 1850, 7723, 31, 3639, 1567, 540, 1111, 31, 3639, 534, 1752, 7134, 565, 4508, 31, 3639, 2252...
throw new BAD_OPERATION("Unable to resolve the local host address.");
BAD_OPERATION bad = new BAD_OPERATION("Unable to open the server socket."); bad.initCause(ex); throw bad;
public Functional_ORB() { try { LOCAL_HOST = ns_host = InetAddress.getLocalHost().getHostAddress(); } catch (UnknownHostException ex) { throw new BAD_OPERATION("Unable to resolve the local host address."); } }
45713 /local/tlutelli/issta_data/temp/all_java4context/java/2006_temp/2006/45713/530b07ccb0c4fb1bf75b0623599a435d741fe9e8/Functional_ORB.java/buggy/libraries/javalib/gnu/CORBA/Functional_ORB.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 282, 1071, 4284, 287, 67, 916, 38, 1435, 225, 288, 565, 775, 1377, 288, 3639, 15234, 67, 8908, 273, 3153, 67, 2564, 273, 14218, 18, 588, 2042, 2594, 7675, 588, 2594, 1887, 5621, 1377, 289, 5...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 4284, 287, 67, 916, 38, 1435, 225, 288, 565, 775, 1377, 288, 3639, 15234, 67, 8908, 273, 3153, 67, 2564, 273, 14218, 18, 588, 2042, 2594, 7675, 588, 2594, 1887, 5621, 1377, 289, 5...
if(DEBUG){ System.out.println("Call sites: ======="); for(Iterator it = calls.iterator(); it.hasNext(); ){ CALL q = (CALL) it.next(); System.out.println(q.getLineNumber() + "\t" + q); } System.out.println("==================="); } if(DEBUG){ System.out.println("SCC of ExactTemp definitions: ====="); for(SCComponent scc2=scc; scc2!=null; scc2=scc2.nextTopSort()) System.out.println(scc2.toString()); System.out.println("==================================="); }
if(DEBUG) display_mm_data(mm_work);
private void analyze_meta_method() { if(DEBUG) System.out.println("\n\n%%: " + mm_work); HMethod hm = mm_work.getHMethod(); // native method, no code for analysis -> return immediately if(Modifier.isNative(hm.getModifiers())) return; MethodData md = get_method_data(hm); SCComponent scc = md.first_scc; ets2et = md.ets2et; calls = md.calls; if(DEBUG){ System.out.println("Call sites: ======="); for(Iterator it = calls.iterator(); it.hasNext(); ){ CALL q = (CALL) it.next(); System.out.println(q.getLineNumber() + "\t" + q); } System.out.println("==================="); } if(DEBUG){ System.out.println("SCC of ExactTemp definitions: ====="); for(SCComponent scc2=scc; scc2!=null; scc2=scc2.nextTopSort()) System.out.println(scc2.toString()); System.out.println("==================================="); } set_parameter_types(mm_work, hcf.convert(hm)); compute_types(scc); analyze_calls(); // before quiting this meta-method, remove the types we computed // for the ExactTemps. The component graph of ExactTemps (and so, // the ExactTemps themselves) is specific to an HMethod and so, // they can be shared by many meta-methods derived from the same // HMethod. Of course, I don't want the next analyzed meta-method // to use the types computed for this one. for(SCComponent scc2 = scc; scc2 != null; scc2 = scc2.nextTopSort()) { Object[] ets = scc2.nodes(); for(int i = 0; i < ets.length; i++) ((ExactTemp) ets[i]).clearTypeSet(); } }
2866 /local/tlutelli/issta_data/temp/all_java0context/java/2006_temp/2006/2866/f4722a5e71f2ffbac4c40dd2a40dc6af79760005/MetaCallGraphImpl.java/buggy/Analysis/MetaMethods/MetaCallGraphImpl.java
[ 1, 8585, 326, 22398, 316, 326, 981, 30, 377, 3238, 918, 12375, 67, 3901, 67, 2039, 1435, 288, 202, 430, 12, 9394, 13, 202, 565, 2332, 18, 659, 18, 8222, 31458, 82, 64, 82, 11438, 30, 315, 397, 9740, 67, 1252, 1769, 202, 44, 1305...
[ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 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, 12375, 67, 3901, 67, 2039, 1435, 288, 202, 430, 12, 9394, 13, 202, 565, 2332, 18, 659, 18, 8222, 31458, 82, 64, 82, 11438, 30, 315, 397, 9740, 67, 1252, 1769, 202, 44, 1305...