Buggy code:
public class Business { static final Platform PlatformAPI = new Twitch ( ) ; static final Twitch TwitchAPI = new Twitch ( ) ; static final Ustream UstreamAPI = new Ustream ( ) ; static final Azubu AzubuAPI = new Azubu ( ) ; static final Hitbox HitboxAPI = new Hitbox ( ) ; static final Mlg MlgAPI = new Mlg ( ) ; static final Cb CbAPI = new Cb ( ) ; static final Platform [ ] PLATFORM_LIST = new Platform [ ] { Business . TwitchAPI , Business . UstreamAPI , Business . AzubuAPI , Business . HitboxAPI , Business . MlgAPI , Business . CbAPI } ; static final Map < String , Platform > Platforms ; Business ( ) { } public class LiveChecker extends AsyncTask < String , Void , LiveStream > { Activity mActivity ; Button goToStreamButton ; LiveStream ls = new LiveStream ( ) ; String channelname = "" ; String platform = null ; @ Override protected LiveStream doInBackground ( String ... urls ) { } @ Override protected void onPostExecute ( LiveStream liveStatus ) { } protected LiveStream checkStream ( String url_or_channel_name ) { } } public static class DownloadTask extends AsyncTask < String , Void , HashMap > { Activity mActivity ; public Spinner qualityPicker ; public int spinner_item ; public ResizingVideoView video ; public Context context ; String channel ; public String platform = null ; public TextView header ; public HashMap qualities ; @ Override protected HashMap doInBackground ( String ... channels ) { } @ Override protected void onPostExecute ( HashMap foundQualities ) { } } public static Response RawHttpGet ( String url ) { } public static String HttpGet ( String url ) { } public static void PlayURL ( ResizingVideoView video , String url ) { } public static void LoadQualities ( Spinner qualityPicker , HashMap qualities , Context context , int spinnerItemId ) { } public static boolean SetCachedHash ( String key , HashMap value , Context cn ) { } public static boolean SetCachedArray ( String key , String [ ] array , Context cn ) { } public static HashMap GetCachedHash ( String key , Context cn ) { } public static String [ ] GetCachedArray ( String key , Context cn ) { } public static boolean isKitkat ( ) { } private static final OkHttpClient rustleClient = new OkHttpClient ( ) ; static void GetRustlers ( final Activity activity , final NavigationDrawerFragment frag ) { } static List < Metadata > ParseJsonToList ( String jString ) { } public static List < Metadata > ParseJsonToList ( JSONObject j ) { List < Metadata > retval = new ArrayList < Metadata > ( ) ; try { JSONObject metadata = j . getJSONObject ( "metadata" ) ; JSONObject metaindex = j . getJSONObject ( "metaindex" ) ; int totalviewers = ( ( Integer ) ( j . get ( "viewercount" ) ) ) ; JSONObject streamsObj = ( ( JSONObject ) ( j . get ( "streams" ) ) ) ; Iterator < String > streams = streamsObj . keys ( ) ; List < Pair < String , Integer > > sorted = new ArrayList < Pair < String , Integer > > ( ) ; while ( streams . hasNext ( ) ) { String key = streams . next ( ) ; sorted . add ( new Pair < String , Integer > ( key , streamsObj . getInt ( key ) ) ) ; } Collections . sort ( sorted , new Comparator < Pair < String , Integer > > ( ) { @ Override public int compare ( Pair < String , Integer > lhs , Pair < String , Integer > rhs ) { return Integer . valueOf ( lhs . second ) . compareTo ( Integer . valueOf ( rhs . second ) ) ; } } ) ; Collections . reverse ( sorted ) ; retval . add ( new Metadata ( ( ( Integer . toString ( totalviewers ) ) + "<seq2seq4repair_space>Rustlers<seq2seq4repair_space>Watching" ) , null ) ) ; retval . add ( new Metadata ( "Destiny" , "twitch" ) ) ; Iterator < Pair < String , Integer > > sortedstreams = sorted . iterator ( ) ; while ( sortedstreams . hasNext ( ) ) { Pair < String , Integer > pair = sortedstreams . next ( ) ; String key = pair . first ; String [ ] parts = key . split ( "=" ) ; if ( ( parts . length ) > 0 ) { String stream = parts [ ( ( parts . length ) - 1 ) ] ; String streamid = stream ; <START_BUG> if ( ! ( metadata . has ( metaindex . getString ( key ) ) ) ) { <END_BUG> continue ; } JSONObject jmd = metadata . getJSONObject ( metaindex . getString ( key ) ) ; retval . add ( new Metadata ( jmd ) ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } return retval ; } public static final int NOTIFICATION_ID = 1 ; public static void sendNotification ( Context context , String msg ) { } }

Fix:
if ( ( ! ( metaindex . has ( key ) ) ) || ( ! ( metadata . has ( metaindex . getString ( key ) ) ) ) ) {