Program: 187239
Project: 187239
Buggy source:
public void run(){
  String sUrlLesson=null;
  try {
    File lessonFolder=mLocalStorageRoot;
    if (mSubFolder != null)     lessonFolder=new File(mLocalStorageRoot,mSubFolder);
    StrongHttpsClient httpClient=getHttpClientInstance();
    SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(mContext);
    boolean useTor=settings.getBoolean("String_Node_Str",false);
    if (useTor) {
    }
    String urlBase=mUrlRemoteRepo;
    if (mSubFolder != null)     urlBase+=mSubFolder + '/';
    String urlIndex=urlBase + LESSON_METADATA_FILE;
    Log.d(AppConstants.TAG,"String_Node_Str" + urlIndex);
    HttpGet request=new HttpGet(urlIndex);
    HttpResponse response=httpClient.execute(request);
    HttpEntity entity=response.getEntity();
    int statusCode=response.getStatusLine().getStatusCode();
    InputStream isContent=entity.getContent();
    long conLen=entity.getContentLength();
    boolean isChunked=entity.isChunked();
    if (statusCode == 200) {
      String jsonData=EntityUtils.toString(entity);
      if (!jsonData.contains("String_Node_Str"))       jsonData+="String_Node_Str";
      JSONObject jObjMain=new JSONObject(jsonData);
      JSONArray jarray=jObjMain.getJSONArray("String_Node_Str");
      for (int i=0; i < jarray.length() && (!jarray.isNull(i)); i++) {
        try {
          JSONObject jobj=jarray.getJSONObject(i);
          String title=jobj.getString("String_Node_Str");
          String lessonUrl=jobj.getJSONObject("String_Node_Str").getString("String_Node_Str");
          sUrlLesson=urlBase + lessonUrl;
          Log.d(AppConstants.TAG,"String_Node_Str" + sUrlLesson);
          URI urlLesson=new URI(sUrlLesson);
          request=new HttpGet(urlLesson);
          response=httpClient.execute(request);
          String fileName=urlLesson.getPath();
          fileName=fileName.substring(fileName.lastIndexOf('/') + 1);
          File fileZip=new File(lessonFolder,fileName);
          if (fileZip.exists()) {
            long remoteLen=response.getEntity().getContentLength();
            long localLen=fileZip.length();
            if (localLen == remoteLen) {
              Log.d(AppConstants.TAG,"String_Node_Str");
              response.getEntity().consumeContent();
              continue;
            }
 else {
              Log.d(AppConstants.TAG,"String_Node_Str");
              fileZip.delete();
            }
          }
          if (mListener != null)           mListener.loadingLessonFromServer(mSubFolder,title);
          fileZip.getParentFile().mkdirs();
          BufferedInputStream bis=new BufferedInputStream(response.getEntity().getContent());
          IOUtils.copyLarge(bis,new FileOutputStream(fileZip));
          unpack(fileZip,lessonFolder);
        }
 catch (        Exception ioe) {
          Log.e(AppConstants.TAG,"String_Node_Str" + sUrlLesson,ioe);
          if (response != null)           response.getEntity().consumeContent();
          if (mListener != null)           mListener.errorLoadingLessons(ioe.getLocalizedMessage());
        }
      }
      if (mListener != null)       mListener.lessonsLoadedFromServer();
    }
 else {
      Log.w(AppConstants.TAG,"String_Node_Str" + sUrlLesson);
      if (mListener != null)       mListener.errorLoadingLessons("String_Node_Str");
    }
  }
 catch (  Exception ioe) {
    Log.e(AppConstants.TAG,"String_Node_Str" + sUrlLesson,ioe);
    if (mListener != null)     mListener.errorLoadingLessons(ioe.getLocalizedMessage());
  }
}

Fixed version (ground truth):
public void run(){
  String sUrlLesson=null;
  try {
    File lessonFolder=mLocalStorageRoot;
    if (mSubFolder != null)     lessonFolder=new File(mLocalStorageRoot,mSubFolder);
    StrongHttpsClient httpClient=getHttpClientInstance();
    SharedPreferences settings=PreferenceManager.getDefaultSharedPreferences(mContext);
    boolean useTor=settings.getBoolean("String_Node_Str",false);
    if (useTor) {
    }
    String urlBase=mUrlRemoteRepo;
    if (mSubFolder != null)     urlBase+=mSubFolder + '/';
    String urlIndex=urlBase + LESSON_METADATA_FILE;
    Log.d(AppConstants.TAG,"String_Node_Str" + urlIndex);
    HttpGet request=new HttpGet(urlIndex);
    HttpResponse response=httpClient.execute(request);
    HttpEntity entity=response.getEntity();
    int statusCode=response.getStatusLine().getStatusCode();
    long conLen=entity.getContentLength();
    boolean isChunked=entity.isChunked();
    if (statusCode == 200) {
      String jsonData=EntityUtils.toString(entity);
      if (!jsonData.contains("String_Node_Str"))       jsonData+="String_Node_Str";
      JSONObject jObjMain=new JSONObject(jsonData);
      JSONArray jarray=jObjMain.getJSONArray("String_Node_Str");
      for (int i=0; i < jarray.length() && (!jarray.isNull(i)); i++) {
        try {
          JSONObject jobj=jarray.getJSONObject(i);
          String title=jobj.getString("String_Node_Str");
          String lessonUrl=jobj.getJSONObject("String_Node_Str").getString("String_Node_Str");
          sUrlLesson=urlBase + lessonUrl;
          Log.d(AppConstants.TAG,"String_Node_Str" + sUrlLesson);
          URI urlLesson=new URI(sUrlLesson);
          request=new HttpGet(urlLesson);
          response=httpClient.execute(request);
          String fileName=urlLesson.getPath();
          fileName=fileName.substring(fileName.lastIndexOf('/') + 1);
          File fileZip=new File(lessonFolder,fileName);
          if (fileZip.exists()) {
            long remoteLen=response.getEntity().getContentLength();
            long localLen=fileZip.length();
            if (localLen == remoteLen) {
              Log.d(AppConstants.TAG,"String_Node_Str");
              response.getEntity().consumeContent();
              continue;
            }
 else {
              Log.d(AppConstants.TAG,"String_Node_Str");
              fileZip.delete();
            }
          }
          if (mListener != null)           mListener.loadingLessonFromServer(mSubFolder,title);
          fileZip.getParentFile().mkdirs();
          BufferedInputStream bis=new BufferedInputStream(response.getEntity().getContent());
          IOUtils.copyLarge(bis,new FileOutputStream(fileZip));
          unpack(fileZip,lessonFolder);
        }
 catch (        Exception ioe) {
          Log.e(AppConstants.TAG,"String_Node_Str" + sUrlLesson,ioe);
          if (response != null)           response.getEntity().consumeContent();
          if (mListener != null)           mListener.errorLoadingLessons(ioe.getLocalizedMessage());
        }
      }
      if (mListener != null)       mListener.lessonsLoadedFromServer();
    }
 else {
      Log.w(AppConstants.TAG,"String_Node_Str" + sUrlLesson);
      if (mListener != null)       mListener.errorLoadingLessons("String_Node_Str");
    }
  }
 catch (  Exception ioe) {
    Log.e(AppConstants.TAG,"String_Node_Str" + sUrlLesson,ioe);
    if (mListener != null)     mListener.errorLoadingLessons(ioe.getLocalizedMessage());
  }
}