test_class.file: nucleo/src/test/java/com/cloud/agent/api/routing/SetNetworkACLCommandTest.java
test_class.identifier: SetNetworkACLCommandTest
test_case.body: @Test
      public void testNetworkAclRuleOrdering(){
  
          //given
          List<NetworkACLTO> aclList = Lists.newArrayList();
  
          aclList.add(new NetworkACLTO(3, null, null, null, null, false, false, null, null, null, null, false, 3));
          aclList.add(new NetworkACLTO(1, null, null, null, null, false, false, null, null, null, null, false, 1));
          aclList.add(new NetworkACLTO(2, null, null, null, null, false, false, null, null, null, null, false, 2));
  
          SetNetworkACLCommand cmd = new SetNetworkACLCommand(aclList, null);
  
          //when
          cmd.orderNetworkAclRulesByRuleNumber(aclList);
  
          //then
          for(int i=0; i< aclList.size();i++){
              assertEquals(aclList.get(i).getNumber(), i+1);
          }
      }
test_case.class_method_signature: SetNetworkACLCommandTest.testNetworkAclRuleOrdering()
test_case.full_signature: @Test public void testNetworkAclRuleOrdering()
test_case.identifier: testNetworkAclRuleOrdering
test_case.invocations: newArrayList add add add orderNetworkAclRulesByRuleNumber size assertEquals getNumber get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNetworkAclRuleOrdering()
focal_class.declarator: rules
focal_class.original_string: NetworkACLTO[] rules;
focal_class.type: NetworkACLTO[]
focal_class.var_name: rules
focal_class.declarator: nic
focal_class.original_string: NicTO nic;
focal_class.type: NicTO
focal_class.var_name: nic
focal_class.file: nucleo/src/main/java/com/cloud/agent/api/routing/SetNetworkACLCommand.java
focal_class.identifier: SetNetworkACLCommand
focal_class.class_method_signature: SetNetworkACLCommand.SetNetworkACLCommand()
focal_class.full_signature: protected  SetNetworkACLCommand()
focal_class.identifier: SetNetworkACLCommand
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  SetNetworkACLCommand()
focal_class.class_method_signature: SetNetworkACLCommand.SetNetworkACLCommand(final List<NetworkACLTO> rules, final NicTO nic)
focal_class.full_signature: public  SetNetworkACLCommand(final List<NetworkACLTO> rules, final NicTO nic)
focal_class.identifier: SetNetworkACLCommand
focal_class.modifiers: public
focal_class.parameters: (final List<NetworkACLTO> rules, final NicTO nic)
focal_class.signature:  SetNetworkACLCommand(final List<NetworkACLTO> rules, final NicTO nic)
focal_class.class_method_signature: SetNetworkACLCommand.getRules()
focal_class.full_signature: public NetworkACLTO[] getRules()
focal_class.identifier: getRules
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NetworkACLTO[]
focal_class.signature: NetworkACLTO[] getRules()
focal_class.class_method_signature: SetNetworkACLCommand.generateFwRules()
focal_class.full_signature: public String[][] generateFwRules()
focal_class.identifier: generateFwRules
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: String[][]
focal_class.signature: String[][] generateFwRules()
focal_class.class_method_signature: SetNetworkACLCommand.orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)
focal_class.full_signature: protected void orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)
focal_class.identifier: orderNetworkAclRulesByRuleNumber
focal_class.modifiers: protected
focal_class.parameters: (List<NetworkACLTO> aclList)
focal_class.return: void
focal_class.signature: void orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)
focal_class.class_method_signature: SetNetworkACLCommand.getNic()
focal_class.full_signature: public NicTO getNic()
focal_class.identifier: getNic
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: NicTO
focal_class.signature: NicTO getNic()
focal_class.class_method_signature: SetNetworkACLCommand.getAnswersCount()
focal_class.full_signature: @Override public int getAnswersCount()
focal_class.identifier: getAnswersCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int getAnswersCount()
focal_class.superclass: extends NetworkElementCommand
focal_method.body: protected void orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList) {
          Collections.sort(aclList, new Comparator<NetworkACLTO>() {
              @Override
              public int compare(final NetworkACLTO acl1, final NetworkACLTO acl2) {
                  return acl1.getNumber() > acl2.getNumber() ? 1 : -1;
              }
          });
      }
focal_method.class_method_signature: SetNetworkACLCommand.orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)
focal_method.full_signature: protected void orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)
focal_method.identifier: orderNetworkAclRulesByRuleNumber
focal_method.invocations: sort getNumber getNumber
focal_method.modifiers: protected
focal_method.parameters: (List<NetworkACLTO> aclList)
focal_method.return: void
focal_method.signature: void orderNetworkAclRulesByRuleNumber(List<NetworkACLTO> aclList)