METHOD_0 ( ) { int [ ] values = new int [ ] { 0 , 2 , 1 , 4 , 5 , 3 , 7 , 8 , 9 , 6 } ; java . lang . String expected = STRING_0 ; org . openscience . cdk . group . IDENT_0 p = new org . openscience . cdk . group . METHOD_1 ( values ) ; "<AssertPlaceHolder>" ; } METHOD_2 ( ) { int n = this . values . length ; boolean [ ] p = new boolean [ n ] ; java . util . Arrays . METHOD_3 ( p , true ) ; java . lang . StringBuilder sb = new java . lang . StringBuilder ( ) ; int j = 0 ; for ( int i = 0 ; i < n ; i ++ ) { if ( p [ i ] ) { sb . append ( STRING_1 ) ; sb . append ( i ) ; p [ i ] = false ; j = i ; while ( p [ values [ j ] ] ) { sb . append ( STRING_2 ) ; j = values [ j ] ; sb . append ( j ) ; p [ j ] = false ; } sb . append ( STRING_3 ) ; } } return sb . toString ( ) ; }
org . junit . Assert . assertEquals ( expected , p . METHOD_2 ( ) )