Program: 147267
Project: 147267
Buggy source:
/** 
 * Take a single row, turn it into a flowMod, and add it to the entries{$dpid}.{$entryName}=FlowMod  IF an entry is in active, mark it with FlowMod = null
 * @param row
 * @param entries
 */
void parseRow(Map<String,Object> row,Map<String,Map<String,OFFlowMod>> entries){
  String switchName=null;
  String entryName=null;
  StringBuffer matchString=new StringBuffer();
  if (ofMessageFactory == null)   ofMessageFactory=new BasicFactory();
  OFFlowMod flowMod=(OFFlowMod)ofMessageFactory.getMessage(OFType.FLOW_MOD);
  if (!row.containsKey(COLUMN_SWITCH) || !row.containsKey(COLUMN_NAME)) {
    log.debug("String_Node_Str",row);
    return;
  }
  try {
    switchName=(String)row.get(COLUMN_SWITCH);
    entryName=(String)row.get(COLUMN_NAME);
    if (!entries.containsKey(switchName))     entries.put(switchName,new HashMap<String,OFFlowMod>());
    StaticFlowEntries.initDefaultFlowMod(flowMod,entryName);
    for (    String key : row.keySet()) {
      if (row.get(key) == null)       continue;
      if (key.equals(COLUMN_SWITCH) || key.equals(COLUMN_NAME) || key.equals("String_Node_Str"))       continue;
      if (key.equals(COLUMN_WILDCARD))       continue;
      if (key.equals(COLUMN_ACTIVE)) {
        if (!Boolean.valueOf((String)row.get(COLUMN_ACTIVE))) {
          log.debug("String_Node_Str",entryName,switchName);
          entries.get(switchName).put(entryName,null);
          return;
        }
      }
 else       if (key.equals(COLUMN_ACTIONS)) {
        StaticFlowEntries.parseActionString(flowMod,(String)row.get(COLUMN_ACTIONS),log);
      }
 else       if (key.equals(COLUMN_COOKIE)) {
        flowMod.setCookie(StaticFlowEntries.computeEntryCookie(flowMod,Integer.valueOf((String)row.get(COLUMN_COOKIE)),entryName));
      }
 else       if (key.equals(COLUMN_PRIORITY)) {
        flowMod.setPriority(U16.t(Integer.valueOf((String)row.get(COLUMN_PRIORITY))));
      }
 else       if (key.equals(COLUMN_HARD_TIMEOUT)) {
        flowMod.setHardTimeout(Short.valueOf(((String)(row.get(COLUMN_HARD_TIMEOUT)))));
      }
 else       if (key.equals(COLUMN_IDLE_TIMEOUT)) {
        flowMod.setHardTimeout(Short.valueOf(((String)(row.get(COLUMN_IDLE_TIMEOUT)))));
      }
 else {
        if (matchString.length() > 0)         matchString.append("String_Node_Str");
        matchString.append(key + "String_Node_Str" + row.get(key).toString());
      }
    }
  }
 catch (  ClassCastException e) {
    if (entryName != null && switchName != null)     log.debug("String_Node_Str" + e.getMessage(),entryName,switchName);
 else     log.debug("String_Node_Str",e.getMessage(),e.getStackTrace());
  }
  OFMatch ofMatch=new OFMatch();
  String match=matchString.toString();
  try {
    ofMatch.fromString(match);
  }
 catch (  IllegalArgumentException e) {
    log.debug("String_Node_Str" + match,entryName,switchName);
    return;
  }
  flowMod.setMatch(ofMatch);
  entries.get(switchName).put(entryName,flowMod);
}

Fixed version (ground truth):
/** 
 * Take a single row, turn it into a flowMod, and add it to the entries{$dpid}.{$entryName}=FlowMod  IF an entry is in active, mark it with FlowMod = null
 * @param row
 * @param entries
 */
void parseRow(Map<String,Object> row,Map<String,Map<String,OFFlowMod>> entries){
  String switchName=null;
  String entryName=null;
  StringBuffer matchString=new StringBuffer();
  if (ofMessageFactory == null)   ofMessageFactory=new BasicFactory();
  OFFlowMod flowMod=(OFFlowMod)ofMessageFactory.getMessage(OFType.FLOW_MOD);
  if (!row.containsKey(COLUMN_SWITCH) || !row.containsKey(COLUMN_NAME)) {
    log.debug("String_Node_Str",row);
    return;
  }
  try {
    switchName=(String)row.get(COLUMN_SWITCH);
    entryName=(String)row.get(COLUMN_NAME);
    if (!entries.containsKey(switchName))     entries.put(switchName,new HashMap<String,OFFlowMod>());
    StaticFlowEntries.initDefaultFlowMod(flowMod,entryName);
    for (    String key : row.keySet()) {
      if (row.get(key) == null)       continue;
      if (key.equals(COLUMN_SWITCH) || key.equals(COLUMN_NAME) || key.equals("String_Node_Str"))       continue;
      if (key.equals(COLUMN_WILDCARD))       continue;
      if (key.equals(COLUMN_ACTIVE)) {
        if (!Boolean.valueOf((String)row.get(COLUMN_ACTIVE))) {
          log.debug("String_Node_Str",entryName,switchName);
          entries.get(switchName).put(entryName,null);
          return;
        }
      }
 else       if (key.equals(COLUMN_ACTIONS)) {
        StaticFlowEntries.parseActionString(flowMod,(String)row.get(COLUMN_ACTIONS),log);
      }
 else       if (key.equals(COLUMN_COOKIE)) {
        flowMod.setCookie(StaticFlowEntries.computeEntryCookie(flowMod,Integer.valueOf((String)row.get(COLUMN_COOKIE)),entryName));
      }
 else       if (key.equals(COLUMN_PRIORITY)) {
        flowMod.setPriority(U16.t(Integer.valueOf((String)row.get(COLUMN_PRIORITY))));
      }
 else       if (key.equals(COLUMN_HARD_TIMEOUT)) {
        flowMod.setHardTimeout(Short.valueOf(((String)(row.get(COLUMN_HARD_TIMEOUT)))));
      }
 else       if (key.equals(COLUMN_IDLE_TIMEOUT)) {
        flowMod.setIdleTimeout(Short.valueOf(((String)(row.get(COLUMN_IDLE_TIMEOUT)))));
      }
 else {
        if (matchString.length() > 0)         matchString.append("String_Node_Str");
        matchString.append(key + "String_Node_Str" + row.get(key).toString());
      }
    }
  }
 catch (  ClassCastException e) {
    if (entryName != null && switchName != null)     log.debug("String_Node_Str" + e.getMessage(),entryName,switchName);
 else     log.debug("String_Node_Str",e.getMessage(),e.getStackTrace());
  }
  OFMatch ofMatch=new OFMatch();
  String match=matchString.toString();
  try {
    ofMatch.fromString(match);
  }
 catch (  IllegalArgumentException e) {
    log.debug("String_Node_Str" + match,entryName,switchName);
    return;
  }
  flowMod.setMatch(ofMatch);
  entries.get(switchName).put(entryName,flowMod);
}