Source:
<code>public boolean isTrue(State state, String[] params) { if (!params[1].equalsIgnoreCase("")) { ObjectInstance container = state.getObject(params[1]); Set<String> contents = ContainerFactory.getContentNames(container); if (contents.isEmpty()) { return false; } ObjectInstance toPeel = null; for (String name : contents) { toPeel = state.getObject(name); boolean match = false; List<IngredientRecipe> ingredientContents = this.topLevelIngredient.getConstituentIngredients(); for (IngredientRecipe content: ingredientContents) { if (content.getName().equals(toPeel.getName())) { if (!content.hasToolAttribute(PeelAction.PEELED)) { return false; } match = true; break; } } if (!match) { AbstractMap<String, IngredientRecipe> necessaryTraits = this.topLevelIngredient.getNecessaryTraits(); Set<String> toPeelTraits = IngredientFactory.getTraits(toPeel); for (Entry<String, IngredientRecipe> entry : necessaryTraits.entrySet()) { String trait = entry.getKey(); if (toPeelTraits.contains(trait)) { if (entry.getValue().hasToolAttribute(PeelAction.PEELED)) { match = true; break; } } } if (!match) { return false; } } } return true; } else { List<IngredientRecipe> contents = topLevelIngredient.getConstituentIngredients(); <START> for (IngredientRecipe content : contents) { <END> if (content.hasToolAttribute(PeelAction.PEELED)) { return true; } } AbstractMap<String, IngredientRecipe> traitMap = topLevelIngredient.getConstituentNecessaryTraits(); for (IngredientRecipe ing : traitMap.values()) { if (ing.hasToolAttribute(PeelAction.PEELED)) { return true; } } return false; } }</code><technical_language>I singular of contents is content for this purpose</technical_language>

Target:
public boolean isTrue(State state, String[] params) { if (!params[1].equalsIgnoreCase("")) { ObjectInstance container = state.getObject(params[1]); Set<String> contents = ContainerFactory.getContentNames(container); if (contents.isEmpty()) { return false; } ObjectInstance toPeel = null; for (String name : contents) { toPeel = state.getObject(name); boolean match = false; List<IngredientRecipe> ingredientContents = this.topLevelIngredient.getConstituentIngredients(); for (IngredientRecipe content: ingredientContents) { if (content.getName().equals(toPeel.getName())) { if (!content.hasToolAttribute(PeelAction.PEELED)) { return false; } match = true; break; } } if (!match) { AbstractMap<String, IngredientRecipe> necessaryTraits = this.topLevelIngredient.getNecessaryTraits(); Set<String> toPeelTraits = IngredientFactory.getTraits(toPeel); for (Entry<String, IngredientRecipe> entry : necessaryTraits.entrySet()) { String trait = entry.getKey(); if (toPeelTraits.contains(trait)) { if (entry.getValue().hasToolAttribute(PeelAction.PEELED)) { match = true; break; } } } if (!match) { return false; } } } return true; } else { List<IngredientRecipe> contents = topLevelIngredient.getConstituentIngredients(); for (IngredientRecipe ing : contents) { if (ing.hasToolAttribute(PeelAction.PEELED)) { return true; } } AbstractMap<String, IngredientRecipe> traitMap = topLevelIngredient.getConstituentNecessaryTraits(); for (IngredientRecipe ing : traitMap.values()) { if (ing.hasToolAttribute(PeelAction.PEELED)) { return true; } } return false; } }