nus-yam/ex-repair huggingface dataset:
Program: 3528
Project: 3528
Buggy source:
/** 
 * Deleted old native libraries e.g. on Windows the DLL file is not removed on VM-Exit (bug #80)
 */
static void cleanup(){
  String tempFolder=getTempDir().getAbsolutePath();
  File dir=new File(tempFolder);
  File[] nativeLibFiles=dir.listFiles(new FilenameFilter(){
    private final String searchPattern="String_Node_Str" + getVersion();
    public boolean accept(    File dir,    String name){
      return name.startsWith(searchPattern) && !name.endsWith("String_Node_Str");
    }
  }
);
  if (nativeLibFiles != null) {
    for (    File nativeLibFile : nativeLibFiles) {
      File lckFile=new File(nativeLibFile.getName() + "String_Node_Str");
      if (!lckFile.exists()) {
        try {
          nativeLibFile.delete();
        }
 catch (        SecurityException e) {
          System.err.println("String_Node_Str" + e.getMessage());
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Deleted old native libraries e.g. on Windows the DLL file is not removed on VM-Exit (bug #80)
 */
static void cleanup(){
  String tempFolder=getTempDir().getAbsolutePath();
  File dir=new File(tempFolder);
  File[] nativeLibFiles=dir.listFiles(new FilenameFilter(){
    private final String searchPattern="String_Node_Str" + getVersion();
    public boolean accept(    File dir,    String name){
      return name.startsWith(searchPattern) && !name.endsWith("String_Node_Str");
    }
  }
);
  if (nativeLibFiles != null) {
    for (    File nativeLibFile : nativeLibFiles) {
      File lckFile=new File(nativeLibFile.getAbsolutePath() + "String_Node_Str");
      if (!lckFile.exists()) {
        try {
          nativeLibFile.delete();
        }
 catch (        SecurityException e) {
          System.err.println("String_Node_Str" + e.getMessage());
        }
      }
    }
  }
}
Program: 3529
Project: 3529
Buggy source:
public void close() throws SQLException {
  cols=null;
  colsMeta=null;
  meta=null;
  open=false;
  limitRows=0;
  row=0;
  lastCol=-1;
  columnNameToIndex=null;
  if (stmt == null) {
    return;
  }
  if (stmt != null && stmt.pointer != 0) {
    db.reset(stmt.pointer);
    if (closeStmt) {
      closeStmt=false;
      ((Statement)stmt).close();
    }
  }
}

Fixed version (ground truth):
public void close() throws SQLException {
  cols=null;
  colsMeta=null;
  meta=null;
  open=false;
  limitRows=0;
  row=0;
  lastCol=-1;
  columnNameToIndex=null;
synchronized (db) {
    if (stmt == null) {
      return;
    }
    if (stmt != null && stmt.pointer != 0) {
      db.reset(stmt.pointer);
      if (closeStmt) {
        closeStmt=false;
        ((Statement)stmt).close();
      }
    }
  }
}
Program: 3530
Project: 3530
Buggy source:
/** 
 * @param datePrecision One of SECONDS or MILLISECONDS
 * @throws SQLException 
 */
public void setDatePrecision(String datePrecision) throws SQLException {
  setPragma(Pragma.DATE_PRECISION,DatePrecision.getPrecision(datePrecision).getValue());
}

Fixed version (ground truth):
/** 
 * @param datePrecision One of SECONDS or MILLISECONDS
 * @throws SQLException 
 */
public void setDatePrecision(String datePrecision) throws SQLException {
  this.datePrecision=DatePrecision.getPrecision(datePrecision);
}
Program: 3531
Project: 3531
Buggy source:
/** 
 * Enables or disables the count-changes flag. When enabled, INSERT, UPDATE and DELETE statements return the number of rows they modified.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_count_changes">www.sqlite.org/pragma.html#pragma_count_changes</a>
 */
public void enableCountChanges(boolean enable){
  set(Pragma.COUNT_CHANGES,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the count-changes flag. When enabled, INSERT, UPDATE and DELETE statements return the number of rows they modified.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_count_changes">www.sqlite.org/pragma.html#pragma_count_changes</a>
 */
public void enableCountChanges(boolean enable){
  set(Pragma.COUNT_CHANGES,enable);
}
Program: 3532
Project: 3532
Buggy source:
/** 
 * Enables or disables the full_column_name flag. This flag together with the short_column_names flag determine the way SQLite assigns names to result columns of SELECT statements.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_full_column_names">www.sqlite.org/pragma.html#pragma_full_column_names</a>
 */
public void enableFullColumnNames(boolean enable){
  set(Pragma.FULL_COLUMN_NAMES,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the full_column_name flag. This flag together with the short_column_names flag determine the way SQLite assigns names to result columns of SELECT statements.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_full_column_names">www.sqlite.org/pragma.html#pragma_full_column_names</a>
 */
public void enableFullColumnNames(boolean enable){
  set(Pragma.FULL_COLUMN_NAMES,enable);
}
Program: 3533
Project: 3533
Buggy source:
/** 
 * Enables or disables the empty_result_callbacks flag.
 * @param enable True to enable; false to disable.false.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks">http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks</a>
 */
public void enableEmptyResultCallBacks(boolean enable){
  set(Pragma.EMPTY_RESULT_CALLBACKS,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the empty_result_callbacks flag.
 * @param enable True to enable; false to disable.false.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks">http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks</a>
 */
public void enableEmptyResultCallBacks(boolean enable){
  set(Pragma.EMPTY_RESULT_CALLBACKS,enable);
}
Program: 3534
Project: 3534
Buggy source:
/** 
 * @param dateStringFormat Format of date string
 */
public void setDateStringFormat(String dateStringFormat){
  setPragma(Pragma.DATE_STRING_FORMAT,dateStringFormat);
}

Fixed version (ground truth):
/** 
 * @param dateStringFormat Format of date string
 */
public void setDateStringFormat(String dateStringFormat){
  this.dateStringFormat=dateStringFormat;
}
Program: 3535
Project: 3535
Buggy source:
/** 
 * @param dateClass One of INTEGER, TEXT or REAL
 */
public void setDateClass(String dateClass){
  setPragma(Pragma.DATE_CLASS,DateClass.getDateClass(dateClass).getValue());
}

Fixed version (ground truth):
/** 
 * @param dateClass One of INTEGER, TEXT or REAL
 */
public void setDateClass(String dateClass){
  this.dateClass=DateClass.getDateClass(dateClass);
}
Program: 3536
Project: 3536
Buggy source:
/** 
 * @param datePrecision One of SECONDS or MILLISECONDS
 * @throws SQLException 
 */
public void setDatePrecision(String datePrecision) throws SQLException {
  setPragma(Pragma.DATE_PRECISION,DatePrecision.getPrecision(datePrecision).getValue());
}

Fixed version (ground truth):
/** 
 * @param datePrecision One of SECONDS or MILLISECONDS
 * @throws SQLException 
 */
public void setDatePrecision(String datePrecision) throws SQLException {
  this.datePrecision=DatePrecision.getPrecision(datePrecision);
}
Program: 3537
Project: 3537
Buggy source:
/** 
 * Enables or disables the count-changes flag. When enabled, INSERT, UPDATE and DELETE statements return the number of rows they modified.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_count_changes">www.sqlite.org/pragma.html#pragma_count_changes</a>
 */
public void enableCountChanges(boolean enable){
  set(Pragma.COUNT_CHANGES,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the count-changes flag. When enabled, INSERT, UPDATE and DELETE statements return the number of rows they modified.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_count_changes">www.sqlite.org/pragma.html#pragma_count_changes</a>
 */
public void enableCountChanges(boolean enable){
  set(Pragma.COUNT_CHANGES,enable);
}
Program: 3538
Project: 3538
Buggy source:
/** 
 * Enables or disables the full_column_name flag. This flag together with the short_column_names flag determine the way SQLite assigns names to result columns of SELECT statements.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_full_column_names">www.sqlite.org/pragma.html#pragma_full_column_names</a>
 */
public void enableFullColumnNames(boolean enable){
  set(Pragma.FULL_COLUMN_NAMES,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the full_column_name flag. This flag together with the short_column_names flag determine the way SQLite assigns names to result columns of SELECT statements.
 * @param enable True to enable; false to disable.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_full_column_names">www.sqlite.org/pragma.html#pragma_full_column_names</a>
 */
public void enableFullColumnNames(boolean enable){
  set(Pragma.FULL_COLUMN_NAMES,enable);
}
Program: 3539
Project: 3539
Buggy source:
/** 
 * Enables or disables the empty_result_callbacks flag.
 * @param enable True to enable; false to disable.false.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks">http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks</a>
 */
public void enableEmptyResultCallBacks(boolean enable){
  set(Pragma.EMPTY_RESULT_CALLBACKS,enable);
}

Fixed version (ground truth):
/** 
 * @deprecated Enables or disables the empty_result_callbacks flag.
 * @param enable True to enable; false to disable.false.
 * @see <a href="http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks">http://www.sqlite.org/pragma.html#pragma_empty_result_callbacks</a>
 */
public void enableEmptyResultCallBacks(boolean enable){
  set(Pragma.EMPTY_RESULT_CALLBACKS,enable);
}
Program: 3540
Project: 3540
Buggy source:
/** 
 * @param dateStringFormat Format of date string
 */
public void setDateStringFormat(String dateStringFormat){
  setPragma(Pragma.DATE_STRING_FORMAT,dateStringFormat);
}

Fixed version (ground truth):
/** 
 * @param dateStringFormat Format of date string
 */
public void setDateStringFormat(String dateStringFormat){
  this.dateStringFormat=dateStringFormat;
}
Program: 3541
Project: 3541
Buggy source:
/** 
 * @param dateClass One of INTEGER, TEXT or REAL
 */
public void setDateClass(String dateClass){
  setPragma(Pragma.DATE_CLASS,DateClass.getDateClass(dateClass).getValue());
}

Fixed version (ground truth):
/** 
 * @param dateClass One of INTEGER, TEXT or REAL
 */
public void setDateClass(String dateClass){
  this.dateClass=DateClass.getDateClass(dateClass);
}
Program: 3543
Project: 3543
Buggy source:
/** 
 * @see java.sql.DatabaseMetaData#getCrossReference(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
 */
public ResultSet getCrossReference(String pc,String ps,String pt,String fc,String fs,String ft) throws SQLException {
  if (pt == null) {
    return getExportedKeys(fc,fs,ft);
  }
  if (ft == null) {
    return getImportedKeys(pc,ps,pt);
  }
  StringBuilder query=new StringBuilder();
  query.append(String.format("String_Node_Str",quote(pc),quote(ps),quote(pt)) + "String_Node_Str" + String.format("String_Node_Str",quote(fc),quote(fs),quote(ft))+ "String_Node_Str"+ "String_Node_Str"+ Integer.toString(importedKeyInitiallyDeferred)+ "String_Node_Str");
  return conn.createStatement().executeQuery(query.toString());
}

Fixed version (ground truth):
/** 
 * @see java.sql.DatabaseMetaData#getCrossReference(java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String,java.lang.String)
 */
public ResultSet getCrossReference(String pc,String ps,String pt,String fc,String fs,String ft) throws SQLException {
  if (pt == null) {
    return getExportedKeys(fc,fs,ft);
  }
  if (ft == null) {
    return getImportedKeys(pc,ps,pt);
  }
  StringBuilder query=new StringBuilder();
  query.append(String.format("String_Node_Str",quote(pc),quote(ps),quote(pt)) + "String_Node_Str" + String.format("String_Node_Str",quote(fc),quote(fs),quote(ft))+ "String_Node_Str"+ "String_Node_Str"+ Integer.toString(importedKeyInitiallyDeferred)+ "String_Node_Str");
  return ((Stmt)conn.createStatement()).executeQuery(query.toString(),true);
}
Program: 3546
Project: 3546
Buggy source:
/** 
 * @see java.sql.DatabaseMetaData#getTables(java.lang.String,java.lang.String,java.lang.String,java.lang.String[])
 */
public synchronized ResultSet getTables(String c,String s,String t,String[] types) throws SQLException {
  checkOpen();
  t=(t == null || "String_Node_Str".equals(t)) ? "String_Node_Str" : t.toUpperCase();
  String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + escape(t) + "String_Node_Str";
  if (types != null) {
    sql+="String_Node_Str";
    for (int i=0; i < types.length; i++) {
      if (i > 0) {
        sql+="String_Node_Str";
      }
      sql+="String_Node_Str" + types[i].toUpperCase() + "String_Node_Str";
    }
    sql+="String_Node_Str";
  }
  sql+="String_Node_Str";
  return conn.createStatement().executeQuery(sql);
}

Fixed version (ground truth):
/** 
 * @see java.sql.DatabaseMetaData#getTables(java.lang.String,java.lang.String,java.lang.String,java.lang.String[])
 */
public synchronized ResultSet getTables(String c,String s,String tblNamePattern,String types[]) throws SQLException {
  checkOpen();
  tblNamePattern=(tblNamePattern == null || "String_Node_Str".equals(tblNamePattern)) ? "String_Node_Str" : escape(tblNamePattern);
  StringBuilder sql=new StringBuilder();
  sql.append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append("String_Node_Str").append(tblNamePattern).append("String_Node_Str");
  if (types == null) {
    sql.append("String_Node_Str");
  }
 else {
    sql.append("String_Node_Str").append(types[0].toUpperCase()).append("String_Node_Str");
    for (int i=1; i < types.length; i++) {
      sql.append("String_Node_Str").append(types[i].toUpperCase()).append("String_Node_Str");
    }
  }
  sql.append("String_Node_Str");
  return ((Stmt)conn.createStatement()).executeQuery(sql.toString(),true);
}
Program: 3547
Project: 3547
Buggy source:
/** 
 * @see java.sql.DatabaseMetaData#getPrimaryKeys(java.lang.String,java.lang.String,java.lang.String)
 */
public ResultSet getPrimaryKeys(String c,String s,String table) throws SQLException {
  PrimaryKeyFinder pkFinder=new PrimaryKeyFinder(table);
  String[] columns=pkFinder.getColumns();
  Statement stat=conn.createStatement();
  StringBuilder sql=new StringBuilder(512);
  sql.append("String_Node_Str").append(escape(table)).append("String_Node_Str");
  if (columns == null) {
    sql.append("String_Node_Str");
    return stat.executeQuery(sql.toString());
  }
  String pkName=pkFinder.getName();
  for (int i=0; i < columns.length; i++) {
    if (i > 0)     sql.append("String_Node_Str");
    sql.append("String_Node_Str").append(pkName).append("String_Node_Str").append(escape(columns[i].trim())).append("String_Node_Str").append(i).append("String_Node_Str");
  }
  return stat.executeQuery(sql.append("String_Node_Str").toString());
}

Fixed version (ground truth):
/** 
 * @see java.sql.DatabaseMetaData#getPrimaryKeys(java.lang.String,java.lang.String,java.lang.String)
 */
public ResultSet getPrimaryKeys(String c,String s,String table) throws SQLException {
  PrimaryKeyFinder pkFinder=new PrimaryKeyFinder(table);
  String[] columns=pkFinder.getColumns();
  Statement stat=conn.createStatement();
  StringBuilder sql=new StringBuilder(512);
  sql.append("String_Node_Str").append(escape(table)).append("String_Node_Str");
  if (columns == null) {
    sql.append("String_Node_Str");
    return ((Stmt)stat).executeQuery(sql.toString(),true);
  }
  String pkName=pkFinder.getName();
  for (int i=0; i < columns.length; i++) {
    if (i > 0)     sql.append("String_Node_Str");
    sql.append("String_Node_Str").append(pkName).append("String_Node_Str").append(escape(columns[i].trim())).append("String_Node_Str").append(i).append("String_Node_Str");
  }
  return ((Stmt)stat).executeQuery(sql.append("String_Node_Str").toString(),true);
}
Program: 3549
Project: 3549
Buggy source:
/** 
 * Default constructor for a given statement.
 * @param stmt The statement.
 */
RS(Stmt stmt){
  this.stmt=stmt;
  this.db=stmt.db;
}

Fixed version (ground truth):
/** 
 * Default constructor for a given statement.
 * @param stmt The statement.
 * @param closeStmt TODO
 */
RS(Stmt stmt){
  this.stmt=stmt;
  this.db=stmt.db;
}
Program: 3550
Project: 3550
Buggy source:
/** 
 * @see java.sql.ResultSet#close()
 */
public void close() throws SQLException {
  cols=null;
  colsMeta=null;
  meta=null;
  open=false;
  limitRows=0;
  row=0;
  lastCol=-1;
  if (stmt == null) {
    return;
  }
  if (stmt != null && stmt.pointer != 0) {
    db.reset(stmt.pointer);
  }
}

Fixed version (ground truth):
/** 
 * @see java.sql.ResultSet#close()
 */
public void close() throws SQLException {
  cols=null;
  colsMeta=null;
  meta=null;
  open=false;
  limitRows=0;
  row=0;
  lastCol=-1;
  if (stmt == null) {
    return;
  }
  if (stmt != null && stmt.pointer != 0) {
    db.reset(stmt.pointer);
    if (closeStmt) {
      closeStmt=false;
      stmt.close();
    }
  }
}
Program: 3551
Project: 3551
Buggy source:
/** 
 * @see org.sqlite.DB#interrupt()
 */
@Override native synchronized void interrupt();

Fixed version (ground truth):
/** 
 * @see org.sqlite.DB#interrupt()
 */
@Override native void interrupt();
Program: 3552
Project: 3552
Buggy source:
private void Encoding(String typeName){
  this.typeName=typeName;
}

Fixed version (ground truth):
private void Encoding(Encoding encoding){
  this.typeName=encoding.getValue();
}
Program: 3553
Project: 3553
Buggy source:
public void setEncoding(String encoding){
  config.setEncoding(Encoding.valueOf(encoding));
}

Fixed version (ground truth):
public void setEncoding(String encoding){
  config.setEncoding(Encoding.getEncoding(encoding));
}
Program: 3555
Project: 3555
Buggy source:
public boolean next() throws SQLException {
  if (!open)   return false;
  lastCol=-1;
  if (row == 0) {
    row++;
    return true;
  }
  if (maxRows != 0 && row > maxRows)   return false;
  if (limitRows != 0 && row >= limitRows)   return false;
  int statusCode=db.step(stmt.pointer);
switch (statusCode) {
case SQLITE_DONE:
    close();
  return false;
case SQLITE_ROW:
row++;
return true;
case SQLITE_BUSY:
default :
db.throwex(statusCode);
return false;
}
}

Fixed version (ground truth):
public boolean next() throws SQLException {
  if (!open)   return false;
  lastCol=-1;
  if (row == 0) {
    row++;
    return true;
  }
  if (maxRows != 0 && row > maxRows)   return false;
  int statusCode=db.step(stmt.pointer);
switch (statusCode) {
case SQLITE_DONE:
    close();
  return false;
case SQLITE_ROW:
row++;
return true;
case SQLITE_BUSY:
default :
db.throwex(statusCode);
return false;
}
}
Program: 3556
Project: 3556
Buggy source:
protected void finalize() throws SQLException {
  close();
}

Fixed version (ground truth):
@Override protected void finalize() throws SQLException {
  close();
}
Program: 3557
Project: 3557
Buggy source:
@Before public void setUp() throws Exception {
  System.setProperty("String_Node_Str","String_Node_Str");
  connection=null;
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str");
}

Fixed version (ground truth):
@Before public void setUp() throws Exception {
  isPureJava=System.getProperty("String_Node_Str","String_Node_Str");
  System.setProperty("String_Node_Str","String_Node_Str");
  connection=null;
  Class.forName("String_Node_Str");
  connection=DriverManager.getConnection("String_Node_Str");
}
Program: 3558
Project: 3558
Buggy source:
@After public void tearDown() throws Exception {
  if (connection != null)   connection.close();
  System.setProperty("String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@After public void tearDown() throws Exception {
  if (connection != null)   connection.close();
  System.setProperty("String_Node_Str",isPureJava);
}
Program: 3561
Project: 3561
Buggy source:
<T,R extends ApiResponse<T>>PendingResult<T> post(ApiConfig config,Class<? extends R> clazz,GeolocationPayload payload){
  checkContext(config.supportsClientId);
  StringBuilder url=new StringBuilder(config.path);
  if (config.supportsClientId && clientId != null) {
    url.append("String_Node_Str").append(clientId);
  }
 else {
    url.append("String_Node_Str").append(apiKey);
  }
  if (config.supportsClientId && clientId != null) {
    try {
      String signature=urlSigner.getSignature(url.toString());
      url.append("String_Node_Str").append(signature);
    }
 catch (    Exception e) {
      return new ExceptionResult<T>(e);
    }
  }
  String hostName=config.hostName;
  if (baseUrlOverride != null) {
    hostName=baseUrlOverride;
  }
  Gson gson=new Gson();
  String jsonPayload=gson.toJson(payload);
  return requestHandler.handlePost(hostName,url.toString(),jsonPayload,USER_AGENT,clazz,config.fieldNamingPolicy,errorTimeout);
}

Fixed version (ground truth):
<T,R extends ApiResponse<T>,P>PendingResult<T> post(ApiConfig config,Class<? extends R> clazz,P payload){
  checkContext(config.supportsClientId);
  StringBuilder url=new StringBuilder(config.path);
  if (config.supportsClientId && clientId != null) {
    url.append("String_Node_Str").append(clientId);
  }
 else {
    url.append("String_Node_Str").append(apiKey);
  }
  if (config.supportsClientId && clientId != null) {
    try {
      String signature=urlSigner.getSignature(url.toString());
      url.append("String_Node_Str").append(signature);
    }
 catch (    Exception e) {
      return new ExceptionResult<T>(e);
    }
  }
  String hostName=config.hostName;
  if (baseUrlOverride != null) {
    hostName=baseUrlOverride;
  }
  Gson gson=new Gson();
  String jsonPayload=gson.toJson(payload);
  return requestHandler.handlePost(hostName,url.toString(),jsonPayload,USER_AGENT,clazz,config.fieldNamingPolicy,errorTimeout);
}
Program: 3562
Project: 3562
Buggy source:
@Override public ApiException getError(){
  return ApiException.from(error.status,error.message);
}

Fixed version (ground truth):
@Override public ApiException getError(){
  if (successful()) {
    return null;
  }
  ApiException e;
  if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else   if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else   if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else   if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else   if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else   if (reason.equals("String_Node_Str")) {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
 else {
    e=ApiException.from("String_Node_Str",reason + "String_Node_Str" + message);
  }
  return e;
}
Program: 3563
Project: 3563
Buggy source:
@Override public GeolocationResult getResult(){
  return result;
}

Fixed version (ground truth):
@Override public GeolocationResult getResult(){
  GeolocationResult result=new GeolocationResult();
  result.accuracy=accuracy;
  result.location=location;
  return result;
}
Program: 3564
Project: 3564
Buggy source:
public static PendingResult<GeolocationResult> geolocate(GeoApiContext context,GeolocationPayload payload){
  return context.post(GEOLOCATION_API_CONFIG,GeolocationResponse.class,payload);
}

Fixed version (ground truth):
public static PendingResult<GeolocationResult> geolocate(GeoApiContext context,GeolocationPayload payload){
  return context.post(GEOLOCATION_API_CONFIG,Response.class,payload);
}
Program: 3565
Project: 3565
Buggy source:
@Override public boolean successful(){
  return error == null;
}

Fixed version (ground truth):
@Override public boolean successful(){
  return code == 200;
}
Program: 3566
Project: 3566
Buggy source:
@Override public <T,R extends ApiResponse<T>>PendingResult<T> handlePost(String hostName,String url,String payload,String userAgent,Class<R> clazz,FieldNamingPolicy fieldNamingPolicy,long errorTimeout){
  RequestBody body=RequestBody.create(JSON,payload);
  Request req=new Request.Builder().post(body).header("String_Node_Str",userAgent).url(hostName + url).build();
  LOG.log(Level.CONFIG,"String_Node_Str",hostName + url);
  LOG.log(Level.CONFIG,"String_Node_Str",payload);
  return new OkHttpPendingResult<T,R>(req,client,clazz,fieldNamingPolicy,errorTimeout);
}

Fixed version (ground truth):
@Override public <T,R extends ApiResponse<T>>PendingResult<T> handlePost(String hostName,String url,String payload,String userAgent,Class<R> clazz,FieldNamingPolicy fieldNamingPolicy,long errorTimeout){
  RequestBody body=RequestBody.create(JSON,payload);
  Request req=new Request.Builder().post(body).header("String_Node_Str",userAgent).url(hostName + url).build();
  LOG.log(Level.INFO,"String_Node_Str",hostName + url);
  LOG.log(Level.INFO,"String_Node_Str",payload);
  return new OkHttpPendingResult<T,R>(req,client,clazz,fieldNamingPolicy,errorTimeout);
}
Program: 3567
Project: 3567
Buggy source:
/** 
 * Performs the request synchronously.
 * @return The result.
 */
T await() throws Exception ;

Fixed version (ground truth):
/** 
 * Performs the GET request synchronously.
 * @return The result.
 */
T await() throws Exception ;
Program: 3569
Project: 3569
Buggy source:
/** 
 * Specifies the unit system to use when expressing distance as text. Distance Matrix results contain text within distance fields to indicate the distance of the calculated route.
 * @see <a href="https://developers.google.com/maps/documentation/distancematrix/#unit_systems">Unit systems in the Distance Matrix API</a>
 * @param unit One of {@link Unit#METRIC},   {@link Unit#IMPERIAL}.
 */
public DistanceMatrixApiRequest units(Unit unit){
  return param("String_Node_Str",unit);
}

Fixed version (ground truth):
/** 
 * Specifies the unit system to use when expressing distance as text. Distance Matrix results contain text within distance fields to indicate the distance of the calculated route.
 * @see <a href="https://developers.google.com/maps/documentation/distancematrix/#unit_systems">
   *   Unit systems in the Distance Matrix API</a>
 * @param unit One of {@link Unit#METRIC},   {@link Unit#IMPERIAL}.
 */
public DistanceMatrixApiRequest units(Unit unit){
  return param("String_Node_Str",unit);
}
Program: 3570
Project: 3570
Buggy source:
/** 
 * Test transit details.
 */
@Test public void testTransitDetails() throws Exception {
  DirectionsRoute[] routes=DirectionsApi.newRequest(context).origin("String_Node_Str").destination("String_Node_Str").mode(TravelMode.TRANSIT).departureTime(new DateTime(2015,2,15,11,0,DateTimeZone.UTC)).await();
  DirectionsLeg testLeg=routes[0].legs[0];
  int i=0;
  for (; i < testLeg.steps.length - 1 && testLeg.steps[i].travelMode != TravelMode.TRANSIT; i++)   assertTrue("String_Node_Str",i < testLeg.steps.length - 1);
  assertNotNull(testLeg.steps[i].transitDetails);
  assertNotNull(testLeg.steps[i].transitDetails.arrivalStop);
  assertNotNull(testLeg.steps[i].transitDetails.arrivalTime);
  assertNotNull(testLeg.steps[i].transitDetails.departureStop);
  assertNotNull(testLeg.steps[i].transitDetails.departureTime);
  assertNotNull(testLeg.steps[i].transitDetails.line);
  assertNotNull(testLeg.steps[i].transitDetails.line.agencies);
  assertNotNull(testLeg.steps[i].transitDetails.line.vehicle);
}

Fixed version (ground truth):
/** 
 * Test transit details.
 */
@Test public void testTransitDetails() throws Exception {
  DirectionsRoute[] routes=DirectionsApi.newRequest(context).origin("String_Node_Str").destination("String_Node_Str").mode(TravelMode.TRANSIT).departureTime(new DateTime(2015,2,15,11,0,DateTimeZone.UTC)).await();
  DirectionsLeg testLeg=routes[0].legs[0];
  int i=0;
  while (testLeg.steps[i].travelMode != TravelMode.TRANSIT) {
    i++;
  }
  assertTrue("String_Node_Str",i < testLeg.steps.length);
  assertNotNull(testLeg.steps[i].transitDetails);
  assertNotNull(testLeg.steps[i].transitDetails.arrivalStop);
  assertNotNull(testLeg.steps[i].transitDetails.arrivalTime);
  assertNotNull(testLeg.steps[i].transitDetails.departureStop);
  assertNotNull(testLeg.steps[i].transitDetails.departureTime);
  assertNotNull(testLeg.steps[i].transitDetails.line);
  assertNotNull(testLeg.steps[i].transitDetails.line.agencies);
  assertNotNull(testLeg.steps[i].transitDetails.line.vehicle);
}
Program: 3571
Project: 3571
Buggy source:
/** 
 * Making a request using just components filter: <a href="https://maps.googleapis.com/maps/api/geocode/json?components=route:Annegatan|administrative_area:Helsinki|country:Finland"> Searching for a route of Annegatan, in the administrative area of Helsinki, and the country of Finland </a>.
 */
@Test public void testGeocodeWithJustComponents() throws Exception {
  GeocodingResult[] results=GeocodingApi.newRequest(context).components(GeocodingApi.ComponentFilter.route("String_Node_Str"),GeocodingApi.ComponentFilter.administrativeArea("String_Node_Str"),GeocodingApi.ComponentFilter.country("String_Node_Str")).await();
  assertNotNull(results);
  assertEquals("String_Node_Str",results[0].formattedAddress);
}

Fixed version (ground truth):
/** 
 * Making a request using just components filter: <a href="https://maps.googleapis.com/maps/api/geocode/json?components=route:Annegatan|administrative_area:Helsinki|country:Finland"> Searching for a route of Annegatan, in the administrative area of Helsinki, and the country of Finland </a>.
 */
@Test public void testGeocodeWithJustComponents() throws Exception {
  GeocodingResult[] results=GeocodingApi.newRequest(context).components(GeocodingApi.ComponentFilter.route("String_Node_Str"),GeocodingApi.ComponentFilter.administrativeArea("String_Node_Str"),GeocodingApi.ComponentFilter.country("String_Node_Str")).await();
  assertNotNull(results);
  assertTrue(results[0].formattedAddress.startsWith("String_Node_Str"));
}
Program: 3572
Project: 3572
Buggy source:
public void decryptPassword(PasswordItem item){
  Intent intent=new Intent(this,PgpHandler.class);
  intent.putExtra("String_Node_Str",item.toString());
  intent.putExtra("String_Node_Str",item.getFile().getAbsolutePath());
  intent.putExtra("String_Node_Str","String_Node_Str");
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
    ShortcutInfo shortcut=new ShortcutInfo.Builder(this,item.getFullPathToParent()).setShortLabel(item.toString()).setLongLabel(item.getFullPathToParent() + item.toString()).setIcon(Icon.createWithResource(this,R.drawable.ic_launcher)).setIntent(intent.setAction("String_Node_Str")).build();
    shortcutManager.addDynamicShortcuts(Arrays.asList(shortcut));
  }
  startActivityForResult(intent,PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY);
}

Fixed version (ground truth):
public void decryptPassword(PasswordItem item){
  Intent intent=new Intent(this,PgpHandler.class);
  intent.putExtra("String_Node_Str",item.toString());
  intent.putExtra("String_Node_Str",item.getFile().getAbsolutePath());
  intent.putExtra("String_Node_Str","String_Node_Str");
  if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N_MR1) {
    ShortcutInfo shortcut=new ShortcutInfo.Builder(this,item.getFullPathToParent()).setShortLabel(item.toString()).setLongLabel(item.getFullPathToParent() + item.toString()).setIcon(Icon.createWithResource(this,R.drawable.ic_launcher)).setIntent(intent.setAction("String_Node_Str")).build();
    List<ShortcutInfo> shortcuts=shortcutManager.getDynamicShortcuts();
    if (shortcuts.size() >= shortcutManager.getMaxShortcutCountPerActivity() && shortcuts.size() > 0) {
      shortcuts.remove(shortcuts.size() - 1);
      shortcuts.add(0,shortcut);
      shortcutManager.setDynamicShortcuts(shortcuts);
    }
 else {
      shortcutManager.addDynamicShortcuts(Collections.singletonList(shortcut));
    }
  }
  startActivityForResult(intent,PgpHandler.REQUEST_CODE_DECRYPT_AND_VERIFY);
}
Program: 3575
Project: 3575
Buggy source:
@Override public void onClick(View v){
  setPreferences();
  EditText editText=(EditText)view.findViewById(R.id.passwordText);
  editText.setText(pwgen.generate(callingActivity.getApplicationContext()).get(0));
}

Fixed version (ground truth):
@Override public void onClick(View v){
  setPreferences();
  TextView textView=(TextView)view.findViewById(R.id.passwordText);
  textView.setText(pwgen.generate(callingActivity.getApplicationContext()).get(0));
}
Program: 3576
Project: 3576
Buggy source:
@Override public void onShow(DialogInterface dialog){
  setPreferences();
  EditText editText=(EditText)view.findViewById(R.id.passwordText);
  editText.setText(pwgen.generate(getActivity().getApplicationContext()).get(0));
  Button b=ad.getButton(AlertDialog.BUTTON_NEUTRAL);
  b.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      setPreferences();
      EditText editText=(EditText)view.findViewById(R.id.passwordText);
      editText.setText(pwgen.generate(callingActivity.getApplicationContext()).get(0));
    }
  }
);
}

Fixed version (ground truth):
@Override public void onShow(DialogInterface dialog){
  setPreferences();
  TextView textView=(TextView)view.findViewById(R.id.passwordText);
  textView.setText(pwgen.generate(getActivity().getApplicationContext()).get(0));
  Button b=ad.getButton(AlertDialog.BUTTON_NEUTRAL);
  b.setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      setPreferences();
      TextView textView=(TextView)view.findViewById(R.id.passwordText);
      textView.setText(pwgen.generate(callingActivity.getApplicationContext()).get(0));
    }
  }
);
}
Program: 3577
Project: 3577
Buggy source:
public void onClick(DialogInterface dialog,int whichButton){
  settings.edit().putBoolean("String_Node_Str",false).apply();
switch (operation) {
case NEW_REPO_BUTTON:
    initializeRepositoryInfo();
  break;
case CLONE_REPO_BUTTON:
Intent intent=new Intent(activity,GitActivity.class);
intent.putExtra("String_Node_Str",GitActivity.REQUEST_CLONE);
startActivityForResult(intent,GitActivity.REQUEST_CLONE);
break;
}
}

Fixed version (ground truth):
public void onClick(DialogInterface dialog,int whichButton){
  settings.edit().putBoolean("String_Node_Str",false).apply();
switch (operation) {
case NEW_REPO_BUTTON:
    initializeRepositoryInfo();
  break;
case CLONE_REPO_BUTTON:
PasswordRepository.initialize(PasswordStore.this);
Intent intent=new Intent(activity,GitActivity.class);
intent.putExtra("String_Node_Str",GitActivity.REQUEST_CLONE);
startActivityForResult(intent,GitActivity.REQUEST_CLONE);
break;
}
}
Program: 3578
Project: 3578
Buggy source:
protected void initRepository(final int operation){
  new AlertDialog.Builder(this).setTitle("String_Node_Str").setMessage("String_Node_Str").setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int whichButton){
      settings.edit().putBoolean("String_Node_Str",true).apply();
      if (settings.getString("String_Node_Str",null) == null) {
        Intent intent=new Intent(activity,UserPreference.class);
        intent.putExtra("String_Node_Str","String_Node_Str");
        startActivityForResult(intent,operation);
      }
 else {
        PasswordRepository.closeRepository();
        checkLocalRepository();
      }
    }
  }
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int whichButton){
      settings.edit().putBoolean("String_Node_Str",false).apply();
switch (operation) {
case NEW_REPO_BUTTON:
        initializeRepositoryInfo();
      break;
case CLONE_REPO_BUTTON:
    Intent intent=new Intent(activity,GitActivity.class);
  intent.putExtra("String_Node_Str",GitActivity.REQUEST_CLONE);
startActivityForResult(intent,GitActivity.REQUEST_CLONE);
break;
}
}
}
).show();
}

Fixed version (ground truth):
protected void initRepository(final int operation){
  PasswordRepository.closeRepository();
  new AlertDialog.Builder(this).setTitle("String_Node_Str").setMessage("String_Node_Str").setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int whichButton){
      settings.edit().putBoolean("String_Node_Str",true).apply();
      if (settings.getString("String_Node_Str",null) == null) {
        Intent intent=new Intent(activity,UserPreference.class);
        intent.putExtra("String_Node_Str","String_Node_Str");
        startActivityForResult(intent,operation);
      }
 else {
switch (operation) {
case NEW_REPO_BUTTON:
          initializeRepositoryInfo();
        break;
case CLONE_REPO_BUTTON:
      PasswordRepository.initialize(PasswordStore.this);
    Intent intent=new Intent(activity,GitActivity.class);
  intent.putExtra("String_Node_Str",GitActivity.REQUEST_CLONE);
startActivityForResult(intent,GitActivity.REQUEST_CLONE);
break;
}
}
}
}
).setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
public void onClick(DialogInterface dialog,int whichButton){
settings.edit().putBoolean("String_Node_Str",false).apply();
switch (operation) {
case NEW_REPO_BUTTON:
initializeRepositoryInfo();
break;
case CLONE_REPO_BUTTON:
PasswordRepository.initialize(PasswordStore.this);
Intent intent=new Intent(activity,GitActivity.class);
intent.putExtra("String_Node_Str",GitActivity.REQUEST_CLONE);
startActivityForResult(intent,GitActivity.REQUEST_CLONE);
break;
}
}
}
).show();
}
Program: 3579
Project: 3579
Buggy source:
private void createRepository(){
  File localDir=PasswordRepository.getWorkTree();
  localDir.mkdir();
  try {
    PasswordRepository.createRepository(localDir);
    new File(localDir.getAbsolutePath() + "String_Node_Str").createNewFile();
    settings.edit().putBoolean("String_Node_Str",true).apply();
  }
 catch (  Exception e) {
    e.printStackTrace();
    localDir.delete();
    return;
  }
  checkLocalRepository();
}

Fixed version (ground truth):
private void createRepository(){
  if (!PasswordRepository.isInitialized()) {
    PasswordRepository.initialize(this);
  }
  File localDir=PasswordRepository.getWorkTree();
  localDir.mkdir();
  try {
    PasswordRepository.createRepository(localDir);
    new File(localDir.getAbsolutePath() + "String_Node_Str").createNewFile();
    settings.edit().putBoolean("String_Node_Str",true).apply();
  }
 catch (  Exception e) {
    e.printStackTrace();
    localDir.delete();
    return;
  }
  checkLocalRepository();
}
Program: 3580
Project: 3580
Buggy source:
@Override protected void configure(OpenSshConfig.Host hc,Session session){
  session.setConfig("String_Node_Str","String_Node_Str");
  CredentialsProvider provider=new CredentialsProvider(){
    @Override public boolean isInteractive(){
      return false;
    }
    @Override public boolean supports(    CredentialItem... items){
      return true;
    }
    @Override public boolean get(    URIish uri,    CredentialItem... items) throws UnsupportedCredentialItem {
      for (      CredentialItem item : items) {
        if (item instanceof CredentialItem.Username) {
          ((CredentialItem.Username)item).setValue(username);
          continue;
        }
        if (item instanceof CredentialItem.StringType) {
          ((CredentialItem.StringType)item).setValue(passphrase);
        }
      }
      return true;
    }
  }
;
  UserInfo userInfo=new CredentialsProviderUserInfo(session,provider);
  session.setUserInfo(userInfo);
}

Fixed version (ground truth):
@Override protected void configure(OpenSshConfig.Host hc,Session session){
  session.setConfig("String_Node_Str","String_Node_Str");
  session.setConfig("String_Node_Str","String_Node_Str");
  CredentialsProvider provider=new CredentialsProvider(){
    @Override public boolean isInteractive(){
      return false;
    }
    @Override public boolean supports(    CredentialItem... items){
      return true;
    }
    @Override public boolean get(    URIish uri,    CredentialItem... items) throws UnsupportedCredentialItem {
      for (      CredentialItem item : items) {
        if (item instanceof CredentialItem.Username) {
          ((CredentialItem.Username)item).setValue(username);
          continue;
        }
        if (item instanceof CredentialItem.StringType) {
          ((CredentialItem.StringType)item).setValue(passphrase);
        }
      }
      return true;
    }
  }
;
  UserInfo userInfo=new CredentialsProviderUserInfo(session,provider);
  session.setUserInfo(userInfo);
}
Program: 3581
Project: 3581
Buggy source:
public void cloneOperation(UsernamePasswordCredentialsProvider provider){
  saveConfiguration(null);
  CloneCommand cmd=Git.cloneRepository().setCredentialsProvider(provider).setCloneAllBranches(true).setDirectory(localDir).setURI(hostname);
  new GitAsyncTask(activity,true,false,CloneCommand.class).execute(cmd);
}

Fixed version (ground truth):
public void cloneOperation(UsernamePasswordCredentialsProvider provider){
  SharedPreferences.Editor editor=settings.edit();
  editor.putString("String_Node_Str",((EditText)findViewById(R.id.server_url)).getText().toString());
  editor.putString("String_Node_Str",((EditText)findViewById(R.id.server_path)).getText().toString());
  editor.putString("String_Node_Str",((EditText)findViewById(R.id.server_user)).getText().toString());
  editor.putString("String_Node_Str",protocol);
  editor.putString("String_Node_Str",connectionMode);
  editor.putString("String_Node_Str",port);
  editor.commit();
  CloneCommand cmd=Git.cloneRepository().setCredentialsProvider(provider).setCloneAllBranches(true).setDirectory(localDir).setURI(hostname);
  new GitAsyncTask(activity,true,false,CloneCommand.class).execute(cmd);
}
Program: 3582
Project: 3582
Buggy source:
@Override public void onBound(IOpenPgpService service){
  Log.i("String_Node_Str","String_Node_Str");
  Bundle extra=getIntent().getExtras();
  if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    setContentView(R.layout.decrypt_layout);
    ((TextView)findViewById(R.id.crypto_password_file)).setText(extra.getString("String_Node_Str"));
    String cat=new File(extra.getString("String_Node_Str").replace(PasswordRepository.getWorkTree().getAbsolutePath(),"String_Node_Str")).getParentFile().getName();
    ((TextView)findViewById(R.id.crypto_password_category)).setText(cat + "String_Node_Str");
    decryptAndVerify(new Intent());
  }
 else   if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    bindingDialog.dismiss();
    setContentView(R.layout.encrypt_layout);
    String cat=extra.getString("String_Node_Str");
    cat=cat.replace(PasswordRepository.getWorkTree().getAbsolutePath(),"String_Node_Str");
    cat=cat + "String_Node_Str";
    ((TextView)findViewById(R.id.crypto_password_category)).setText(cat);
  }
 else   if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    bindingDialog.dismiss();
    getKeyIds(new Intent());
  }
}

Fixed version (ground truth):
@Override public void onBound(IOpenPgpService service){
  Log.i("String_Node_Str","String_Node_Str");
  Bundle extra=getIntent().getExtras();
  if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    setContentView(R.layout.decrypt_layout);
    ((TextView)findViewById(R.id.crypto_password_file)).setText(extra.getString("String_Node_Str"));
    String cat=new File(extra.getString("String_Node_Str").replace(PasswordRepository.getWorkTree().getAbsolutePath(),"String_Node_Str")).getParentFile().getName();
    ((TextView)findViewById(R.id.crypto_password_category)).setText(cat + "String_Node_Str");
    decryptAndVerify(new Intent());
  }
 else   if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    setContentView(R.layout.encrypt_layout);
    String cat=extra.getString("String_Node_Str");
    cat=cat.replace(PasswordRepository.getWorkTree().getAbsolutePath(),"String_Node_Str");
    cat=cat + "String_Node_Str";
    ((TextView)findViewById(R.id.crypto_password_category)).setText(cat);
  }
 else   if (extra.getString("String_Node_Str").equals("String_Node_Str")) {
    getKeyIds(new Intent());
  }
}
Program: 3583
Project: 3583
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  this.activity=this;
  this.clipboard=(ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
  settings=PreferenceManager.getDefaultSharedPreferences(this);
  String providerPackageName=settings.getString("String_Node_Str","String_Node_Str");
  accountName=settings.getString("String_Node_Str","String_Node_Str");
  keyIDs=settings.getString("String_Node_Str","String_Node_Str");
  registered=false;
  if (TextUtils.isEmpty(providerPackageName)) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    Intent intent=new Intent(this,UserPreference.class);
    startActivity(intent);
    setResult(RESULT_CANCELED);
    finish();
  }
 else {
    mServiceConnection=new OpenPgpServiceConnection(PgpHandler.this,providerPackageName,this);
    mServiceConnection.bindToService();
    bindingDialog=new ProgressDialog(this);
    bindingDialog.setMessage("String_Node_Str");
    bindingDialog.setCancelable(false);
    bindingDialog.show();
    registered=true;
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  }
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  this.activity=this;
  this.clipboard=(ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
  settings=PreferenceManager.getDefaultSharedPreferences(this);
  String providerPackageName=settings.getString("String_Node_Str","String_Node_Str");
  accountName=settings.getString("String_Node_Str","String_Node_Str");
  keyIDs=settings.getString("String_Node_Str","String_Node_Str");
  registered=false;
  if (TextUtils.isEmpty(providerPackageName)) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    Intent intent=new Intent(this,UserPreference.class);
    startActivity(intent);
    setResult(RESULT_CANCELED);
    finish();
  }
 else {
    mServiceConnection=new OpenPgpServiceConnection(PgpHandler.this,providerPackageName,this);
    mServiceConnection.bindToService();
    registered=true;
    getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  }
}
Program: 3584
Project: 3584
Buggy source:
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  Log.d(Constants.TAG,"String_Node_Str" + resultCode);
  if (resultCode == RESULT_OK) {
switch (requestCode) {
case REQUEST_CODE_ENCRYPT:
{
        encrypt(data);
        break;
      }
case REQUEST_CODE_DECRYPT_AND_VERIFY:
{
      decryptAndVerify(data);
      break;
    }
case REQUEST_CODE_GET_KEY_IDS:
  getKeyIds(data);
break;
}
}
 else if (resultCode == RESULT_CANCELED) {
bindingDialog.dismiss();
setResult(RESULT_CANCELED,data);
finish();
}
}

Fixed version (ground truth):
@Override protected void onActivityResult(int requestCode,int resultCode,Intent data){
  super.onActivityResult(requestCode,resultCode,data);
  Log.d(Constants.TAG,"String_Node_Str" + resultCode);
  if (resultCode == RESULT_OK) {
switch (requestCode) {
case REQUEST_CODE_ENCRYPT:
{
        encrypt(data);
        break;
      }
case REQUEST_CODE_DECRYPT_AND_VERIFY:
{
      decryptAndVerify(data);
      break;
    }
case REQUEST_CODE_GET_KEY_IDS:
  getKeyIds(data);
break;
}
}
 else if (resultCode == RESULT_CANCELED) {
setResult(RESULT_CANCELED,data);
finish();
}
}