Program: 76735
Project: 76735
Buggy source:
private void recieveData(){
  byte buf[]=new byte[1024];
  int len=0;
  try {
    Log.d("String_Node_Str","String_Node_Str");
    Log.d("String_Node_Str",serverSocket.getLocalSocketAddress().toString());
    Log.d("String_Node_Str",String.valueOf(serverSocket.getLocalPort()));
    client=serverSocket.accept();
    Log.d("String_Node_Str","String_Node_Str");
    if (isCancelled())     return;
    InputStream inputStream=client.getInputStream();
    ObjectInputStream objectInputStream=new ObjectInputStream(inputStream);
    int sizeOfItems=objectInputStream.readInt();
    ArrayList<String> fileNames=(ArrayList<String>)objectInputStream.readObject();
    ArrayList<Long> fileSizes=(ArrayList<Long>)objectInputStream.readObject();
    for (int i=0; i < sizeOfItems; i++) {
      String fileName=fileNames.get(i);
      fileSize=fileSizes.get(i);
      fileSizeOriginal=fileSizes.get(i);
      file=new File(Environment.getExternalStorageDirectory() + "String_Node_Str" + context.getApplicationContext().getPackageName()+ "String_Node_Str"+ fileName);
      Log.d("String_Node_Str",file.getPath());
      File dir=file.getParentFile();
      if (!dir.exists())       dir.mkdirs();
      if (file.exists())       file.delete();
      if (file.createNewFile()) {
        Log.d("String_Node_Str","String_Node_Str");
      }
 else       Log.d("String_Node_Str","String_Node_Str");
      OutputStream outputStream=new FileOutputStream(file);
      CustomObject progress=new CustomObject();
      progress.name=fileName;
      progress.dataIncrement=0;
      progress.totalProgress=0;
      try {
        while (fileSize > 0 && (len=inputStream.read(buf,0,(int)Math.min(buf.length,fileSize))) != -1) {
          outputStream.write(buf,0,len);
          fileSize-=len;
          progress.dataIncrement=(long)len;
          if (((int)(progress.totalProgress * 100 / fileSizeOriginal)) == ((int)((progress.totalProgress + progress.dataIncrement) * 100 / fileSizeOriginal))) {
            progress.totalProgress+=progress.dataIncrement;
            continue;
          }
          progress.totalProgress+=progress.dataIncrement;
          publishProgress(progress);
          if (this.isCancelled())           return;
        }
        Log.d("String_Node_Str","String_Node_Str" + len);
      }
 catch (      Exception e) {
        Log.d("String_Node_Str","String_Node_Str");
        e.printStackTrace();
      }
      outputStream.flush();
      outputStream.close();
    }
    inputStream.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private void recieveData(){
  byte buf[]=new byte[1024];
  int len=0;
  try {
    Log.d("String_Node_Str","String_Node_Str");
    Log.d("String_Node_Str",serverSocket.getLocalSocketAddress().toString());
    Log.d("String_Node_Str",String.valueOf(serverSocket.getLocalPort()));
    client=serverSocket.accept();
    Log.d("String_Node_Str","String_Node_Str");
    if (isCancelled())     return;
    InputStream inputStream=client.getInputStream();
    ObjectInputStream objectInputStream=new ObjectInputStream(inputStream);
    int sizeOfItems=objectInputStream.readInt();
    ArrayList<String> fileNames=(ArrayList<String>)objectInputStream.readObject();
    ArrayList<Long> fileSizes=(ArrayList<Long>)objectInputStream.readObject();
    for (int i=0; i < sizeOfItems; i++) {
      String fileName=fileNames.get(i);
      fileSize=fileSizes.get(i);
      fileSizeOriginal=fileSizes.get(i);
      file=new File(Environment.getExternalStorageDirectory() + "String_Node_Str" + context.getApplicationContext().getPackageName()+ "String_Node_Str"+ fileName);
      Log.d("String_Node_Str",file.getPath());
      File dir=file.getParentFile();
      if (!dir.exists())       dir.mkdirs();
      if (file.exists())       file.delete();
      if (file.createNewFile()) {
        Log.d("String_Node_Str","String_Node_Str");
      }
 else       Log.d("String_Node_Str","String_Node_Str");
      OutputStream outputStream=new FileOutputStream(file);
      CustomObject progress=new CustomObject();
      progress.name=fileName;
      progress.dataIncrement=0;
      progress.totalProgress=0;
      try {
        while (fileSize > 0 && (len=objectInputStream.read(buf,0,(int)Math.min(buf.length,fileSize))) != -1) {
          outputStream.write(buf,0,len);
          fileSize-=len;
          progress.dataIncrement=(long)len;
          if (((int)(progress.totalProgress * 100 / fileSizeOriginal)) == ((int)((progress.totalProgress + progress.dataIncrement) * 100 / fileSizeOriginal))) {
            progress.totalProgress+=progress.dataIncrement;
            continue;
          }
          progress.totalProgress+=progress.dataIncrement;
          publishProgress(progress);
          if (this.isCancelled())           return;
        }
        Log.d("String_Node_Str","String_Node_Str" + len);
      }
 catch (      Exception e) {
        Log.d("String_Node_Str","String_Node_Str");
        e.printStackTrace();
      }
      outputStream.flush();
      outputStream.close();
    }
    objectInputStream.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}