From 77f7de7d88cfe871ec4ff38d87f338dd4617c19c Mon Sep 17 00:00:00 2001
From: Arnaud Jelmoni <arnaud.jelmoni@keyconsulting.fr>
Date: Fri, 27 Nov 2020 16:20:12 +0000
Subject: [PATCH] remove commented code

---
 .../extraction/BuildNumericListenerImpl.java  |  2 -
 .../plugin/persistance/AnyAttribute.java      | 14 ---
 .../archiving/snap/api/DataBaseAPI.java       | 57 -----------
 .../snap/api/extractor/tools/Tools.java       |  8 --
 .../snap/api/manager/SnapManagerApi.java      | 37 -------
 .../snap/api/manager/SnapManagerImpl.java     | 97 -------------------
 .../archiving/snap/api/tools/Criterions.java  |  4 -
 .../archiving/snap/api/tools/Snapshot.java    | 16 ---
 8 files changed, 235 deletions(-)

diff --git a/src/main/java/fr/soleil/actiongroup/collectiveaction/components/singleactioncompletelistener/extraction/BuildNumericListenerImpl.java b/src/main/java/fr/soleil/actiongroup/collectiveaction/components/singleactioncompletelistener/extraction/BuildNumericListenerImpl.java
index 006bc59..d568af5 100644
--- a/src/main/java/fr/soleil/actiongroup/collectiveaction/components/singleactioncompletelistener/extraction/BuildNumericListenerImpl.java
+++ b/src/main/java/fr/soleil/actiongroup/collectiveaction/components/singleactioncompletelistener/extraction/BuildNumericListenerImpl.java
@@ -44,7 +44,6 @@ public class BuildNumericListenerImpl extends ActionListenerDecorator implements
     
     public void actionSucceeded ( String deviceName , ActionResult readResult )
     {
-        //System.out.println("BuildNumericListenerImpl/actionSucceeded/deviceName|"+deviceName);
         DeviceAttributeWrapper[] attributesAnswer = readResult.getAttributesValue ();
         
         int idx = deviceNameToIndexMap.get ( deviceName );
@@ -89,7 +88,6 @@ public class BuildNumericListenerImpl extends ActionListenerDecorator implements
         for ( int i = 0 ; i < deviceAttributes.length ; i ++ )
         {
             ret [ i ] = Tools.toDouble ( deviceAttributes [ i ].getAttribute () );
-            //System.out.println("BuildNumericListenerImpl/toDoubleTab/deviceName|"+deviceName+"/ret [ i ]/"+ret [ i ]);
             this.registerAttributeQuality ( deviceName , deviceAttributes [ i ] );
         }
         
diff --git a/src/main/java/fr/soleil/actiongroup/collectiveaction/onattributes/plugin/persistance/AnyAttribute.java b/src/main/java/fr/soleil/actiongroup/collectiveaction/onattributes/plugin/persistance/AnyAttribute.java
index a751e45..efc967b 100644
--- a/src/main/java/fr/soleil/actiongroup/collectiveaction/onattributes/plugin/persistance/AnyAttribute.java
+++ b/src/main/java/fr/soleil/actiongroup/collectiveaction/onattributes/plugin/persistance/AnyAttribute.java
@@ -232,7 +232,6 @@ public class AnyAttribute {
                 // stored
                 // as
                 // true,false,false,...
-                // System.out.println("");
                 break;
 
             case TangoConst.Tango_DEV_DOUBLE:
@@ -389,39 +388,27 @@ public class AnyAttribute {
     }
 
     public String getConvertedStringAggreggatedValues(final boolean wantsReadValue) {
-        // System.out.println("AnyAttribute/getConvertedStringAggreggatedValues/START");
         if (!hasBeenAggreggated) {
-            // System.out.println("AnyAttribute/getConvertedStringAggreggatedValues/1");
             aggreggate();
         }
 
         if (!hasBothReadAndWrite) {
-            // System.out.println("AnyAttribute/getConvertedStringAggreggatedValues/2");
             return aggreggateAll;
         } else {
             if (wantsReadValue) {
-                // System.out.println("AnyAttribute/getConvertedStringAggreggatedValues/3");
                 return aggreggateRead;
             } else {
-                // System.out.println("AnyAttribute/getConvertedStringAggreggatedValues/4");
                 return aggreggateWrite;
             }
         }
     }
 
     private void aggreggate() {
-        // System.out.println("AnyAttribute/aggreggate/START");
         if (!hasBothReadAndWrite) {
-            // System.out.println("AnyAttribute/aggreggateAll/");
             aggreggateAll = aggreggateAll();
         } else {
-            // System.out.println("AnyAttribute/aggreggateRead/");
             aggreggateRead = aggreggateRead();
-
-            // System.out.println("AnyAttribute/aggreggateWrite/");
             aggreggateWrite = aggreggateWrite();
-            // System.out.println("AnyAttribute/AFTER aggreggateWrite/aggreggateWrite|"+
-            // this.aggreggateWrite+"|" );
         }
         hasBeenAggreggated = true;
     }
@@ -446,7 +433,6 @@ public class AnyAttribute {
     }
 
     private String aggreggateRead() {
-        // System.out.println("AnyAttribute/aggreggateRead/START");
         if (convertedStringValuesTable == null || convertedStringValuesTable.length == 0) {
             return null;
         }
diff --git a/src/main/java/fr/soleil/archiving/snap/api/DataBaseAPI.java b/src/main/java/fr/soleil/archiving/snap/api/DataBaseAPI.java
index cb96cc0..7f4ace9 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/DataBaseAPI.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/DataBaseAPI.java
@@ -773,18 +773,9 @@ public class DataBaseAPI {
             conn = getConnection();
             if (id_context != -1) {
                 // Cas ou l'id_context est donne.
-
                 query = query + clause;
 
-                // System.out.println("query : " + query);
-
-                // if (m_dataSource == null) {
                 preparedStatement = conn.prepareStatement(query);
-                // } else {
-                // conn = m_dataSource.getConnection();
-                // preparedStatement = conn.prepareStatement(query);
-                // }
-
                 preparedStatement.setInt(1, id_context);
                 resultSet = preparedStatement.executeQuery();
 
@@ -908,7 +899,6 @@ public class DataBaseAPI {
         // Create and execute the SQL query string
         String query;
         final String select_field = SnapConst.TAB_SNAP[0] + ", " + SnapConst.TAB_SNAP[2];
-        // + ConfigConst.TAB_SNAP[3] //todo ajouter le champ 'commentaire'
         final String table_1 = getDbSchema() + "." + SnapConst.TABS[3];
         final String clause_2 = SnapConst.TABS[3] + "." + SnapConst.TAB_SNAP[1] + " = ?";
 
@@ -925,7 +915,6 @@ public class DataBaseAPI {
                 final SnapshotLight snapShotLight = new SnapshotLight();
                 snapShotLight.setId_snap(rset.getInt(1));
                 snapShotLight.setSnap_date(rset.getTimestamp(2));
-                // snapShotLight.setSnap_comment(rset.getString(3)); // todo
                 // commentaire
                 associatedSnapshots.add(snapShotLight);
             }
@@ -962,9 +951,6 @@ public class DataBaseAPI {
             final int id_snap) throws SnapshotingException {
         final List<SnapshotLight> associatedSnapshots = new ArrayList<SnapshotLight>();
         // First connect with the database
-        /*
-         * if (getAutoConnect()) connect();
-         */
         Connection conn = null;
         PreparedStatement preparedStatement = null;
         ResultSet rset = null;
@@ -987,14 +973,6 @@ public class DataBaseAPI {
             conn = getConnection();
             if (id_context != -1 && id_snap != -1) {
                 // Cas ou l'id_context et l'id_snap sont donnes.
-                /*
-                 * String clause_2 = ConfigConst.TABS[2] + "." +
-                 * ConfigConst.TAB_SNAP[1] + " = ?"; String clause_3 =
-                 * ConfigConst.TABS[2] + "." + ConfigConst.TAB_SNAP[0] + " = ?";
-                 * if(clause.equals("")) query = query + " WHERE " + clause_2 +
-                 * " AND " + clause_3 + clause_4; else query = query + " AND " +
-                 * clause_2 + " AND " + clause_3 + clause_4;
-                 */
                 query = query + clause_4;
 
                 preparedStatement = conn.prepareStatement(query);
@@ -1015,13 +993,6 @@ public class DataBaseAPI {
 
             } else if (id_context != -1) {
                 // Cas ou l'id_context est donne.
-
-                /*
-                 * String clause_2 = ConfigConst.TABS[2] + "." +
-                 * ConfigConst.TAB_SNAP[1] + " = ?"; if(clause.equals("")) query
-                 * = query + " WHERE " + clause_2 + clause_4; else query = query
-                 * + " AND " + clause_2 + clause_4;
-                 */
                 query = query + clause_4;
                 preparedStatement = conn.prepareStatement(query);
 
@@ -1040,12 +1011,6 @@ public class DataBaseAPI {
                 // preparedStatement.close();
             } else if (id_snap != -1) {
                 // Cas ou l'id_snap est donne.
-                /*
-                 * String clause_2 = ConfigConst.TABS[2] + "." +
-                 * ConfigConst.TAB_SNAP[0] + " = ?"; if(clause.equals("")) query
-                 * = query + " WHERE " + clause_2 + clause_4; else query = query
-                 * + " AND " + clause_2 + clause_4;
-                 */
                 query = query + clause_4;
                 preparedStatement = conn.prepareStatement(query);
                 preparedStatement.setInt(1, id_snap);
@@ -1063,15 +1028,8 @@ public class DataBaseAPI {
             } else {
                 // Cas ou ni l'id_context ni l'id_snap ne sont donnes.
                 query = query + clause_4;
-                // System.out.println("DataBaseApi.getContextAssociatedSnapshots/query  : "
-                // + query);
 
-                // if (m_dataSource == null) {
                 stmt = conn.createStatement();
-                // } else {
-                // conn = m_dataSource.getConnection();
-                // stmt = conn.createStatement();
-                // }
 
                 rset = stmt.executeQuery(query.toString());
                 while (rset.next()) {
@@ -1126,7 +1084,6 @@ public class DataBaseAPI {
         final String clause_2 = SnapConst.TABS[1] + "." + SnapConst.TAB_CONTEXT[2] + " = ?";
 
         // the SQL request is : select count(*) from snap.list where
-        // list.id_context = context.id_context and context.name = 'nom';
         query = "SELECT " + select_field + " FROM " + table_1 + " WHERE " + clause_1 + " AND " + clause_2;
         Connection conn = null;
         try {
@@ -2315,15 +2272,12 @@ public class DataBaseAPI {
                 }
                 final int dim_x = resultSet.getInt(3);
                 setCurrentSpectrumDimX(dim_x);
-                // System.out.println (
-                // "CLA/extract_SpectrumData_RW_MySQL/dim_x/"+dim_x );
             }
         } catch (final SQLException e) {
             System.err.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "DataBaseAPI.extract_SpectrumData_RW_MySQL"
                     + "\r\n" + "\t Reason : \t " + getDbSchema().toUpperCase().trim() + "_FAILURE" + "\r\n"
                     + "\t Description : \t " + e.getMessage() + "\r\n" + "\t Additional information : \r\n"
                     + "\t\t Statement : " + query + "\r\n");
-            // throw e;
         } finally {
             closeResultSet(resultSet);
             closeStatement(preparedStatement);
@@ -2372,20 +2326,12 @@ public class DataBaseAPI {
 
                 final int dim_x = resultSet.getInt(3);
                 setCurrentSpectrumDimX(dim_x);
-
-                // System.out.println (
-                // "CLA/extract_SpectrumData_RW_Oracle/readString/"+readString
-                // );
-                // System.out.println (
-                // "CLA/extract_SpectrumData_RW_Oracle/writeString/"+writeString
-                // );
             }
         } catch (final SQLException e) {
             System.err.println("ERROR !! " + "\r\n" + "\t Origin : \t " + "DataBaseAPI.extract_SpectrumData_RW_Oracle"
                     + "\r\n" + "\t Reason : \t " + getDbSchema().toUpperCase().trim() + "_FAILURE" + "\r\n"
                     + "\t Description : \t " + e.getMessage() + "\r\n" + "\t Additional information : \r\n"
                     + "\t\t Statement : " + query + "\r\n");
-            // throw e;
         } finally {
             closeResultSet(resultSet);
             closeStatement(preparedStatement);
@@ -2998,7 +2944,6 @@ public class DataBaseAPI {
     }
 
     private NullableData<Object[], boolean[][]> getImageValue(final String dbValue, final int data_type) {
-        // System.out.println("***getImageValue() -> " + dbValue);
         if (dbValue == null || "".equals(dbValue) || "null".equals(dbValue)) {
             return null;
         }
@@ -3024,7 +2969,6 @@ public class DataBaseAPI {
             }
         }
 
-        // System.out.println("rowSize,Colsize:"+rowSize+","+colSize);
         final boolean[][] nullElements = new boolean[rowSize][colSize];
         double[][] dvalueArr = null;
         byte[][] cvalueArr = null;
@@ -3441,7 +3385,6 @@ public class DataBaseAPI {
         }
 
         // Returns the names list
-        // System.out.println("query : " + query);
         return definitionsList;
     }
 
diff --git a/src/main/java/fr/soleil/archiving/snap/api/extractor/tools/Tools.java b/src/main/java/fr/soleil/archiving/snap/api/extractor/tools/Tools.java
index aa5c710..30d2876 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/extractor/tools/Tools.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/extractor/tools/Tools.java
@@ -102,11 +102,8 @@ public class Tools {
 
 		boolean isFr = (date.indexOf("-") != 4);
 		int currentLength = date.length();
-		// String toTheSecond = "yyyy-MM-dd HH:mm:ss";
 		String toTheDay = "yyyy-MM-dd";
 
-		// System.out.println ( "CLA/stringToMilli/BEFORE/date|"+date+"|" );
-
 		if (isFr) {
 
 		} else {
@@ -139,12 +136,9 @@ public class Tools {
 			}
 		}
 
-		// System.out.println ( "CLA/stringToMilli/AFTER 1/date|"+date+"|" );
-
 		if (date.indexOf(".") == -1) {
 			date = date + (".000");
 		}
-		// System.out.println ( "CLA/stringToMilli/AFTER 2/date|"+date+"|" );
 
 		try {
 			if (isFr) {
@@ -156,8 +150,6 @@ public class Tools {
 			}
 		} catch (Exception e1) {
 			try {
-				// System.out.println (
-				// "CLA/!!!!!!!!!!!!!!!!!!!!!!/date|"+date+"|" );
 				e1.printStackTrace();
 
 				Timestamp ts = Timestamp.valueOf(date);
diff --git a/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerApi.java b/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerApi.java
index d2efa42..a56ac3c 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerApi.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerApi.java
@@ -476,8 +476,6 @@ public class SnapManagerApi {
             for (int i = 0; i < devslist.length; i++) {
                 if (i > 1 && 0 == i % 2 && devslist[i].equalsIgnoreCase(device_name)) {
                     device_name = devslist[i];
-                    // System.out.println("SnapManagerAPI.register: And the name of "+att_complete_name+" device is
-                    // "+device_name);
                 }
             }
             String attribute_name = att_complete_name.substring(index + 1);
@@ -486,8 +484,6 @@ public class SnapManagerApi {
             att_complete_name = device_name + "/" + attribute_name;
             // / srubio@cells.es: end of my code
 
-//            System.out.println("SnapManagerAPI.register: " + att_complete_name);
-
             final String[] att_splitted_name = split_att_name_3_fields(att_complete_name);
 
             final Timestamp time = new Timestamp(new java.util.Date().getTime());
@@ -521,25 +517,6 @@ public class SnapManagerApi {
         }
     }
 
-    /**
-     * This method retrieves the information associated to a given attribute
-     * 
-     * @param att_complete_name
-     *            the attribute name
-     * @return the associated informations
-     * @throws DevFailed
-     *             execption throwned in case of communications problems with
-     *             the device
-     */
-    // private static AttributeInfo attributeGetInfo(String att_complete_name)
-    // throws DevFailed {
-    // int index = att_complete_name.lastIndexOf("/");
-    // String device_name = att_complete_name.substring(0, index);
-    // String attribute_name = att_complete_name.substring(index + 1);
-    // DeviceProxy deviceProxy = new DeviceProxy(device_name);
-    // AttributeInfo att_info = deviceProxy.get_attribute_info(attribute_name);
-    // return att_info;
-    // }
 
     /**
      * This method insure that a given attribute was registered into Snap DB
@@ -867,10 +844,6 @@ public class SnapManagerApi {
     public static SnapAttributeExtract[] getSnapValues(final int idSnap, final String... attributeNames)
             throws SnapshotingException {
         final SnapAttributeExtract[] conf = snapDataBase.getAttributeConfig(attributeNames);
-        // for (SnapAttributeExtract snapAttributeExtract : conf) {
-        // snapAttributeExtract =
-        // snapDataBase.getSnapResult(snapAttributeExtract, idSnap);
-        // }
         snapDataBase.getSnapResults(Arrays.asList(conf), idSnap);
         return conf;
     }
@@ -921,7 +894,6 @@ public class SnapManagerApi {
                 DeviceData device_data = null;
                 device_data = new DeviceData();
                 device_data.insert(snapShot.toArray());
-                // System.out.println("----------------------------On transfère au SnapManager");
                 deviceProxy.command_inout("SetEquipmentsWithSnapshot", device_data);
             } else {
                 final String message = SnapConst.SNAPSHOTING_ERROR_PREFIX + " : " + SnapConst.ERROR_SNAP_SET_EQUIPMENT;
@@ -954,14 +926,10 @@ public class SnapManagerApi {
             if (snapAttributeExtract.getWritable() != AttrWriteType._READ
                     && snapAttributeExtract.getWritable() != AttrWriteType._READ_WITH_WRITE) {
                 try {
-                    // System.out.println("TriggerSetEquipments test0");
                     final AttributeProxy attributeProxy = new AttributeProxy(
                             snapAttributeExtract.getAttributeCompleteName());
-                    // System.out.println("TriggerSetEquipments test1");
                     final DeviceAttribute deviceAttribute = new DeviceAttribute(attributeProxy.name());
-                    // System.out.println("TriggerSetEquipments test2");
                     final Object value = snapAttributeExtract.getWriteValue();
-                    // System.out.println("TriggerSetEquipments test3");
                     switch (snapAttributeExtract.getDataFormat()) {
                         case AttrDataFormat._SCALAR:
                             if (value == null || NAN.equals(value)) {
@@ -1058,9 +1026,6 @@ public class SnapManagerApi {
                     final String reason = "Failed while executing SnapManagerApi.TriggerSetEquipments() method on attribute:"
                             + nameOfFailure;
                     final String desc = reason;
-                    // String origin = "Attribute: " + nameOfFailure;
-                    // throw new SnapshotingException(message , reason ,
-                    // ErrSeverity.PANIC , desc , "" , devFailed);
                     if (snapFinalEx == null) {
                         snapFinalEx = new SnapshotingException(message, reason, ErrSeverity.PANIC, desc, "", devFailed);
                     } else {
@@ -1084,7 +1049,6 @@ public class SnapManagerApi {
      */
     public static String setEquipmentWithCommand(final String cmd_name, final String option, final Snapshot snapShot)
             throws SnapshotingException {
-        // TODO Auto-generated method stub
         try {
             final int timeout = 3000;
             final String device = chooseDevice(SNAP_MANAGER_DEVICE_CLASS);
@@ -1114,7 +1078,6 @@ public class SnapManagerApi {
                 }
                 device_data.insert(argin);
 
-                // System.out.println("----------------------------On transfère au SnapManager");
                 device_data = deviceProxy.command_inout("SetEquipmentsWithCommand", device_data);
                 return device_data.extractString();
             } else {
diff --git a/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerImpl.java b/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerImpl.java
index 16af838..fffa59f 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerImpl.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/manager/SnapManagerImpl.java
@@ -89,29 +89,10 @@ import fr.soleil.archiving.snap.api.tools.SnapshotingException;
  */
 public class SnapManagerImpl implements ISnapManager {
 
-    // private static boolean isConnected = false;
-    // private final String user;
-    // private final String pwd;
-
-    // private static SnapManagerApi m_snapManager = null;
 
     public SnapManagerImpl() {
-        // this.user = _user;
-        // this.pwd = _pwd;
-
-        // System.out.println("SnapManagerImpl/new/user/" + user + "/pwd/" +
-        // pwd);
     }
 
-    // public SnapManagerImpl(String _user, String _pwd, boolean _isConnected) {
-    // this.user = _user;
-    // this.pwd = _pwd;
-    // this.isConnected = _isConnected;
-    //
-    // System.out.println("SnapManagerImpl/new/user/" + user + "/pwd/" + pwd +
-    // "/isConnected/" + isConnected);
-    // }
-
     @Override
     public SnapAttributeExtract[] findSnapshotAttributes(final SnapshotLight snapshot) throws SnapshotingException {
         return findSnapshotAttributes(snapshot, -1);
@@ -120,19 +101,11 @@ public class SnapManagerImpl implements ISnapManager {
     @Override
     public SnapAttributeExtract[] findSnapshotAttributes(final SnapshotLight snapshot, final int contextID)
             throws SnapshotingException {
-        // checkConnection();
 
         // Gets the list of attributes associated to the given snapshot
         final List<SnapAttributeExtract> arrayList = SnapManagerApi
                 .getSnapshotAssociatedAttributes(snapshot, contextID);
 
-        // // Cast the attributes in SnapAttributesExtract
-        // SnapAttributeExtract[] snapAttributeExtract = new
-        // SnapAttributeExtract[arrayList.size()];
-        // for (int i = 0; i < arrayList.size(); i++) {
-        // snapAttributeExtract[i] = arrayList.get(i);
-        // }
-
         return arrayList.toArray(new SnapAttributeExtract[arrayList.size()]);
     }
 
@@ -144,7 +117,6 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public SnapContext saveContext(final SnapContext context) throws SnapshotingException {
-        // checkConnection();
 
         // The context is registered into the database
         try {
@@ -152,7 +124,6 @@ public class SnapManagerImpl implements ISnapManager {
             context.setId(context_id);
             // PB : Pas d'enregistrement de la relation id_context <-> id_att
             // dans la table 'list'.
-            // SnapManagerApi.createContext2Archiver(context);
         } catch (final SnapshotingException e) {
             final String message = SnapConst.SNAPSHOTING_ERROR_PREFIX + " : " + SnapConst.ERROR_SNAPPATTERN_CREATION;
             final String reason = "Failed while executing SnapManagerApi.createContext2Manager() method...";
@@ -165,22 +136,6 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public Snapshot launchSnapshot(final SnapContext context) throws SnapshotingException {
-        // checkConnection();
-
-        // Registers the snapshot into the database
-        // final long milliseconds = System.currentTimeMillis();
-        // final int type = SnapManagerApi.getSnapDbType();
-        // String date = "";
-        // switch (type) {
-        // case ConfigConst.BD_ORACLE:
-        // date = DateUtil.milliToString(milliseconds,
-        // DateUtil.FR_DATE_PATTERN);
-        // break;
-        // case ConfigConst.BD_MYSQL:
-        // default:
-        // date = DateUtil.milliToString(milliseconds,
-        // DateUtil.US_DATE_PATTERN);
-        // }
 
         int snapId = 0;
         try {
@@ -188,7 +143,6 @@ public class SnapManagerImpl implements ISnapManager {
         } catch (final DevFailed dFEx)// Failure of 'launchSnap2Archiver'.
         {
             DevFailedUtils.printDevFailed(dFEx);
-            // Except.print_exception(dFEx.errors);
             final String message = SnapConst.SNAPSHOTING_ERROR_PREFIX + " : " + SnapConst.ERROR_LAUNCHINGSNAP;
             final String reason = "Failed while executing SnapManagerApi.launchSnap2Archiver() method...";
             String desc = "No SnapArchiver Found";
@@ -232,45 +186,6 @@ public class SnapManagerImpl implements ISnapManager {
         }
     }
 
-    /*
-     * public SnapShot launchSnapshot(SnapContext context) throws
-     * SnapshotingException { if ( !isConnected )
-     * SnapManagerApi.SnapshotingConfigure(this.user , this.pwd);
-     * 
-     * // Registers the snapshot into the database long milliseconds =
-     * System.currentTimeMillis(); int type = SnapManagerApi.getSnapDbType();
-     * String date = ""; switch ( type ) { case ConfigConst.BD_ORACLE: date =
-     * DateUtil.milliToString(milliseconds , DateUtil.FR_DATE_PATTERN); break;
-     * case ConfigConst.BD_MYSQL: default : date =
-     * DateUtil.milliToString(milliseconds , DateUtil.US_DATE_PATTERN); } short
-     * res = SnapManagerApi.launchSnap2Archiver(context.getId()); // Retourner
-     * l'id_snap? if ( res == SnapManagerResult.OK_SNAPLAUNCH ) { // Gets the
-     * snapshot identifier Condition[] condition = new Condition[ 2 ]; String
-     * context_id = "" + context.getId(); condition[ 0 ] = new
-     * Condition(GlobalConst.TAB_SNAP[ 1 ] , GlobalConst.OP_EQUALS ,
-     * context_id); condition[ 1 ] = new Condition(GlobalConst.TAB_SNAP[ 2 ] ,
-     * GlobalConst.OP_GREATER_THAN , date); Criterions criterions = new
-     * Criterions(condition); SnapShotLight[] snapShotLight =
-     * findSnapshots(criterions);
-     * 
-     * if ( snapShotLight.length > 0 ) { // Gets the attributes and theirs
-     * values SnapShotLight snap = snapShotLight[ 0 ]; ArrayList arrayList =
-     * SnapManagerApi.getSnapshotAssociatedAttributes(snap); String[] tableau =
-     * {"" + context.getId(), "" + snap.getId_snap(), "" + snap.getSnap_date()};
-     * SnapShot snapShot = new SnapShot(tableau);
-     * snapShot.setAttribute_List(arrayList); return snapShot; } else { // Pas
-     * de snapshot correspondant. String message =
-     * GlobalConst.SNAPSHOTING_ERROR_PREFIX + " : " +
-     * GlobalConst.ERROR_RET_SNAP; String reason =
-     * "Failed while executing SnapManagerApi.getSnapshotAssociatedAttributes() method..."
-     * ; String desc = ""; throw new SnapshotingException(message , reason ,
-     * ErrSeverity.ERR , desc , ""); } } // Failure of 'launchSnap2Archiver'.
-     * String message = GlobalConst.SNAPSHOTING_ERROR_PREFIX + " : " +
-     * GlobalConst.ERROR_LAUNCHINGSNAP; String reason =
-     * "Failed while executing SnapManagerApi.launchSnap2Archiver() method...";
-     * String desc = ""; throw new SnapshotingException(message , reason ,
-     * ErrSeverity.ERR , desc , ""); }
-     */
 
     @Override
     public SnapshotLight updateCommentOfSnapshot(final SnapshotLight context, final String comment)
@@ -298,7 +213,6 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public SnapContext[] findContexts(final Criterions criterions) throws SnapshotingException {
-        // checkConnection();
         // Gets the contexts which subscribe to the given conditions
         final List<SnapContext> arrayList = SnapManagerApi.getContext(criterions);
 
@@ -309,7 +223,6 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public SnapshotLight[] findSnapshots(final Criterions criterions) throws SnapshotingException {
-        // checkConnection();
         // Gets the snapshots which subscribe to the given conditions
         final List<SnapshotLight> arrayList = SnapManagerApi.getContextAssociatedSnapshots(criterions);
 
@@ -324,7 +237,6 @@ public class SnapManagerImpl implements ISnapManager {
     @Override
     public SnapAttributeHeavy[] findContextAttributes(final SnapContext context, final Criterions criterions)
             throws SnapshotingException {
-        // checkConnection();
         // Gets the attributes which are associated to the given context and
         // subscribe to the given conditions
         final List<SnapAttributeHeavy> arrayList = SnapManagerApi.getContextAssociatedAttributes(context.getId(),
@@ -334,8 +246,6 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public SnapAttributeExtract[] getSnap(final int id) throws SnapshotingException {
-        // checkConnection();
-
         final Condition condition = new Condition(SnapConst.TAB_SNAP[0], "=", String.valueOf(id));
         final Criterions searchCriterions = new Criterions();
         searchCriterions.addCondition(condition);
@@ -358,14 +268,7 @@ public class SnapManagerImpl implements ISnapManager {
 
     @Override
     public int findContextId(final int snapshotId) throws SnapshotingException {
-        // checkConnection();
         final int contextId = SnapManagerApi.getContextID(snapshotId);
         return contextId;
     }
-
-    // private void checkConnection() throws SnapshotingException {
-    // if (!isConnected) {
-    // SnapManagerApi.SnapshotingConfigure(this.user, this.pwd);
-    // }
-    // }
 }
diff --git a/src/main/java/fr/soleil/archiving/snap/api/tools/Criterions.java b/src/main/java/fr/soleil/archiving/snap/api/tools/Criterions.java
index 70cd535..0f6afe8 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/tools/Criterions.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/tools/Criterions.java
@@ -219,8 +219,6 @@ public class Criterions {
         // Cas de l'id_snap.
         Condition[] conditions = getConditions(field[0]);
         if (conditions != null) {
-            // System.out.println("conditions.length : " + conditions.length);
-            // Une seule condition sur l'id_snap.
             if (conditions.length == 1) {
                 // Mise en forme du predicat de la requete SQL.
                 String predicat = conditions[0].getPredicatInt();
@@ -284,8 +282,6 @@ public class Criterions {
                 }
             }
         }
-        // System.out.println("Criterions.getSnapshotClause/clause : " +
-        // clause);
         return clause;
     }
 
diff --git a/src/main/java/fr/soleil/archiving/snap/api/tools/Snapshot.java b/src/main/java/fr/soleil/archiving/snap/api/tools/Snapshot.java
index cfcc299..eaa60ae 100644
--- a/src/main/java/fr/soleil/archiving/snap/api/tools/Snapshot.java
+++ b/src/main/java/fr/soleil/archiving/snap/api/tools/Snapshot.java
@@ -137,32 +137,18 @@ public class Snapshot {
      *            <I>list of attributes</I> that are included in the context.
      */
     public Snapshot(String[] argin) {
-        // System.out.println("Snapshot test 0");
         setId_context(Integer.parseInt(argin[0]));
-        // System.out.println("Snapshot test 1");
         setId_snap(Integer.parseInt(argin[1]));
-        // System.out.println("Snapshot test 2");
         setSnap_date(java.sql.Timestamp.valueOf(argin[2]));
-        // System.out.println("Snapshot test 3");
         attribute_List = new ArrayList<SnapAttributeExtract>((argin.length - 3) / 7);
-        // System.out.println("Snapshot test 4");
 
         int k = 3;
-        /*
-         * System.out.println("Snapshot test 5 : argin.length = " +
-         * argin.length); for (int i = 0; i < argin.length; i++) {
-         * System.out.println("argin["+i+"] = |"+argin[i]+"|"); }
-         */
 
         while (k < argin.length) {
-            // System.out.println("Little test 0 : k="+k);
             String[] snapAttributeExtractArray = { argin[k], argin[k + 1], argin[k + 2], argin[k + 3], argin[k + 4],
                     argin[k + 5], argin[k + 6] };
-            // System.out.println("Little test 1");
             SnapAttributeExtract snapAttributeExtract = new SnapAttributeExtract(snapAttributeExtractArray);
-            // System.out.println("Little test 2");
             attribute_List.add(snapAttributeExtract);
-            // System.out.println("Little test 3");
             k = k + 7;
         }
     }
@@ -389,9 +375,7 @@ public class Snapshot {
 
         for (int i = 0; i < attribute_List.size(); i++) {
             SnapAttributeExtract snapAttributeExtract = attribute_List.get(i);
-            // System.out.println("test0");
             String[] snapAttributeExtractArray = snapAttributeExtract.toArray();
-            // System.out.println("test1");
             snapShot[k] = snapAttributeExtractArray[0];
             snapShot[k + 1] = snapAttributeExtractArray[1];
             snapShot[k + 2] = snapAttributeExtractArray[2];
-- 
GitLab