Program: 25452
Project: 25452
Buggy source:
@Test public void testManagedFlowModWithTag(){
  VLANSlicer otherSlicer=new VLANSlicer();
  otherSlicer.setTagManagement(true);
  pConfig=new PortConfig();
  pConfig.setPortName("String_Node_Str");
  VLANRange range=new VLANRange();
  range.setVlanAvail((short)101,true);
  pConfig.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig);
  pConfig2=new PortConfig();
  pConfig2.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)103,true);
  pConfig2.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig2);
  pConfig3=new PortConfig();
  pConfig3.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)104,true);
  pConfig3.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig3);
  pConfig5=new PortConfig();
  pConfig5.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)106,true);
  pConfig5.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig5);
  pConfig6=new PortConfig();
  pConfig6.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)107,true);
  pConfig6.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig6);
  otherSlicer.setSwitch(sw);
  OFFlowMod flowMod=new OFFlowMod();
  OFMatch match=new OFMatch();
  match.setInputPort((short)3);
  match.setDataLayerVirtualLan((short)200);
  flowMod.setMatch(match);
  List<OFAction> actions=new ArrayList<OFAction>();
  OFActionOutput out=new OFActionOutput();
  out.setPort((short)1);
  actions.add(out);
  flowMod.setActions(actions);
  flowMod.setLength((short)(OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH));
  List<OFFlowMod> managedFlows=otherSlicer.managedFlows(flowMod);
  assertTrue(managedFlows.size() == 0);
  actions.clear();
  OFActionVirtualLanIdentifier set_vlan_vid=new OFActionVirtualLanIdentifier();
  set_vlan_vid.setVirtualLanIdentifier((short)100);
  actions.add(set_vlan_vid);
  actions.add(out);
  flowMod.setActions(actions);
  flowMod.getMatch().setDataLayerVirtualLan((short)0);
  flowMod.setLength((short)(OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH + OFActionVirtualLanIdentifier.MINIMUM_LENGTH));
  managedFlows=otherSlicer.managedFlows(flowMod);
  assertTrue(managedFlows.size() == 0);
}

Fixed version (ground truth):
@Test public void testManagedFlowModWithTag(){
  VLANSlicer otherSlicer=new VLANSlicer();
  otherSlicer.setTagManagement(true);
  pConfig=new PortConfig();
  pConfig.setPortName("String_Node_Str");
  VLANRange range=new VLANRange();
  range.setVlanAvail((short)101,true);
  pConfig.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig);
  pConfig2=new PortConfig();
  pConfig2.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)103,true);
  pConfig2.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig2);
  pConfig3=new PortConfig();
  pConfig3.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)104,true);
  pConfig3.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig3);
  pConfig5=new PortConfig();
  pConfig5.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)106,true);
  pConfig5.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig5);
  pConfig6=new PortConfig();
  pConfig6.setPortName("String_Node_Str");
  range=new VLANRange();
  range.setVlanAvail((short)107,true);
  pConfig6.setVLANRange(range);
  otherSlicer.setPortConfig("String_Node_Str",pConfig6);
  otherSlicer.setSwitch(sw);
  OFFlowMod flowMod=new OFFlowMod();
  OFMatch match=new OFMatch();
  match.setInputPort((short)3);
  match.setDataLayerVirtualLan((short)200);
  match.setWildcards(match.getWildcardObj().matchOn(Flag.IN_PORT));
  match.setWildcards(match.getWildcardObj().matchOn(Flag.DL_VLAN));
  flowMod.setMatch(match);
  List<OFAction> actions=new ArrayList<OFAction>();
  OFActionOutput out=new OFActionOutput();
  out.setPort((short)1);
  actions.add(out);
  flowMod.setActions(actions);
  flowMod.setLength((short)(OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH));
  List<OFFlowMod> managedFlows=otherSlicer.managedFlows(flowMod);
  assertTrue(managedFlows.size() == 0);
  actions.clear();
  OFActionVirtualLanIdentifier set_vlan_vid=new OFActionVirtualLanIdentifier();
  set_vlan_vid.setVirtualLanIdentifier((short)100);
  actions.add(set_vlan_vid);
  actions.add(out);
  flowMod.setActions(actions);
  flowMod.getMatch().setDataLayerVirtualLan((short)0);
  flowMod.setLength((short)(OFFlowMod.MINIMUM_LENGTH + OFActionOutput.MINIMUM_LENGTH + OFActionVirtualLanIdentifier.MINIMUM_LENGTH));
  managedFlows=otherSlicer.managedFlows(flowMod);
  assertTrue(managedFlows.size() == 0);
}