Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
dead stores--
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Jun 2016 08:26:21 +0000 (10:26 +0200)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Tue, 28 Jun 2016 08:26:21 +0000 (10:26 +0200)
examples/java/dht/kademlia/Node.java
examples/java/io/file/Node.java
examples/java/task/priority/Test.java
examples/java/trace/pingpong/Sender.java

index ba7bee2..4e46ba0 100644 (file)
@@ -109,12 +109,10 @@ public class Node extends Process {
           } else {
             Task task = comm.getTask();
             if (task instanceof FindNodeAnswerTask) {
-              answerGot = true;
               //Retrieve the node list and ping them
               FindNodeAnswerTask answerTask = (FindNodeAnswerTask)task;
               Answer answer = answerTask.getAnswer();
               answerGot = true;
-              //answersGotten++;
               if (answer.getDestinationId() == this.id) {
                 //Ping everyone in the list
                 for (Contact c : answer.getNodes()) {
@@ -155,8 +153,8 @@ public class Node extends Process {
   public boolean findNode(int destination, boolean counts) {
     int queries;
     int answers;
-    int nodesAdded = 0;
-    boolean destinationFound = false;
+    int nodesAdded;
+    boolean destinationFound;
     int steps = 0;
     double timeBeginReceive;
     double timeout;
index 3044f17..8339064 100644 (file)
@@ -39,7 +39,7 @@ public class Node extends Process {
   }
 
   public void main(String[] args) throws MsgException {
-    String mount = "";
+    String mount;
     String filename;
     switch (number) {
       case 0:
index 3d10a04..f84234d 100644 (file)
@@ -17,11 +17,8 @@ public class Test extends Process {
   }
 
   public void main(String[] args) throws MsgException {  
-    double computationAmount = 1.0;
-    double priority = 1.0;
-
-    computationAmount = Double.parseDouble(args[0]);
-    priority = Double.parseDouble(args[1]);
+    double computationAmount = Double.parseDouble(args[0]);
+    double priority = Double.parseDouble(args[1]);
 
     Msg.info("Hello! Running a task of size " + computationAmount + " with priority " + priority);
 
index 0204316..256a4b8 100644 (file)
@@ -46,7 +46,7 @@ public class Sender extends Process {
       ping.send(mailboxes[pos]);
 
       Trace.hostPushState (getHost().getName(), PM_STATE, "waitingPong");
-      PingPongTask pong = (PingPongTask)Task.receive(getHost().getName());
+      Task.receive(getHost().getName());
       double timeGot = Msg.getClock();
       double timeSent = ping.getTime();
       double communicationTime;