Buggy code:
public class ROITable extends OMETreeTable implements PropertyChangeListener , ROIActionController { private ROINode root ; private Vector < String > columnNames ; private Collection < ROINode > nodes ; private ROITableModel model ; private ROIPopupMenu popupMenu ; private ObjectManager manager ; private boolean reset ; private Map < Long , FolderData > availableFolders = new HashMap < Long , FolderData > ( ) ; private boolean addAction = true ; private boolean haveSameID ( List < ROIShape > shapeList ) { } private long getSameID ( List < ROIShape > shapeList ) { } private boolean onSeparatePlanes ( List < ROIShape > shapeList ) { } ROITable ( ROITableModel model , Vector columnNames , ObjectManager manager ) { } void onSelectedFigures ( Collection < Figure > figures ) { } void selectROIShape ( ROIShape shape ) { } void scrollToROIShape ( ROIShape shape ) { } void showROIManagementMenu ( Component c , int x , int y ) { } void refresh ( ) { } void clear ( ) { } public void setValueAt ( Object obj , int row , int column ) { } void addROIShape ( ROIShape shape ) { } void addROIShapeList ( List < ROIShape > shapeList ) { } void expandNode ( ROINode node ) { } ROIShape getROIShapeAtRow ( int index ) { } ROI getROIAtRow ( int index ) { } void expandROIRow ( ROINode parent ) { } void collapseROIRow ( ROINode parent ) { } void expandROIRow ( ROI roi ) { } void removeROIShape ( ROIShape shape ) { } void removeROI ( ROI roi ) { } Collection < ROINode > findNodes ( ROI roi ) { } Collection < ROINode > findFolders ( ROI roi ) { } void handleParentFolderNodes ( ROINode node ) { } private ROINode findFolderNode ( Collection < ROINode > nodes , FolderData folder ) { } void setROIAttributesChanged ( ROIShape shape ) { } boolean isShapeTypeColumn ( int column ) { } List getSelectedObjects ( ) { } TreeMap < Coord3D , ROIShape > buildPlaneMap ( ArrayList objectList ) { } List < Long > getIDList ( List selectedObjects ) { } List < ROIShape > getSelectedROIShapes ( ) { } public void duplicateROI ( ) { } public void mergeROI ( ) { } public void propagateROI ( ) { } public void splitROI ( ) { } public void deleteROI ( ) { } public void calculateStats ( ) { } protected void onMousePressed ( MouseEvent e ) { } public String getToolTipText ( MouseEvent e ) { } public void loadTags ( ) { } @ Override public void addToFolder ( ) { } @ Override public void removeFromFolder ( ) { } @ Override public void propertyChange ( PropertyChangeEvent evt ) { if ( SELECTED_ITEMS_PROPERTY . equals ( evt . getPropertyName ( ) ) ) { List < ROIShape > selectedObjects = getSelectedROIShapes ( ) ; Collection < FolderData > folders = null ; Map m = ( ( Map ) ( evt . getNewValue ( ) ) ) ; if ( ( m == null ) || ( ( m . size ( ) ) != 1 ) ) return ; Set set = m . entrySet ( ) ; Map . Entry entry ; Iterator i = set . iterator ( ) ; Class type ; while ( i . hasNext ( ) ) { entry = ( ( Map . Entry ) ( i . next ( ) ) ) ; type = ( ( Class ) ( entry . getKey ( ) ) ) ; if ( FolderData . class . getName ( ) . equals ( type . getName ( ) ) ) { folders = ( ( Collection < FolderData > ) ( entry . getValue ( ) ) ) ; <START_BUG> System . out . println ( folders ) ; <END_BUG> } } if ( folders == null ) return ; if ( addAction ) { manager . addRoisToFolder ( selectedObjects , folders ) ; } else { manager . removeRoisFromFolder ( selectedObjects , folders ) ; } } } }

Fix:
break ;