Index: tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java
===================================================================
--- tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 1039)
+++ tmp/org.txm.lexicaltable.rcp/src/org/txm/lexicaltable/rcp/editors/LexicalTableEditor.java	(revision 1040)
@@ -488,7 +488,7 @@
 			String[] colNames;
 			int[] colMargins = null;
 			// from lexical table if they exist
-			if(lexicalTable.getData() != null)	{
+			if (lexicalTable.getData() != null)	{
 				colNames = lexicalTable.getColNames().asStringsArray();
 				colMargins = lexicalTable.getColMarginsVector().asIntArray();
 			}
Index: tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy
===================================================================
--- tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 1039)
+++ tmp/org.txm.groovy.core/src/groovy/org/txm/macro/oriflamms/analyse/AllographsMacro.groovy	(revision 1040)
@@ -69,7 +69,7 @@
 writer = tsvFile.newWriter("UTF-8")
 writer.println "text_id\tpb_id\tcb_id\tlb_id\tsign\tchar\tcount\t%/sign"
 Partition p = corpus.createPartition("tmp", text_su,text_id)
-ConsoleProgressBar cpb = new ConsoleProgressBar(p.getParts().size())
+ConsoleProgressBar cpb = new ConsoleProgressBar(p.getNPart())
 for (Part part : p.getParts()) {
 	processText(part, part.getName())
 	cpb.tick();
Index: tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java
===================================================================
--- tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 1039)
+++ tmp/org.txm.ahc.rcp/src/org/txm/ahc/rcp/handlers/ComputeAHC.java	(revision 1040)
@@ -99,7 +99,7 @@
 		else if (selection instanceof Partition) {
 			//System.out.println("Compute CAH with Partition : "+((Partition)selection.getFirstElement()).getName());
 			Partition partition = (Partition)selection;
-			if (partition.getParts().size() < 4) {
+			if (partition.getNPart() < 4) {
 				MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
 						NLS.bind(AHCUIMessages.error_canNotComputeAHCWith, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
 				d.open();
Index: tmp/org.txm.core/src/java/org/txm/Toolbox.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 1039)
+++ tmp/org.txm.core/src/java/org/txm/Toolbox.java	(revision 1040)
@@ -235,8 +235,7 @@
 
 			if (!getPreference(TBXPreferences.LOG_DIR).isEmpty()) {
 				Log.setPrintInFile(TBXPreferences.getInstance().getBoolean(TBXPreferences.LOG_IN_FILE), new File(getPreference(TBXPreferences.LOG_DIR)));
-			}
-			else {
+			} else {
 				Log.setPrintInFile(TBXPreferences.getInstance().getBoolean(TBXPreferences.LOG_IN_FILE));
 			}
 
Index: tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java
===================================================================
--- tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1039)
+++ tmp/org.txm.core/src/java/org/txm/core/results/TXMResult.java	(revision 1040)
@@ -174,7 +174,7 @@
 		if (parent == this) {
 			throw new IllegalArgumentException("A result can not be parent of itself.");
 		}
-		if(uuid == null)	{
+		if (uuid == null)	{
 			uuid = createUUID() + "_" + this.getClass().getSimpleName();
 		}
 		this.uniqueID = uuid;
@@ -205,9 +205,10 @@
 		
 
 		// retrieving parent from UUID
-		if(parent == null && uuid != null && !this.getStringParameterValue(TXMPreferences.PARENT_UUID).isEmpty())	{
-			Log.warning("Searching parent with UUID: " + this.getStringParameterValue(TXMPreferences.PARENT_UUID) + "...");
-			TXMResult retrievedParent = TXMResult.getResult(this.getStringParameterValue(TXMPreferences.PARENT_UUID));
+		String puuid = this.getStringParameterValue(TXMPreferences.PARENT_UUID);
+		if (parent == null && uuid != null && !puuid.isEmpty())	{
+			Log.warning("Searching parent with UUID: " + puuid + "...");
+			TXMResult retrievedParent = TXMResult.getResult(puuid);
 			if (retrievedParent != null) {
 				Log.warning("Parent retrieved from UUID: " + retrievedParent + ".");
 				retrievedParent.addChild(this);
@@ -976,8 +977,12 @@
 	synchronized public static void deleteAllNonPersistentResults() {
 		ArrayList<TXMResult> results = Toolbox.workspace.getDeepChildren();
 		for (int i = 0; i < results.size(); i++) {
-			if(!results.get(i).mustBePersisted())	{ 
-				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + results.get(i).getSimpleName() + " of type " + results.get(i).getClass().getSimpleName() + ".");
+			TXMResult r = results.get(i);
+			if (r.mustBePersisted())	{ 
+				TXMPreferences.flush(r);
+			} else {
+				Log.finest("TXMResult.deleteAllNonPersistentResults(): Deleting result " + r.getSimpleName() + " of type " + r.getClass().getSimpleName() + ".");
+				TXMPreferences.delete(r);
 			}
 		}
 	}
@@ -1693,7 +1698,7 @@
 	 * @return
 	 */
 	public boolean mustBePersisted()	{
-		if(this.persistable || TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED) || this.userPersistable)	{
+		if (this.persistable || TBXPreferences.getInstance().getBoolean(TBXPreferences.AUTO_PERSISTENCE_ENABLED) || this.userPersistable)	{
 			return true;
 		}
 		return false;
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMResultDebugView.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMResultDebugView.java	(revision 1039)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/views/debug/TXMResultDebugView.java	(revision 1040)
@@ -36,6 +36,7 @@
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.PlatformUI;
 import org.eclipse.ui.part.ViewPart;
+import org.txm.core.preferences.TBXPreferences;
 //import org.txm.chartsengine.core.results.ChartResult;
 import org.txm.core.results.TXMResult;
 import org.txm.rcp.views.corpora.CorporaView;
@@ -124,7 +125,6 @@
 		buffer.append(this.currentResult.dumpPreferences());
 		buffer.append("\n"); //$NON-NLS-1$
 		
-
 		// Hierarchy
 		buffer.append("\n"); //$NON-NLS-1$
 		buffer.append("Selected object = " + this.currentResult + "\n"); //$NON-NLS-1$ //$NON-NLS-2$
@@ -143,7 +143,6 @@
 		displayArea.setText(buffer.toString());
 	}
 	
-	
 	@Override
 	public void selectionChanged(SelectionChangedEvent event) {
 		
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 1039)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/actions/CreatePartitionDialog.java	(revision 1040)
@@ -620,7 +620,7 @@
 			return null;
 		}
 		
-		if (p.getParts().size() == 0) {
+		if (p.getNPart() == 0) {
 			Log.severe(TXMUIMessages.CreatePartitionDialog_10);
 			return null;
 		}
Index: tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java
===================================================================
--- tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1039)
+++ tmp/org.txm.rcp/src/main/java/org/txm/rcp/editors/TXMEditor.java	(revision 1040)
@@ -659,9 +659,6 @@
 							}
 						}
 					});
-
-
-
 				}
 				// for user direct canceling
 				catch (ThreadDeath td) {
Index: tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java
===================================================================
--- tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1039)
+++ tmp/org.txm.index.core/src/org/txm/index/core/functions/Lexicon.java	(revision 1040)
@@ -120,7 +120,8 @@
 			//this.persistable = false; // FIXME: remove that later
 			String p = this.getStringParameterValue(TBXPreferences.UNIT_PROPERTY);
 			if (p != null && p.length() > 0) {
-				this.pProperty = getCorpus().getProperty(p);
+				Corpus corpus = getCorpus();
+				this.pProperty = corpus.getProperty(p);
 			}
 		}
 		catch (CqiClientException e) {
Index: tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java
===================================================================
--- tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 1039)
+++ tmp/org.txm.ca.rcp/src/org/txm/ca/rcp/handlers/ComputeCA.java	(revision 1040)
@@ -81,8 +81,7 @@
 
 				Partition partition = (Partition) selection;
 
-				// warning to few parts
-				if (partition.getNPart() < 4) {
+				if (partition.getNPart() < 4) { // error to few parts
 					MessageDialog d = new MessageDialog(window.getShell(), TXMCoreMessages.error_error2, null,
 							NLS.bind(CAUIMessages.ComputeCorrespondanceAnalysis_4, partition.getNPart()), 0, new String[] { TXMCoreMessages.common_ok}, 0);
 					d.open();
@@ -101,9 +100,7 @@
 
 					LexicalTable lexicalTable = new LexicalTable(partition, property, fMin, vMax);
 					ca = new CA(lexicalTable);
-				}
-				// aborted
-				else {
+				} else { // aborted
 					return null;
 				}
 			}
Index: tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java
===================================================================
--- tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java	(revision 1039)
+++ tmp/org.txm.specificities.core/src/org/txm/functions/contrasts/Contrast.java	(revision 1040)
@@ -32,7 +32,7 @@
 //	public Contrast(Partition partition, Property property, int Fmin) throws Exception {
 //		super(partition);
 //		
-//		if (partition.getParts().size() < 2) {
+//		if (partition.getNPart() < 2) {
 //			throw new IllegalArgumentException(SpecificitiesCoreMessages.ComputeError_NEED_AT_LEAST_2_PARTS);
 //		}
 //		table = LexicalTableFactory.getLexicalTable(partition, property, Fmin);
Index: tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/PartitionFocus.java
===================================================================
--- tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/PartitionFocus.java	(revision 1039)
+++ tmp/org.txm.searchengine.cqp.core/src/org/txm/searchengine/cqp/corpus/query/PartitionFocus.java	(revision 1040)
@@ -105,7 +105,7 @@
 	 */
 	public List<Part> getFocusedParts() {
 		List<Part> focused = new ArrayList<Part>(modality.size());
-		for (int i = 0; i < partition.getParts().size(); i++) {
+		for (int i = 0; i < partition.getNPart(); i++) {
 			if (modality.contains(partition.getParts().get(i))) {
 				focused.add(partition.getParts().get(i));
 			}
@@ -120,7 +120,7 @@
 	 */
 	public List<Part> getNotFocusedParts() {
 		List<Part> notFocused = new ArrayList<Part>(modality.size());
-		for (int i = 0; i < partition.getParts().size(); i++) {
+		for (int i = 0; i < partition.getNPart(); i++) {
 			if (!modality.contains(partition.getParts().get(i))) {
 				notFocused.add(partition.getParts().get(i));
 			}
