Program: 61066
Project: 61066
Buggy source:
private NodeCond buildSearchCond(final List<SearchConditionWrapper> conditions){
  SearchConditionWrapper searchConditionWrapper=conditions.get(conditions.size() - 1);
  LOG.debug("String_Node_Str" + "String_Node_Str",new Object[]{searchConditionWrapper.getFilterName(),searchConditionWrapper.getFilterType(),searchConditionWrapper.getFilterValue(),searchConditionWrapper.getOperationType(),searchConditionWrapper.getType(),searchConditionWrapper.isNotOperator()});
  NodeCond nodeCond=null;
switch (searchConditionWrapper.getFilterType()) {
case ATTRIBUTE:
    final AttributeCond attributeCond=new AttributeCond();
  attributeCond.setSchema(searchConditionWrapper.getFilterName());
attributeCond.setType(searchConditionWrapper.getType());
attributeCond.setExpression(searchConditionWrapper.getFilterValue());
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(attributeCond);
}
 else {
nodeCond=NodeCond.getLeafCond(attributeCond);
}
break;
case MEMBERSHIP:
final MembershipCond membershipCond=new MembershipCond();
membershipCond.setRoleId(RoleTO.fromDisplayName(searchConditionWrapper.getFilterName()));
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(membershipCond);
}
 else {
nodeCond=NodeCond.getLeafCond(membershipCond);
}
break;
case RESOURCE:
final ResourceCond resourceCond=new ResourceCond();
resourceCond.setName(searchConditionWrapper.getFilterName());
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(resourceCond);
}
 else {
nodeCond=NodeCond.getLeafCond(resourceCond);
}
break;
default :
}
LOG.debug("String_Node_Str",nodeCond);
if (conditions.size() > 1) {
List<SearchConditionWrapper> subList=conditions.subList(0,conditions.size() - 1);
if (OperationType.OR.equals(searchConditionWrapper.getOperationType())) {
nodeCond=NodeCond.getOrCond(nodeCond,buildSearchCond(subList));
}
 else {
nodeCond=NodeCond.getAndCond(nodeCond,buildSearchCond(subList));
}
}
return nodeCond;
}

Fixed version (ground truth):
private NodeCond buildSearchCond(final List<SearchConditionWrapper> conditions){
  SearchConditionWrapper searchConditionWrapper=conditions.get(conditions.size() - 1);
  LOG.debug("String_Node_Str" + "String_Node_Str",new Object[]{searchConditionWrapper.getFilterName(),searchConditionWrapper.getFilterType(),searchConditionWrapper.getFilterValue(),searchConditionWrapper.getOperationType(),searchConditionWrapper.getType(),searchConditionWrapper.isNotOperator()});
  NodeCond nodeCond=null;
switch (searchConditionWrapper.getFilterType()) {
case ATTRIBUTE:
    final AttributeCond attributeCond=new AttributeCond();
  attributeCond.setSchema(searchConditionWrapper.getFilterName());
attributeCond.setType(searchConditionWrapper.getType());
attributeCond.setExpression(searchConditionWrapper.getFilterValue());
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(attributeCond);
}
 else {
nodeCond=NodeCond.getLeafCond(attributeCond);
}
break;
case MEMBERSHIP:
final MembershipCond membershipCond=new MembershipCond();
membershipCond.setRoleId(RoleTO.fromDisplayName(searchConditionWrapper.getFilterName()));
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(membershipCond);
}
 else {
nodeCond=NodeCond.getLeafCond(membershipCond);
}
break;
case RESOURCE:
final ResourceCond resourceCond=new ResourceCond();
resourceCond.setResourceName(searchConditionWrapper.getFilterName());
if (searchConditionWrapper.isNotOperator()) {
nodeCond=NodeCond.getNotLeafCond(resourceCond);
}
 else {
nodeCond=NodeCond.getLeafCond(resourceCond);
}
break;
default :
}
LOG.debug("String_Node_Str",nodeCond);
if (conditions.size() > 1) {
List<SearchConditionWrapper> subList=conditions.subList(0,conditions.size() - 1);
if (OperationType.OR.equals(searchConditionWrapper.getOperationType())) {
nodeCond=NodeCond.getOrCond(nodeCond,buildSearchCond(subList));
}
 else {
nodeCond=NodeCond.getAndCond(nodeCond,buildSearchCond(subList));
}
}
return nodeCond;
}