nus-yam/ex-repair huggingface dataset:
Program: 89471
Project: 89471
Buggy source:
private Runnable getHeartbeatTask(){
  return new Runnable(){
    @Override public void run(){
      try {
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        Connection conn=getHeartbeatConnection();
        _mshostDao.update(conn,_mshostId,getCurrentRunId(),DateUtil.currentGMTTime());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        if (!_peerScanInited) {
          _peerScanInited=true;
          initPeerScan(conn);
        }
        peerScan(conn);
      }
 catch (      CloudRuntimeException e) {
        s_logger.error("String_Node_Str",e.getCause());
        if (e.getCause() instanceof ClusterInvalidSessionException) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        invalidHeartbeatConnection();
      }
catch (      Throwable e) {
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        s_logger.error("String_Node_Str",e);
      }
    }
  }
;
}

Fixed version (ground truth):
private Runnable getHeartbeatTask(){
  return new Runnable(){
    @Override public void run(){
      Transaction txn=Transaction.open("String_Node_Str");
      try {
        txn.transitToUserManagedConnection(getHeartbeatConnection());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        _mshostDao.update(_mshostId,getCurrentRunId(),DateUtil.currentGMTTime());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        if (!_peerScanInited) {
          _peerScanInited=true;
          initPeerScan();
        }
        peerScan();
      }
 catch (      CloudRuntimeException e) {
        s_logger.error("String_Node_Str",e.getCause());
        if (e.getCause() instanceof ClusterInvalidSessionException) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        invalidHeartbeatConnection();
      }
catch (      Throwable e) {
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        s_logger.error("String_Node_Str",e);
      }
 finally {
        txn.close("String_Node_Str");
      }
    }
  }
;
}
Program: 89474
Project: 89474
Buggy source:
void invalidateRunSession(Connection conn,long id,long runid);

Fixed version (ground truth):
void invalidateRunSession(long id,long runid);
Program: 89475
Project: 89475
Buggy source:
void update(Connection conn,long id,long runId,State state,Date lastUpdate);

Fixed version (ground truth):
void update(long id,long runId,State state,Date lastUpdate);
Program: 89476
Project: 89476
Buggy source:
List<ManagementServerHostVO> getActiveList(Connection conn,Date cutTime);

Fixed version (ground truth):
List<ManagementServerHostVO> getActiveList(Date cutTime);
Program: 89477
Project: 89477
Buggy source:
List<ManagementServerHostVO> getInactiveList(Connection conn,Date cutTime);

Fixed version (ground truth):
List<ManagementServerHostVO> getInactiveList(Date cutTime);
Program: 89478
Project: 89478
Buggy source:
@Override public void invalidateRunSession(Connection conn,long id,long runid){
  PreparedStatement pstmt=null;
  try {
    pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setLong(1,id);
    pstmt.setLong(2,runid);
    pstmt.executeUpdate();
    conn.commit();
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
 finally {
    if (pstmt != null) {
      try {
        pstmt.close();
      }
 catch (      Exception e) {
        s_logger.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void invalidateRunSession(long id,long runid){
  Transaction txn=Transaction.currentTxn();
  PreparedStatement pstmt=null;
  try {
    pstmt=txn.prepareAutoCloseStatement("String_Node_Str");
    pstmt.setLong(1,id);
    pstmt.setLong(2,runid);
    pstmt.executeUpdate();
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
}
Program: 89479
Project: 89479
Buggy source:
@Override public void update(Connection conn,long id,long runId,State state,Date lastUpdate){
  PreparedStatement pstmt=null;
  try {
    pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setString(1,state.toString());
    pstmt.setString(2,DateUtil.getDateDisplayString(TimeZone.getTimeZone("String_Node_Str"),lastUpdate));
    pstmt.setLong(3,id);
    pstmt.setLong(4,runId);
    int count=pstmt.executeUpdate();
    conn.commit();
    if (count < 1) {
      throw new CloudRuntimeException("String_Node_Str",new ClusterInvalidSessionException("String_Node_Str" + runId + "String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
 finally {
    if (pstmt != null) {
      try {
        pstmt.close();
      }
 catch (      Exception e) {
        s_logger.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void update(long id,long runId,State state,Date lastUpdate){
  Transaction txn=Transaction.currentTxn();
  PreparedStatement pstmt=null;
  try {
    pstmt=txn.prepareAutoCloseStatement("String_Node_Str");
    pstmt.setString(1,state.toString());
    pstmt.setString(2,DateUtil.getDateDisplayString(TimeZone.getTimeZone("String_Node_Str"),lastUpdate));
    pstmt.setLong(3,id);
    pstmt.setLong(4,runId);
    int count=pstmt.executeUpdate();
    if (count < 1) {
      throw new CloudRuntimeException("String_Node_Str",new ClusterInvalidSessionException("String_Node_Str" + runId + "String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
}
Program: 89480
Project: 89480
Buggy source:
@Override @DB public boolean remove(Long id){
  Transaction txn=Transaction.currentTxn();
  try {
    txn.start();
    ManagementServerHostVO msHost=findById(id);
    msHost.setState(ManagementServerHost.State.Down);
    super.remove(id);
    txn.commit();
    return true;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    txn.rollback();
  }
  return false;
}

Fixed version (ground truth):
@Override @DB public boolean remove(Long id){
  Transaction txn=Transaction.currentTxn();
  try {
    txn.start();
    ManagementServerHostVO msHost=findById(id);
    msHost.setState(ManagementServerHost.State.Down);
    super.remove(id);
    txn.commit();
    return true;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
  }
  return false;
}
Program: 89482
Project: 89482
Buggy source:
@Override public <K>K getNextInSequence(final Class<K> clazz,final String name){
}

Fixed version (ground truth):
@Override @DB(txn=false) public <K>K getNextInSequence(final Class<K> clazz,final String name){
}
Program: 89483
Project: 89483
Buggy source:
public static Transaction open(final String name,final short databaseId,final boolean forceDbChange){
  Transaction txn=tls.get();
  boolean isNew=false;
  if (txn == null) {
    if (s_logger.isTraceEnabled()) {
      s_logger.trace("String_Node_Str" + name);
    }
    txn=new Transaction(name,false,databaseId);
    tls.set(txn);
    isNew=true;
  }
 else   if (forceDbChange) {
    final short currentDbId=txn.getDatabaseId();
    if (currentDbId != databaseId) {
      txn.close(txn.getName());
      txn=new Transaction(name,false,databaseId);
      tls.set(txn);
      isNew=true;
    }
  }
  txn.takeOver(name,false);
  if (isNew) {
    s_logger.debug("String_Node_Str" + txn.getId());
    s_mbean.addTransaction(txn);
  }
  return txn;
}

Fixed version (ground truth):
public static Transaction open(final String name,final short databaseId,final boolean forceDbChange){
  Transaction txn=tls.get();
  boolean isNew=false;
  if (txn == null) {
    if (s_logger.isTraceEnabled()) {
      s_logger.trace("String_Node_Str" + name);
    }
    txn=new Transaction(name,false,databaseId);
    tls.set(txn);
    isNew=true;
  }
 else   if (forceDbChange) {
    final short currentDbId=txn.getDatabaseId();
    if (currentDbId != databaseId) {
      txn.close(txn.getName());
      txn=new Transaction(name,false,databaseId);
      tls.set(txn);
      isNew=true;
    }
  }
  txn.takeOver(name,false);
  if (isNew) {
    s_mbean.addTransaction(txn);
  }
  return txn;
}
Program: 89485
Project: 89485
Buggy source:
private void initPeerScan(Connection conn){
  Date cutTime=DateUtil.currentGMTTime();
  List<ManagementServerHostVO> inactiveList=_mshostDao.getInactiveList(conn,new Date(cutTime.getTime() - heartbeatThreshold));
  if (inactiveList.size() > 0) {
    this.queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeRemoved,inactiveList));
  }
}

Fixed version (ground truth):
private void initPeerScan(){
  Date cutTime=DateUtil.currentGMTTime();
  List<ManagementServerHostVO> inactiveList=_mshostDao.getInactiveList(new Date(cutTime.getTime() - heartbeatThreshold));
  if (inactiveList.size() > 0) {
    this.queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeRemoved,inactiveList));
  }
}
Program: 89486
Project: 89486
Buggy source:
private Runnable getHeartbeatTask(){
  return new Runnable(){
    @Override public void run(){
      try {
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        Connection conn=getHeartbeatConnection();
        _mshostDao.update(conn,_mshostId,getCurrentRunId(),DateUtil.currentGMTTime());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        if (!_peerScanInited) {
          _peerScanInited=true;
          initPeerScan(conn);
        }
        peerScan(conn);
      }
 catch (      CloudRuntimeException e) {
        s_logger.error("String_Node_Str",e.getCause());
        if (e.getCause() instanceof ClusterInvalidSessionException) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        invalidHeartbeatConnection();
      }
catch (      Throwable e) {
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        s_logger.error("String_Node_Str",e);
      }
    }
  }
;
}

Fixed version (ground truth):
private Runnable getHeartbeatTask(){
  return new Runnable(){
    @Override public void run(){
      Transaction txn=Transaction.open("String_Node_Str");
      try {
        txn.transitToUserManagedConnection(getHeartbeatConnection());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        _mshostDao.update(_mshostId,getCurrentRunId(),DateUtil.currentGMTTime());
        if (s_logger.isTraceEnabled()) {
          s_logger.trace("String_Node_Str" + _mshostId);
        }
        if (!_peerScanInited) {
          _peerScanInited=true;
          initPeerScan();
        }
        peerScan();
      }
 catch (      CloudRuntimeException e) {
        s_logger.error("String_Node_Str",e.getCause());
        if (e.getCause() instanceof ClusterInvalidSessionException) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        invalidHeartbeatConnection();
      }
catch (      Throwable e) {
        if (isRootCauseConnectionRelated(e.getCause())) {
          s_logger.error("String_Node_Str");
          queueNotification(new ClusterManagerMessage(ClusterManagerMessage.MessageType.nodeIsolated));
        }
        s_logger.error("String_Node_Str",e);
      }
 finally {
        txn.close("String_Node_Str");
      }
    }
  }
;
}
Program: 89489
Project: 89489
Buggy source:
void invalidateRunSession(Connection conn,long id,long runid);

Fixed version (ground truth):
void invalidateRunSession(long id,long runid);
Program: 89490
Project: 89490
Buggy source:
void update(Connection conn,long id,long runId,State state,Date lastUpdate);

Fixed version (ground truth):
void update(long id,long runId,State state,Date lastUpdate);
Program: 89491
Project: 89491
Buggy source:
List<ManagementServerHostVO> getActiveList(Connection conn,Date cutTime);

Fixed version (ground truth):
List<ManagementServerHostVO> getActiveList(Date cutTime);
Program: 89492
Project: 89492
Buggy source:
List<ManagementServerHostVO> getInactiveList(Connection conn,Date cutTime);

Fixed version (ground truth):
List<ManagementServerHostVO> getInactiveList(Date cutTime);
Program: 89493
Project: 89493
Buggy source:
@Override public void invalidateRunSession(Connection conn,long id,long runid){
  PreparedStatement pstmt=null;
  try {
    pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setLong(1,id);
    pstmt.setLong(2,runid);
    pstmt.executeUpdate();
    conn.commit();
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
 finally {
    if (pstmt != null) {
      try {
        pstmt.close();
      }
 catch (      Exception e) {
        s_logger.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void invalidateRunSession(long id,long runid){
  Transaction txn=Transaction.currentTxn();
  PreparedStatement pstmt=null;
  try {
    pstmt=txn.prepareAutoCloseStatement("String_Node_Str");
    pstmt.setLong(1,id);
    pstmt.setLong(2,runid);
    pstmt.executeUpdate();
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
}
Program: 89494
Project: 89494
Buggy source:
@Override public void update(Connection conn,long id,long runId,State state,Date lastUpdate){
  PreparedStatement pstmt=null;
  try {
    pstmt=conn.prepareStatement("String_Node_Str");
    pstmt.setString(1,state.toString());
    pstmt.setString(2,DateUtil.getDateDisplayString(TimeZone.getTimeZone("String_Node_Str"),lastUpdate));
    pstmt.setLong(3,id);
    pstmt.setLong(4,runId);
    int count=pstmt.executeUpdate();
    conn.commit();
    if (count < 1) {
      throw new CloudRuntimeException("String_Node_Str",new ClusterInvalidSessionException("String_Node_Str" + runId + "String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
 finally {
    if (pstmt != null) {
      try {
        pstmt.close();
      }
 catch (      Exception e) {
        s_logger.warn("String_Node_Str",e);
      }
    }
  }
}

Fixed version (ground truth):
@Override public void update(long id,long runId,State state,Date lastUpdate){
  Transaction txn=Transaction.currentTxn();
  PreparedStatement pstmt=null;
  try {
    pstmt=txn.prepareAutoCloseStatement("String_Node_Str");
    pstmt.setString(1,state.toString());
    pstmt.setString(2,DateUtil.getDateDisplayString(TimeZone.getTimeZone("String_Node_Str"),lastUpdate));
    pstmt.setLong(3,id);
    pstmt.setLong(4,runId);
    int count=pstmt.executeUpdate();
    if (count < 1) {
      throw new CloudRuntimeException("String_Node_Str",new ClusterInvalidSessionException("String_Node_Str" + runId + "String_Node_Str"));
    }
  }
 catch (  SQLException e) {
    throw new CloudRuntimeException("String_Node_Str" + pstmt.toString(),e);
  }
}
Program: 89495
Project: 89495
Buggy source:
@Override @DB public boolean remove(Long id){
  Transaction txn=Transaction.currentTxn();
  try {
    txn.start();
    ManagementServerHostVO msHost=findById(id);
    msHost.setState(ManagementServerHost.State.Down);
    super.remove(id);
    txn.commit();
    return true;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
    txn.rollback();
  }
  return false;
}

Fixed version (ground truth):
@Override @DB public boolean remove(Long id){
  Transaction txn=Transaction.currentTxn();
  try {
    txn.start();
    ManagementServerHostVO msHost=findById(id);
    msHost.setState(ManagementServerHost.State.Down);
    super.remove(id);
    txn.commit();
    return true;
  }
 catch (  Exception e) {
    s_logger.warn("String_Node_Str",e);
  }
  return false;
}
Program: 89497
Project: 89497
Buggy source:
@Override public <K>K getNextInSequence(final Class<K> clazz,final String name){
}

Fixed version (ground truth):
@Override @DB(txn=false) public <K>K getNextInSequence(final Class<K> clazz,final String name){
}
Program: 89498
Project: 89498
Buggy source:
public static Transaction open(final String name,final short databaseId,final boolean forceDbChange){
  Transaction txn=tls.get();
  boolean isNew=false;
  if (txn == null) {
    if (s_logger.isTraceEnabled()) {
      s_logger.trace("String_Node_Str" + name);
    }
    txn=new Transaction(name,false,databaseId);
    tls.set(txn);
    isNew=true;
  }
 else   if (forceDbChange) {
    final short currentDbId=txn.getDatabaseId();
    if (currentDbId != databaseId) {
      txn.close(txn.getName());
      txn=new Transaction(name,false,databaseId);
      tls.set(txn);
      isNew=true;
    }
  }
  txn.takeOver(name,false);
  if (isNew) {
    s_logger.debug("String_Node_Str" + txn.getId());
    s_mbean.addTransaction(txn);
  }
  return txn;
}

Fixed version (ground truth):
public static Transaction open(final String name,final short databaseId,final boolean forceDbChange){
  Transaction txn=tls.get();
  boolean isNew=false;
  if (txn == null) {
    if (s_logger.isTraceEnabled()) {
      s_logger.trace("String_Node_Str" + name);
    }
    txn=new Transaction(name,false,databaseId);
    tls.set(txn);
    isNew=true;
  }
 else   if (forceDbChange) {
    final short currentDbId=txn.getDatabaseId();
    if (currentDbId != databaseId) {
      txn.close(txn.getName());
      txn=new Transaction(name,false,databaseId);
      tls.set(txn);
      isNew=true;
    }
  }
  txn.takeOver(name,false);
  if (isNew) {
    s_mbean.addTransaction(txn);
  }
  return txn;
}
Program: 89500
Project: 89500
Buggy source:
ListResponse<TemplateResponse> createIsoResponses(VirtualMachineTemplate template,Long zoneId);

Fixed version (ground truth):
List<TemplateResponse> createIsoResponses(long isoId,long zoneId,boolean readyOnly);
Program: 89501
Project: 89501
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.copyTemplate(this);
    TemplateResponse templateResponse=_responseGenerator.createTemplateResponse(template,destZoneId);
    templateResponse.setResponseName(getCommandName());
    this.setResponseObject(templateResponse);
  }
 catch (  StorageUnavailableException ex) {
    s_logger.warn("String_Node_Str",ex);
    throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR,ex.getMessage());
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.copyTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
      List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),getDestinationZoneId(),false);
      response.setResponses(templateResponses);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  StorageUnavailableException ex) {
    s_logger.warn("String_Node_Str",ex);
    throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR,ex.getMessage());
  }
}
Program: 89502
Project: 89502
Buggy source:
@Override public void execute(){
  VirtualMachineTemplate template=_userVmService.createPrivateTemplate(this);
  if (template != null) {
    TemplateResponse response=_responseGenerator.createTemplateResponse(template,snapshotId,volumeId);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute(){
  VirtualMachineTemplate template=_userVmService.createPrivateTemplate(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
    List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),snapshotId,volumeId,false);
    response.setResponses(templateResponses);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89503
Project: 89503
Buggy source:
@Override public void execute(){
  Set<Pair<Long,Long>> isoZonePairSet=_mgr.listIsos(this);
  TemplateFilter isoFilterObj=null;
  try {
    if (isoFilter == null) {
      isoFilterObj=TemplateFilter.selfexecutable;
    }
 else {
      isoFilterObj=TemplateFilter.valueOf(isoFilter);
    }
  }
 catch (  IllegalArgumentException e) {
    isoFilterObj=TemplateFilter.selfexecutable;
  }
  boolean isAdmin=false;
  Account account=UserContext.current().getCaller();
  if ((account == null) || BaseCmd.isAdmin(account.getType())) {
    isAdmin=true;
  }
  ListResponse<TemplateResponse> response=_responseGenerator.createIsoResponse(isoZonePairSet,isAdmin,account,bootable,listInReadyState());
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}

Fixed version (ground truth):
@Override public void execute(){
  Set<Pair<Long,Long>> isoZonePairSet=_mgr.listIsos(this);
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> iso : isoZonePairSet) {
    List<TemplateResponse> responses=new ArrayList<TemplateResponse>();
    responses=_responseGenerator.createIsoResponses(iso.first(),iso.second(),listInReadyState());
    templateResponses.addAll(responses);
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
}
Program: 89504
Project: 89504
Buggy source:
public boolean listInReadyState(){
  return true;
}

Fixed version (ground truth):
public boolean listInReadyState(){
  Account account=UserContext.current().getCaller();
  boolean isAccountSpecific=(account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
  TemplateFilter templateFilter=TemplateFilter.valueOf(getIsoFilter());
  boolean onlyReady=(templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)|| (templateFilter == TemplateFilter.executable && isAccountSpecific)|| (templateFilter == TemplateFilter.community);
  return onlyReady;
}
Program: 89505
Project: 89505
Buggy source:
@Override public void execute(){
  Set<Pair<Long,Long>> templateZonePairSet=_mgr.listTemplates(this);
  boolean isAdmin=false;
  Account account=UserContext.current().getCaller();
  if ((account == null) || BaseCmd.isAdmin(account.getType())) {
    isAdmin=true;
  }
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> template : templateZonePairSet) {
    _responseGenerator.createTemplateResponse(templateResponses,template,isAdmin,account,listInReadyState());
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}

Fixed version (ground truth):
@Override public void execute(){
  Set<Pair<Long,Long>> templateZonePairSet=_mgr.listTemplates(this);
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> template : templateZonePairSet) {
    List<TemplateResponse> responses=new ArrayList<TemplateResponse>();
    responses=_responseGenerator.createTemplateResponses(template.first(),template.second(),listInReadyState());
    templateResponses.addAll(responses);
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}
Program: 89506
Project: 89506
Buggy source:
public boolean listInReadyState(){
  return true;
}

Fixed version (ground truth):
public boolean listInReadyState(){
  Account account=UserContext.current().getCaller();
  boolean isAccountSpecific=(account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
  TemplateFilter templateFilter=TemplateFilter.valueOf(getTemplateFilter());
  boolean onlyReady=(templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)|| (templateFilter == TemplateFilter.executable && isAccountSpecific)|| (templateFilter == TemplateFilter.community);
  return onlyReady;
}
Program: 89507
Project: 89507
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  VirtualMachineTemplate template=_templateService.registerIso(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=_responseGenerator.createIsoResponses(template,zoneId);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  VirtualMachineTemplate template=_templateService.registerIso(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
    List<TemplateResponse> templateResponses=_responseGenerator.createIsoResponses(template.getId(),zoneId,false);
    response.setResponses(templateResponses);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89508
Project: 89508
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.registerTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=_responseGenerator.createTemplateResponse2(template,zoneId);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  URISyntaxException ex1) {
    s_logger.info(ex1);
    throw new ServerApiException(BaseCmd.PARAM_ERROR,ex1.getMessage());
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.registerTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
      List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),zoneId,false);
      response.setResponses(templateResponses);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  URISyntaxException ex1) {
    s_logger.info(ex1);
    throw new ServerApiException(BaseCmd.PARAM_ERROR,ex1.getMessage());
  }
}
Program: 89509
Project: 89509
Buggy source:
public static VMTemplateHostVO findTemplateHostRef(long templateId,long zoneId){
  VMTemplateVO vmTemplate=findTemplateById(templateId);
  if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) {
    return _templateHostDao.listByTemplateId(templateId).get(0);
  }
 else {
    return _storageMgr.getTemplateHostRef(zoneId,templateId);
  }
}

Fixed version (ground truth):
public static VMTemplateHostVO findTemplateHostRef(long templateId,long zoneId,boolean readyOnly){
  VMTemplateVO vmTemplate=findTemplateById(templateId);
  if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) {
    return _templateHostDao.listByTemplateId(templateId).get(0);
  }
 else {
    return _storageMgr.getTemplateHostRef(zoneId,templateId,readyOnly);
  }
}
Program: 89510
Project: 89510
Buggy source:
ListResponse<TemplateResponse> createIsoResponses(VirtualMachineTemplate template,Long zoneId);

Fixed version (ground truth):
List<TemplateResponse> createIsoResponses(long isoId,long zoneId,boolean readyOnly);
Program: 89511
Project: 89511
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.copyTemplate(this);
    TemplateResponse templateResponse=_responseGenerator.createTemplateResponse(template,destZoneId);
    templateResponse.setResponseName(getCommandName());
    this.setResponseObject(templateResponse);
  }
 catch (  StorageUnavailableException ex) {
    s_logger.warn("String_Node_Str",ex);
    throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR,ex.getMessage());
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.copyTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
      List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),getDestinationZoneId(),false);
      response.setResponses(templateResponses);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  StorageUnavailableException ex) {
    s_logger.warn("String_Node_Str",ex);
    throw new ServerApiException(BaseCmd.RESOURCE_UNAVAILABLE_ERROR,ex.getMessage());
  }
}
Program: 89512
Project: 89512
Buggy source:
@Override public void execute(){
  VirtualMachineTemplate template=_userVmService.createPrivateTemplate(this);
  if (template != null) {
    TemplateResponse response=_responseGenerator.createTemplateResponse(template,snapshotId,volumeId);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute(){
  VirtualMachineTemplate template=_userVmService.createPrivateTemplate(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
    List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),snapshotId,volumeId,false);
    response.setResponses(templateResponses);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89513
Project: 89513
Buggy source:
@Override public void execute(){
  Set<Pair<Long,Long>> isoZonePairSet=_mgr.listIsos(this);
  TemplateFilter isoFilterObj=null;
  try {
    if (isoFilter == null) {
      isoFilterObj=TemplateFilter.selfexecutable;
    }
 else {
      isoFilterObj=TemplateFilter.valueOf(isoFilter);
    }
  }
 catch (  IllegalArgumentException e) {
    isoFilterObj=TemplateFilter.selfexecutable;
  }
  boolean isAdmin=false;
  Account account=UserContext.current().getCaller();
  if ((account == null) || BaseCmd.isAdmin(account.getType())) {
    isAdmin=true;
  }
  ListResponse<TemplateResponse> response=_responseGenerator.createIsoResponse(isoZonePairSet,isAdmin,account,bootable,listInReadyState());
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}

Fixed version (ground truth):
@Override public void execute(){
  Set<Pair<Long,Long>> isoZonePairSet=_mgr.listIsos(this);
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> iso : isoZonePairSet) {
    List<TemplateResponse> responses=new ArrayList<TemplateResponse>();
    responses=_responseGenerator.createIsoResponses(iso.first(),iso.second(),listInReadyState());
    templateResponses.addAll(responses);
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
}
Program: 89514
Project: 89514
Buggy source:
public boolean listInReadyState(){
  return true;
}

Fixed version (ground truth):
public boolean listInReadyState(){
  Account account=UserContext.current().getCaller();
  boolean isAccountSpecific=(account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
  TemplateFilter templateFilter=TemplateFilter.valueOf(getIsoFilter());
  boolean onlyReady=(templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)|| (templateFilter == TemplateFilter.executable && isAccountSpecific)|| (templateFilter == TemplateFilter.community);
  return onlyReady;
}
Program: 89515
Project: 89515
Buggy source:
@Override public void execute(){
  Set<Pair<Long,Long>> templateZonePairSet=_mgr.listTemplates(this);
  boolean isAdmin=false;
  Account account=UserContext.current().getCaller();
  if ((account == null) || BaseCmd.isAdmin(account.getType())) {
    isAdmin=true;
  }
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> template : templateZonePairSet) {
    _responseGenerator.createTemplateResponse(templateResponses,template,isAdmin,account,listInReadyState());
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}

Fixed version (ground truth):
@Override public void execute(){
  Set<Pair<Long,Long>> templateZonePairSet=_mgr.listTemplates(this);
  ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
  List<TemplateResponse> templateResponses=new ArrayList<TemplateResponse>();
  for (  Pair<Long,Long> template : templateZonePairSet) {
    List<TemplateResponse> responses=new ArrayList<TemplateResponse>();
    responses=_responseGenerator.createTemplateResponses(template.first(),template.second(),listInReadyState());
    templateResponses.addAll(responses);
  }
  response.setResponses(templateResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}
Program: 89516
Project: 89516
Buggy source:
public boolean listInReadyState(){
  return true;
}

Fixed version (ground truth):
public boolean listInReadyState(){
  Account account=UserContext.current().getCaller();
  boolean isAccountSpecific=(account == null || isAdmin(account.getType())) && (getAccountName() != null) && (getDomainId() != null);
  TemplateFilter templateFilter=TemplateFilter.valueOf(getTemplateFilter());
  boolean onlyReady=(templateFilter == TemplateFilter.featured) || (templateFilter == TemplateFilter.selfexecutable) || (templateFilter == TemplateFilter.sharedexecutable)|| (templateFilter == TemplateFilter.executable && isAccountSpecific)|| (templateFilter == TemplateFilter.community);
  return onlyReady;
}
Program: 89517
Project: 89517
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  VirtualMachineTemplate template=_templateService.registerIso(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=_responseGenerator.createIsoResponses(template,zoneId);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  VirtualMachineTemplate template=_templateService.registerIso(this);
  if (template != null) {
    ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
    List<TemplateResponse> templateResponses=_responseGenerator.createIsoResponses(template.getId(),zoneId,false);
    response.setResponses(templateResponses);
    response.setResponseName(getCommandName());
    this.setResponseObject(response);
  }
 else {
    throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
  }
}
Program: 89518
Project: 89518
Buggy source:
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.registerTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=_responseGenerator.createTemplateResponse2(template,zoneId);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  URISyntaxException ex1) {
    s_logger.info(ex1);
    throw new ServerApiException(BaseCmd.PARAM_ERROR,ex1.getMessage());
  }
}

Fixed version (ground truth):
@Override public void execute() throws ResourceAllocationException {
  try {
    VirtualMachineTemplate template=_templateService.registerTemplate(this);
    if (template != null) {
      ListResponse<TemplateResponse> response=new ListResponse<TemplateResponse>();
      List<TemplateResponse> templateResponses=_responseGenerator.createTemplateResponses(template.getId(),zoneId,false);
      response.setResponses(templateResponses);
      response.setResponseName(getCommandName());
      this.setResponseObject(response);
    }
 else {
      throw new ServerApiException(BaseCmd.INTERNAL_ERROR,"String_Node_Str");
    }
  }
 catch (  URISyntaxException ex1) {
    s_logger.info(ex1);
    throw new ServerApiException(BaseCmd.PARAM_ERROR,ex1.getMessage());
  }
}
Program: 89519
Project: 89519
Buggy source:
public static VMTemplateHostVO findTemplateHostRef(long templateId,long zoneId){
  VMTemplateVO vmTemplate=findTemplateById(templateId);
  if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) {
    return _templateHostDao.listByTemplateId(templateId).get(0);
  }
 else {
    return _storageMgr.getTemplateHostRef(zoneId,templateId);
  }
}

Fixed version (ground truth):
public static VMTemplateHostVO findTemplateHostRef(long templateId,long zoneId,boolean readyOnly){
  VMTemplateVO vmTemplate=findTemplateById(templateId);
  if (vmTemplate.getHypervisorType() == HypervisorType.BareMetal) {
    return _templateHostDao.listByTemplateId(templateId).get(0);
  }
 else {
    return _storageMgr.getTemplateHostRef(zoneId,templateId,readyOnly);
  }
}
Program: 89521
Project: 89521
Buggy source:
@Override public String[] getUpgradableVersionRange(){
  return new String[]{"String_Node_Str"};
}

Fixed version (ground truth):
@Override public String[] getUpgradableVersionRange(){
  return new String[]{"String_Node_Str","String_Node_Str"};
}
Program: 89522
Project: 89522
Buggy source:
@Override public String[] getUpgradableVersionRange(){
  return new String[]{"String_Node_Str"};
}

Fixed version (ground truth):
@Override public String[] getUpgradableVersionRange(){
  return new String[]{"String_Node_Str","String_Node_Str"};
}
Program: 89526
Project: 89526
Buggy source:
@Override public List<HostVO> findDirectAgentToLoad(long lastPingSecondsAfter,Long limit){
  SearchCriteria<HostVO> sc=UnmanagedDirectConnectSearch.create();
  sc.setParameters("String_Node_Str",lastPingSecondsAfter);
  return search(sc,new Filter(HostVO.class,"String_Node_Str",true,0L,limit));
}

Fixed version (ground truth):
@Override public List<HostVO> findDirectAgentToLoad(long lastPingSecondsAfter,Long limit){
  SearchCriteria<HostVO> sc=UnmanagedDirectConnectSearch.create();
  sc.setParameters("String_Node_Str",lastPingSecondsAfter);
  sc.setParameters("String_Node_Str",Status.ErrorInMaintenance,Status.Maintenance,Status.PrepareForMaintenance);
  return search(sc,new Filter(HostVO.class,"String_Node_Str",true,0L,limit));
}
Program: 89527
Project: 89527
Buggy source:
@Override public void markHostsAsDisconnected(long msId){
  SearchCriteria<HostVO> sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  HostVO host=createForUpdate();
  host.setManagementServerId(null);
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  UpdateBuilder ub=getUpdateBuilder(host);
  ub.set(host,"String_Node_Str",Status.Disconnected);
  update(ub,sc,null);
}

Fixed version (ground truth):
@Override public void markHostsAsDisconnected(long msId){
  SearchCriteria<HostVO> sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  sc.setParameters("String_Node_Str",Status.ErrorInMaintenance,Status.Maintenance,Status.PrepareForMaintenance);
  HostVO host=createForUpdate();
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  UpdateBuilder ub=getUpdateBuilder(host);
  ub.set(host,"String_Node_Str",Status.Disconnected);
  update(ub,sc,null);
  sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  host=createForUpdate();
  host.setManagementServerId(null);
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  ub=getUpdateBuilder(host);
  update(ub,sc,null);
}
Program: 89529
Project: 89529
Buggy source:
@Override public List<HostVO> findDirectAgentToLoad(long lastPingSecondsAfter,Long limit){
  SearchCriteria<HostVO> sc=UnmanagedDirectConnectSearch.create();
  sc.setParameters("String_Node_Str",lastPingSecondsAfter);
  return search(sc,new Filter(HostVO.class,"String_Node_Str",true,0L,limit));
}

Fixed version (ground truth):
@Override public List<HostVO> findDirectAgentToLoad(long lastPingSecondsAfter,Long limit){
  SearchCriteria<HostVO> sc=UnmanagedDirectConnectSearch.create();
  sc.setParameters("String_Node_Str",lastPingSecondsAfter);
  sc.setParameters("String_Node_Str",Status.ErrorInMaintenance,Status.Maintenance,Status.PrepareForMaintenance);
  return search(sc,new Filter(HostVO.class,"String_Node_Str",true,0L,limit));
}
Program: 89530
Project: 89530
Buggy source:
@Override public void markHostsAsDisconnected(long msId){
  SearchCriteria<HostVO> sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  HostVO host=createForUpdate();
  host.setManagementServerId(null);
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  UpdateBuilder ub=getUpdateBuilder(host);
  ub.set(host,"String_Node_Str",Status.Disconnected);
  update(ub,sc,null);
}

Fixed version (ground truth):
@Override public void markHostsAsDisconnected(long msId){
  SearchCriteria<HostVO> sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  sc.setParameters("String_Node_Str",Status.ErrorInMaintenance,Status.Maintenance,Status.PrepareForMaintenance);
  HostVO host=createForUpdate();
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  UpdateBuilder ub=getUpdateBuilder(host);
  ub.set(host,"String_Node_Str",Status.Disconnected);
  update(ub,sc,null);
  sc=MsStatusSearch.create();
  sc.setParameters("String_Node_Str",msId);
  host=createForUpdate();
  host.setManagementServerId(null);
  host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60));
  host.setDisconnectedOn(new Date());
  ub=getUpdateBuilder(host);
  update(ub,sc,null);
}
Program: 89538
Project: 89538
Buggy source:
protected static String buildName(){
  if (s_logger.isDebugEnabled()) {
    final StackTraceElement[] stacks=Thread.currentThread().getStackTrace();
    final StringBuilder str=new StringBuilder();
    int i=3, j=3;
    while (j < 7 && j < stacks.length) {
      StackTraceElement element=stacks[i];
      String filename=element.getFileName();
      String method=element.getMethodName();
      if ((filename != null && filename.equals("String_Node_Str")) || (method != null && method.equals("String_Node_Str"))) {
        i++;
        continue;
      }
      str.append("String_Node_Str").append(stacks[i].getClassName().substring(stacks[i].getClassName().lastIndexOf("String_Node_Str") + 1)).append("String_Node_Str").append(stacks[i].getMethodName()).append("String_Node_Str").append(stacks[i].getLineNumber());
      j++;
      i++;
    }
    return str.toString();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
protected static String buildName(){
  if (s_logger.isDebugEnabled()) {
    final StackTraceElement[] stacks=Thread.currentThread().getStackTrace();
    final StringBuilder str=new StringBuilder();
    int i=3, j=3;
    while (j < 7 && i < stacks.length) {
      StackTraceElement element=stacks[i];
      String filename=element.getFileName();
      String method=element.getMethodName();
      if ((filename != null && filename.equals("String_Node_Str")) || (method != null && method.equals("String_Node_Str"))) {
        i++;
        continue;
      }
      str.append("String_Node_Str").append(stacks[i].getClassName().substring(stacks[i].getClassName().lastIndexOf("String_Node_Str") + 1)).append("String_Node_Str").append(stacks[i].getMethodName()).append("String_Node_Str").append(stacks[i].getLineNumber());
      j++;
      i++;
    }
    return str.toString();
  }
  return "String_Node_Str";
}