Buggy code:
System . out . println ( "[14.<seq2seq4repair_space>CG<seq2seq4repair_space>Error<seq2seq4repair_space>Threshold]" ) ; System . out . println ( "[15.<seq2seq4repair_space>Sammon<seq2seq4repair_space>mapping<seq2seq4repair_space>(boolean)]" ) ; System . exit ( 0 ) ; } int numMapTasks = Integer . valueOf ( args [ 0 ] ) ; String inputFolder = args [ 1 ] ; String inputPrefix = args [ 2 ] ; String weightPrefix = args [ 3 ] ; String idsFile = args [ 4 ] ; String labelsFile = args [ 5 ] ; String outputFile = args [ 6 ] ; double threshold = Double . valueOf ( args [ 7 ] ) ; DAMDS2 . D = Integer . valueOf ( args [ 8 ] ) ; DAMDS2 . alpha = Double . valueOf ( args [ 9 ] ) ; DAMDS2 . N = Integer . parseInt ( args [ 10 ] ) ; String finalWeightPrefix = args [ 11 ] ; DAMDS2 . CG_ITER = Integer . parseInt ( args [ 12 ] ) ; DAMDS2 . CG_THRESHOLD = Double . parseDouble ( args [ 13 ] ) ; DAMDS2 . sammonMapping = Boolean . parseBoolean ( args [ 14 ] ) ; System . out . println ( ( ( "==<seq2seq4repair_space>DAMDS<seq2seq4repair_space>run<seq2seq4repair_space>started<seq2seq4repair_space>on<seq2seq4repair_space>" + ( new Date ( ) ) ) + "<seq2seq4repair_space>==" ) ) ; DAMDS2 . printParameters ( true , String . valueOf ( numMapTasks ) , inputFolder , inputPrefix , weightPrefix , idsFile , labelsFile , outputFile , String . valueOf ( threshold ) , String . valueOf ( DAMDS2 . D ) , String . valueOf ( DAMDS2 . alpha ) , String . valueOf ( DAMDS2 . N ) , String . valueOf ( finalWeightPrefix ) , String . valueOf ( DAMDS2 . CG_ITER ) , String . valueOf ( DAMDS2 . CG_THRESHOLD ) , String . valueOf ( DAMDS2 . sammonMapping ) ) ; try { DAMDS2 . performInitialCalculations ( numMapTasks , inputFolder , inputPrefix , idsFile , weightPrefix ) ; System . out . println ( ( "<seq2seq4repair_space>N:<seq2seq4repair_space>" + ( DAMDS2 . N ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>AvgOrgDistance:<seq2seq4repair_space>" + ( DAMDS2 . avgOrigDistance ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>SumSquareOrgDistance:<seq2seq4repair_space>" + ( DAMDS2 . sumOrigDistanceSquare ) ) ) ; System . out . println ( ( "<seq2seq4repair_space>MaxOrigDistance:<seq2seq4repair_space>" + ( DAMDS2 . maxOrigDistance ) ) ) ; double [ ] [ ] preX = DAMDS2 . generateInitMapping ( DAMDS2 . N , DAMDS2 . D ) ; TwisterModel stressDriver = DAMDS2 . configureCalculateStress ( numMapTasks , inputFolder , inputPrefix , weightPrefix , idsFile ) ; Double stress = null ; Double preStress = DAMDS2 . calculateStress ( stressDriver , preX , numMapTasks ) ; System . out . println ( ( "Initial<seq2seq4repair_space>Stress:<seq2seq4repair_space>" + preStress ) ) ; double diffStress = 10 * threshold ; double [ ] [ ] X = null ; double [ ] [ ] BC = null ; TwisterModel bcDriver = DAMDS2 . configureCalculateBC ( numMapTasks , inputFolder , inputPrefix , weightPrefix , idsFile ) ; TwisterModel mmDriver = DAMDS2 . configureMatrixMutiply ( numMapTasks , inputFolder , inputPrefix , weightPrefix , idsFile ) ; double QoR1 = 0 ; double QoR2 = 0 ; double avgOrigDist = DAMDS2 . avgOrigDistance ; DAMDS2 . tMax = DAMDS2 . calculateMaxT ( DAMDS2 . maxOrigDistance , DAMDS2 . D ) ; DAMDS2 . tMin = ( ( 0.01 * ( DAMDS2 . tMax ) ) < 0.01 ) ? 0.01 * ( DAMDS2 . tMax ) : 0.01 ; DAMDS2 . tCur = ( DAMDS2 . alpha ) * ( DAMDS2 . tMax ) ; mainTimer . stop ( ) ; System . out . println ( ( ( "Up<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>loop<seq2seq4repair_space>took<seq2seq4repair_space>=" + ( mainTimer . elapsed ( TimeUnit . SECONDS ) ) ) + "<seq2seq4repair_space>seconds" ) ) ; mainTimer . start ( ) ; Stopwatch loopTimer = Stopwatch . createStarted ( ) ; int loopCount = 0 ; while ( true ) { preStress = DAMDS2 . calculateStress ( stressDriver , preX , numMapTasks ) ; diffStress = threshold + 1.0 ; <START_BUG> System . out . printf ( "\nStart<seq2seq4repair_space>of<seq2seq4repair_space>loop<seq2seq4repair_space>%d<seq2seq4repair_space>Temperature<seq2seq4repair_space>(T_Cur)<seq2seq4repair_space>%.4g" , loopCount , DAMDS2 . tCur ) ; <END_BUG> int iterationCount = 0 ; Ref < Integer > cgCount = new Ref ( 0 ) ; while ( diffStress >= threshold ) { BC = DAMDS2 . calculateBC ( bcDriver , preX ) ; X = DAMDS2 . conjugateGradient ( mmDriver , BC , preX , cgCount ) ; stress = DAMDS2 . calculateStress ( stressDriver , X , numMapTasks ) ; diffStress = preStress - stress ; preStress = stress ; preX = MatrixUtils . copy ( X ) ; ++ iterationCount ; if ( ( ( iterationCount - ( 1 % 9 ) ) == 0 ) || ( iterationCount >= ( DAMDS2 . MAX_ITER ) ) ) { System . out . printf ( "<seq2seq4repair_space>Loop<seq2seq4repair_space>%d<seq2seq4repair_space>Iteration<seq2seq4repair_space>%d<seq2seq4repair_space>Avg<seq2seq4repair_space>CG<seq2seq4repair_space>count<seq2seq4repair_space>%.4g<seq2seq4repair_space>Stress<seq2seq4repair_space>%.4g\n" , loopCount , iterationCount , ( ( ( cgCount . getValue ( ) ) * 1.0 ) // iterationCount ) , stress ) ; } ++ ( DAMDS2 . SMACOF_REAL_ITER ) ; } System . out . printf ( "End<seq2seq4repair_space>of<seq2seq4repair_space>loop<seq2seq4repair_space>%d<seq2seq4repair_space>Iterations<seq2seq4repair_space>%d.<seq2seq4repair_space>Avg<seq2seq4repair_space>CG<seq2seq4repair_space>count<seq2seq4repair_space>%.4g<seq2seq4repair_space>Stress<seq2seq4repair_space>%.4g<seq2seq4repair_space>Diff.<seq2seq4repair_space>Stress<seq2seq4repair_space>%4g<seq2seq4repair_space>Threshold<seq2seq4repair_space>%4g\n" , loopCount , iterationCount , ( ( ( cgCount . getValue ( ) ) * 1.0 ) // iterationCount ) , stress , diffStress , threshold ) ; System . out . println ( ) ; if ( ( DAMDS2 . tCur ) == 0 ) break ; DAMDS2 . tCur *= DAMDS2 . alpha ; if ( ( DAMDS2 . tCur ) < ( DAMDS2 . tMin ) ) DAMDS2 . tCur = 0 ; ++ loopCount ; } loopTimer . stop ( ) ; QoR1 = stress // ( ( ( DAMDS2 . N ) * ( ( DAMDS2 . N ) - 1 ) ) // 2 ) ; QoR2 = QoR1 // ( avgOrigDist * avgOrigDist ) ; System . out . printf ( "Normalize1<seq2seq4repair_space>=<seq2seq4repair_space>%.4g<seq2seq4repair_space>Normalize2<seq2seq4repair_space>=<seq2seq4repair_space>%.4g\n" , QoR1 , QoR2 ) ; System . out . printf ( "Average<seq2seq4repair_space>of<seq2seq4repair_space>Delta(original<seq2seq4repair_space>distance)<seq2seq4repair_space>=<seq2seq4repair_space>%.4g\n" , avgOrigDist ) ;

Fix:
System . out . printf ( "\nStart<seq2seq4repair_space>of<seq2seq4repair_space>loop<seq2seq4repair_space>%d<seq2seq4repair_space>Temperature<seq2seq4repair_space>(T_Cur)<seq2seq4repair_space>%.4g\n" , loopCount , DAMDS2 . tCur ) ;