Buggy code:
public class ClassDetailTask extends AsyncTask < SchoolClass , Void , Void > { private final ClassesTaskShim layer ; private String error = "An<seq2seq4repair_space>unknown<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>loading<seq2seq4repair_space>your<seq2seq4repair_space>assignments" ; private final AeriesManager aeriesManager ; public ClassDetailTask ( Context context , ClassesTaskShim layer ) { } @ Override protected void onPreExecute ( ) { } @ Override protected Void doInBackground ( SchoolClass ... schoolClasses ) { try { aeriesManager . client . execute ( aeriesManager . getLoginRequest ( ) ) ; HttpResponse response_main = aeriesManager . client . execute ( new org . apache . http . client . methods . HttpGet ( AeriesManager . GRADES_DETAIL ) ) ; Document doc_main = Jsoup . parse ( response_main . getEntity ( ) . getContent ( ) , null , GRADES_DETAIL ) ; Elements options = doc_main . select ( "#ctl00_MainContent_subGBS_dlGN" ) . first ( ) . children ( ) ; String viewState = doc_main . select ( "#__VIEWSTATE" ) . val ( ) ; for ( Element option : options ) { String stupidTitle = option . text ( ) ; String stupidId = option . attr ( "value" ) ; if ( ! ( stupidTitle . startsWith ( "<<" ) ) ) { for ( SchoolClass schoolClass : schoolClasses ) { <START_BUG> if ( stupidTitle . matches ( ( ( "(.*)" + ( schoolClass . className ) ) + "(.*)" ) ) ) { <END_BUG> schoolClass . aeriesID = stupidId ; } } } } for ( SchoolClass schoolClass : schoolClasses ) { if ( ( schoolClass . aeriesID ) == null ) { continue ; } List < NameValuePair > nvps = new ArrayList < NameValuePair > ( ) ; nvps . add ( new BasicNameValuePair ( "ctl00$MainContent$subGBS$dlGN" , schoolClass . aeriesID ) ) ; nvps . add ( new BasicNameValuePair ( "__EVENTTARGET" , "ctl00$MainContent$subGBS$dlGN" ) ) ; nvps . add ( new BasicNameValuePair ( "__VIEWSTATE" , viewState ) ) ; HttpPost request = new HttpPost ( AeriesManager . GRADES_DETAIL ) ; request . setEntity ( new org . apache . http . client . entity . UrlEncodedFormEntity ( nvps , "UTF-8" ) ) ; HttpResponse response = aeriesManager . client . execute ( request ) ; Document doc = Jsoup . parse ( response . getEntity ( ) . getContent ( ) , null , request . getURI ( ) . toString ( ) ) ; Elements rows = doc . select ( "table#ctl00_MainContent_subGBS_tblEverything<seq2seq4repair_space>div#ctl00_MainContent_subGBS_upEverything<seq2seq4repair_space>><seq2seq4repair_space>table" ) . get ( 1 ) . children ( ) . first ( ) . children ( ) . first ( ) . children ( ) . first ( ) . children ( ) . first ( ) . children ( ) . first ( ) . children ( ) ; if ( rows == null ) { error = "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred,<seq2seq4repair_space>Aeries<seq2seq4repair_space>might<seq2seq4repair_space>be<seq2seq4repair_space>down" ; cancel ( true ) ; return null ; } schoolClass . assignments . clear ( ) ; for ( Element row : rows ) { if ( row . className ( ) . equals ( "SubHeaderRow" ) ) { continue ; } if ( ( row . children ( ) . size ( ) ) >= 3 ) { Assignment assign = new Assignment ( ) ; row . children ( ) . get ( 2 ) . children ( ) . remove ( ) ; assign . description = row . children ( ) . get ( 2 ) . text ( ) ; assign . type = row . children ( ) . get ( 3 ) . text ( ) ; assign . category = row . children ( ) . get ( 4 ) . text ( ) ; assign . score = row . children ( ) . get ( 5 ) . text ( ) ; assign . correct = row . children ( ) . get ( 6 ) . text ( ) ; assign . percent = row . children ( ) . get ( 7 ) . text ( ) ; assign . status = row . children ( ) . get ( 8 ) . text ( ) ; assign . dateCompleted = row . children ( ) . get ( 9 ) . text ( ) ; assign . dateDue = row . children ( ) . get ( 10 ) . text ( ) ; assign . gradingComplete = row . children ( ) . get ( 11 ) . text ( ) . contains ( "Yes" ) ; schoolClass . assignments . add ( assign ) ; } aeriesManager . setAssignments ( schoolClass . ID , schoolClass . assignments ) ; } } } catch ( Exception e ) { error = "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred,<seq2seq4repair_space>This<seq2seq4repair_space>class<seq2seq4repair_space>may<seq2seq4repair_space>have<seq2seq4repair_space>no<seq2seq4repair_space>assignments<seq2seq4repair_space>yet" ; cancel ( true ) ; } return null ; } @ Override protected void onCancelled ( ) { } @ Override protected void onPostExecute ( Void v ) { } }

Fix:
if ( stupidTitle . contains ( schoolClass . className ) ) {