question: private boolean replaceBadEntry ( KBucketEntry entry ) { List < KBucketEntry > entriesRef = entries ; for ( int i = 0 , n = entriesRef . size ( ) ; i < n ; i ++ ) { KBucketEntry e = entriesRef . get ( i ) ; if ( e . needsReplacement ( ) ) { modifyMainBucket ( e , entry ) ; return true ; } } return false ; }
target:  Tries to instert entry by replacing a bad entry.