Buggy code:
public class DbAdaptert_Evento_Establec { public static final String EE_id_evt_establec = "_id" ; public static final String EE_id_establec = "ee_in_id_establec" ; public static final String EE_id_cat_est = "ee_in_id_cat_est" ; public static final String EE_id_tipo_doc_cliente = "ee_in_id_tipo_doc_cliente" ; public static final String EE_id_estado_atencion = "ee_in_id_estado_atencion" ; public static final String EE_nom_establec = "ee_te_nom_establec" ; public static final String EE_nom_cliente = "ee_te_nom_cliente" ; public static final String EE_doc_cliente = "ee_te_doc_cliente" ; public static final String EE_orden = "ee_in_orden" ; public static final String EE_surtido_stock_ant = "ee_in_surtido_stock_ant" ; public static final String EE_surtido_venta_ant = "ee_in_surtido_venta_ant" ; public static final String EE_dias_credito = "ee_in_dias_credito" ; public static final String EE_id_agente = "ee_in_id_agente" ; public static final String estado_sincronizacion = "estado_sincronizacion" ; public static final String EE_monto_credito = "ee_re_monto_credito" ; public static final String EE_id_estado_no_atencion = "ee_in_id_estado_no_atencion" ; public static final String EE_estado_no_atencion_comentario = "ee_in_estado_no_atencion_comentario" ; public static final String TAG = "Evento_Establec" ; private DbHelper mDbHelper ; private SQLiteDatabase mDb ; private static final String SQLITE_TABLE_Evento_Establec = "m_evento_establec" ; private final Context mCtx ; public static final String CREATE_TABLE_EVENTO_ESTABLEC = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "create<seq2seq4repair_space>table<seq2seq4repair_space>if<seq2seq4repair_space>not<seq2seq4repair_space>exists<seq2seq4repair_space>" + ( DbAdaptert_Evento_Establec . SQLITE_TABLE_Evento_Establec ) ) + "<seq2seq4repair_space>(" ) + ( DbAdaptert_Evento_Establec . EE_id_evt_establec ) ) + "<seq2seq4repair_space>integer<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>autoincrement," ) + ( DbAdaptert_Evento_Establec . EE_id_establec ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_id_cat_est ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_id_tipo_doc_cliente ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_id_estado_atencion ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_nom_establec ) ) + "<seq2seq4repair_space>text," ) + ( DbAdaptert_Evento_Establec . EE_nom_cliente ) ) + "<seq2seq4repair_space>text," ) + ( DbAdaptert_Evento_Establec . EE_doc_cliente ) ) + "<seq2seq4repair_space>text," ) + ( DbAdaptert_Evento_Establec . EE_orden ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_surtido_stock_ant ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_surtido_venta_ant ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_monto_credito ) ) + "<seq2seq4repair_space>real," ) + ( DbAdaptert_Evento_Establec . EE_dias_credito ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_id_estado_no_atencion ) ) + "<seq2seq4repair_space>integer," ) + ( DbAdaptert_Evento_Establec . EE_estado_no_atencion_comentario ) ) + "<seq2seq4repair_space>text," ) + ( DbAdaptert_Evento_Establec . EE_id_agente ) ) + "<seq2seq4repair_space>integer,<seq2seq4repair_space>" ) + ( DbAdaptert_Evento_Establec . estado_sincronizacion ) ) + "<seq2seq4repair_space>integer);" ; public static final String DELETE_TABLE_EVENTO_ESTABLEC = "DROP<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>EXISTS<seq2seq4repair_space>" + ( DbAdaptert_Evento_Establec . SQLITE_TABLE_Evento_Establec ) ; public DbAdaptert_Evento_Establec ( Context ctx ) { } public DbAdaptert_Evento_Establec open ( ) throws SQLException { } public void close ( ) { } public long createEstablecs ( int id_establec , int id_cat_est , int id_tipo_doc_cliente , int id_estado_atencion , String nom_establec , String nom_cliente , String doc_cliente , int orden , int surtido_stock_ant , int surtido_venta_ant , double monto_credito , int dias_credito , int estado_no_atencion , int id_agente ) { } public long createEstablecimientos ( EventoEstablecimiento establecimiento , int id_agente ) { } public void updateEstablecimientos ( EventoEstablecimiento establecimiento , int id_agente ) { } public boolean existeEstablecsById ( int idEstablec ) throws SQLException { } public void updateEstadoNoAtendido ( String id , int estado , int estadoNoAtendido , String comentario ) { } public void updateEstadoEstablecs ( String id , int estado ) { } public void updateEstablecs ( String id , int estado ) { } public void updateEstablecsCredito ( int idEstablecimiento , int montoCredito , int diasCredito ) { } public void changeEstadoToExport ( String [ ] ids , int estadoSincronizacion ) { } public void updateEstablecs1 ( String id , int aten , int naten ) { } public boolean deleteAllEstablecs ( ) { } public Cursor fetchEstablecsByName ( String inputText ) throws SQLException { } public Cursor fetchEstablecsById ( String inputText ) throws SQLException { } public Cursor fetchEstablecsByIdX ( String inputText ) throws SQLException { } public Cursor fetchAllEstablecs ( ) { } public Cursor filterExportUpdated ( ) { } public Cursor fetchAllEstablecsX ( ) { } public Cursor fetchAllEstablecsXX ( ) { } public Cursor listarEstablecimientos ( ) { } public Cursor listarEstablecimientosPorNombre ( String nombreEstablecimiento ) { <START_BUG> Cursor mCursor = mDb . rawQuery ( ( ( ( ( ( "select<seq2seq4repair_space>ee._id<seq2seq4repair_space>AS<seq2seq4repair_space>_id,<seq2seq4repair_space>ee.ee_in_id_agente<seq2seq4repair_space>AS<seq2seq4repair_space>idAgente,<seq2seq4repair_space>ee.ee_in_id_establec<seq2seq4repair_space>AS<seq2seq4repair_space>idEstablecimiento,<seq2seq4repair_space>ee.ee_te_nom_establec<seq2seq4repair_space>AS<seq2seq4repair_space>nombreEstablecimiento,<seq2seq4repair_space>ee.ee_te_nom_cliente<seq2seq4repair_space>AS<seq2seq4repair_space>nombrecliente,ee.ee_in_orden<seq2seq4repair_space>AS<seq2seq4repair_space>orden,<seq2seq4repair_space>ee_in_id_estado_atencion<seq2seq4repair_space>AS<seq2seq4repair_space>estadoAtencion,<seq2seq4repair_space>SUM(cc.cc_re_monto_a_pagar)<seq2seq4repair_space>as<seq2seq4repair_space>deudaTotal<seq2seq4repair_space>from<seq2seq4repair_space>m_evento_establec<seq2seq4repair_space>ee\n" + ( ( "LEFT<seq2seq4repair_space>OUTER<seq2seq4repair_space>JOIN<seq2seq4repair_space>m_comprob_cobro<seq2seq4repair_space>cc<seq2seq4repair_space>\n" + "ON<seq2seq4repair_space>ee.ee_in_id_establec<seq2seq4repair_space>=<seq2seq4repair_space>cc.cc_in_id_establec<seq2seq4repair_space>AND<seq2seq4repair_space>\n" ) + "ee.ee_te_nom_establec<seq2seq4repair_space>like<seq2seq4repair_space>'%" ) ) + nombreEstablecimiento ) + "%\'<seq2seq4repair_space>\n" ) + "GROUP<seq2seq4repair_space>BY<seq2seq4repair_space>ee.ee_in_id_establec,<seq2seq4repair_space>ee.ee_te_nom_establec<seq2seq4repair_space>\n" ) + "ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>ee.ee_in_id_estado_atencion;" ) , null ) ; <END_BUG> return mCursor ; } No newline ; at end ; of file ; }

Fix:
Cursor mCursor = mDb . rawQuery ( ( ( ( ( ( "select<seq2seq4repair_space>ee._id<seq2seq4repair_space>AS<seq2seq4repair_space>_id,<seq2seq4repair_space>ee.ee_in_id_agente<seq2seq4repair_space>AS<seq2seq4repair_space>idAgente,<seq2seq4repair_space>ee.ee_in_id_establec<seq2seq4repair_space>AS<seq2seq4repair_space>idEstablecimiento,<seq2seq4repair_space>ee.ee_te_nom_establec<seq2seq4repair_space>AS<seq2seq4repair_space>nombreEstablecimiento,<seq2seq4repair_space>ee.ee_te_nom_cliente<seq2seq4repair_space>AS<seq2seq4repair_space>nombrecliente,ee.ee_in_orden<seq2seq4repair_space>AS<seq2seq4repair_space>orden,<seq2seq4repair_space>ee_in_id_estado_atencion<seq2seq4repair_space>AS<seq2seq4repair_space>estadoAtencion,<seq2seq4repair_space>SUM(cc.cc_re_monto_a_pagar)<seq2seq4repair_space>as<seq2seq4repair_space>deudaTotal<seq2seq4repair_space>from<seq2seq4repair_space>m_evento_establec<seq2seq4repair_space>ee\n" + ( ( "LEFT<seq2seq4repair_space>OUTER<seq2seq4repair_space>JOIN<seq2seq4repair_space>m_comprob_cobro<seq2seq4repair_space>cc<seq2seq4repair_space>\n" + "ON<seq2seq4repair_space>ee.ee_in_id_establec<seq2seq4repair_space>=<seq2seq4repair_space>cc.cc_in_id_establec<seq2seq4repair_space>WHERE<seq2seq4repair_space>\n" ) + "ee.ee_te_nom_establec<seq2seq4repair_space>like<seq2seq4repair_space>'%" ) ) + nombreEstablecimiento ) + "%\'<seq2seq4repair_space>\n" ) + "GROUP<seq2seq4repair_space>BY<seq2seq4repair_space>ee.ee_in_id_establec,<seq2seq4repair_space>ee.ee_te_nom_establec<seq2seq4repair_space>\n" ) + "ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>ee.ee_in_id_estado_atencion;" ) , null ) ;