Program: 178173
Project: 178173
Buggy source:
/** 
 * @param rawLine
 * @return If not null, returns the invalid keyword found
 * @throws InvalidParameterException
 */
public String registerLine(String rawLine) throws InvalidParameterException {
  String[] words=rawLine.split("String_Node_Str");
  String lineText=rawLine.toLowerCase();
  InventoryConfigRule newRule=null;
  if (words.length == 2) {
    if (lineText.matches("String_Node_Str") || lineText.matches("String_Node_Str")) {
      words[0]=words[0].toLowerCase();
      if (words[1].equals(InvTweaksConfig.LOCKED)) {
        int[] newLockedSlots=InventoryConfigRule.getRulePreferredPositions(words[0],Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
        int lockPriority=InventoryConfigRule.getRuleType(words[0]).getHighestPriority();
        for (        int i : newLockedSlots) {
          lockPriorities[i]=lockPriority;
        }
        return null;
      }
 else       if (words[1].equals(InvTweaksConfig.FROZEN)) {
        int[] newLockedSlots=InventoryConfigRule.getRulePreferredPositions(words[0],Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
        for (        int i : newLockedSlots) {
          frozenSlots[i]=true;
        }
        return null;
      }
 else {
        String keyword=words[1];
        boolean isValidKeyword=tree.isKeywordValid(keyword.toLowerCase());
        if (!isValidKeyword) {
          Vector<String> wordVariants=getKeywordVariants(keyword);
          for (          String wordVariant : wordVariants) {
            if (tree.isKeywordValid(wordVariant.toLowerCase())) {
              isValidKeyword=true;
              keyword=wordVariant;
              break;
            }
          }
        }
        if (isValidKeyword) {
          newRule=new InventoryConfigRule(tree,words[0],keyword.toLowerCase(),Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
          rules.add(newRule);
          return null;
        }
 else {
          return keyword.toLowerCase();
        }
      }
    }
 else     if (words[0].equals(InvTweaksConfig.AUTOREPLACE)) {
      words[1]=words[1].toLowerCase();
      if (tree.isKeywordValid(words[1]) || words[1].equals(InvTweaksConfig.AUTOREPLACE_NOTHING)) {
        autoReplaceRules.add(words[1]);
      }
      return null;
    }
  }
 else   if (words.length == 1) {
    if (words[0].equals(InvTweaksConfig.DEBUG)) {
      debugEnabled=true;
      return null;
    }
  }
  throw new InvalidParameterException();
}

Fixed version (ground truth):
/** 
 * @param rawLine
 * @return If not null, returns the invalid keyword found
 * @throws InvalidParameterException
 */
public String registerLine(String rawLine) throws InvalidParameterException {
  String[] words=rawLine.split("String_Node_Str");
  String lineText=rawLine.toLowerCase();
  InventoryConfigRule newRule=null;
  if (words.length == 2) {
    if (lineText.matches("String_Node_Str") || lineText.matches("String_Node_Str")) {
      words[0]=words[0].toLowerCase();
      if (words[1].equals(InvTweaksConfig.LOCKED)) {
        int[] newLockedSlots=InventoryConfigRule.getRulePreferredPositions(words[0],Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
        int lockPriority=InventoryConfigRule.getRuleType(words[0]).getHighestPriority();
        for (        int i : newLockedSlots) {
          lockPriorities[i]=lockPriority;
        }
        return null;
      }
 else       if (words[1].equals(InvTweaksConfig.FROZEN)) {
        int[] newLockedSlots=InventoryConfigRule.getRulePreferredPositions(words[0],Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
        for (        int i : newLockedSlots) {
          frozenSlots[i]=true;
        }
        return null;
      }
 else {
        String keyword=words[1].toLowerCase();
        boolean isValidKeyword=tree.isKeywordValid(keyword);
        if (!isValidKeyword) {
          Vector<String> wordVariants=getKeywordVariants(keyword);
          for (          String wordVariant : wordVariants) {
            if (tree.isKeywordValid(wordVariant.toLowerCase())) {
              isValidKeyword=true;
              keyword=wordVariant;
              break;
            }
          }
        }
        if (isValidKeyword) {
          newRule=new InventoryConfigRule(tree,words[0],keyword.toLowerCase(),Const.INVENTORY_SIZE,Const.INVENTORY_ROW_SIZE);
          rules.add(newRule);
          return null;
        }
 else {
          return keyword.toLowerCase();
        }
      }
    }
 else     if (words[0].equals(InvTweaksConfig.AUTOREPLACE)) {
      words[1]=words[1].toLowerCase();
      if (tree.isKeywordValid(words[1]) || words[1].equals(InvTweaksConfig.AUTOREPLACE_NOTHING)) {
        autoReplaceRules.add(words[1]);
      }
      return null;
    }
  }
 else   if (words.length == 1) {
    if (words[0].equals(InvTweaksConfig.DEBUG)) {
      debugEnabled=true;
      return null;
    }
  }
  throw new InvalidParameterException();
}