nus-yam/ex-repair huggingface dataset:
Program: 63339
Project: 63339
Buggy source:
private static void undo(Opt opt) throws IOException, InterruptedException {
  logger.info("String_Node_Str" + opt.toString());
switch (opt.type) {
case CHANGE_HTABLE_HOST:
{
      String tableName=(String)opt.params[0];
      HTableDescriptor desc=hbaseAdmin.getTableDescriptor(TableName.valueOf(tableName));
      hbaseAdmin.disableTable(tableName);
      desc.setValue(CubeManager.getHtableMetadataKey(),srcConfig.getMetadataUrlPrefix());
      hbaseAdmin.modifyTable(tableName,desc);
      hbaseAdmin.enableTable(tableName);
    }
case COPY_FILE_IN_META:
{
    logger.info("String_Node_Str");
    break;
  }
case COPY_DICT_OR_SNAPSHOT:
{
  logger.info("String_Node_Str");
  break;
}
case RENAME_FOLDER_IN_HDFS:
{
String srcPath=(String)opt.params[1];
String dstPath=(String)opt.params[0];
if (hdfsFS.exists(new Path(srcPath)) && !hdfsFS.exists(new Path(dstPath))) {
  hdfsFS.rename(new Path(srcPath),new Path(dstPath));
  logger.info("String_Node_Str" + srcPath + "String_Node_Str"+ dstPath);
}
break;
}
case ADD_INTO_PROJECT:
{
logger.info("String_Node_Str");
break;
}
}
}

Fixed version (ground truth):
private static void undo(Opt opt) throws IOException, InterruptedException {
  logger.info("String_Node_Str" + opt.toString());
switch (opt.type) {
case CHANGE_HTABLE_HOST:
{
      String tableName=(String)opt.params[0];
      HTableDescriptor desc=hbaseAdmin.getTableDescriptor(TableName.valueOf(tableName));
      hbaseAdmin.disableTable(tableName);
      desc.setValue(CubeManager.getHtableMetadataKey(),srcConfig.getMetadataUrlPrefix());
      hbaseAdmin.modifyTable(tableName,desc);
      hbaseAdmin.enableTable(tableName);
      break;
    }
case COPY_FILE_IN_META:
{
    logger.info("String_Node_Str");
    break;
  }
case COPY_DICT_OR_SNAPSHOT:
{
  logger.info("String_Node_Str");
  break;
}
case RENAME_FOLDER_IN_HDFS:
{
String srcPath=(String)opt.params[1];
String dstPath=(String)opt.params[0];
if (hdfsFS.exists(new Path(srcPath)) && !hdfsFS.exists(new Path(dstPath))) {
  hdfsFS.rename(new Path(srcPath),new Path(dstPath));
  logger.info("String_Node_Str" + srcPath + "String_Node_Str"+ dstPath);
}
break;
}
case ADD_INTO_PROJECT:
{
logger.info("String_Node_Str");
break;
}
}
}
Program: 63341
Project: 63341
Buggy source:
/** 
 * @param context
 * @param cube
 * @param value
 */
private void validateColumnParameter(ValidateContext context,CubeDesc cube,String value){
  String factTable=cube.getFactTable();
  if (StringUtils.isEmpty(factTable)) {
    context.addResult(ResultLevel.ERROR,"String_Node_Str");
    return;
  }
  TableDesc table=MetadataManager.getInstance(cube.getConfig()).getTableDesc(factTable);
  if (table == null) {
    context.addResult(ResultLevel.ERROR,"String_Node_Str" + cube);
  }
  Set<String> set=new HashSet<String>();
  ColumnDesc[] cdesc=table.getColumns();
  for (int i=0; i < cdesc.length; i++) {
    ColumnDesc columnDesc=cdesc[i];
    set.add(columnDesc.getName());
  }
  String[] items=value.split("String_Node_Str");
  for (int i=0; i < items.length; i++) {
    String item=items[i].trim();
    if (StringUtils.isEmpty(item)) {
      continue;
    }
    if (!set.contains(item)) {
      context.addResult(ResultLevel.ERROR,"String_Node_Str" + item + "String_Node_Str"+ factTable);
    }
  }
}

Fixed version (ground truth):
/** 
 * @param context
 * @param cube
 * @param value
 */
private void validateColumnParameter(ValidateContext context,CubeDesc cube,String value){
  String factTable=cube.getFactTable();
  if (StringUtils.isEmpty(factTable)) {
    context.addResult(ResultLevel.ERROR,"String_Node_Str");
    return;
  }
  TableDesc table=MetadataManager.getInstance(cube.getConfig()).getTableDesc(factTable);
  if (table == null) {
    context.addResult(ResultLevel.ERROR,"String_Node_Str" + cube);
    return;
  }
  Set<String> set=new HashSet<String>();
  ColumnDesc[] cdesc=table.getColumns();
  for (int i=0; i < cdesc.length; i++) {
    ColumnDesc columnDesc=cdesc[i];
    set.add(columnDesc.getName());
  }
  String[] items=value.split("String_Node_Str");
  for (int i=0; i < items.length; i++) {
    String item=items[i].trim();
    if (StringUtils.isEmpty(item)) {
      continue;
    }
    if (!set.contains(item)) {
      context.addResult(ResultLevel.ERROR,"String_Node_Str" + item + "String_Node_Str"+ factTable);
    }
  }
}
Program: 63342
Project: 63342
Buggy source:
private JoinDesc buildJoin(RexCall condition){
  Map<TblColRef,TblColRef> joinColumns=new HashMap<TblColRef,TblColRef>();
  translateJoinColumn(condition,joinColumns);
  List<String> pks=new ArrayList<String>();
  List<TblColRef> pkCols=new ArrayList<TblColRef>();
  List<String> fks=new ArrayList<String>();
  List<TblColRef> fkCols=new ArrayList<TblColRef>();
  String factTable=context.firstTableScan.getCubeTable();
  for (  Map.Entry<TblColRef,TblColRef> columnPair : joinColumns.entrySet()) {
    TblColRef fromCol=columnPair.getKey();
    TblColRef toCol=columnPair.getValue();
    if (factTable.equals(fromCol)) {
      fks.add(fromCol.getName());
      fkCols.add(fromCol);
      pks.add(toCol.getName());
      pkCols.add(toCol);
    }
 else {
      fks.add(toCol.getName());
      fkCols.add(toCol);
      pks.add(fromCol.getName());
      pkCols.add(fromCol);
    }
  }
  JoinDesc join=new JoinDesc();
  join.setForeignKey(fks.toArray(COLUMN_ARRAY_MARKER));
  join.setForeignKeyColumns(fkCols.toArray(new TblColRef[fkCols.size()]));
  join.setPrimaryKey(pks.toArray(COLUMN_ARRAY_MARKER));
  join.setPrimaryKeyColumns(pkCols.toArray(new TblColRef[pkCols.size()]));
  return join;
}

Fixed version (ground truth):
private JoinDesc buildJoin(RexCall condition){
  Map<TblColRef,TblColRef> joinColumns=new HashMap<TblColRef,TblColRef>();
  translateJoinColumn(condition,joinColumns);
  List<String> pks=new ArrayList<String>();
  List<TblColRef> pkCols=new ArrayList<TblColRef>();
  List<String> fks=new ArrayList<String>();
  List<TblColRef> fkCols=new ArrayList<TblColRef>();
  String factTable=context.firstTableScan.getCubeTable();
  for (  Map.Entry<TblColRef,TblColRef> columnPair : joinColumns.entrySet()) {
    TblColRef fromCol=columnPair.getKey();
    TblColRef toCol=columnPair.getValue();
    if (factTable.equalsIgnoreCase(fromCol.getTable())) {
      fks.add(fromCol.getName());
      fkCols.add(fromCol);
      pks.add(toCol.getName());
      pkCols.add(toCol);
    }
 else {
      fks.add(toCol.getName());
      fkCols.add(toCol);
      pks.add(fromCol.getName());
      pkCols.add(fromCol);
    }
  }
  JoinDesc join=new JoinDesc();
  join.setForeignKey(fks.toArray(COLUMN_ARRAY_MARKER));
  join.setForeignKeyColumns(fkCols.toArray(new TblColRef[fkCols.size()]));
  join.setPrimaryKey(pks.toArray(COLUMN_ARRAY_MARKER));
  join.setPrimaryKeyColumns(pkCols.toArray(new TblColRef[pkCols.size()]));
  return join;
}
Program: 63343
Project: 63343
Buggy source:
@Override public Result implement(EnumerableRelImplementor implementor,Prefer pref){
  JavaImplementor javaImplementor=(JavaImplementor)implementor;
  int ctxId=this.context.id;
  if (javaImplementor.getParentContext() != null) {
    ctxId=javaImplementor.getParentContext().id;
  }
  PhysType physType=PhysTypeImpl.of(javaImplementor.getTypeFactory(),this.rowType,pref.preferArray());
  String execFunction=genExecFunc();
  return javaImplementor.result(physType,Blocks.toBlock(Expressions.call(table.getExpression(OLAPTable.class),execFunction,javaImplementor.getRootExpression(),Expressions.constant(ctxId))));
}

Fixed version (ground truth):
@Override public Result implement(EnumerableRelImplementor implementor,Prefer pref){
  @SuppressWarnings("String_Node_Str") JavaImplementor javaImplementor=(JavaImplementor)implementor;
  int ctxId=this.context.id;
  if (javaImplementor.getParentContext() != null) {
    ctxId=javaImplementor.getParentContext().id;
  }
  PhysType physType=PhysTypeImpl.of(javaImplementor.getTypeFactory(),this.rowType,pref.preferArray());
  String execFunction=genExecFunc();
  return javaImplementor.result(physType,Blocks.toBlock(Expressions.call(table.getExpression(OLAPTable.class),execFunction,javaImplementor.getRootExpression(),Expressions.constant(ctxId))));
}
Program: 63344
Project: 63344
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!super.equals(obj))   return false;
  if (getClass() != obj.getClass())   return false;
  FixedValueHLLCMockup other=(FixedValueHLLCMockup)obj;
  if (value != other.value)   return false;
  return true;
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (this == obj)   return true;
  if (!super.equals(obj))   return false;
  if (getClass() != obj.getClass())   return false;
  FixedValueHLLCMockup other=(FixedValueHLLCMockup)obj;
  if (!value.equals(other.value))   return false;
  return true;
}
Program: 63345
Project: 63345
Buggy source:
/** 
 * Check if there is kylin.properties exist
 * @param path
 * @param env
 * @return the properties file
 */
private static File getKylinPropertiesFile(String path){
  if (path == null)   return null;
  File propFile=new File(path,KYLIN_CONF_PROPERTIES_FILE);
  if (propFile.exists()) {
    logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  }
  logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  return null;
}

Fixed version (ground truth):
/** 
 * Check if there is kylin.properties exist
 * @param path
 * @param env
 * @return the properties file
 */
private static File getKylinPropertiesFile(String path){
  if (path == null)   return null;
  File propFile=new File(path,KYLIN_CONF_PROPERTIES_FILE);
  if (propFile.exists()) {
    logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
    return propFile;
  }
  logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  return null;
}
Program: 63346
Project: 63346
Buggy source:
/** 
 * Check if there is kylin.properties exist
 * @param path
 * @param env
 * @return the properties file
 */
private static File getKylinPropertiesFile(String path){
  if (path == null)   return null;
  File propFile=new File(path,KYLIN_CONF_PROPERTIES_FILE);
  if (propFile.exists()) {
    logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  }
  logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  return null;
}

Fixed version (ground truth):
/** 
 * Check if there is kylin.properties exist
 * @param path
 * @param env
 * @return the properties file
 */
private static File getKylinPropertiesFile(String path){
  if (path == null)   return null;
  File propFile=new File(path,KYLIN_CONF_PROPERTIES_FILE);
  if (propFile.exists()) {
    logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
    return propFile;
  }
  logger.info(KYLIN_CONF_PROPERTIES_FILE + "String_Node_Str" + propFile.getAbsolutePath());
  return null;
}
Program: 63348
Project: 63348
Buggy source:
void setLastModified(long lastModified){
  this.lastModified=lastModified;
}

Fixed version (ground truth):
public void setLastModified(long lastModified){
  this.lastModified=lastModified;
}
Program: 63351
Project: 63351
Buggy source:
@PreAuthorize(Constant.ACCESS_HAS_ROLE_ADMIN) public String[] reloadHiveTable(String tables){
  String tableMetaDir=HiveSourceTableMgmt.reloadHiveTable(tables);
  getMetadataManager().reload();
  File metaDir=new File(tableMetaDir);
  if (metaDir.exists()) {
    File tableDir=new File(metaDir,HiveSourceTableMgmt.TABLE_FOLDER_NAME);
    if (tableDir.exists()) {
      return tableDir.list();
    }
  }
  return new String[0];
}

Fixed version (ground truth):
@PreAuthorize(Constant.ACCESS_HAS_ROLE_MODELER) public String[] reloadHiveTable(String tables){
  String tableMetaDir=HiveSourceTableMgmt.reloadHiveTable(tables);
  getMetadataManager().reload();
  File metaDir=new File(tableMetaDir);
  if (metaDir.exists()) {
    File tableDir=new File(metaDir,HiveSourceTableMgmt.TABLE_FOLDER_NAME);
    if (tableDir.exists()) {
      return tableDir.list();
    }
  }
  return new String[0];
}
Program: 63352
Project: 63352
Buggy source:
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Get get=new Get(Bytes.toBytes(username));
    get.addFamily(Bytes.toBytes(USER_AUTHORITY_FAMILY));
    Result result=htable.get(get);
    byte[] gaBytes=result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
    Collection<? extends GrantedAuthority> authorities=Arrays.asList(ugaSerializer.deserialize(gaBytes));
    return new User(username,"String_Node_Str",authorities);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return null;
}

Fixed version (ground truth):
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Get get=new Get(Bytes.toBytes(username));
    get.addFamily(Bytes.toBytes(USER_AUTHORITY_FAMILY));
    Result result=htable.get(get);
    Collection<? extends GrantedAuthority> authorities=null;
    if (null != result && !result.isEmpty()) {
      byte[] gaBytes=result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
      authorities=Arrays.asList(ugaSerializer.deserialize(gaBytes));
    }
 else {
      throw new UsernameNotFoundException("String_Node_Str" + username + "String_Node_Str");
    }
    return new User(username,"String_Node_Str",authorities);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
    throw new RuntimeException(e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
}
Program: 63354
Project: 63354
Buggy source:
@Override public LongWritable getState(){
  if (hllAgg != null) {
    state.set(hllAgg.getState().getCountEstimate());
  }
  return state;
}

Fixed version (ground truth):
@Override public LongWritable getState(){
  if (hllAgg == null) {
    return ZERO;
  }
 else {
    state.set(hllAgg.getState().getCountEstimate());
    return state;
  }
}
Program: 63355
Project: 63355
Buggy source:
@Override public void aggregate(LongWritable value){
  if (state.get() == 0)   state.set(value.get());
 else   throw new IllegalStateException();
}

Fixed version (ground truth):
@Override public void aggregate(LongWritable value){
}
Program: 63356
Project: 63356
Buggy source:
@Override public LongWritable getState(){
  if (hllAgg == null) {
    return ZERO;
  }
 else {
    state.set(hllAgg.getState().getCountEstimate());
    return state;
  }
}

Fixed version (ground truth):
@Override public LongWritable getState(){
  if (hllAgg != null) {
    state.set(hllAgg.getState().getCountEstimate());
  }
  return state;
}
Program: 63357
Project: 63357
Buggy source:
@Override public void aggregate(LongWritable value){
}

Fixed version (ground truth):
@Override public void aggregate(LongWritable value){
  if (state.get() == 0)   state.set(value.get());
 else   throw new IllegalStateException();
}
Program: 63358
Project: 63358
Buggy source:
@Override public void deleteAcl(ObjectIdentity objectIdentity,boolean deleteChildren) throws ChildrenExistException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    List<ObjectIdentity> children=findChildren(objectIdentity);
    if (!deleteChildren && children.size() > 0) {
      throw new ChildrenExistException("String_Node_Str" + objectIdentity);
    }
    for (    ObjectIdentity oid : children) {
      deleteAcl(oid,deleteChildren);
    }
    htable.delete(delete);
    htable.flushCommits();
    aclCache.remove(objectIdentity);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
}

Fixed version (ground truth):
@Override public void deleteAcl(ObjectIdentity objectIdentity,boolean deleteChildren) throws ChildrenExistException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    List<ObjectIdentity> children=findChildren(objectIdentity);
    if (!deleteChildren && children.size() > 0) {
      throw new ChildrenExistException("String_Node_Str" + objectIdentity);
    }
    for (    ObjectIdentity oid : children) {
      deleteAcl(oid,deleteChildren);
    }
    htable.delete(delete);
    htable.flushCommits();
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
}
Program: 63359
Project: 63359
Buggy source:
private void genAces(List<Sid> sids,Result result,AclImpl acl){
  List<AceInfo> aceInfos=new ArrayList<AceInfo>();
  if (null != sids) {
    for (    Sid sid : sids) {
      String sidName=null;
      if (sid instanceof PrincipalSid) {
        sidName=((PrincipalSid)sid).getPrincipal();
      }
 else       if (sid instanceof GrantedAuthoritySid) {
        sidName=((GrantedAuthoritySid)sid).getGrantedAuthority();
      }
      aceInfos.add(aceSerializer.deserialize(result.getValue(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(sidName))));
    }
  }
 else {
    NavigableMap<byte[],byte[]> familyMap=result.getFamilyMap(Bytes.toBytes(ACL_ACES_FAMILY));
    for (    byte[] qualifier : familyMap.keySet()) {
      AceInfo aceInfo=aceSerializer.deserialize(familyMap.get(qualifier));
      if (null != aceInfo) {
        aceInfos.add(aceInfo);
      }
    }
  }
  List<AccessControlEntry> newAces=new ArrayList<AccessControlEntry>();
  for (int i=0; i < aceInfos.size(); i++) {
    AceInfo aceInfo=aceInfos.get(i);
    if (null != aceInfo) {
      Sid sid=aceInfo.getSidInfo().isPrincipal() ? new PrincipalSid(aceInfo.getSidInfo().getSid()) : new GrantedAuthoritySid(aceInfo.getSidInfo().getSid());
      AccessControlEntry ace=new AccessControlEntryImpl(Long.valueOf(i),acl,sid,aclPermissionFactory.buildFromMask(aceInfo.getPermissionMask()),true,false,false);
      newAces.add(ace);
    }
  }
  this.setAces(acl,newAces);
}

Fixed version (ground truth):
private void genAces(List<Sid> sids,Result result,AclImpl acl){
  List<AceInfo> aceInfos=new ArrayList<AceInfo>();
  if (null != sids) {
    for (    Sid sid : sids) {
      String sidName=null;
      if (sid instanceof PrincipalSid) {
        sidName=((PrincipalSid)sid).getPrincipal();
      }
 else       if (sid instanceof GrantedAuthoritySid) {
        sidName=((GrantedAuthoritySid)sid).getGrantedAuthority();
      }
      AceInfo aceInfo=aceSerializer.deserialize(result.getValue(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(sidName)));
      if (null != aceInfo) {
        aceInfos.add(aceInfo);
      }
    }
  }
 else {
    NavigableMap<byte[],byte[]> familyMap=result.getFamilyMap(Bytes.toBytes(ACL_ACES_FAMILY));
    for (    byte[] qualifier : familyMap.keySet()) {
      AceInfo aceInfo=aceSerializer.deserialize(familyMap.get(qualifier));
      if (null != aceInfo) {
        aceInfos.add(aceInfo);
      }
    }
  }
  List<AccessControlEntry> newAces=new ArrayList<AccessControlEntry>();
  for (int i=0; i < aceInfos.size(); i++) {
    AceInfo aceInfo=aceInfos.get(i);
    if (null != aceInfo) {
      Sid sid=aceInfo.getSidInfo().isPrincipal() ? new PrincipalSid(aceInfo.getSidInfo().getSid()) : new GrantedAuthoritySid(aceInfo.getSidInfo().getSid());
      AccessControlEntry ace=new AccessControlEntryImpl(Long.valueOf(i),acl,sid,aclPermissionFactory.buildFromMask(aceInfo.getPermissionMask()),true,false,false);
      newAces.add(ace);
    }
  }
  this.setAces(acl,newAces);
}
Program: 63361
Project: 63361
Buggy source:
@Override public MutableAcl updateAcl(MutableAcl acl) throws NotFoundException {
  try {
    readAclById(acl.getObjectIdentity());
  }
 catch (  NotFoundException e) {
    throw e;
  }
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    delete.deleteFamily(Bytes.toBytes(ACL_ACES_FAMILY));
    htable.delete(delete);
    Put put=new Put(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    if (null != acl.getParentAcl()) {
      put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),domainObjSerializer.serialize(new DomainObjectInfo(acl.getParentAcl().getObjectIdentity())));
    }
    for (    AccessControlEntry ace : acl.getEntries()) {
      AceInfo aceInfo=new AceInfo(ace);
      put.add(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(aceInfo.getSidInfo().getSid()),aceSerializer.serialize(aceInfo));
    }
    if (!put.isEmpty()) {
      htable.put(put);
      htable.flushCommits();
    }
    aclCache.remove(acl.getObjectIdentity());
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(acl.getObjectIdentity());
}

Fixed version (ground truth):
@Override public MutableAcl updateAcl(MutableAcl acl) throws NotFoundException {
  try {
    readAclById(acl.getObjectIdentity());
  }
 catch (  NotFoundException e) {
    throw e;
  }
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    delete.deleteFamily(Bytes.toBytes(ACL_ACES_FAMILY));
    htable.delete(delete);
    Put put=new Put(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    if (null != acl.getParentAcl()) {
      put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),domainObjSerializer.serialize(new DomainObjectInfo(acl.getParentAcl().getObjectIdentity())));
    }
    for (    AccessControlEntry ace : acl.getEntries()) {
      AceInfo aceInfo=new AceInfo(ace);
      put.add(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(aceInfo.getSidInfo().getSid()),aceSerializer.serialize(aceInfo));
    }
    if (!put.isEmpty()) {
      htable.put(put);
      htable.flushCommits();
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(acl.getObjectIdentity());
}
Program: 63362
Project: 63362
Buggy source:
@Override public void deleteAcl(ObjectIdentity objectIdentity,boolean deleteChildren) throws ChildrenExistException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    List<ObjectIdentity> children=findChildren(objectIdentity);
    if (!deleteChildren && children.size() > 0) {
      throw new ChildrenExistException("String_Node_Str" + objectIdentity);
    }
    for (    ObjectIdentity oid : children) {
      deleteAcl(oid,deleteChildren);
    }
    htable.delete(delete);
    htable.flushCommits();
    aclCache.remove(objectIdentity);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
}

Fixed version (ground truth):
@Override public void deleteAcl(ObjectIdentity objectIdentity,boolean deleteChildren) throws ChildrenExistException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    List<ObjectIdentity> children=findChildren(objectIdentity);
    if (!deleteChildren && children.size() > 0) {
      throw new ChildrenExistException("String_Node_Str" + objectIdentity);
    }
    for (    ObjectIdentity oid : children) {
      deleteAcl(oid,deleteChildren);
    }
    htable.delete(delete);
    htable.flushCommits();
    aclCache.remove(objectIdentity);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
}
Program: 63363
Project: 63363
Buggy source:
@Override public MutableAcl createAcl(ObjectIdentity objectIdentity) throws AlreadyExistsException {
  Acl acl=null;
  try {
    acl=readAclById(objectIdentity);
  }
 catch (  NotFoundException e) {
  }
  if (null != acl) {
    throw new AlreadyExistsException("String_Node_Str" + objectIdentity + "String_Node_Str");
  }
  Authentication auth=SecurityContextHolder.getContext().getAuthentication();
  PrincipalSid sid=new PrincipalSid(auth);
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Put put=new Put(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_TYPE_COLUMN),Bytes.toBytes(objectIdentity.getType()));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_OWNER_COLUMN),sidSerializer.serialize(new SidInfo(sid)));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_ENTRY_INHERIT_COLUMN),Bytes.toBytes(true));
    htable.put(put);
    htable.flushCommits();
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(objectIdentity);
}

Fixed version (ground truth):
@Override public MutableAcl createAcl(ObjectIdentity objectIdentity) throws AlreadyExistsException {
  Acl acl=null;
  try {
    acl=readAclById(objectIdentity);
  }
 catch (  NotFoundException e) {
  }
  if (null != acl) {
    throw new AlreadyExistsException("String_Node_Str" + objectIdentity + "String_Node_Str");
  }
  Authentication auth=SecurityContextHolder.getContext().getAuthentication();
  PrincipalSid sid=new PrincipalSid(auth);
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Put put=new Put(Bytes.toBytes(String.valueOf(objectIdentity.getIdentifier())));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_TYPE_COLUMN),Bytes.toBytes(objectIdentity.getType()));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_OWNER_COLUMN),sidSerializer.serialize(new SidInfo(sid)));
    put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_ENTRY_INHERIT_COLUMN),Bytes.toBytes(true));
    htable.put(put);
    htable.flushCommits();
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(objectIdentity);
}
Program: 63365
Project: 63365
Buggy source:
@Override public MutableAcl updateAcl(MutableAcl acl) throws NotFoundException {
  try {
    readAclById(acl.getObjectIdentity());
  }
 catch (  NotFoundException e) {
    throw e;
  }
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    delete.deleteFamily(Bytes.toBytes(ACL_ACES_FAMILY));
    htable.delete(delete);
    Put put=new Put(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    if (null != acl.getParentAcl()) {
      put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),domainObjSerializer.serialize(new DomainObjectInfo(acl.getParentAcl().getObjectIdentity())));
    }
    for (    AccessControlEntry ace : acl.getEntries()) {
      AceInfo aceInfo=new AceInfo(ace);
      put.add(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(aceInfo.getSidInfo().getSid()),aceSerializer.serialize(aceInfo));
    }
    if (!put.isEmpty()) {
      htable.put(put);
      htable.flushCommits();
    }
    aclCache.remove(acl.getObjectIdentity());
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(acl.getObjectIdentity());
}

Fixed version (ground truth):
@Override public MutableAcl updateAcl(MutableAcl acl) throws NotFoundException {
  try {
    readAclById(acl.getObjectIdentity());
  }
 catch (  NotFoundException e) {
    throw e;
  }
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Delete delete=new Delete(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    delete.deleteFamily(Bytes.toBytes(ACL_ACES_FAMILY));
    htable.delete(delete);
    Put put=new Put(Bytes.toBytes(String.valueOf(acl.getObjectIdentity().getIdentifier())));
    if (null != acl.getParentAcl()) {
      put.add(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),domainObjSerializer.serialize(new DomainObjectInfo(acl.getParentAcl().getObjectIdentity())));
    }
    for (    AccessControlEntry ace : acl.getEntries()) {
      AceInfo aceInfo=new AceInfo(ace);
      put.add(Bytes.toBytes(ACL_ACES_FAMILY),Bytes.toBytes(aceInfo.getSidInfo().getSid()),aceSerializer.serialize(aceInfo));
    }
    if (!put.isEmpty()) {
      htable.put(put);
      htable.flushCommits();
    }
    aclCache.remove(acl.getObjectIdentity());
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return (MutableAcl)readAclById(acl.getObjectIdentity());
}
Program: 63366
Project: 63366
Buggy source:
@Override public List<ObjectIdentity> findChildren(ObjectIdentity parentIdentity){
  List<ObjectIdentity> oids=new ArrayList<ObjectIdentity>();
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Scan scan=new Scan();
    SingleColumnValueFilter parentFilter=new SingleColumnValueFilter(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),CompareOp.EQUAL,domainObjSerializer.serialize(new DomainObjectInfo(parentIdentity)));
    parentFilter.setFilterIfMissing(true);
    scan.setFilter(parentFilter);
    ResultScanner scanner=htable.getScanner(scan);
    for (Result result=scanner.next(); result != null; result=scanner.next()) {
      String id=Bytes.toString(result.getRow());
      String type=Bytes.toString(result.getValue(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_TYPE_COLUMN)));
      oids.add(new ObjectIdentityImpl(type,id));
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return oids;
}

Fixed version (ground truth):
@Override public List<ObjectIdentity> findChildren(ObjectIdentity parentIdentity){
  List<ObjectIdentity> oids=new ArrayList<ObjectIdentity>();
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(aclTableName);
    Scan scan=new Scan();
    SingleColumnValueFilter parentFilter=new SingleColumnValueFilter(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_PARENT_COLUMN),CompareOp.EQUAL,domainObjSerializer.serialize(new DomainObjectInfo(parentIdentity)));
    parentFilter.setFilterIfMissing(true);
    scan.setFilter(parentFilter);
    ResultScanner scanner=htable.getScanner(scan);
    for (Result result=scanner.next(); result != null; result=scanner.next()) {
      String id=Bytes.toString(result.getRow());
      String type=Bytes.toString(result.getValue(Bytes.toBytes(ACL_INFO_FAMILY),Bytes.toBytes(ACL_INFO_FAMILY_TYPE_COLUMN)));
      oids.add(new ObjectIdentityImpl(type,id));
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return oids;
}
Program: 63367
Project: 63367
Buggy source:
public AclService(){
  String metadataUrl=KylinConfig.getInstanceFromEnv().getMetadataUrl();
  int cut=metadataUrl.indexOf('@');
  tableNameBase=cut < 0 ? DEFAULT_TABLE_PREFIX : metadataUrl.substring(0,cut);
  hbaseUrl=cut < 0 ? metadataUrl : metadataUrl.substring(cut + 1);
  userTableName=tableNameBase + ACL_TABLE_NAME;
  fieldAces.setAccessible(true);
  fieldAcl.setAccessible(true);
}

Fixed version (ground truth):
public AclService(){
  String metadataUrl=KylinConfig.getInstanceFromEnv().getMetadataUrl();
  int cut=metadataUrl.indexOf('@');
  tableNameBase=cut < 0 ? DEFAULT_TABLE_PREFIX : metadataUrl.substring(0,cut);
  hbaseUrl=cut < 0 ? metadataUrl : metadataUrl.substring(cut + 1);
  aclTableName=tableNameBase + ACL_TABLE_NAME;
  fieldAces.setAccessible(true);
  fieldAcl.setAccessible(true);
  try {
    HadoopUtil.createHTableIfNeeded(hbaseUrl,aclTableName,ACL_INFO_FAMILY,ACL_ACES_FAMILY);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
}
Program: 63368
Project: 63368
Buggy source:
@Override public List<String> getUserAuthorities(){
  Scan s=new Scan();
  s.addColumn(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
  List<String> authorities=new ArrayList<String>();
  HTableInterface htable=null;
  ResultScanner scanner=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    scanner=htable.getScanner(s);
    for (Result result=scanner.next(); result != null; result=scanner.next()) {
      Collection<? extends GrantedAuthority> authCollection=deserialize(result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN)));
      for (      GrantedAuthority auth : authCollection) {
        if (!authorities.contains(auth.getAuthority())) {
          authorities.add(auth.getAuthority());
        }
      }
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(scanner);
    IOUtils.closeQuietly(htable);
  }
  return authorities;
}

Fixed version (ground truth):
@Override public List<String> getUserAuthorities(){
  Scan s=new Scan();
  s.addColumn(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
  List<String> authorities=new ArrayList<String>();
  HTableInterface htable=null;
  ResultScanner scanner=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    scanner=htable.getScanner(s);
    for (Result result=scanner.next(); result != null; result=scanner.next()) {
      byte[] uaBytes=result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
      Collection<? extends GrantedAuthority> authCollection=Arrays.asList(ugaSerializer.deserialize(uaBytes));
      for (      GrantedAuthority auth : authCollection) {
        if (!authorities.contains(auth.getAuthority())) {
          authorities.add(auth.getAuthority());
        }
      }
    }
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(scanner);
    IOUtils.closeQuietly(htable);
  }
  return authorities;
}
Program: 63369
Project: 63369
Buggy source:
private byte[] serialize(Collection<? extends GrantedAuthority> collection){
  ByteArrayOutputStream buf=new ByteArrayOutputStream();
  DataOutputStream dout=new DataOutputStream(buf);
  try {
    ObjectMapper mapper=new ObjectMapper();
    mapper.writeValue(dout,collection);
    dout.close();
    buf.close();
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return buf.toByteArray();
}

Fixed version (ground truth):
private byte[] serialize(Collection<? extends GrantedAuthority> auths){
  if (null == auths) {
    return null;
  }
  ByteArrayOutputStream buf=new ByteArrayOutputStream();
  DataOutputStream dout=new DataOutputStream(buf);
  try {
    ObjectMapper mapper=new ObjectMapper();
    mapper.writeValue(dout,auths);
    dout.close();
    buf.close();
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
  return buf.toByteArray();
}
Program: 63370
Project: 63370
Buggy source:
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Get get=new Get(Bytes.toBytes(username));
    get.addFamily(Bytes.toBytes(USER_AUTHORITY_FAMILY));
    Result result=htable.get(get);
    Collection<? extends GrantedAuthority> authorities=deserialize(result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN)));
    return new User(username,"String_Node_Str",authorities);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return null;
}

Fixed version (ground truth):
@Override public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
  HTableInterface htable=null;
  try {
    htable=HBaseConnection.get(hbaseUrl).getTable(userTableName);
    Get get=new Get(Bytes.toBytes(username));
    get.addFamily(Bytes.toBytes(USER_AUTHORITY_FAMILY));
    Result result=htable.get(get);
    byte[] gaBytes=result.getValue(Bytes.toBytes(USER_AUTHORITY_FAMILY),Bytes.toBytes(USER_AUTHORITY_COLUMN));
    Collection<? extends GrantedAuthority> authorities=Arrays.asList(ugaSerializer.deserialize(gaBytes));
    return new User(username,"String_Node_Str",authorities);
  }
 catch (  IOException e) {
    logger.error(e.getLocalizedMessage(),e);
  }
 finally {
    IOUtils.closeQuietly(htable);
  }
  return null;
}
Program: 63374
Project: 63374
Buggy source:
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody @Timed(name="String_Node_Str") public SQLResponse query(@RequestBody SQLRequest sqlRequest){
  long startTimestamp=System.currentTimeMillis();
  SQLResponse response=doQuery(sqlRequest);
  response.setDuration(System.currentTimeMillis() - startTimestamp);
  queryService.logQuery(sqlRequest,response,new Date(startTimestamp),new Date(System.currentTimeMillis()));
  if (response.getIsException()) {
    String errorMsg=response.getExceptionMessage();
    throw new InternalErrorException(makeErrorMsgUserFriendly(errorMsg));
  }
  return response;
}

Fixed version (ground truth):
@RequestMapping(value="String_Node_Str",method=RequestMethod.POST) @ResponseBody @Timed(name="String_Node_Str") public SQLResponse query(@RequestBody SQLRequest sqlRequest){
  long startTimestamp=System.currentTimeMillis();
  SQLResponse response=doQuery(sqlRequest);
  response.setDuration(System.currentTimeMillis() - startTimestamp);
  queryService.logQuery(sqlRequest,response,new Date(startTimestamp),new Date(System.currentTimeMillis()));
  return response;
}
Program: 63376
Project: 63376
Buggy source:
private Lock getLockForGivenEntry(String key){
  if (!mEditionLocks.containsKey(key)) {
    mEditionLocks.put(key,new ReentrantLock());
  }
  return mEditionLocks.get(key);
}

Fixed version (ground truth):
private Lock getLockForGivenEntry(String key){
  if (!mEditionLocks.containsKey(key)) {
    mEditionLocks.putIfAbsent(key,new ReentrantLock());
  }
  return mEditionLocks.get(key);
}
Program: 63377
Project: 63377
Buggy source:
public ShellCommands(final List<String> commands){
  this.commands=commands;
}

Fixed version (ground truth):
public ShellCommands(final List<String> commands){
  this(true,commands.toArray(new String[]{}));
}
Program: 63378
Project: 63378
Buggy source:
public <T extends DbBackedBuild>T getFirstBuild(final DbBackedProject project){
  final DbBackedBuild build=getDatastore().createQuery(DbBackedBuild.class).disableValidation().limit(1).order("String_Node_Str").get();
  associateProject(project,build);
  return (T)build;
}

Fixed version (ground truth):
public <T extends DbBackedBuild>T getFirstBuild(final DbBackedProject project){
  final DbBackedBuild build=getQuery(project).disableValidation().limit(1).order("String_Node_Str").get();
  associateProject(project,build);
  return (T)build;
}
Program: 63379
Project: 63379
Buggy source:
public int getNextBuildNumber(DynamicProject project){
  BuildNumberCounter seq=getDatastore().createQuery(BuildNumberCounter.class).field("String_Node_Str").equal(project.getFullName()).get();
  if (seq == null) {
    return 1;
  }
  return seq.getCounter();
}

Fixed version (ground truth):
public int getNextBuildNumber(DynamicProject project){
  BuildNumberCounter seq=getDatastore().createQuery(BuildNumberCounter.class).field("String_Node_Str").equal(project.getFullName()).get();
  if (seq == null) {
    return 1;
  }
  return seq.getCounter() + 1;
}
Program: 63380
Project: 63380
Buggy source:
public List<String> getBranches(){
  ArrayList<String> configuredBranches=parseBranches();
  ArrayList<String> branchList=new ArrayList<String>();
  if (!configuredBranches.contains("String_Node_Str"))   branchList.add("String_Node_Str");
  if (!configuredBranches.contains("String_Node_Str"))   branchList.add("String_Node_Str");
  branchList.addAll(configuredBranches);
  return branchList;
}

Fixed version (ground truth):
public List<String> getBranches(){
  return parseBranches();
}
Program: 63381
Project: 63381
Buggy source:
@Exported public Iterable<String> getBuildHistoryTabs(){
  DynamicProjectBranchTabsProperty tabsProperty=dynamicProject.getProperty(DynamicProjectBranchTabsProperty.class);
  return tabsProperty == null ? Collections.<String>emptyList() : tabsProperty.getBranches();
}

Fixed version (ground truth):
@Exported public Iterable<String> getBuildHistoryTabs(){
  DynamicProjectBranchTabsProperty tabsProperty=dynamicProject.getProperty(DynamicProjectBranchTabsProperty.class);
  List<String> tabs=tabsProperty == null ? new ArrayList<String>() : tabsProperty.getBranches();
  ArrayList<String> configuredTabs=new ArrayList<String>();
  if (!tabs.contains("String_Node_Str"))   configuredTabs.add("String_Node_Str");
  if (!tabs.contains("String_Node_Str"))   configuredTabs.add("String_Node_Str");
  configuredTabs.addAll(tabs);
  return configuredTabs;
}
Program: 63382
Project: 63382
Buggy source:
public Iterable<BuildHistoryRow> getBuilds(String branch){
  return toUiBuilds(filterSkipped(isMyBuilds(branch) ? getDynamicBuildRepository().<DynamicBuild>getCurrentUserBuilds(dynamicProject,BUILD_COUNT) : getDynamicBuildRepository().<DynamicBuild>getLast(dynamicProject,BUILD_COUNT,branch)));
}

Fixed version (ground truth):
public Iterable<BuildHistoryRow> getBuilds(String branch){
  if ("String_Node_Str".equalsIgnoreCase(branch)) {
    branch=null;
  }
  Iterable<DynamicBuild> builds=isMyBuilds(branch) ? getDynamicBuildRepository().<DynamicBuild>getCurrentUserBuilds(dynamicProject,BUILD_COUNT) : getDynamicBuildRepository().<DynamicBuild>getLast(dynamicProject,BUILD_COUNT,branch);
  return toUiBuilds(filterSkipped(builds));
}
Program: 63383
Project: 63383
Buggy source:
@Override public BuildCause.CommitInfo getCommit(){
  return build.getCause().getCommitInfo();
}

Fixed version (ground truth):
@Override public BuildCause.CommitInfo getCommit(){
  BuildCause.CommitInfo commitInfo=build.getCause().getCommitInfo();
  if (commitInfo == null) {
    return BuildCause.CommitInfo.NULL_INFO;
  }
  return commitInfo;
}
Program: 63384
Project: 63384
Buggy source:
public static void render(StaplerResponse rsp,Object output) throws IOException {
  rsp.setContentType("String_Node_Str");
  ObjectMapper mapper=new ObjectMapper(new JsonFactory());
  mapper.setVisibilityChecker(mapper.getSerializationConfig().getDefaultVisibilityChecker().withGetterVisibility(JsonAutoDetect.Visibility.PUBLIC_ONLY).withSetterVisibility(JsonAutoDetect.Visibility.NONE));
  mapper.writeValue(rsp.getOutputStream(),output);
  rsp.flushBuffer();
}

Fixed version (ground truth):
public static void render(StaplerResponse rsp,Object output) throws IOException {
  rsp.setContentType("String_Node_Str");
  ObjectMapper mapper=new ObjectMapper(new JsonFactory());
  mapper.setVisibilityChecker(mapper.getSerializationConfig().getDefaultVisibilityChecker().withGetterVisibility(JsonAutoDetect.Visibility.PUBLIC_ONLY).withSetterVisibility(JsonAutoDetect.Visibility.NONE));
  mapper.writeValue(rsp.getOutputStream(),output);
}
Program: 63385
Project: 63385
Buggy source:
@Override public void doAjax(StaplerRequest req,StaplerResponse rsp,@Header("String_Node_Str") String n) throws IOException, ServletException {
  if (n == null) {
    throw HttpResponses.error(SC_BAD_REQUEST,new IllegalArgumentException("String_Node_Str"));
  }
  rsp.setContentType("String_Node_Str");
  List<T> items=new LinkedList<T>();
  String nn=null;
  Iterable<T> builds=model.getBuildsAfter(n);
  for (  T t : builds) {
    if (adapter.compare(t,n) >= 0) {
      items.add(t);
      if (adapter.isBuilding(t)) {
        nn=adapter.getKey(t);
      }
    }
 else {
      break;
    }
  }
  if (nn == null) {
    if (items.isEmpty()) {
      nn=n;
    }
 else {
      nn=adapter.getNextKey(adapter.getKey(items.get(0)));
    }
  }
  baseList=items;
  GReflectionUtils.setField(HistoryWidget.class,"String_Node_Str",this,nn);
  rsp.setHeader("String_Node_Str",nn);
  req.getView(this,"String_Node_Str").forward(req,rsp);
}

Fixed version (ground truth):
@Override public void doAjax(StaplerRequest req,StaplerResponse rsp,@Header("String_Node_Str") String n) throws IOException, ServletException {
  if (n == null) {
    throw HttpResponses.error(SC_BAD_REQUEST,new IllegalArgumentException("String_Node_Str"));
  }
  rsp.setContentType("String_Node_Str");
  List<T> items=new LinkedList<T>();
  String nn=null;
  Iterable<T> builds=model.getBuildsAfter(Integer.parseInt(n) - 1);
  for (  T t : builds) {
    if (adapter.compare(t,n) >= 0) {
      items.add(t);
      if (adapter.isBuilding(t)) {
        nn=adapter.getKey(t);
      }
    }
 else {
      break;
    }
  }
  if (nn == null) {
    if (items.isEmpty()) {
      nn=n;
    }
 else {
      nn=adapter.getNextKey(adapter.getKey(items.get(0)));
    }
  }
  baseList=items;
  GReflectionUtils.setField(HistoryWidget.class,"String_Node_Str",this,nn);
  rsp.setHeader("String_Node_Str",nn);
  req.getView(this,"String_Node_Str").forward(req,rsp);
}
Program: 63386
Project: 63386
Buggy source:
public Iterable<T> getBuildsAfter(String n){
  return filterSkipped(isMyBuilds() ? dynamicBuildRepository.<T>getCurrentUserBuildsGreaterThan((DbBackedProject)owner,n) : dynamicBuildRepository.<T>getBuildGreaterThan((DbBackedProject)owner,n,branch));
}

Fixed version (ground truth):
public Iterable<T> getBuildsAfter(int n){
  return filterSkipped(isMyBuilds() ? dynamicBuildRepository.<T>getCurrentUserBuildsGreaterThan((DbBackedProject)owner,n) : dynamicBuildRepository.<T>getBuildGreaterThan((DbBackedProject)owner,n,branch));
}
Program: 63387
Project: 63387
Buggy source:
public <T extends DbBackedBuild>Iterable<T> getBuildGreaterThan(DbBackedProject project,String n,String branch){
  int number=Integer.parseInt(n) - 1;
  Query<DbBackedBuild> query=getQuery(project).order("String_Node_Str").field("String_Node_Str").greaterThan(number);
  if (branch != null) {
    query=query.field("String_Node_Str").equal(branch);
  }
  List<DbBackedBuild> builds=query.asList();
  for (  DbBackedBuild build : builds) {
    associateProject(project,build);
  }
  return (Iterable<T>)query.asList();
}

Fixed version (ground truth):
public <T extends DbBackedBuild>Iterable<T> getBuildGreaterThan(DbBackedProject project,int number,String branch){
  Query<DbBackedBuild> query=getQuery(project).order("String_Node_Str").field("String_Node_Str").greaterThan(number).order("String_Node_Str");
  if (branch != null) {
    query=query.field("String_Node_Str").equal(branch);
  }
  List<DbBackedBuild> builds=query.asList();
  for (  DbBackedBuild build : builds) {
    associateProject(project,build);
  }
  return (Iterable<T>)query.asList();
}
Program: 63388
Project: 63388
Buggy source:
public <T extends DbBackedBuild>Iterable<T> getCurrentUserBuildsGreaterThan(DbBackedProject project,String n){
  int number=Integer.parseInt(n) - 1;
  List<DbBackedBuild> builds=getQuery(project).order("String_Node_Str").field("String_Node_Str").equal(Jenkins.getAuthentication().getName()).field("String_Node_Str").greaterThan(number).asList();
  for (  DbBackedBuild build : builds) {
    associateProject(project,build);
  }
  return (Iterable<T>)builds;
}

Fixed version (ground truth):
public <T extends DbBackedBuild>Iterable<T> getCurrentUserBuildsGreaterThan(DbBackedProject project,int number){
  List<DbBackedBuild> builds=getQuery(project).order("String_Node_Str").field("String_Node_Str").equal(Jenkins.getAuthentication().getName()).field("String_Node_Str").greaterThan(number).asList();
  for (  DbBackedBuild build : builds) {
    associateProject(project,build);
  }
  return (Iterable<T>)builds;
}