Buggy code:
@ CloneControl ( filter = Clone . exclude , modifiers = Modifier . TRANSIENT ) public class FileResourceContentMetaData extends AbstractContentMetaData { private String uri = null ; private int currentDepth = 0 ; private ResourceParameter [ ] resourceParameters = new ResourceParameter [ 0 ] ; private transient File file ; public enum FileAttributes { absolutePath , canonicalPath , symlink , regular ; } @ SuppressWarnings ( "unused" ) private FileResourceContentMetaData ( ) { } public FileResourceContentMetaData ( String uri , ResourceParameter ... resourceParameters ) throws Exception { } public FileResourceContentMetaData ( String uri , int currentDepth , ResourceParameter ... resourceParameters ) throws Exception { } @ SuppressWarnings ( "rawtypes" ) @ Override public Enum [ ] getAdditionalSupportedAttributes ( ) { } public void refresh ( ResourceParameter ... resourceParameters ) throws Exception { } private void init ( String uri , int currentDepth , ResourceParameter ... resourceParameters ) throws Exception { } @ Override public void init ( ) throws RuntimeException { } protected void load ( ) throws Exception { if ( ( file ) == null ) { refresh ( ) ; } boolean exists = false ; Map fileAttributes = null ; try { fileAttributes = Files . readAttributes ( file . toPath ( ) , "*" , LinkOption . NOFOLLOW_LINKS ) ; } catch ( IOException ioe ) { setValue ( exists , ( exists + "" ) ) ; setValue ( executable , file . canExecute ( ) ) ; setValue ( readable , file . canRead ( ) ) ; setValue ( writeable , file . canWrite ( ) ) ; setValue ( container , "false" ) ; setValue ( lastModified , "" ) ; setValue ( ATTRIBUTE_NAME , 0 ) ; setValue ( FileResourceContentMetaData . FileAttributes . absolutePath , file . getAbsolutePath ( ) ) ; setValue ( FileResourceContentMetaData . FileAttributes . canonicalPath , file . getCanonicalPath ( ) ) ; setValue ( FileResourceContentMetaData . FileAttributes . symlink , "false" ) ; setInitialized ( true ) ; return ; } exists = true ; setValue ( exists , exists ) ; setValue ( executable , file . canExecute ( ) ) ; setValue ( readable , file . canRead ( ) ) ; setValue ( writeable , file . canWrite ( ) ) ; setValue ( container , fileAttributes . get ( "isDirectory" ) ) ; setValue ( lastModified , file . lastModified ( ) ) ; setValue ( ATTRIBUTE_NAME , fileAttributes . get ( "size" ) ) ; setValue ( FileResourceContentMetaData . FileAttributes . absolutePath , file . getAbsolutePath ( ) ) ; setValue ( FileResourceContentMetaData . FileAttributes . canonicalPath , file . getCanonicalPath ( ) ) ; boolean isSymlink = Boolean . parseBoolean ( fileAttributes . get ( "isSymbolicLink" ) . toString ( ) ) ; setValue ( FileResourceContentMetaData . FileAttributes . symlink , ( isSymlink + "" ) ) ; if ( ( ( exists == true ) && ( ( file . canRead ( ) ) == true ) ) && ( ( ( file . isDirectory ( ) ) == false ) || isSymlink ) ) { if ( Files . isRegularFile ( file . toPath ( ) ) ) { setValue ( FileResourceContentMetaData . FileAttributes . regular , "true" ) ; FileInputStream fileInputStream = new FileInputStream ( file ) ; try { readInputStream ( fileInputStream , false ) ; } catch ( IOException ioException ) { setValue ( readable , false ) ; } finally { fileInputStream . close ( ) ; } } else { setValue ( FileResourceContentMetaData . FileAttributes . regular , "false" ) ; } } else <START_BUG> if ( ( ( ( file . isDirectory ( ) ) == true ) && ( ( getIntValue ( DEPTH , 1 , resourceParameters ) ) > ( currentDepth ) ) ) && ( isSymlink == false ) ) { <END_BUG> String [ ] fileList = file . list ( ) ; if ( ( fileList == null ) && ( ( file . canRead ( ) ) == false ) ) { logger . log ( Level . WARNING , ( "Can't<seq2seq4repair_space>read<seq2seq4repair_space>directory<seq2seq4repair_space>contents<seq2seq4repair_space>of<seq2seq4repair_space>" + ( file ) ) ) ; fileList = new String [ ] { } ; } if ( isSymlink ) { logger . log ( Level . WARNING , ( "Symlink<seq2seq4repair_space>skipping<seq2seq4repair_space>directory<seq2seq4repair_space>contents<seq2seq4repair_space>of<seq2seq4repair_space>" + ( file ) ) ) ; fileList = new String [ ] { } ; } MD5FilterOutputStream md5FilterOutputStream = new MD5FilterOutputStream ( new ByteArrayOutputStream ( ) ) ; if ( ( ( file ) != null ) && exists ) { md5FilterOutputStream . write ( file . getName ( ) ) ; md5FilterOutputStream . write ( ( ( file . length ( ) ) + "" ) ) ; md5FilterOutputStream . write ( ( ( file . lastModified ( ) ) + "" ) ) ; } else { md5FilterOutputStream . write ( "" ) ; } Arrays . sort ( fileList ) ; int currentPreviousChildIndex = 0 ; for ( int currentChildURIIndex = 0 ; currentChildURIIndex < ( fileList . length ) ; currentChildURIIndex ++ ) { String childURI = fileList [ currentChildURIIndex ] ; File childFile = new File ( file , childURI ) ; String tempChildURI = toURI ( childFile , false ) ; if ( tempChildURI . endsWith ( File . separator ) ) { tempChildURI = tempChildURI . substring ( 0 , ( ( tempChildURI . length ( ) ) - ( File . separator . length ( ) ) ) ) ; } FileResourceContentMetaData contentMetaData = new FileResourceContentMetaData ( tempChildURI , ( ( currentDepth ) + 1 ) , resourceParameters ) ; if ( ( contentMetaData . file ) != null ) { contentMetaData . file = childFile ; BasicFileAttributes contentAttributes = Files . readAttributes ( file . toPath ( ) , BasicFileAttributes . class ) ; md5FilterOutputStream . write ( contentMetaData . file . getName ( ) ) ;

Fix:
if ( ( ( ( file . isDirectory ( ) ) == true ) && ( ( ContentMetaData . getIntValue ( DEPTH , 1 , resourceParameters ) ) > ( currentDepth ) ) ) && ( isSymlink == false ) ) {