Buggy code:
ArrayList < String > morningShift ; ArrayList < String > afternoonShift ; ArrayList < String > nightShift ; ArrayList < String > checkBoxValuee ; ArrayList < String > jobID ; Context context ; ArrayList < Integer > imageId ; String studentID ; private static LayoutInflater inflater = null ; public CustLvAdapterForJobs ( Context con , ArrayList < String > jobIdArray , ArrayList < String > compNameArray , ArrayList < String > contPersonNameArray , ArrayList < String > addressArray , ArrayList < String > cleanCriminalRecordArray , ArrayList < String > contactPersonPhoneArray , ArrayList < String > datePostedArray , ArrayList < String > descriptionArray , ArrayList < String > fieldOfWorkArray , ArrayList < String > howManyHoursArray , ArrayList < String > haveCarArray , ArrayList < String > morningShiftArray , ArrayList < String > afternoonShiftArray , ArrayList < String > nightShiftArray , ArrayList < String > salaryArray , ArrayList < String > startDateArray , ArrayList < String > startTimeArray , ArrayList < String > checkBoxValueArray , ArrayList < Integer > prgmImages , String studentId ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } public class Holder { TextView tvCompanyName ; TextView tvContactPerson ; TextView tvSalary ; TextView tvTime ; ImageView img ; AnimCheckBoxJob checkBoxJob ; } @ Override public View getView ( final int position , View convertView , ViewGroup parent ) { final CustLvAdapterForJobs . Holder holder = new CustLvAdapterForJobs . Holder ( ) ; View rowView ; rowView = CustLvAdapterForJobs . inflater . inflate ( job_list_item , null ) ; holder . tvCompanyName = ( ( TextView ) ( rowView . findViewById ( tvCompName ) ) ) ; holder . tvContactPerson = ( ( TextView ) ( rowView . findViewById ( tvContName ) ) ) ; holder . tvSalary = ( ( TextView ) ( rowView . findViewById ( tvSalary ) ) ) ; holder . tvTime = ( ( TextView ) ( rowView . findViewById ( tvStartTime ) ) ) ; holder . img = ( ( ImageView ) ( rowView . findViewById ( ivLogo ) ) ) ; holder . checkBoxJob = ( ( AnimCheckBoxJob ) ( rowView . findViewById ( checkBoxApply ) ) ) ; holder . tvCompanyName . setText ( companyName . get ( position ) ) ; holder . tvContactPerson . setText ( contactPerson . get ( position ) ) ; holder . tvSalary . setText ( ( ( salary . get ( position ) ) + "dkk//h" ) ) ; holder . tvTime . setText ( startDate . get ( position ) ) ; holder . tvTime . append ( ( ",<seq2seq4repair_space>" + ( startTime . get ( position ) ) ) ) ; holder . img . setImageResource ( imageId . get ( position ) ) ; Log . d ( "Stringas" , ( "ValueOfCheckbox<seq2seq4repair_space>" + ( checkBoxValuee . get ( position ) ) ) ) ; if ( checkBoxValuee . get ( position ) . equals ( "1" ) ) { holder . checkBoxJob . setChecked ( true ) ; } else { holder . checkBoxJob . setChecked ( false ) ; } holder . checkBoxJob . setOnCheckedChangeListener ( new AnimCheckBoxJob . OnCheckedChangeListener ( ) { @ Override public void onChange ( boolean checked ) { if ( checked ) changeJobStatus ( false , jobID . get ( position ) . toString ( ) , studentID ) ; else changeJobStatus ( true , jobID . get ( position ) . toString ( ) , studentID ) ; } } ) ; rowView . setOnLongClickListener ( new View . OnLongClickListener ( ) { @ Override public boolean onLongClick ( View v ) { <START_BUG> final Dialog dialog = new Dialog ( context ) ; <END_BUG> dialog . setContentView ( dialog_layout_for_job ) ; Log . d ( "Stringas" , ( "Position<seq2seq4repair_space>of<seq2seq4repair_space>arrayItem:<seq2seq4repair_space>" + position ) ) ; dialog . setTitle ( "Detailed<seq2seq4repair_space>information" ) ; TextView tvCompany = ( ( TextView ) ( dialog . findViewById ( tvCompanyName ) ) ) ; TextView tvContactPersonPhone = ( ( TextView ) ( dialog . findViewById ( tvContactPersonPhone ) ) ) ; TextView tvContactPerson = ( ( TextView ) ( dialog . findViewById ( tvContactPerson ) ) ) ; TextView tvAddress = ( ( TextView ) ( dialog . findViewById ( tvAddress ) ) ) ; TextView tvSalaryDialog = ( ( TextView ) ( dialog . findViewById ( tvSalaryDialog ) ) ) ; TextView tvStartDate = ( ( TextView ) ( dialog . findViewById ( tvStartDate ) ) ) ; TextView tvStartTimeDialog = ( ( TextView ) ( dialog . findViewById ( tvStartTimeDialog ) ) ) ; TextView tvDescription = ( ( TextView ) ( dialog . findViewById ( tvDescription ) ) ) ; TextView tvHowManyHours = ( ( TextView ) ( dialog . findViewById ( tvHowManyHours ) ) ) ; TextView tvFieldOfWork = ( ( TextView ) ( dialog . findViewById ( tvFieldOfWork ) ) ) ; TextView tvDatePosted = ( ( TextView ) ( dialog . findViewById ( tvDatePosted ) ) ) ; Button btnClose = ( ( Button ) ( dialog . findViewById ( btnCloseJobItem ) ) ) ; tvCompany . setText ( ( "Company<seq2seq4repair_space>Name:<seq2seq4repair_space>" + ( companyName . get ( position ) ) ) ) ; tvAddress . setText ( ( "Address:<seq2seq4repair_space>" + ( address . get ( position ) ) ) ) ; tvContactPerson . setText ( ( "Contact<seq2seq4repair_space>person:<seq2seq4repair_space>" + ( contactPerson . get ( position ) ) ) ) ; tvContactPersonPhone . setText ( ( "Phone:<seq2seq4repair_space>" + ( contactPersonPhone . get ( position ) ) ) ) ; tvSalaryDialog . setText ( ( ( "Salary:<seq2seq4repair_space>" + ( salary . get ( position ) ) ) + "dkk//h" ) ) ; tvStartDate . setText ( ( "Starting<seq2seq4repair_space>date:<seq2seq4repair_space>" + ( startDate . get ( position ) ) ) ) ; tvStartTimeDialog . setText ( ( "Starting<seq2seq4repair_space>time:<seq2seq4repair_space>" + ( startTime . get ( position ) ) ) ) ;

Fix:
final Dialog dialog = new Dialog ( context , style . Theme_Material_Dialog_Alert ) ;