Index: branches/pap/ippTools/src/dettool_residexp.c
===================================================================
--- branches/pap/ippTools/src/dettool_residexp.c	(revision 23511)
+++ branches/pap/ippTools/src/dettool_residexp.c	(revision 23532)
@@ -95,6 +95,6 @@
     PXOPT_LOOKUP_S32(iteration, config->args, "-iteration", false, false);
     PXOPT_LOOKUP_S64(exp_id, config->args, "-exp_id", true, false); // required
-    PXOPT_LOOKUP_S16(code, config->args, "-code", false, false);
-    PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (code == 0), false); // Required if code == 0
+    PXOPT_LOOKUP_S16(fault, config->args, "-fault", false, false);
+    PXOPT_LOOKUP_STR(recipe, config->args, "-recip", (fault == 0), false); // Required if fault == 0
     PXOPT_LOOKUP_F64(bg, config->args, "-bg", false, false);
     PXOPT_LOOKUP_F64(bg_stdev, config->args, "-bg_stdev", false, false);
@@ -124,7 +124,7 @@
 
     if (psListLength(where->list)) {
-	psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
-	psStringAppend(&query, " WHERE %s", whereClause);
-	psFree(whereClause);
+        psString whereClause = psDBGenerateWhereConditionSQL(where, NULL);
+        psStringAppend(&query, " WHERE %s", whereClause);
+        psFree(whereClause);
     }
     psFree(where);
@@ -151,5 +151,5 @@
 
     if (!detResidExpInsert(
-	    config->dbh,
+            config->dbh,
             det_id,
             iteration,
@@ -174,7 +174,7 @@
             user_5,
             path_base,
-	    "full",
+            "full",
             !reject,
-            code
+            fault
         )) {
         psError(PS_ERR_UNKNOWN, false, "database error");
@@ -225,5 +225,5 @@
     if (reject) {
         psStringAppend(&query, " %s", "AND detResidExp.accept != 0");
-    } 
+    }
 
     // treat limit == 0 as "no limit"
@@ -273,5 +273,5 @@
     PXOPT_COPY_S32(config->args, where, "-iteration", "iteration", "==");
     PXOPT_COPY_S64(config->args, where, "-exp_id",    "exp_id", "==");
-    PXOPT_COPY_S16(config->args, where, "-code",      "fault", "==");
+    PXOPT_COPY_S16(config->args, where, "-fault",      "fault", "==");
 
     psString query = pxDataGet("dettool_revertresidexp.sql");
@@ -330,5 +330,5 @@
     PXOPT_LOOKUP_STR(data_state, config->args, "-data_state", false, false);
     if (data_state) {
-	if (!isValidDataState (data_state)) return false;
+        if (!isValidDataState (data_state)) return false;
     }
 
