Program: 178329
Project: 178329
Buggy source:
@Override public void run(){
  try {
    if (V_LOG) {
      Log.v(TAG,"String_Node_Str" + uri);
    }
    ContentResolver mContentResolver=context.getContentResolver();
    InputStream mInputStream=mContentResolver.openInputStream(uri);
    try {
      ContentValues mNewValues=null;
      Cursor mCursor=null;
      PointOfInterestMessage.Message mMessage;
      long mLatestTimeStamp=-1;
      while ((mMessage=PointOfInterestMessage.Message.parseDelimitedFrom(mInputStream)) != null) {
        if (mLatestTimeStamp == -1) {
          String[] mProjection={PointsOfInterestContract.Table.TIMESTAMP};
          String mSelection=PointsOfInterestContract.Table.PHONE_NUMBER + "String_Node_Str";
          String[] mSelectionArgs=new String[1];
          mSelectionArgs[0]=mMessage.getPhoneNumber();
          String mOrderBy=PointsOfInterestContract.Table.TIMESTAMP + "String_Node_Str";
          mCursor=mContentResolver.query(PointsOfInterestContract.CONTENT_URI,mProjection,mSelection,mSelectionArgs,mOrderBy);
          if (mCursor.getCount() != 0) {
            mCursor.moveToFirst();
            mLatestTimeStamp=mCursor.getLong(mCursor.getColumnIndex(PointsOfInterestContract.Table.TIMESTAMP));
          }
 else {
            mLatestTimeStamp=0;
          }
          mCursor.close();
          mCursor=null;
        }
        if (mMessage.getTimestamp() > mLatestTimeStamp) {
          mNewValues=new ContentValues();
          mNewValues.put(PointsOfInterestContract.Table.PHONE_NUMBER,mMessage.getPhoneNumber());
          mNewValues.put(PointsOfInterestContract.Table.SUBSCRIBER_ID,mMessage.getSubsciberId());
          mNewValues.put(PointsOfInterestContract.Table.LATITUDE,mMessage.getLatitude());
          mNewValues.put(PointsOfInterestContract.Table.LONGITUDE,mMessage.getLongitude());
          mNewValues.put(PointsOfInterestContract.Table.TIMESTAMP,mMessage.getTimestamp());
          mNewValues.put(PointsOfInterestContract.Table.TIMEZONE,mMessage.getTimeZone());
          mNewValues.put(PointsOfInterestContract.Table.TITLE,mMessage.getTitle());
          mNewValues.put(PointsOfInterestContract.Table.DESCRIPTION,mMessage.getDescription());
          mNewValues.put(PointsOfInterestContract.Table.CATEGORY,mMessage.getCategory());
          mNewValues.put(PointsOfInterestContract.Table.PHOTO,mMessage.getPhoto());
          try {
            mContentResolver.insert(PointsOfInterestContract.CONTENT_URI,mNewValues);
          }
 catch (          SQLiteException e) {
            Log.e(TAG,"String_Node_Str",e);
            break;
          }
          if (V_LOG) {
            Log.v(TAG,"String_Node_Str");
          }
        }
 else {
          if (V_LOG) {
            Log.v(TAG,"String_Node_Str");
          }
          try {
            Thread.sleep(sleepTime);
          }
 catch (          InterruptedException e) {
            Log.w(TAG,"String_Node_Str");
          }
        }
        mNewValues=null;
        try {
          Thread.sleep(sleepTime);
        }
 catch (        InterruptedException e) {
          Log.w(TAG,"String_Node_Str");
        }
      }
    }
  finally {
      mInputStream.close();
    }
  }
 catch (  Exception e) {
    Log.e(TAG,e.getMessage(),e);
  }
}

Fixed version (ground truth):
@Override public void run(){
  try {
    if (V_LOG) {
      Log.v(TAG,"String_Node_Str" + dataFile);
    }
    ContentResolver mContentResolver=context.getContentResolver();
    InputStream mInputStream=null;
    try {
      mInputStream=mContentResolver.openInputStream(dataFile);
    }
 catch (    java.io.FileNotFoundException e) {
      Log.e(TAG,"String_Node_Str" + dataFile);
      return;
    }
    try {
      ContentValues mNewValues=null;
      Cursor mCursor=null;
      PointOfInterestMessage.Message mMessage;
      long mLatestTimeStamp=-1;
      while ((mMessage=PointOfInterestMessage.Message.parseDelimitedFrom(mInputStream)) != null) {
        if (mLatestTimeStamp == -1) {
          String[] mProjection={PointsOfInterestContract.Table.TIMESTAMP};
          String mSelection=PointsOfInterestContract.Table.PHONE_NUMBER + "String_Node_Str";
          String[] mSelectionArgs=new String[1];
          mSelectionArgs[0]=mMessage.getPhoneNumber();
          String mOrderBy=PointsOfInterestContract.Table.TIMESTAMP + "String_Node_Str";
          mCursor=mContentResolver.query(PointsOfInterestContract.CONTENT_URI,mProjection,mSelection,mSelectionArgs,mOrderBy);
          if (mCursor.getCount() != 0) {
            mCursor.moveToFirst();
            mLatestTimeStamp=mCursor.getLong(mCursor.getColumnIndex(PointsOfInterestContract.Table.TIMESTAMP));
          }
 else {
            mLatestTimeStamp=0;
          }
          mCursor.close();
          mCursor=null;
        }
        if (mMessage.getTimestamp() > mLatestTimeStamp) {
          mNewValues=new ContentValues();
          mNewValues.put(PointsOfInterestContract.Table.PHONE_NUMBER,mMessage.getPhoneNumber());
          mNewValues.put(PointsOfInterestContract.Table.SUBSCRIBER_ID,mMessage.getSubsciberId());
          mNewValues.put(PointsOfInterestContract.Table.LATITUDE,mMessage.getLatitude());
          mNewValues.put(PointsOfInterestContract.Table.LONGITUDE,mMessage.getLongitude());
          mNewValues.put(PointsOfInterestContract.Table.TIMESTAMP,mMessage.getTimestamp());
          mNewValues.put(PointsOfInterestContract.Table.TIMEZONE,mMessage.getTimeZone());
          mNewValues.put(PointsOfInterestContract.Table.TITLE,mMessage.getTitle());
          mNewValues.put(PointsOfInterestContract.Table.DESCRIPTION,mMessage.getDescription());
          mNewValues.put(PointsOfInterestContract.Table.CATEGORY,mMessage.getCategory());
          mNewValues.put(PointsOfInterestContract.Table.PHOTO,mMessage.getPhoto());
          Log.d(TAG,"String_Node_Str" + mMessage.getDescription() + "String_Node_Str");
          Log.d(TAG,"String_Node_Str" + mMessage.getTitle() + "String_Node_Str");
          try {
            mContentResolver.insert(PointsOfInterestContract.CONTENT_URI,mNewValues);
          }
 catch (          SQLiteException e) {
            Log.e(TAG,"String_Node_Str",e);
            break;
          }
          if (V_LOG) {
            Log.v(TAG,"String_Node_Str");
          }
        }
 else {
          try {
            Thread.sleep(sleepTime);
          }
 catch (          InterruptedException e) {
            Log.w(TAG,"String_Node_Str");
          }
        }
        mNewValues=null;
        try {
          Thread.sleep(sleepTime);
        }
 catch (        InterruptedException e) {
          Log.w(TAG,"String_Node_Str");
        }
      }
    }
  finally {
      mInputStream.close();
    }
  }
 catch (  Exception e) {
    Log.e(TAG,e.getMessage(),e);
  }
}