Buggy code:
public class TableModelSorter implements ModelVisitor { protected boolean ascending = true ; protected String sort = new String ( "Date" ) ; protected Collator collator ; protected SortingStateObservable sortingStateObservable ; public TableModelSorter ( ) { } public SortingStateObservable getSortingStateObservable ( ) { } public Object [ ] getColumns ( ) { } public void loadConfig ( TableView view ) { } public String getSortingColumn ( ) { } public boolean getSortingOrder ( ) { } public void setSortingColumn ( String str ) { } public void setSortingOrder ( boolean b ) { } public void sort ( HeaderTableModel tableModel ) { } class MessageHeaderComparator implements Comparator { protected int column ; protected boolean ascending ; protected String columnName ; public MessageHeaderComparator ( String columnName , int sortCol , boolean sortAsc ) { } public int compare ( Object o1 , Object o2 ) { MessageNode node1 = ( ( MessageNode ) ( o1 ) ) ; MessageNode node2 = ( ( MessageNode ) ( o2 ) ) ; ColumbaHeader header1 = ( ( ColumbaHeader ) ( node1 . getUserObject ( ) ) ) ; ColumbaHeader header2 = ( ( ColumbaHeader ) ( node2 . getUserObject ( ) ) ) ; if ( ( header1 == null ) || ( header2 == null ) ) { return 0 ; } int result = 0 ; if ( columnName . equals ( "Status" ) ) { Flags flags1 = header1 . getFlags ( ) ; Flags flags2 = header2 . getFlags ( ) ; if ( ( flags1 == null ) || ( flags2 == null ) ) { result = 0 ; } else if ( ( flags1 . getSeen ( ) ) && ( ! ( flags2 . getSeen ( ) ) ) ) { result = - 1 ; } else if ( ( ! ( flags1 . getSeen ( ) ) ) && ( flags2 . getSeen ( ) ) ) { result = 1 ; } else { result = 0 ; } } else if ( columnName . equals ( "Flagged" ) ) { Flags flags1 = header1 . getFlags ( ) ; Flags flags2 = header2 . getFlags ( ) ; boolean f1 = flags1 . getFlagged ( ) ; boolean f2 = flags2 . getFlagged ( ) ; if ( f1 == f2 ) { result = 0 ; } else if ( f1 ) { result = 1 ; } else { result = - 1 ; } } else if ( columnName . equals ( "Attachment" ) ) { boolean f1 = ( ( Boolean ) ( header1 . get ( "columba.attachment" ) ) ) . booleanValue ( ) ; boolean f2 = ( ( Boolean ) ( header2 . get ( "columba.attachment" ) ) ) . booleanValue ( ) ; if ( f1 == f2 ) { result = 0 ; } else if ( f1 ) { result = 1 ; } else { result = - 1 ; } } else <START_BUG> if ( columnName . equals ( "Date" ) ) { <END_BUG> Date d1 = ( ( Date ) ( header1 . get ( "columba.date" ) ) ) ; Date d2 = ( ( Date ) ( header2 . get ( "columba.date" ) ) ) ; if ( ( d1 == null ) || ( d2 == null ) ) { result = 0 ; } else { result = d1 . compareTo ( d2 ) ; } } else if ( columnName . equals ( "Size" ) ) { int i1 = ( ( Integer ) ( header1 . get ( "columba.size" ) ) ) . intValue ( ) ; int i2 = ( ( Integer ) ( header2 . get ( "columba.size" ) ) ) . intValue ( ) ; if ( i1 == i2 ) { result = 0 ; } else if ( i1 > i2 ) { result = 1 ; } else { result = - 1 ; } } else if ( columnName . equals ( "Spam" ) ) { boolean f1 = ( ( Boolean ) ( header1 . get ( "columba.spam" ) ) ) . booleanValue ( ) ; boolean f2 = ( ( Boolean ) ( header2 . get ( "columba.spam" ) ) ) . booleanValue ( ) ; if ( f1 == f2 ) { result = 0 ; } else if ( f1 ) { result = 1 ; } else { result = - 1 ; } } else { Object item1 = header1 . get ( columnName ) ; Object item2 = header2 . get ( columnName ) ; if ( ( item1 != null ) && ( item2 == null ) ) { result = 1 ; } else if ( ( item1 == null ) && ( item2 != null ) ) { result = - 1 ; } else if ( ( item1 == null ) && ( item2 == null ) ) { result = 0 ; } else if ( item1 instanceof String ) { result = collator . compare ( ( ( String ) ( item1 ) ) , ( ( String ) ( item2 ) ) ) ; } else if ( item1 instanceof Boolean ) { result = collator . compare ( ( ( Boolean ) ( item1 ) ) , ( ( Boolean ) ( item2 ) ) ) ; } } if ( ! ( ascending ) ) { result = - result ; } return result ; } public boolean equals ( Object obj ) { } } public void visit ( HeaderTableModel realModel ) { } }

Fix:
if ( ( columnName . equals ( "Date" ) ) || ( columnName . equals ( "MultiLine" ) ) ) {