Program: 163442
Project: 163442
Buggy source:
/** 
 * Get all indexes in the given selector and adds the conversions defined at that index to the map of conversionsByIndex. <p>This method is called in the same sequence each selector was created (in   {@link FieldConversionMapping#prepareExecution(String[])}) <p>At the end of the process, the map of conversionsByIndex will have each index with its list of conversions in the order they were declared.
 * @param selector the selected fields for a given conversion sequence.
 * @param conversionsByIndex map of all conversions registered to every field index, in the order they were declared
 * @param values The field sequence that identifies how records will be organized.<p> This is generally the sequence of headers in a record, but it might be just the first parsed row from a given input (as field selection by index is allowed).
 */
public void prepareExecution(FieldSelector selector,Map<Integer,List<Conversion<String,?>>> conversionsByIndex,String[] values){
  if (conversionsMap == null) {
    return;
  }
  Conversion<String,?>[] conversions=conversionsMap.get(selector);
  if (conversions == null) {
    return;
  }
  int[] fieldIndexes=selector.getFieldIndexes(values);
  for (  int fieldIndex : fieldIndexes) {
    List<Conversion<String,?>> conversionsAtIndex=conversionsByIndex.get(fieldIndex);
    if (conversionsAtIndex == null) {
      conversionsAtIndex=new ArrayList<Conversion<String,?>>();
      conversionsByIndex.put(fieldIndex,conversionsAtIndex);
    }
    validateDuplicates(selector,conversionsAtIndex,conversions);
    conversionsAtIndex.addAll(Arrays.asList(conversions));
  }
}

Fixed version (ground truth):
/** 
 * Get all indexes in the given selector and adds the conversions defined at that index to the map of conversionsByIndex. <p>This method is called in the same sequence each selector was created (in   {@link FieldConversionMapping#prepareExecution(String[])}) <p>At the end of the process, the map of conversionsByIndex will have each index with its list of conversions in the order they were declared.
 * @param selector the selected fields for a given conversion sequence.
 * @param conversionsByIndex map of all conversions registered to every field index, in the order they were declared
 * @param values The field sequence that identifies how records will be organized.<p> This is generally the sequence of headers in a record, but it might be just the first parsed row from a given input (as field selection by index is allowed).
 */
public void prepareExecution(FieldSelector selector,Map<Integer,List<Conversion<?,?>>> conversionsByIndex,String[] values){
  if (conversionsMap == null) {
    return;
  }
  Conversion<String,?>[] conversions=conversionsMap.get(selector);
  if (conversions == null) {
    return;
  }
  int[] fieldIndexes=selector.getFieldIndexes(values);
  for (  int fieldIndex : fieldIndexes) {
    List<Conversion<?,?>> conversionsAtIndex=conversionsByIndex.get(fieldIndex);
    if (conversionsAtIndex == null) {
      conversionsAtIndex=new ArrayList<Conversion<?,?>>();
      conversionsByIndex.put(fieldIndex,conversionsAtIndex);
    }
    validateDuplicates(selector,conversionsAtIndex,conversions);
    conversionsAtIndex.addAll(Arrays.asList(conversions));
  }
}