I am going to face a following issue:
I'm writing a program that manages some properties of my application. Each property is a pair of key and value. Application has general skin and also few customized ones (specific). There are two files with properties for each skin version. The general properties loads each time, specific only in case of corresponding version. The problem was that the properties was often duplicated in the same file (just because of mess) or between different files. It started to be hard and time-consuming to use it. My goal was to write a code that looks over all them and will delete duplicates, replace all properties that are general to general file etc. So there was many many conditions to consider during constructing it i.e: "If a property is placed both in general and specific file, than delete the specific only when the key and value are the same, leave both otherwise. If a property is duplicated inside the same file leave only that which has the largest line number etc...". A lot of if-and-else's and you're never sure that you have all combinations considered.
I think that this is more general problem. You have an objects with a few features and many conditions what to do with this object (state (?)) depending on values of those features (true or false). I am wondering if there is some way of resolving such problems (maybe by some graph, table or drawing) to be sure about taking into account all possible cases. Few years ago I've heard something about finite state machine and Mealy's/Moore's automats, maybe this is such issue?
I've managed with my task only because it was not very complicated by trial-and-error and tests. But my question is simple: what would you type in to google to search good solution or book with similar examples?