Program: 3191
Project: 3191
Buggy source:
@Override public void run(){
  Log.d(TAG,"String_Node_Str");
  for (  AbstractWidgetUpdater updater : Values.widgetUpdaters) {
    updater.widgetLoading(this);
  }
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  String updateDateString=sp.getString("String_Node_Str","String_Node_Str");
  boolean update=true;
  if (!force) {
    try {
      Date now=new Date();
      Date lastUpdate=DateFormatters.ISO8601FORMAT.parse(updateDateString);
      long diff=now.getTime() - lastUpdate.getTime();
      long mins=diff / (1000 * 60);
      if (mins < Integer.parseInt(sp.getString("String_Node_Str","String_Node_Str"))) {
        update=false;
      }
    }
 catch (    Exception e) {
      Log.d(TAG,"String_Node_Str");
    }
  }
  int error=NONE;
  DataFetcher dataFetcher=new DataFetcher(getExceptionReporter());
  if (update) {
    try {
      dataFetcher.updateData(this,force);
    }
 catch (    DataFetcherLoginDetailsException e) {
      Log.d(TAG,e.getMessage());
switch (e.getErrorType()) {
case DataFetcherLoginDetailsException.LOGINFAILED:
        error=LOGINFAILED;
      break;
case DataFetcherLoginDetailsException.USERNAMEPASSWORDNOTSET:
    error=USERNAMEPASSWORD;
  break;
}
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
catch (ClientProtocolException e) {
Log.d(TAG,e.getMessage());
error=NETWORK;
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
catch (IOException e) {
Log.d(TAG,e.getMessage());
error=NETWORK;
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
Log.d(TAG,"String_Node_Str");
}
 else {
Log.d(TAG,"String_Node_Str");
}
Log.d(TAG,Integer.toString(error));
for (AbstractWidgetUpdater updater : Values.widgetUpdaters) {
updater.updateWidgets(this,force,error);
}
Log.d(TAG,"String_Node_Str");
Intent myIntent=new Intent(NEWDATA);
sendBroadcast(myIntent);
if (Values.tracker == null) {
Values.tracker=GoogleAnalyticsTracker.getInstance();
}
Values.tracker.dispatch();
isThreadRunning=false;
stopSelf();
}

Fixed version (ground truth):
@Override public void run(){
  Log.d(TAG,"String_Node_Str");
  for (  AbstractWidgetUpdater updater : Values.widgetUpdaters) {
    updater.widgetLoading(this);
  }
  SharedPreferences sp=PreferenceManager.getDefaultSharedPreferences(this);
  String updateDateString=sp.getString("String_Node_Str","String_Node_Str");
  boolean update=true;
  if (!force) {
    try {
      Date now=new Date();
      Date lastUpdate=DateFormatters.ISO8601FORMAT.parse(updateDateString);
      long diff=now.getTime() - lastUpdate.getTime();
      long mins=diff / (1000 * 60);
      if (mins < Integer.parseInt(sp.getString("String_Node_Str","String_Node_Str"))) {
        update=false;
      }
    }
 catch (    Exception e) {
      Log.d(TAG,"String_Node_Str");
    }
  }
  int error=NONE;
  DataFetcher dataFetcher=new DataFetcher(getExceptionReporter());
  if (update) {
    try {
      dataFetcher.updateData(this,force);
    }
 catch (    DataFetcherLoginDetailsException e) {
      Log.d(TAG,e.getMessage());
switch (e.getErrorType()) {
case DataFetcherLoginDetailsException.LOGINFAILED:
        error=LOGINFAILED;
      break;
case DataFetcherLoginDetailsException.USERNAMEPASSWORDNOTSET:
    error=USERNAMEPASSWORD;
  break;
}
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
catch (ClientProtocolException e) {
Log.d(TAG,e.getMessage());
error=NETWORK;
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
catch (IOException e) {
Log.d(TAG,e.getMessage());
error=NETWORK;
Editor edit=sp.edit();
edit.putBoolean("String_Node_Str",true);
edit.commit();
}
Log.d(TAG,"String_Node_Str");
}
 else {
Log.d(TAG,"String_Node_Str");
}
Log.d(TAG,Integer.toString(error));
for (AbstractWidgetUpdater updater : Values.widgetUpdaters) {
updater.updateWidgets(this,force,error);
}
Log.d(TAG,"String_Node_Str");
Intent myIntent=new Intent(NEWDATA);
sendBroadcast(myIntent);
GoogleAnalyticsTracker tracker=GoogleAnalyticsTracker.getInstance();
tracker.dispatch();
isThreadRunning=false;
stopSelf();
}