class ParallelRankThread extends Thread {

	private int[] readArray;
	private int[] resultArray;
	private int threadNum;
	private int threadIndex;

	private int currentItem;
	private int currentPosition;
  private int startIndex;
  private int endIndex;
  private String threadName;
  private int currentThreadNum;

  public ParallelRankThread(int[] readArray, int[] resultArray, int threadNum, int threadIndex) {
    this.readArray = readArray;
    this.resultArray = resultArray;
    this.threadNum = threadNum;
    this.threadIndex = threadIndex;

    this.currentItem = 0;
    this.currentPosition = 0;
		this.startIndex = 0;
		this.endIndex = 0;
		this.threadName = "";
		this.currentThreadNum = 0;
  }

  @Override
  public void run() {

    threadName = Thread.currentThread().getName();
    currentThreadNum = threadIndex;

    int blockSize = (int) Math.ceil(readArray.length / threadNum);
    startIndex = currentThreadNum * blockSize;
    if (threadNum - 1 == currentThreadNum) {
      endIndex = readArray.length;
    } else {
      endIndex = (currentThreadNum + 1) * blockSize;
    }

    // Rank sort
    for (int j = startIndex; j < endIndex; j++) {
      currentItem = readArray[j];
      currentPosition = 0;
      for (int i = 0; i < readArray.length; i++) {
        if (currentItem > readArray[i]) {
          currentPosition++;
        }
				if ((currentItem == readArray[i]) && (j < i)) {
					currentPosition++;
				}
      }
      resultArray[currentPosition] = currentItem;
    }

  }
}

@@ -1,8 +1,9 @@
+%09
 class Pa
@@ -198,18 +198,17 @@
 sition;%0A
-  
+%09
 private 
@@ -219,26 +219,25 @@
 startIndex;%0A
-  
+%09
 private int 
@@ -246,18 +246,17 @@
 dIndex;%0A
-  
+%09
 private 
@@ -274,18 +274,17 @@
 adName;%0A
-  
+%09
 private 
@@ -306,18 +306,17 @@
 adNum;%0A%0A
-  
+%09
 public P
@@ -403,20 +403,18 @@
 ndex) %7B%0A
-    
+%09%09
 this.rea
@@ -429,28 +429,26 @@
  readArray;%0A
-    
+%09%09
 this.resultA
@@ -467,20 +467,18 @@
 tArray;%0A
-    
+%09%09
 this.thr
@@ -497,20 +497,18 @@
 eadNum;%0A
-    
+%09%09
 this.thr
@@ -532,20 +532,18 @@
 Index;%0A%0A
-    
+%09%09
 this.cur
@@ -556,20 +556,18 @@
 em = 0;%0A
-    
+%09%09
 this.cur
@@ -681,23 +681,21 @@
 um = 0;%0A
-  %7D%0A%0A  
+%09%7D%0A%0A%09
 @Overrid
@@ -696,18 +696,17 @@
 verride%0A
-  
+%09
 public v
@@ -717,19 +717,17 @@
 run() %7B%0A
-%0A  
+%09
   thread
@@ -767,18 +767,17 @@
 Name();%0A
-  
+%09
   curren
@@ -803,18 +803,17 @@
 Index;%0A%0A
-  
+%09
   int bl
@@ -869,18 +869,17 @@
 adNum);%0A
-  
+%09
   startI
@@ -915,18 +915,17 @@
 ckSize;%0A
-  
+%09
   if (th
@@ -959,22 +959,19 @@
 dNum) %7B%0A
-      
+%09%09%09
 endIndex
@@ -991,18 +991,17 @@
 length;%0A
-  
+%09
   %7D else
@@ -1003,22 +1003,19 @@
  else %7B%0A
-      
+%09%09%09
 endIndex
@@ -1053,25 +1053,23 @@
 ckSize;%0A
-  
+%09
   %7D%0A%0A
-  
+%09
   // Ran
@@ -1075,18 +1075,17 @@
 nk sort%0A
-  
+%09
   for (i
@@ -1124,22 +1124,19 @@
  j++) %7B%0A
-      
+%09%09%09
 currentI
@@ -1155,22 +1155,19 @@
 ray%5Bj%5D;%0A
-      
+%09%09%09
 currentP
@@ -1179,22 +1179,19 @@
 on = 0;%0A
-      
+%09%09%09
 for (int
@@ -1227,24 +1227,20 @@
  i++) %7B%0A
-        
+%09%09%09%09
 if (curr
@@ -1269,18 +1269,13 @@
 ) %7B%0A
-          
+%09%09%09%09%09
 curr
@@ -1293,16 +1293,12 @@
 ++;%0A
-        
+%09%09%09%09
 %7D%0A%09%09
@@ -1381,22 +1381,16 @@
 %09%09%7D%0A
-      %7D%0A      
+%09%09%09%7D%0A%09%09%09
 resu
@@ -1433,17 +1433,16 @@
 em;%0A
-  
+%09
   %7D%0A%0A
-  %7D
+%09%7D%0A
 %0A%7D%0A

fix indentation on parallel thread class