Buggy code:
public void mouseExited ( final MouseEvent _event ) { } public final void mousePressed ( final MouseEvent _event ) { } public final void mouseReleased ( final MouseEvent _event ) { } private void md_buttonLocationWholeImage ( final MouseEvent _event ) { } private void md_buttonLocation ( final MouseEvent _event ) { } private void mr_stretchPicture ( final MouseEvent _event ) { } private void mr_stretchImage ( final MouseEvent _event ) { double distanceX = ( _event . getXOnScreen ( ) ) - ( pnt_start . getX ( ) ) ; double distanceY = ( _event . getYOnScreen ( ) ) - ( pnt_start . getY ( ) ) ; MButton [ ] [ ] j = Page . getInstance ( ) . getJbtn_resize ( ) ; double distanceXY ; double distanceXY2 ; if ( ( Math . abs ( distanceX ) ) < ( Math . abs ( distanceY ) ) ) { distanceXY = distanceX ; distanceXY2 = - distanceX ; } else { distanceXY = distanceY ; distanceXY2 = distanceY ; } DPoint pnt_stretchFrom = null ; DPoint pnt_size ; DPoint pnt_totalStretch = null ; if ( _event . getSource ( ) . equals ( j [ 0 ] [ 0 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 2 ] [ 2 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( distanceXY , distanceXY ) ; } else if ( _event . getSource ( ) . equals ( j [ 1 ] [ 0 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 1 ] [ 2 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( 0 , distanceY ) ; } else if ( _event . getSource ( ) . equals ( j [ 2 ] [ 0 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 0 ] [ 2 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( distanceXY2 , distanceXY2 ) ; } else if ( _event . getSource ( ) . equals ( j [ 0 ] [ 1 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 2 ] [ 1 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( distanceX , 0 ) ; } else if ( _event . getSource ( ) . equals ( j [ 1 ] [ 2 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 1 ] [ 0 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( 0 , ( - distanceY ) ) ; } else if ( _event . getSource ( ) . equals ( j [ 0 ] [ 2 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 2 ] [ 0 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( ( - distanceXY2 ) , ( - distanceXY2 ) ) ; } else if ( _event . getSource ( ) . equals ( j [ 2 ] [ 1 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 0 ] [ 1 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( ( - distanceX ) , 0 ) ; } else if ( _event . getSource ( ) . equals ( j [ 2 ] [ 2 ] ) ) { pnt_stretchFrom = new DPoint ( j [ 0 ] [ 0 ] . getLocation ( ) ) ; pnt_totalStretch = new DPoint ( ( - distanceXY ) , ( - distanceXY ) ) ; } pnt_size = new DPoint ( ( ( j [ 2 ] [ 2 ] . getX ( ) ) - ( j [ 0 ] [ 0 ] . getX ( ) ) ) , ( ( j [ 2 ] [ 2 ] . getY ( ) ) - ( j [ 0 ] [ 0 ] . getY ( ) ) ) ) ; final int size = ( j [ 0 ] [ 0 ] . getWidth ( ) ) // 2 ; final int sizeButton = ( j [ 1 ] [ 1 ] . getWidth ( ) ) // 2 ; final int minSize = ( sizeButton * 2 ) + ( size * ( 2 + 1 ) ) ; if ( ( pnt_size . getX ( ) ) < minSize ) { pnt_size . setX ( minSize ) ; } if ( ( pnt_size . getY ( ) ) < minSize ) { pnt_size . setY ( minSize ) ; } final int transaction = Picture . getInstance ( ) . getLs_po_sortedByX ( ) . startTransaction ( "stretch<seq2seq4repair_space>image" , ID_NO_PREDECESSOR ) ; <START_BUG> final int closedAction = Picture . getInstance ( ) . getLs_po_sortedByX ( ) . startTransaction ( "stretch<seq2seq4repair_space>image" , ID_NO_PREDECESSOR ) ; <END_BUG> Picture . getInstance ( ) . getLs_poSelected ( ) . toFirst ( transaction , closedAction ) ; while ( ! ( Picture . getInstance ( ) . getLs_poSelected ( ) . isBehind ( ) ) ) { Picture . getInstance ( ) . getLs_poSelected ( ) . getItem ( ) . stretch ( pnt_stretchFrom , pnt_totalStretch , pnt_size ) ; Picture . getInstance ( ) . getLs_poSelected ( ) . next ( transaction , closedAction ) ; } Picture . getInstance ( ) . getLs_po_sortedByX ( ) . finishTransaction ( transaction ) ; Picture . getInstance ( ) . getLs_po_sortedByX ( ) . finishClosedAction ( closedAction ) ; Page . getInstance ( ) . releaseSelected ( ) ; Picture . getInstance ( ) . paintSelected ( ) ; } public final Rectangle getR_selection ( ) { } public final Point getOldPaintLabelLocation ( ) { } public final void setOldPaintLabelLocation ( final Point _pnt ) { } public final void setR_selection ( final Rectangle _r_selection , final Point _pnt_startPaintLabelLocation ) { } public final DPoint getPnt_start ( ) { } }

Fix:
final int closedAction = Picture . getInstance ( ) . getLs_po_sortedByX ( ) . startClosedAction ( "stretch<seq2seq4repair_space>image" , ID_NO_PREDECESSOR ) ;