Program: 40368
Project: 40368
Buggy source:
@Override protected StorjNode doInBackground(List<StorjNode>... lists){
  StorjNode node=null;
  if (hasActiveInternetConnection()) {
    for (    StorjNode storjNode : lists[0]) {
      try {
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),true);
        }
        JSONObject storjApiReponse=getJSONObjectFromURL(STORJ_API_URL + "String_Node_Str" + storjNode.getNodeID().getValue());
        Log.d(TAG,"String_Node_Str" + storjApiReponse.toString());
        DatabaseManager db=DatabaseManager.getInstance(mContext);
        node=new StorjNode(storjApiReponse);
        node.setLastChecked(Calendar.getInstance().getTime());
        JSONObject releaseInfoJson=getJSONObjectFromURL("String_Node_Str");
        Version newestGithubVersion=null;
        if (releaseInfoJson == null) {
          Version savedStorjCoreVersion=getSavedActualStorjCoreVersion();
          if (savedStorjCoreVersion != null) {
            newestGithubVersion=getSavedActualStorjCoreVersion();
          }
        }
 else {
          newestGithubVersion=new Version(releaseInfoJson.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"));
        }
        if (newestGithubVersion != null && node.getUserAgent().isSet()) {
          node.setIsOutdated(!node.getUserAgent().getValue().isEqualTo(newestGithubVersion));
        }
 else {
          node.setIsOutdated(false);
        }
        if (getSavedActualStorjCoreVersion() == null && newestGithubVersion != null) {
          saveNewUserAgentVersion(newestGithubVersion);
        }
 else         if (newestGithubVersion != null && getSavedActualStorjCoreVersion().isLowerThan(newestGithubVersion)) {
          saveNewUserAgentVersion(newestGithubVersion);
          sendNewUserAgentVersionNotification();
        }
        Cursor cursor=db.getNode(node.getNodeID().getValue());
        if (cursor.getCount() > 0) {
          StorjNode previusNode=new StorjNode(cursor);
          node.setSimpleName(previusNode.getSimpleName().getValue());
          if (previusNode.getResponseTime().getValue() != previusNode.getResponseTime().getDefault())           node.setOnlineSince(previusNode.getOnlineSince());
          if (node.getLastContractSent().getValue() != previusNode.getLastContractSent().getValue()) {
            node.setLastContractSentUpdated(Calendar.getInstance().getTime());
          }
 else {
            node.setLastContractSentUpdated(previusNode.getLastContractSentUpdated());
          }
          if (isNodeOffline(node)) {
            node.setResponseTime(node.getResponseTime().getDefault());
            node.setShouldSendNotification(false);
            if (previusNode.getShouldSendNotification())             sendNodeOfflineNotification(node);
          }
 else {
            db.insertNodeResponseTimeEntry(node);
            db.insertNodeReputationEntry(node);
            if (previusNode.getResponseTime().getValue() == previusNode.getResponseTime().getDefault()) {
              node.setShouldSendNotification(true);
            }
          }
          db.updateNode(node);
          publishProgress(node.getNodeID().getValue());
        }
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
      }
 catch (      IOException e) {
        e.printStackTrace();
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
        Log.i(TAG,"String_Node_Str" + storjNode.getNodeID().getValue() + "String_Node_Str");
      }
catch (      JSONException e) {
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
        e.printStackTrace();
      }
    }
  }
  return node;
}

Fixed version (ground truth):
@Override protected StorjNode doInBackground(List<StorjNode>... lists){
  mRunning=true;
  StorjNode node=null;
  if (hasActiveInternetConnection()) {
    for (    StorjNode storjNode : lists[0]) {
      try {
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),true);
        }
        JSONObject storjApiReponse=getJSONObjectFromURL(STORJ_API_URL + "String_Node_Str" + storjNode.getNodeID().getValue());
        Log.d(TAG,"String_Node_Str" + storjApiReponse.toString());
        DatabaseManager db=DatabaseManager.getInstance(mContext);
        node=new StorjNode(storjApiReponse);
        node.setLastChecked(Calendar.getInstance().getTime());
        JSONObject releaseInfoJson=getJSONObjectFromURL("String_Node_Str");
        Version newestGithubVersion=null;
        if (releaseInfoJson == null) {
          Version savedStorjCoreVersion=getSavedActualStorjCoreVersion();
          if (savedStorjCoreVersion != null) {
            newestGithubVersion=getSavedActualStorjCoreVersion();
          }
        }
 else {
          newestGithubVersion=new Version(releaseInfoJson.getString("String_Node_Str").replace("String_Node_Str","String_Node_Str"));
        }
        if (newestGithubVersion != null && node.getUserAgent().isSet()) {
          node.setIsOutdated(!node.getUserAgent().getValue().isEqualTo(newestGithubVersion));
        }
 else {
          node.setIsOutdated(false);
        }
        if (getSavedActualStorjCoreVersion() == null && newestGithubVersion != null) {
          saveNewUserAgentVersion(newestGithubVersion);
        }
 else         if (newestGithubVersion != null && getSavedActualStorjCoreVersion().isLowerThan(newestGithubVersion)) {
          saveNewUserAgentVersion(newestGithubVersion);
          sendNewUserAgentVersionNotification();
        }
        Cursor cursor=db.getNode(node.getNodeID().getValue());
        if (cursor.getCount() > 0) {
          StorjNode previusNode=new StorjNode(cursor);
          node.setSimpleName(previusNode.getSimpleName().getValue());
          if (previusNode.getResponseTime().getValue() != previusNode.getResponseTime().getDefault())           node.setOnlineSince(previusNode.getOnlineSince());
          if (node.getLastContractSent().getValue() != previusNode.getLastContractSent().getValue()) {
            node.setLastContractSentUpdated(Calendar.getInstance().getTime());
          }
 else {
            node.setLastContractSentUpdated(previusNode.getLastContractSentUpdated());
          }
          if (isNodeOffline(node)) {
            node.setResponseTime(node.getResponseTime().getDefault());
            node.setShouldSendNotification(false);
            if (previusNode.getShouldSendNotification())             sendNodeOfflineNotification(node);
          }
 else {
            db.insertNodeResponseTimeEntry(node);
            db.insertNodeReputationEntry(node);
            if (previusNode.getResponseTime().getValue() == previusNode.getResponseTime().getDefault()) {
              node.setShouldSendNotification(true);
            }
          }
          db.updateNode(node);
          publishProgress(node.getNodeID().getValue());
        }
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
      }
 catch (      IOException e) {
        e.printStackTrace();
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
        Log.i(TAG,"String_Node_Str" + storjNode.getNodeID().getValue() + "String_Node_Str");
      }
catch (      JSONException e) {
        if (MainActivity.mIsRunning) {
          ListViewHolder holder=ListViewHolder.getInstance();
          holder.showLoadingBar(storjNode.getNodeID().getValue(),false);
        }
        e.printStackTrace();
      }
    }
  }
  mRunning=false;
  return node;
}