Program: 115725
Project: 115725
Buggy source:
private boolean doProcess(String idOfComponent,String appId,String instanceId){
  ParentComponent component;
  Map<String,Group> groups;
  Map<String,ClusterDataHolder> clusterData;
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + "String_Node_Str" + idOfComponent + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ instanceId+ "String_Node_Str");
  }
  try {
    ApplicationHolder.acquireWriteLock();
    if (idOfComponent.equals(appId)) {
      component=ApplicationHolder.getApplications().getApplication(appId);
    }
 else {
      component=ApplicationHolder.getApplications().getApplication(appId).getGroupRecursively(idOfComponent);
    }
    groups=component.getAliasToGroupMap();
    clusterData=component.getClusterDataMap();
    if (groups.isEmpty() && getAllClusterInactive(clusterData,instanceId) || clusterData.isEmpty() && getAllGroupInactive(groups,instanceId) || getAllClusterInactive(clusterData,instanceId) || getAllGroupInactive(groups,instanceId)) {
      if (component instanceof Application) {
        log.warn("String_Node_Str" + appId + "String_Node_Str"+ instanceId);
        ApplicationBuilder.handleApplicationInstanceInactivateEvent(appId,instanceId);
        return true;
      }
 else {
        if (((Group)component).getStatus(instanceId) != GroupStatus.Inactive) {
          log.info("String_Node_Str" + component.getUniqueIdentifier() + "String_Node_Str"+ instanceId);
          ApplicationBuilder.handleGroupInactivateEvent(appId,component.getUniqueIdentifier(),instanceId);
          return true;
        }
      }
    }
  }
  finally {
    ApplicationHolder.releaseWriteLock();
  }
  return false;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") private boolean doProcess(String idOfComponent,String appId,String instanceId){
  ParentComponent component;
  Map<String,Group> groups;
  Map<String,ClusterDataHolder> clusterData;
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + "String_Node_Str" + idOfComponent + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ instanceId+ "String_Node_Str");
  }
  try {
    ApplicationHolder.acquireWriteLock();
    Application application=ApplicationHolder.getApplications().getApplication(appId);
    component=application;
    if (!idOfComponent.equals(appId)) {
      component=application.getGroupRecursively(idOfComponent);
    }
    groups=component.getAliasToGroupMap();
    clusterData=component.getClusterDataMap();
    if (groups.isEmpty() && getAllClusterInactive(clusterData,instanceId) || clusterData.isEmpty() && getAllGroupInactive(groups,instanceId) || getAllClusterInactive(clusterData,instanceId) || getAllGroupInactive(groups,instanceId)) {
      if (component instanceof Application) {
        log.warn("String_Node_Str" + appId + "String_Node_Str"+ instanceId);
        ApplicationBuilder.handleApplicationInstanceInactivateEvent(appId,instanceId);
        return true;
      }
 else {
        if (((Group)component).getStatus(instanceId) != GroupStatus.Inactive) {
          log.info("String_Node_Str" + component.getUniqueIdentifier() + "String_Node_Str"+ instanceId);
          ApplicationBuilder.handleGroupInactivateEvent(appId,component.getUniqueIdentifier(),instanceId);
          return true;
        }
      }
    }
  }
  finally {
    ApplicationHolder.releaseWriteLock();
  }
  return false;
}