nus-yam/ex-repair huggingface dataset:
Program: 80195
Project: 80195
Buggy source:
/** 
 * Create a BackingStoreHashtable which contains all rows that qualify for the described scan.
 */
public BackingStoreHashtable createBackingStoreHashtableFromScan(long conglomId,int open_mode,int lock_level,int isolation_level,FormatableBitSet scanColumnList,DataValueDescriptor[] startKeyValue,int startSearchOperator,Qualifier qualifier[][],DataValueDescriptor[] stopKeyValue,int stopSearchOperator,long max_rowcnt,int[] key_column_numbers,boolean remove_duplicates,long estimated_rowcnt,long max_inmemory_rowcnt,int initialCapacity,float loadFactor,boolean collect_runtimestats,boolean skipNullKeyColumns) throws StandardException {
  return (new BackingStoreHashTableFromScan(this,conglomId,open_mode,lock_level,isolation_level,scanColumnList,startKeyValue,startSearchOperator,qualifier,stopKeyValue,stopSearchOperator,max_rowcnt,key_column_numbers,remove_duplicates,estimated_rowcnt,max_inmemory_rowcnt,initialCapacity,loadFactor,collect_runtimestats,skipNullKeyColumns));
}

Fixed version (ground truth):
/** 
 * Create a BackingStoreHashtable which contains all rows that qualify for the described scan.
 */
public BackingStoreHashtable createBackingStoreHashtableFromScan(long conglomId,int open_mode,int lock_level,int isolation_level,FormatableBitSet scanColumnList,DataValueDescriptor[] startKeyValue,int startSearchOperator,Qualifier qualifier[][],DataValueDescriptor[] stopKeyValue,int stopSearchOperator,long max_rowcnt,int[] key_column_numbers,boolean remove_duplicates,long estimated_rowcnt,long max_inmemory_rowcnt,int initialCapacity,float loadFactor,boolean collect_runtimestats,boolean skipNullKeyColumns,boolean keepAfterCommit) throws StandardException {
  return (new BackingStoreHashTableFromScan(this,conglomId,open_mode,lock_level,isolation_level,scanColumnList,startKeyValue,startSearchOperator,qualifier,stopKeyValue,stopSearchOperator,max_rowcnt,key_column_numbers,remove_duplicates,estimated_rowcnt,max_inmemory_rowcnt,initialCapacity,loadFactor,collect_runtimestats,skipNullKeyColumns,keepAfterCommit));
}
Program: 80196
Project: 80196
Buggy source:
public BackingStoreHashtable createBackingStoreHashtableFromScan(long conglomId,int open_mode,int lock_level,int isolation_level,FormatableBitSet scanColumnList,DataValueDescriptor[] startKeyValue,int startSearchOperator,Qualifier[][] qualifier,DataValueDescriptor[] stopKeyValue,int stopSearchOperator,long max_rowcnt,int[] key_column_numbers,boolean remove_duplicates,long estimated_rowcnt,long max_inmemory_rowcnt,int initialCapacity,float loadFactor,boolean collect_runtimestats,boolean skipNullKeyColumns) throws StandardException {
  return null;
}

Fixed version (ground truth):
public BackingStoreHashtable createBackingStoreHashtableFromScan(long conglomId,int open_mode,int lock_level,int isolation_level,FormatableBitSet scanColumnList,DataValueDescriptor[] startKeyValue,int startSearchOperator,Qualifier[][] qualifier,DataValueDescriptor[] stopKeyValue,int stopSearchOperator,long max_rowcnt,int[] key_column_numbers,boolean remove_duplicates,long estimated_rowcnt,long max_inmemory_rowcnt,int initialCapacity,float loadFactor,boolean collect_runtimestats,boolean skipNullKeyColumns,boolean keepAfterCommit) throws StandardException {
  return null;
}
Program: 80197
Project: 80197
Buggy source:
/** 
 * Create an <code>InputStream</code> for reading the <code>Clob</code> value represented by the given locator based <code>Clob</code> object.
 * @param connection connection to be used to read the<code>Clob</code> value from the server
 * @param clob <code>Clob</code> object that contains locator forthe <code>Clob</code> value on the server.
 */
public ClobLocatorInputStream(Connection connection,Clob clob){
  SanityManager.ASSERT(clob.isLocator());
  this.connection=connection;
  this.clob=clob;
}

Fixed version (ground truth):
/** 
 * Create an <code>InputStream</code> for reading the <code>Clob</code> value represented by the given locator based <code>Clob</code> object.
 * @param connection connection to be used to read the<code>Clob</code> value from the server
 * @param clob <code>Clob</code> object that contains locator forthe <code>Clob</code> value on the server.
 */
public ClobLocatorInputStream(Connection connection,Clob clob){
  if (SanityManager.DEBUG) {
    SanityManager.ASSERT(clob.isLocator());
  }
  this.connection=connection;
  this.clob=clob;
}
Program: 80198
Project: 80198
Buggy source:
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char2);
}

Fixed version (ground truth):
/** 
 * @see SQLChar#stringCompare(SQLChar,SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char1,char2);
}
Program: 80199
Project: 80199
Buggy source:
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char2);
}

Fixed version (ground truth):
/** 
 * @see SQLChar#stringCompare(SQLChar,SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char1,char2);
}
Program: 80200
Project: 80200
Buggy source:
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char2);
}

Fixed version (ground truth):
/** 
 * @see SQLChar#stringCompare(SQLChar,SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char1,char2);
}
Program: 80201
Project: 80201
Buggy source:
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char2);
}

Fixed version (ground truth):
/** 
 * @see SQLChar#stringCompare(SQLChar,SQLChar) 
 */
protected int stringCompare(SQLChar char1,SQLChar char2) throws StandardException {
  return holderForCollationSensitiveInfo.stringCompare(char1,char2);
}
Program: 80202
Project: 80202
Buggy source:
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar str2) throws StandardException {
  CollationKey ckey1=stringData.getCollationKey();
  CollationKey ckey2=str2.getCollationKey();
  if (ckey1 == null || ckey2 == null) {
    if (ckey1 != null)     return -1;
    if (ckey2 != null)     return 1;
    return 0;
  }
  return ckey1.compareTo(ckey2);
}

Fixed version (ground truth):
/** 
 * @see SQLChar.stringCompare(SQLChar, SQLChar) 
 */
protected int stringCompare(SQLChar str1,SQLChar str2) throws StandardException {
  CollationKey ckey1=str1.getCollationKey();
  CollationKey ckey2=str2.getCollationKey();
  if (ckey1 == null || ckey2 == null) {
    if (ckey1 != null)     return -1;
    if (ckey2 != null)     return 1;
    return 0;
  }
  return ckey1.compareTo(ckey2);
}
Program: 80203
Project: 80203
Buggy source:
/** 
 * Test order by with default collation
 * @throws SQLException
 */
public void testDefaultCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  checkLangBasedQuery(ds,new String[][]{{"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"}});
}

Fixed version (ground truth):
/** 
 * Test order by with default collation
 * @throws SQLException
 */
public void testDefaultCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  setUpTable(ds);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  checkLangBasedQuery(ds,"String_Node_Str",null);
  checkLangBasedQuery(ds,"String_Node_Str",null);
  dropTable(ds);
}
Program: 80204
Project: 80204
Buggy source:
/** 
 * sort customers by 
 * @param ds
 * @param expectedResult
 * @throws SQLException
 */
private void checkLangBasedQuery(DataSource ds,String[][] expectedResult) throws SQLException {
  Connection conn=ds.getConnection();
  Statement s=conn.createStatement();
  s.execute("String_Node_Str");
  conn.setAutoCommit(false);
  PreparedStatement ps=conn.prepareStatement("String_Node_Str");
  for (int i=0; i < NAMES.length; i++) {
    ps.setInt(1,i);
    ps.setString(2,NAMES[i]);
    ps.executeUpdate();
  }
  ResultSet rs=s.executeQuery("String_Node_Str");
  JDBC.assertFullResultSet(rs,expectedResult);
  s.execute("String_Node_Str");
  conn.commit();
  ps.close();
}

Fixed version (ground truth):
/** 
 * sort customers by 
 * @param ds
 * @param expectedResult Null for this means that the passed query is expected to return an empty resultset. If not empty, then the resultset from the query should match this paramter
 * @throws SQLException
 */
private void checkLangBasedQuery(DataSource ds,String query,String[][] expectedResult) throws SQLException {
  Connection conn=ds.getConnection();
  conn.setAutoCommit(false);
  Statement s=conn.createStatement();
  ResultSet rs=s.executeQuery(query);
  if (expectedResult == null)   JDBC.assertEmpty(rs);
 else   JDBC.assertFullResultSet(rs,expectedResult);
  s.close();
  conn.commit();
}
Program: 80205
Project: 80205
Buggy source:
/** 
 * Test order by with English collation
 * @throws SQLException
 */
public void testEnglishCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  checkLangBasedQuery(ds,new String[][]{{"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"}});
}

Fixed version (ground truth):
/** 
 * Test order by with English collation
 * @throws SQLException
 */
public void testEnglishCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  setUpTable(ds);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  checkLangBasedQuery(ds,"String_Node_Str",null);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  dropTable(ds);
}
Program: 80206
Project: 80206
Buggy source:
/** 
 * Test order by with polish collation
 * @throws SQLException
 */
public void testPolishCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  checkLangBasedQuery(ds,new String[][]{{"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"}});
}

Fixed version (ground truth):
/** 
 * Test order by with polish collation
 * @throws SQLException
 */
public void testPolishCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  setUpTable(ds);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  checkLangBasedQuery(ds,"String_Node_Str",null);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  dropTable(ds);
}
Program: 80207
Project: 80207
Buggy source:
/** 
 * Test order by with Norwegian collation
 * @throws SQLException
 */
public void testNorwayCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  checkLangBasedQuery(ds,new String[][]{{"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"}});
}

Fixed version (ground truth):
/** 
 * Test order by with Norwegian collation
 * @throws SQLException
 */
public void testNorwayCollation() throws SQLException {
  DataSource ds=JDBCDataSource.getDataSourceLogical("String_Node_Str");
  JDBCDataSource.setBeanProperty(ds,"String_Node_Str","String_Node_Str");
  setUpTable(ds);
  checkLangBasedQuery(ds,"String_Node_Str",new String[][]{{"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"}});
  checkLangBasedQuery(ds,"String_Node_Str",null);
  checkLangBasedQuery(ds,"String_Node_Str",null);
  dropTable(ds);
}
Program: 80208
Project: 80208
Buggy source:
/** 
 * Create an <code>InputStream</code> for reading the <code>Blob</code> value represented by the given locator based <code>Blob</code> object.
 * @param connection connection to be used to read the<code>Blob</code> value from the server
 * @param blob <code>Blob</code> object that contains locator forthe <code>Blob</code> value on the server.
 * @param offset the offset in the <code>Blob</code> of the firstbyte to read.  
 * @param length the maximum number of bytes to read fromthe <code>Blob</code>.
 * @throws SqlException if an error occurs when obtaining thelength of the <code>Blob</code>.
 */
public BlobLocatorInputStream(Connection connection,Blob blob,long position,long length) throws SqlException {
  SanityManager.ASSERT(blob.isLocator());
  this.connection=connection;
  this.blob=blob;
  this.currentPos=position;
  this.maxPos=Math.min(blob.sqlLength(),position + length - 1);
}

Fixed version (ground truth):
/** 
 * Create an <code>InputStream</code> for reading the <code>Blob</code> value represented by the given locator based <code>Blob</code> object.
 * @param connection connection to be used to read the<code>Blob</code> value from the server
 * @param blob <code>Blob</code> object that contains locator forthe <code>Blob</code> value on the server.
 * @param position the position in the <code>Blob</code> of the firstbyte to read.  
 * @param length the maximum number of bytes to read fromthe <code>Blob</code>.
 * @throws SqlException if an error occurs when obtaining thelength of the <code>Blob</code>.
 */
public BlobLocatorInputStream(Connection connection,Blob blob,long position,long length) throws SqlException {
  SanityManager.ASSERT(blob.isLocator());
  this.connection=connection;
  this.blob=blob;
  this.currentPos=position;
  this.maxPos=Math.min(blob.sqlLength(),position + length - 1);
}
Program: 80209
Project: 80209
Buggy source:
/** 
 * Create an <code>InputStream</code> for reading the <code>Blob</code> value represented by the given locator based <code>Blob</code> object.
 * @param connection connection to be used to read the<code>Blob</code> value from the server
 * @param blob <code>Blob</code> object that contains locator forthe <code>Blob</code> value on the server.
 */
public BlobLocatorInputStream(Connection connection,Blob blob){
  SanityManager.ASSERT(blob.isLocator());
  this.connection=connection;
  this.blob=blob;
}

Fixed version (ground truth):
/** 
 * Create an <code>InputStream</code> for reading the <code>Blob</code> value represented by the given locator based <code>Blob</code> object.
 * @param connection connection to be used to read the<code>Blob</code> value from the server
 * @param blob <code>Blob</code> object that contains locator forthe <code>Blob</code> value on the server.
 */
public BlobLocatorInputStream(Connection connection,Blob blob){
  if (SanityManager.DEBUG) {
    SanityManager.ASSERT(blob.isLocator());
  }
  this.connection=connection;
  this.blob=blob;
}
Program: 80210
Project: 80210
Buggy source:
/** 
 * Generate the code necessary to produce a SQL value based on a value.  The value's type is assumed to match the type of this TypeId.  For example, a TypeId for the SQL int type should be given an value that evaluates to a Java int or Integer. If the type of the value is incorrect, the generated code will not work. The stack must contain data value factory value.
 * @param mb	The method to put the expression in
 * @param collationType For character DVDs, this will be used to determinewhat Collator should be associated with the DVD which in turn will  decide whether to generate CollatorSQLcharDVDs or SQLcharDVDs. For  other types of DVDs, this parameter will be ignored.
 * @param className name of the base class of the activation's hierarchy
 * @param field LocalField
 */
void generateDataValue(MethodBuilder eb,int collationType,String className,LocalField field);

Fixed version (ground truth):
/** 
 * Generate the code necessary to produce a SQL value based on a value.  The value's type is assumed to match the type of this TypeId.  For example, a TypeId for the SQL int type should be given an value that evaluates to a Java int or Integer. If the type of the value is incorrect, the generated code will not work. The stack must contain data value factory value.
 * @param eb	The method to put the expression in
 * @param collationType For character DVDs, this will be used to determinewhat Collator should be associated with the DVD which in turn will  decide whether to generate CollatorSQLcharDVDs or SQLcharDVDs. For  other types of DVDs, this parameter will be ignored.
 * @param className name of the base class of the activation's hierarchy
 * @param field LocalField
 */
void generateDataValue(MethodBuilder eb,int collationType,String className,LocalField field);
Program: 80213
Project: 80213
Buggy source:
/** 
 * See if a string matches the pattern as defined by DatabaseMetaData. By passing in non-zero values can check sub-sets of the pattern against the sub strings of the result. <BR> _ matches a single character <BR> % matches zero or more characters <BR> Other characters match themselves.
 * @param pattern Pattern
 * @param pp Position in pattern to start the actual pattern from
 * @param result result string
 * @param rp position in result to starting checking
 * @return
 */
private boolean doesMatch(String pattern,int pp,String result,int rp){
  for (; ; ) {
    if (pp == pattern.length() && rp == result.length())     return true;
    if (pp == pattern.length())     return false;
    char pc=pattern.charAt(pp);
    if (pc == '_') {
      if (rp == result.length())       return false;
      pp++;
      rp++;
    }
 else     if (pc == '%') {
      if (pp == pattern.length() - 1) {
        return true;
      }
      for (int sp=rp; sp < result.length(); sp++) {
        if (doesMatch(pattern,pp + 1,result,sp)) {
          return true;
        }
      }
      return false;
    }
 else {
      if (rp == result.length())       return false;
      if (pc != result.charAt(rp)) {
        return false;
      }
      pp++;
      rp++;
    }
  }
}

Fixed version (ground truth):
/** 
 * See if a string matches the pattern as defined by DatabaseMetaData. By passing in non-zero values can check sub-sets of the pattern against the sub strings of the result. <BR> _ matches a single character <BR> % matches zero or more characters <BR> Other characters match themselves.
 * @param pattern Pattern
 * @param pp Position in pattern to start the actual pattern from
 * @param result result string
 * @param rp position in result to starting checking
 * @return true if a match is found
 */
private boolean doesMatch(String pattern,int pp,String result,int rp){
  for (; ; ) {
    if (pp == pattern.length() && rp == result.length())     return true;
    if (pp == pattern.length())     return false;
    char pc=pattern.charAt(pp);
    if (pc == '_') {
      if (rp == result.length())       return false;
      pp++;
      rp++;
    }
 else     if (pc == '%') {
      if (pp == pattern.length() - 1) {
        return true;
      }
      for (int sp=rp; sp < result.length(); sp++) {
        if (doesMatch(pattern,pp + 1,result,sp)) {
          return true;
        }
      }
      return false;
    }
 else {
      if (rp == result.length())       return false;
      if (pc != result.charAt(rp)) {
        return false;
      }
      pp++;
      rp++;
    }
  }
}
Program: 80214
Project: 80214
Buggy source:
/** 
 * Return the identifiers used to create schemas, tables etc. in the order the database stores them.
 * @return
 */
private String[] getSortedIdentifiers(){
  String[] dbIDS=new String[IDS.length];
  for (int i=0; i < IDS.length; i++) {
    dbIDS[i]=getStoredIdentifier(IDS[i]);
  }
  Arrays.sort(dbIDS);
  return dbIDS;
}

Fixed version (ground truth):
/** 
 * Return the identifiers used to create schemas, tables etc. in the order the database stores them.
 */
private String[] getSortedIdentifiers(){
  String[] dbIDS=new String[IDS.length];
  for (int i=0; i < IDS.length; i++) {
    dbIDS[i]=getStoredIdentifier(IDS[i]);
  }
  Arrays.sort(dbIDS);
  return dbIDS;
}
Program: 80215
Project: 80215
Buggy source:
/** 
 * Assert that a user has procedure execute privilege on a given table / column
 * @param hasPrivilege whether or not the user has the privilege
 * @param user the user to check
 * @param schema the schema to check
 * @param table the table to check
 * @throws SQLException throws all exceptions
 */
public void assertProcedurePrivilege(boolean hasPrivilege,String user,String schema,String procedure) throws SQLException {
  Connection c=openUserConnection(user);
  String procedurecall="String_Node_Str" + schema + "String_Node_Str"+ procedure+ "String_Node_Str";
  PreparedStatement ps=c.prepareStatement(procedurecall);
  ResultSet rs=null;
  try {
    ps.execute();
    rs=ps.getResultSet();
  }
 catch (  SQLException e) {
    if (!hasPrivilege)     assertSQLState("String_Node_Str",e);
 else {
      e.printStackTrace();
      fail("String_Node_Str");
    }
  }
  ps.close();
  if (rs != null) {
    rs.close();
  }
}

Fixed version (ground truth):
/** 
 * Assert that a user has procedure execute privilege on a given table / column
 * @param hasPrivilege whether or not the user has the privilege
 * @param user the user to check
 * @param schema the schema to check
 * @param procedure the name of the procedure to check
 * @throws SQLException throws all exceptions
 */
public void assertProcedurePrivilege(boolean hasPrivilege,String user,String schema,String procedure) throws SQLException {
  Connection c=openUserConnection(user);
  String procedurecall="String_Node_Str" + schema + "String_Node_Str"+ procedure+ "String_Node_Str";
  PreparedStatement ps=c.prepareStatement(procedurecall);
  ResultSet rs=null;
  try {
    ps.execute();
    rs=ps.getResultSet();
  }
 catch (  SQLException e) {
    if (!hasPrivilege)     assertSQLState("String_Node_Str",e);
 else {
      e.printStackTrace();
      fail("String_Node_Str");
    }
  }
  ps.close();
  if (rs != null) {
    rs.close();
  }
}
Program: 80216
Project: 80216
Buggy source:
/** 
 * Most tests run in embedded only, since they are only checking DDL statements. Metadata methods test also runs in client/server mode.
 * @return
 */
public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTest(basesuite());
  suite.addTest(TestConfiguration.clientServerDecorator(new GrantRevokeTest("String_Node_Str")));
  return suite;
}

Fixed version (ground truth):
/** 
 * Most tests run in embedded only, since they are only checking DDL statements. Metadata methods test also runs in client/server mode.
 */
public static Test suite(){
  TestSuite suite=new TestSuite();
  suite.addTest(basesuite());
  suite.addTest(TestConfiguration.clientServerDecorator(new GrantRevokeTest("String_Node_Str")));
  return suite;
}
Program: 80217
Project: 80217
Buggy source:
/** 
 * Iterates over an array of row vectors, comparing each to the data in the RS using assertRow. Always closes the RS, even when an exception is thrown. Assertion failures are intercepted and 'dumpDiff' is used to print the differences between the RS and the expected values to System.err.
 * @param assertString a message from the caller
 * @param expected array of row vectors
 * @param returned the resultset to verify
 */
private static void assertResultSet(String message,Object[][] expected,ResultSet returned) throws Exception {
  int i=0;
  boolean moreRows=false;
  try {
    for (; i < expected.length && (moreRows=returned.next()); ++i) {
      assertRow(message + "String_Node_Str" + (i + 1)+ "String_Node_Str",expected[i],returned);
    }
    assertEquals(message + "String_Node_Str",expected.length,i);
    moreRows=returned.next();
    ++i;
    assertFalse(message + "String_Node_Str" + expected.length+ "String_Node_Str"+ i+ "String_Node_Str",moreRows);
  }
 catch (  junit.framework.AssertionFailedError af) {
    System.err.println(af);
    dumpDiff(expected,i,returned,moreRows,System.err);
    throw af;
  }
 finally {
    returned.close();
  }
}

Fixed version (ground truth):
/** 
 * Iterates over an array of row vectors, comparing each to the data in the RS using assertRow. Always closes the RS, even when an exception is thrown. Assertion failures are intercepted and 'dumpDiff' is used to print the differences between the RS and the expected values to System.err.
 * @param message a message from the caller
 * @param expected array of row vectors
 * @param returned the resultset to verify
 */
private static void assertResultSet(String message,Object[][] expected,ResultSet returned) throws Exception {
  int i=0;
  boolean moreRows=false;
  try {
    for (; i < expected.length && (moreRows=returned.next()); ++i) {
      assertRow(message + "String_Node_Str" + (i + 1)+ "String_Node_Str",expected[i],returned);
    }
    assertEquals(message + "String_Node_Str",expected.length,i);
    moreRows=returned.next();
    ++i;
    assertFalse(message + "String_Node_Str" + expected.length+ "String_Node_Str"+ i+ "String_Node_Str",moreRows);
  }
 catch (  junit.framework.AssertionFailedError af) {
    System.err.println(af);
    dumpDiff(expected,i,returned,moreRows,System.err);
    throw af;
  }
 finally {
    returned.close();
  }
}
Program: 80218
Project: 80218
Buggy source:
/** 
 * This method checks that the SQL type can be converted to Decimal
 * @param rs ResultSet
 * @param columnIndex Column Index
 * @return true if the SQL type is convertible to DECIMAL, false otherwise.
 * @throws SQLException
 */
protected static boolean canConvertToDecimal(int type) throws SQLException {
  boolean canConvert=false;
  for (int bdType=0; bdType < bdConvertibleTypes.length; bdType++) {
    if (type == bdConvertibleTypes[bdType]) {
      canConvert=true;
      break;
    }
  }
  return canConvert;
}

Fixed version (ground truth):
/** 
 * This method checks that the SQL type can be converted to Decimal
 * @param type the SQL type to check
 * @return true if the SQL type is convertible to DECIMAL, false otherwise.
 * @throws SQLException
 */
protected static boolean canConvertToDecimal(int type) throws SQLException {
  boolean canConvert=false;
  for (int bdType=0; bdType < bdConvertibleTypes.length; bdType++) {
    if (type == bdConvertibleTypes[bdType]) {
      canConvert=true;
      break;
    }
  }
  return canConvert;
}
Program: 80219
Project: 80219
Buggy source:
/** 
 * This method is a wrapper for the PreparedStatement method setObject(int parameterIndex, Object x) 
 * @param ps PreparedStatement 
 * @param parameterIndex Parameter Index
 * @param bdString String to be used in setObject method
 * @throws SQLException
 */
public static void setObjectString(PreparedStatement ps,int parameterIndex,String objectString) throws SQLException {
switch (representation) {
case BIGDECIMAL_REPRESENTATION:
    BigDecimal bd=(objectString == null) ? null : new BigDecimal(objectString);
  ps.setObject(parameterIndex,bd);
break;
case STRING_REPRESENTATION:
ps.setObject(parameterIndex,objectString);
break;
default :
new Exception("String_Node_Str").printStackTrace();
}
}

Fixed version (ground truth):
/** 
 * This method is a wrapper for the PreparedStatement method setObject(int parameterIndex, Object x) 
 * @param ps PreparedStatement 
 * @param parameterIndex Parameter Index
 * @param objectString String to be used in setObject method
 * @throws SQLException
 */
public static void setObjectString(PreparedStatement ps,int parameterIndex,String objectString) throws SQLException {
switch (representation) {
case BIGDECIMAL_REPRESENTATION:
    BigDecimal bd=(objectString == null) ? null : new BigDecimal(objectString);
  ps.setObject(parameterIndex,bd);
break;
case STRING_REPRESENTATION:
ps.setObject(parameterIndex,objectString);
break;
default :
new Exception("String_Node_Str").printStackTrace();
}
}
Program: 80220
Project: 80220
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80221
Project: 80221
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80222
Project: 80222
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80223
Project: 80223
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80224
Project: 80224
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80225
Project: 80225
Buggy source:
/** 
 * @param args
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}

Fixed version (ground truth):
/** 
 */
public void generateQueries(){
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
  queries.add("String_Node_Str");
}
Program: 80226
Project: 80226
Buggy source:
/** 
 * Prepare commonly used statement to insert a row.
 * @param con connection to database
 * @param colName name of the column to insert into
 */
private PreparedStatement prep(String colName) throws SQLException {
  return prepareStatement("String_Node_Str" + "String_Node_Str" + colName + "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Prepare commonly used statement to insert a row.
 * @param colName name of the column to insert into
 */
private PreparedStatement prep(String colName) throws SQLException {
  return prepareStatement("String_Node_Str" + "String_Node_Str" + colName + "String_Node_Str");
}
Program: 80227
Project: 80227
Buggy source:
/** 
 * Fetch the specified row for update.
 * @param con connection to database
 * @param colName name of the column to fetch
 * @param key identifier for row to fetch
 * @return a <code>ResultSet</code> with zero or one row, depending onthe key used
 */
private ResultSet fetchUpd(String colName,int key) throws SQLException {
  Statement stmt=createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE);
  return stmt.executeQuery("String_Node_Str" + colName + "String_Node_Str"+ key+ "String_Node_Str");
}

Fixed version (ground truth):
/** 
 * Fetch the specified row for update.
 * @param colName name of the column to fetch
 * @param key identifier for row to fetch
 * @return a <code>ResultSet</code> with zero or one row, depending onthe key used
 */
private ResultSet fetchUpd(String colName,int key) throws SQLException {
  Statement stmt=createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_UPDATABLE);
  return stmt.executeQuery("String_Node_Str" + colName + "String_Node_Str"+ key+ "String_Node_Str");
}
Program: 80228
Project: 80228
Buggy source:
/** 
 * Fetch the specified row.
 * @param con connection to database
 * @param colName name of the column to fetch
 * @param key identifier for row to fetch
 * @return a <code>ResultSet</code> with zero or one row, depending onthe key used
 */
private ResultSet fetch(String colName,int key) throws SQLException {
  Statement stmt=createStatement();
  return stmt.executeQuery("String_Node_Str" + colName + "String_Node_Str"+ key);
}

Fixed version (ground truth):
/** 
 * Fetch the specified row.
 * @param colName name of the column to fetch
 * @param key identifier for row to fetch
 * @return a <code>ResultSet</code> with zero or one row, depending onthe key used
 */
private ResultSet fetch(String colName,int key) throws SQLException {
  Statement stmt=createStatement();
  return stmt.executeQuery("String_Node_Str" + colName + "String_Node_Str"+ key);
}
Program: 80229
Project: 80229
Buggy source:
/** 
 * Resets the size.
 * @param size new size should be smaller than exisiting size
 * @throws IOException , SQLException
 */
synchronized void truncate(long size) throws IOException, SQLException {
  isValidPostion(size);
  if (isBytes) {
    byte[] tmpByte=new byte[(int)size];
    System.arraycopy(dataBytes,0,tmpByte,0,(int)size);
  }
 else {
    if (size < Integer.MAX_VALUE && size < MAX_BUF_SIZE) {
      dataBytes=new byte[(int)size];
      read(dataBytes,0);
      isBytes=true;
      tmpFile.close();
      tmpFile=null;
    }
 else     tmpFile.setLength(size);
  }
}

Fixed version (ground truth):
/** 
 * Resets the size.
 * @param size new size should be smaller than exisiting size
 * @throws IOException , SQLException
 */
synchronized void truncate(long size) throws IOException, SQLException {
  isValidPostion(size);
  if (isBytes) {
    byte[] tmpByte=new byte[(int)size];
    System.arraycopy(dataBytes,0,tmpByte,0,(int)size);
    dataBytes=tmpByte;
  }
 else {
    if (size < Integer.MAX_VALUE && size < MAX_BUF_SIZE) {
      dataBytes=new byte[(int)size];
      read(dataBytes,0);
      isBytes=true;
      tmpFile.close();
      tmpFile=null;
    }
 else     tmpFile.setLength(size);
  }
}
Program: 80231
Project: 80231
Buggy source:
public NetClientImpl(VertxInternal vertx,NetClientOptions options){
  this.vertx=vertx;
  this.options=new NetClientOptions(options);
  this.sslHelper=new SSLHelper(options,KeyStoreHelper.create(vertx,options.getKeyStore()),KeyStoreHelper.create(vertx,options.getTrustStore()));
  this.closeHook=completionHandler -> {
    NetClientImpl.this.close();
    completionHandler.handle(new FutureResultImpl<>((Void)null));
  }
;
  creatingContext=vertx.getContext();
  if (creatingContext != null) {
    if (creatingContext.isMultithreaded()) {
      throw new IllegalStateException("String_Node_Str");
    }
    creatingContext.addCloseHook(closeHook);
  }
}

Fixed version (ground truth):
public NetClientImpl(VertxInternal vertx,NetClientOptions options){
  this.vertx=vertx;
  this.options=new NetClientOptions(options);
  this.sslHelper=new SSLHelper(options,KeyStoreHelper.create(vertx,options.getKeyStoreOptions()),KeyStoreHelper.create(vertx,options.getTrustStoreOptions()));
  this.closeHook=completionHandler -> {
    NetClientImpl.this.close();
    completionHandler.handle(new FutureResultImpl<>((Void)null));
  }
;
  creatingContext=vertx.getContext();
  if (creatingContext != null) {
    if (creatingContext.isMultithreaded()) {
      throw new IllegalStateException("String_Node_Str");
    }
    creatingContext.addCloseHook(closeHook);
  }
}
Program: 80232
Project: 80232
Buggy source:
public NetServerImpl(VertxInternal vertx,NetServerOptions options){
  this.vertx=vertx;
  this.options=new NetServerOptions(options);
  this.sslHelper=new SSLHelper(options,KeyStoreHelper.create(vertx,options.getKeyStore()),KeyStoreHelper.create(vertx,options.getTrustStore()));
  this.creatingContext=vertx.getContext();
  if (creatingContext != null) {
    if (creatingContext.isMultithreaded()) {
      throw new IllegalStateException("String_Node_Str");
    }
    creatingContext.addCloseHook(this);
  }
}

Fixed version (ground truth):
public NetServerImpl(VertxInternal vertx,NetServerOptions options){
  this.vertx=vertx;
  this.options=new NetServerOptions(options);
  this.sslHelper=new SSLHelper(options,KeyStoreHelper.create(vertx,options.getKeyStoreOptions()),KeyStoreHelper.create(vertx,options.getTrustStoreOptions()));
  this.creatingContext=vertx.getContext();
  if (creatingContext != null) {
    if (creatingContext.isMultithreaded()) {
      throw new IllegalStateException("String_Node_Str");
    }
    creatingContext.addCloseHook(this);
  }
}
Program: 80233
Project: 80233
Buggy source:
@Test public void testAsyncDeployCalledSynchronously() throws Exception {
  MyAsyncVerticle verticle=new MyAsyncVerticle(f -> f.setResult(null),null);
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
    testComplete();
  }
);
  await();
}

Fixed version (ground truth):
@Test public void testAsyncDeployCalledSynchronously() throws Exception {
  MyAsyncVerticle verticle=new MyAsyncVerticle(f -> f.setResult(null),f -> f.setResult(null));
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
    testComplete();
  }
);
  await();
}
Program: 80234
Project: 80234
Buggy source:
@Test public void testSimpleChildDeployment() throws Exception {
  Verticle verticle=new MyAsyncVerticle(f -> {
    Context parentContext=vertx.currentContext();
    Verticle child1=new MyAsyncVerticle(f2 -> {
      Context childContext=vertx.currentContext();
      assertNotSame(parentContext,childContext);
      f2.setResult(null);
      testComplete();
    }
,null);
    vertx.deployVerticleInstance(child1,new DeploymentOptions(),ar -> {
      assertTrue(ar.succeeded());
    }
);
    f.setResult(null);
  }
,null);
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
  }
);
  await();
}

Fixed version (ground truth):
@Test public void testSimpleChildDeployment() throws Exception {
  Verticle verticle=new MyAsyncVerticle(f -> {
    Context parentContext=vertx.currentContext();
    Verticle child1=new MyAsyncVerticle(f2 -> {
      Context childContext=vertx.currentContext();
      assertNotSame(parentContext,childContext);
      f2.setResult(null);
      testComplete();
    }
,f2 -> f2.setResult(null));
    vertx.deployVerticleInstance(child1,new DeploymentOptions(),ar -> {
      assertTrue(ar.succeeded());
    }
);
    f.setResult(null);
  }
,f -> f.setResult(null));
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
  }
);
  await();
}
Program: 80235
Project: 80235
Buggy source:
@Test public void testAsyncDeploy() throws Exception {
  long start=System.currentTimeMillis();
  long delay=1000;
  MyAsyncVerticle verticle=new MyAsyncVerticle(f -> vertx.setTimer(delay,id -> f.setResult(null)),null);
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
    long now=System.currentTimeMillis();
    assertTrue(now - start >= delay);
    assertTrue(vertx.deployments().contains(ar.result()));
    testComplete();
  }
);
  Thread.sleep(delay / 2);
  assertTrue(vertx.deployments().isEmpty());
  await();
}

Fixed version (ground truth):
@Test public void testAsyncDeploy() throws Exception {
  long start=System.currentTimeMillis();
  long delay=1000;
  MyAsyncVerticle verticle=new MyAsyncVerticle(f -> {
    vertx.setTimer(delay,id -> {
      f.setResult(null);
    }
);
  }
,f -> f.setResult(null));
  vertx.deployVerticleInstance(verticle,new DeploymentOptions(),ar -> {
    assertTrue(ar.succeeded());
    long now=System.currentTimeMillis();
    assertTrue(now - start >= delay);
    assertTrue(vertx.deployments().contains(ar.result()));
    testComplete();
  }
);
  Thread.sleep(delay / 2);
  assertTrue(vertx.deployments().isEmpty());
  await();
}
Program: 80237
Project: 80237
Buggy source:
@Override public HttpServerResponse setStatusMessage(String statusMessage){
  this.response.setStatus(new HttpResponseStatus(response.getStatus().code(),statusMessage));
  return this;
}

Fixed version (ground truth):
@Override public HttpServerResponse setStatusMessage(String statusMessage){
  this.statusMessage=statusMessage;
  this.response.setStatus(new HttpResponseStatus(response.getStatus().code(),statusMessage));
  return this;
}
Program: 80238
Project: 80238
Buggy source:
@Override public HttpServerResponse setStatusCode(int statusCode){
  this.response.setStatus(new HttpResponseStatus(statusCode,response.getStatus().reasonPhrase()));
  return this;
}

Fixed version (ground truth):
@Override public HttpServerResponse setStatusCode(int statusCode){
  HttpResponseStatus status=statusMessage != null ? new HttpResponseStatus(statusCode,statusMessage) : HttpResponseStatus.valueOf(statusCode);
  this.response.setStatus(status);
  return this;
}
Program: 80239
Project: 80239
Buggy source:
private void testStatusCode(int code,String statusMessage){
  server.requestHandler(req -> {
    if (code != -1) {
      req.response().setStatusCode(code);
    }
    if (statusMessage != null) {
      req.response().setStatusMessage(statusMessage);
    }
    req.response().end();
  }
);
  server.listen(onSuccess(s -> {
    client.getNow(new RequestOptions().setPort(DEFAULT_HTTP_PORT).setRequestURI(DEFAULT_TEST_URI),resp -> {
      if (code != -1) {
        assertEquals(code,resp.statusCode());
      }
 else {
        assertEquals(200,resp.statusCode());
      }
      if (statusMessage != null) {
        assertEquals(statusMessage,resp.statusMessage());
      }
      testComplete();
    }
);
  }
));
  await();
}

Fixed version (ground truth):
private void testStatusCode(int code,String statusMessage){
  server.requestHandler(req -> {
    if (code != -1) {
      req.response().setStatusCode(code);
    }
    if (statusMessage != null) {
      req.response().setStatusMessage(statusMessage);
    }
    req.response().end();
  }
);
  server.listen(onSuccess(s -> {
    client.getNow(new RequestOptions().setPort(DEFAULT_HTTP_PORT).setRequestURI(DEFAULT_TEST_URI),resp -> {
      int theCode;
      if (code == -1) {
        assertEquals(200,resp.statusCode());
        theCode=200;
      }
 else {
        theCode=code;
      }
      if (statusMessage != null) {
        assertEquals(statusMessage,resp.statusMessage());
      }
 else {
        assertEquals(HttpResponseStatus.valueOf(theCode).reasonPhrase(),resp.statusMessage());
      }
      testComplete();
    }
);
  }
));
  await();
}
Program: 80240
Project: 80240
Buggy source:
public void execute(EventLoop worker,Runnable handler){
  if (isOnCorrectWorker(worker)) {
    wrapTask(handler).run();
  }
 else {
    execute(handler);
  }
}

Fixed version (ground truth):
public void execute(EventLoop worker,Runnable handler){
  boolean correctThread;
  Thread thread=Thread.currentThread();
  if (thread instanceof VertxThread) {
    VertxThread vthread=(VertxThread)thread;
    Context ctx=vthread.getContext();
    correctThread=ctx == this;
  }
 else {
    correctThread=false;
  }
  if (correctThread) {
    wrapTask(handler).run();
  }
 else {
    execute(handler);
  }
}
Program: 80241
Project: 80241
Buggy source:
@Override public DatagramSocket unlistenMulticastGroup(String multicastAddress,String networkInterface,String source,Handler<AsyncResult<DatagramSocket>> handler){
  configurable=false;
  try {
    addListener(channel().leaveGroup(InetAddress.getByName(multicastAddress),NetworkInterface.getByName(networkInterface),InetAddress.getByName(source)),handler);
  }
 catch (  Exception e) {
    notifyException(handler,e);
  }
  return this;
}

Fixed version (ground truth):
@Override public DatagramSocket unlistenMulticastGroup(String multicastAddress,String networkInterface,String source,Handler<AsyncResult<DatagramSocket>> handler){
  configurable=false;
  try {
    InetAddress sourceAddress;
    if (source == null) {
      sourceAddress=null;
    }
 else {
      sourceAddress=InetAddress.getByName(source);
    }
    addListener(channel().leaveGroup(InetAddress.getByName(multicastAddress),NetworkInterface.getByName(networkInterface),sourceAddress),handler);
  }
 catch (  Exception e) {
    notifyException(handler,e);
  }
  return this;
}