From 030906c4ce1b491e10e36c3b363772eeb2861a0a Mon Sep 17 00:00:00 2001 From: bdemsky Date: Tue, 19 Aug 2008 10:15:08 +0000 Subject: [PATCH] changes --- .../Analysis/Scheduling/ScheduleAnalysis.java | 2 +- .../Analysis/TaskStateAnalysis/FlagState.java | 3 +- .../TaskStateAnalysis/TaskAnalysis.java | 2 +- .../Analysis/TaskStateAnalysis/TaskGraph.java | 2 +- Robust/src/ClassLibrary/gnu/Random.java | 6 +- Robust/src/Interface/HTTPHeader.java | 5 +- Robust/src/Interface/HTTPServices.java | 12 ++-- Robust/src/Interface/JhttpServer.java | 10 ++-- Robust/src/Interface/JhttpWorker.java | 21 +++---- Robust/src/Interface/LogFile.java | 5 +- Robust/src/Interface/WebInterface.java | 30 +++++++--- Robust/src/Main/Main.java | 4 +- Robust/src/Runtime/DSTM/interface/dht.c | 58 +++++++------------ Robust/src/Runtime/DSTM/interface/mlookup.c | 3 +- Robust/src/Runtime/DSTM/interface/trans.c | 2 +- Robust/src/Runtime/SimpleHash.c | 2 +- Robust/src/Runtime/multicoretask.c | 2 +- Robust/src/Runtime/task.c | 6 +- Robust/src/java.cfg | 1 + 19 files changed, 81 insertions(+), 95 deletions(-) diff --git a/Robust/src/Analysis/Scheduling/ScheduleAnalysis.java b/Robust/src/Analysis/Scheduling/ScheduleAnalysis.java index 5673edaf..25c4960f 100644 --- a/Robust/src/Analysis/Scheduling/ScheduleAnalysis.java +++ b/Robust/src/Analysis/Scheduling/ScheduleAnalysis.java @@ -1010,7 +1010,7 @@ public class ScheduleAnalysis { ScheduleNode tocombine = sn2sn.get(tmpcombine.node); ScheduleNode root = sn2sn.get(rootnodes.elementAt(tmpcombine.root).elementAt(tmpcombine.index)); ScheduleEdge se = (ScheduleEdge)tocombine.inedges().next(); - try{ + try { if(root.equals(((ScheduleNode)se.getSource()))) { root.mergeSEdge(se); if(ScheduleEdge.NEWEDGE == se.getType()) { diff --git a/Robust/src/Analysis/TaskStateAnalysis/FlagState.java b/Robust/src/Analysis/TaskStateAnalysis/FlagState.java index 9c975eb8..2034015d 100644 --- a/Robust/src/Analysis/TaskStateAnalysis/FlagState.java +++ b/Robust/src/Analysis/TaskStateAnalysis/FlagState.java @@ -239,8 +239,7 @@ public class FlagState extends GraphNode implements Cloneable { */ public String toString(FlagDescriptor[] flags) { StringBuffer sb = new StringBuffer(flagstate.size()); - for(int i=0; i < flags.length; i++) - { + for(int i=0; i < flags.length; i++){ if (get(flags[i])) sb.append(1); else diff --git a/Robust/src/Analysis/TaskStateAnalysis/TaskAnalysis.java b/Robust/src/Analysis/TaskStateAnalysis/TaskAnalysis.java index 8508068e..3d637732 100644 --- a/Robust/src/Analysis/TaskStateAnalysis/TaskAnalysis.java +++ b/Robust/src/Analysis/TaskStateAnalysis/TaskAnalysis.java @@ -374,7 +374,7 @@ public class TaskAnalysis { private FlagState canonicalizeFlagState(Hashtable sourcenodes, FlagState fs) { if (sourcenodes.containsKey(fs)) return (FlagState)sourcenodes.get(fs); - else{ + else { sourcenodes.put(fs,fs); return fs; } diff --git a/Robust/src/Analysis/TaskStateAnalysis/TaskGraph.java b/Robust/src/Analysis/TaskStateAnalysis/TaskGraph.java index ac522e9d..432e3d49 100644 --- a/Robust/src/Analysis/TaskStateAnalysis/TaskGraph.java +++ b/Robust/src/Analysis/TaskStateAnalysis/TaskGraph.java @@ -62,7 +62,7 @@ public class TaskGraph { private TaskNode canonicalizeTaskNode(Hashtable nodes, TaskNode node) { if (nodes.containsKey(node)) return (TaskNode)nodes.get(node); - else{ + else { nodes.put(node,node); return (TaskNode)node; } diff --git a/Robust/src/ClassLibrary/gnu/Random.java b/Robust/src/ClassLibrary/gnu/Random.java index b09683e6..c56fa3b1 100644 --- a/Robust/src/ClassLibrary/gnu/Random.java +++ b/Robust/src/ClassLibrary/gnu/Random.java @@ -190,8 +190,7 @@ public class Random int random; // Do a little bit unrolling of the above algorithm. int max = bytes.length & ~0x3; - for (int i = 0; i < max; i += 4) - { + for (int i = 0; i < max; i += 4){ random = next(32); bytes[i] = (byte) random; bytes[i + 1] = (byte) (random >> 8); @@ -200,8 +199,7 @@ public class Random } if (max < bytes.length){ random = next(32); - for (int j = max; j < bytes.length; j++) - { + for (int j = max; j < bytes.length; j++){ bytes[j] = (byte) random; random >>= 8; } diff --git a/Robust/src/Interface/HTTPHeader.java b/Robust/src/Interface/HTTPHeader.java index d3e753fe..76125e8b 100644 --- a/Robust/src/Interface/HTTPHeader.java +++ b/Robust/src/Interface/HTTPHeader.java @@ -71,10 +71,9 @@ public class HTTPHeader { "Server : SpinWeb Custom HTTP Server\n" + // server type "Content-Type: " + contentType + "\n" + // type "Content-Length: "+ fileLength + "\n\n"; // length - try{ + try { out.write(header.getBytes()); - } - catch(IOException e){ + } catch(IOException e) { e.printStackTrace(); // do nothing! } } diff --git a/Robust/src/Interface/HTTPServices.java b/Robust/src/Interface/HTTPServices.java index 5a2b19a5..818777ff 100644 --- a/Robust/src/Interface/HTTPServices.java +++ b/Robust/src/Interface/HTTPServices.java @@ -35,12 +35,11 @@ public class HTTPServices { buffer = new byte[1024]; - try{ + try { while((size = reader.read(buffer,0,buffer.length)) != -1) out.write(buffer,0,size); reader.close(); - } - catch(IOException e){ + } catch(IOException e) { e.printStackTrace(); resp.returnCode = 501; // error during transmision } @@ -55,17 +54,16 @@ public class HTTPServices { OutputStream out,HTTPResponse resp) { FileInputStream reader = null; - try{ + try { reader = get_reader(fileName, resp); resp.returnCode = 200; - } - catch(IOException e){ + } catch(IOException e) { resp.returnCode = 404; // file not found } if(resp.returnCode == 200) HTTPHeader.send_header(out, resp.returnCode, fileName, resp.sentBytes); - else{ + else { HTTPHeader.send_header(out, resp.returnCode, fileName, 0); return null; } diff --git a/Robust/src/Interface/JhttpServer.java b/Robust/src/Interface/JhttpServer.java index 59c675ce..bdec1490 100644 --- a/Robust/src/Interface/JhttpServer.java +++ b/Robust/src/Interface/JhttpServer.java @@ -20,11 +20,10 @@ public class JhttpServer extends Thread { public JhttpServer(int port, WebInterface webinterface) { System.out.println("starting..."); this.webinterface=webinterface; - try{ + try { System.out.println("creating the port"); server = new ServerSocket(port); - } - catch (IOException e){ + } catch (IOException e) { System.err.println(e); System.exit(1); } @@ -37,10 +36,9 @@ public class JhttpServer extends Thread { public void run() { // infinite loop while (true){ - try{ + try { startWorker(server.accept()); - } - catch (Exception e){ + } catch (Exception e) { System.err.println(e); } } diff --git a/Robust/src/Interface/JhttpWorker.java b/Robust/src/Interface/JhttpWorker.java index c5e3bfc1..73239225 100644 --- a/Robust/src/Interface/JhttpWorker.java +++ b/Robust/src/Interface/JhttpWorker.java @@ -46,8 +46,7 @@ public class JhttpWorker extends Thread { client.getInputStream())); out = client.getOutputStream(); - } - catch(IOException e){ + } catch(IOException e) { // I'm not too good at HTTP. Normally, we should put some // error code here. Anyway, I have assumed that an error // is equivalent to an unhandled request / method (501) @@ -80,7 +79,7 @@ public class JhttpWorker extends Thread { resp.returnCode = 501; //error } - try{ + try { out.flush(); if (logging) LogFile.write_log(client,methodType,fileName,httpVersion, @@ -89,8 +88,7 @@ public class JhttpWorker extends Thread { out.close(); in.close(); client.close(); - } - catch(IOException e){ + } catch(IOException e) { ; // do nothing } } @@ -110,7 +108,7 @@ public class JhttpWorker extends Thread { private int method(BufferedReader in) { int ret = -1; - try{ + try { String line; // read just the first line @@ -123,17 +121,17 @@ public class JhttpWorker extends Thread { if ( str.equals("GET") ){ ret = 0; methodType = "GET"; - } else if ( str.equals("HEAD") ) { + } else if ( str.equals("HEAD") ) { ret = 1; methodType = "HEAD"; - } else if ( str.equals("POST") ) { + } else if ( str.equals("POST") ) { ret = 2; methodType = "POST"; - } else{ + } else { System.out.println("501 - unsupported request:" +str); return -1; } - } else{ + } else { // System.out.println("Request from browser was empty!"); return -1; } @@ -171,8 +169,7 @@ public class JhttpWorker extends Thread { break; } } - } - catch(Exception e){ + } catch(Exception e) { System.err.println(e); return -1; } diff --git a/Robust/src/Interface/LogFile.java b/Robust/src/Interface/LogFile.java index b52ea857..d282a092 100644 --- a/Robust/src/Interface/LogFile.java +++ b/Robust/src/Interface/LogFile.java @@ -55,7 +55,7 @@ public class LogFile ReturnCode + " " + // 200-500 BytesSent + "\n"; // bytes sent - try{ + try { BufferedWriter out = new BufferedWriter( new OutputStreamWriter( new FileOutputStream(log_file_name, true))); @@ -63,8 +63,7 @@ public class LogFile out.write(Entry,0,Entry.length()); out.flush(); out.close(); - } - catch (IOException e){ + } catch (IOException e) { System.err.println("Gicu " + e); } diff --git a/Robust/src/Interface/WebInterface.java b/Robust/src/Interface/WebInterface.java index 472e9fa8..1815417e 100644 --- a/Robust/src/Interface/WebInterface.java +++ b/Robust/src/Interface/WebInterface.java @@ -87,7 +87,7 @@ public class WebInterface { } private String task(TaskDescriptor td, OutputStream out, HTTPResponse resp) { - try{ + try { PrintWriter pw=new PrintWriter(out); pw.println("

Task:   "+td.toString()+"


"); printTask(td,pw); @@ -103,12 +103,14 @@ public class WebInterface { } pw.flush(); - } catch (Exception e) {e.printStackTrace(); System.exit(-1);} + } catch (Exception e) { + e.printStackTrace(); System.exit(-1); + } return null; } private String printTask(TaskDescriptor td, PrintWriter pw) { - try{ + try { for(int i=0; i < td.numParameters(); i++){ pw.println("FlagState Graph:  "+td.getParamType(i)+"
"); @@ -116,7 +118,9 @@ public class WebInterface { +td.getParamType(i)+"
"); } pw.flush(); - } catch(Exception e) {e.printStackTrace(); System.exit(-1);} + } catch(Exception e) { + e.printStackTrace(); System.exit(-1); + } return null; } @@ -125,7 +129,7 @@ public class WebInterface { for(Iterator it_rootnodes=rootnodes.iterator(); it_rootnodes.hasNext();){ FlagState root=(FlagState)it_rootnodes.next(); if (root.getLabel().equals((String)cd_nodeid.elementAt(1))){ - try{ + try { PrintWriter pw=new PrintWriter(out); pw.println("

Allocating tasks for "+root.getTextLabel()+":


"); Vector tasks=root.getAllocatingTasks(); @@ -135,7 +139,9 @@ public class WebInterface { printTask(td,pw); } - } catch (Exception e) {e.printStackTrace(); System.exit(-1);} + } catch (Exception e) { + e.printStackTrace(); System.exit(-1); + } break; } @@ -176,7 +182,9 @@ public class WebInterface { } pw.flush(); - } catch (Exception e) {e.printStackTrace(); System.exit(-1);} + } catch (Exception e) { + e.printStackTrace(); System.exit(-1); + } return null; } @@ -212,7 +220,9 @@ public class WebInterface { pw.println(str); } pw.flush(); - } catch (Exception e) {e.printStackTrace(); System.exit(-1);} + } catch (Exception e) { + e.printStackTrace(); System.exit(-1); + } return null; } @@ -273,7 +283,9 @@ public class WebInterface { pw.println(str); pw.flush(); - } catch (Exception e) {e.printStackTrace(); System.exit(-1);} + } catch (Exception e) { + e.printStackTrace(); System.exit(-1); + } return null; } diff --git a/Robust/src/Main/Main.java b/Robust/src/Main/Main.java index 07b3b717..28389107 100644 --- a/Robust/src/Main/Main.java +++ b/Robust/src/Main/Main.java @@ -86,10 +86,10 @@ public class Main { else if (option.equals("-flatirtasks")) { state.FLATIRGRAPH=true; state.FLATIRGRAPHTASKS=true; - } else if (option.equals("-flatirusermethods")) { + } else if (option.equals("-flatirusermethods")) { state.FLATIRGRAPH=true; state.FLATIRGRAPHUSERMETHODS=true; - } else if (option.equals("-flatirlibmethods")) { + } else if (option.equals("-flatirlibmethods")) { state.FLATIRGRAPH=true; state.FLATIRGRAPHLIBMETHODS=true; } else if (option.equals("-multicore")) diff --git a/Robust/src/Runtime/DSTM/interface/dht.c b/Robust/src/Runtime/DSTM/interface/dht.c index 768a8e33..fc181991 100644 --- a/Robust/src/Runtime/DSTM/interface/dht.c +++ b/Robust/src/Runtime/DSTM/interface/dht.c @@ -404,8 +404,7 @@ int dhtInsert(unsigned int key, unsigned int val) { write4(&outBuffer[1], key); write4(&outBuffer[5], val); - for (i = 0; i < INSERT_RETRIES; i++) - { + for (i = 0; i < INSERT_RETRIES; i++){ if (sendto(pollsock.fd, outBuffer, 9, 0, (struct sockaddr *)&toAddr, socklen) < 0){ perror("dhtInsert():sendto()"); @@ -446,8 +445,7 @@ int dhtInsertMult(unsigned int numKeys, unsigned int *keys, unsigned int *va int i; status = 0; - for (i = 0; i < numKeys; i++) - { + for (i = 0; i < numKeys; i++){ if (dhtInsert(keys[i], vals[i]) != 0) status = -1; } @@ -487,8 +485,7 @@ int dhtRemove(unsigned int key) { outBuffer[0] = REMOVE_CMD; write4(&outBuffer[1], key); - for (i = 0; i < REMOVE_RETRIES; i++) - { + for (i = 0; i < REMOVE_RETRIES; i++){ if (sendto(pollsock.fd, outBuffer, 5, 0, (struct sockaddr *)&toAddr, socklen) < 0){ perror("dhtRemove():sendto()"); @@ -529,8 +526,7 @@ int dhtRemoveMult(unsigned int numKeys, unsigned int *keys) { int i; status = 0; - for (i = 0; i < numKeys; i++) - { + for (i = 0; i < numKeys; i++){ if (dhtRemove(keys[i]) != 0) status = -1; } @@ -569,8 +565,7 @@ int dhtSearch(unsigned int key, unsigned int *val) { outBuffer[0] = SEARCH_CMD; write4(&outBuffer[1], key); - for (i = 0; i < SEARCH_RETRIES; i++) - { + for (i = 0; i < SEARCH_RETRIES; i++){ if (sendto(pollsock.fd, outBuffer, 5, 0, (struct sockaddr *)&toAddr, socklen) < 0){ perror("dhtSearch():sendto()"); @@ -610,8 +605,7 @@ int dhtSearch(unsigned int key, unsigned int *val) { int dhtSearchMult(unsigned int numKeys, unsigned int *keys, unsigned int *vals) { int i; int status = 0; - for (i = 0; i < numKeys; i++) - { + for (i = 0; i < numKeys; i++){ if (dhtSearch(keys[i], &vals[i]) != 0) status = -1; } @@ -765,8 +759,7 @@ int udpSend(unsigned char *msg, unsigned int size, unsigned int destIp) { int udpSendAll(unsigned char *msg, unsigned int size) { int i; int status = 0; - for (i = 0; i < numHosts; i++) - { + for (i = 0; i < numHosts; i++){ if ((hostReplied[i] == 0) && (hostArray[i].ipAddr != myHostData.ipAddr)){ if (udpSend(msg, size, hostArray[i].ipAddr) != 0) status = -1; @@ -859,16 +852,14 @@ int removeHost(unsigned int ipAddr) { if (i == -1) return -1; - for (j = 0; j < numBlocks; j++) - { + for (j = 0; j < numBlocks; j++){ if (blockOwnerArray[j] == i) blockOwnerArray[j] = 0; //TODO: is this what I want to have happen? else if (blockOwnerArray[j] > i) blockOwnerArray[j]--; } - for (; i < numHosts - 1; i++) - { + for (; i < numHosts - 1; i++){ hostArray[i] = hostArray[i+1]; hostReplied[i] = hostReplied[i+1]; } @@ -880,8 +871,7 @@ int removeHost(unsigned int ipAddr) { void removeUnresponsiveHosts() { int i; - for (i = 0; i < numHosts; i++) - { + for (i = 0; i < numHosts; i++){ if (!hostReplied[i] && hostArray[i].ipAddr != myHostData.ipAddr) removeHost(hostArray[i].ipAddr); } @@ -893,13 +883,12 @@ int addHost(struct hostData newHost) { int i; int j; - for (i = 0; i < numHosts; i++) - { + for (i = 0; i < numHosts; i++){ if (hostArray[i].ipAddr == newHost.ipAddr){ hostArray[i] = newHost; hostReplied[i] = 0; return 0; - } else if (hostArray[i].ipAddr > newHost.ipAddr) { + } else if (hostArray[i].ipAddr > newHost.ipAddr) { if (numHosts == hostArraySize){ newHostArray = calloc(2 * hostArraySize, sizeof(struct hostData)); newHostReplied = calloc(2 * hostArraySize, sizeof(unsigned char)); @@ -918,16 +907,14 @@ int addHost(struct hostData newHost) { hostArraySize = 2 * hostArraySize; } else { - for (j = numHosts; j > i; j--) - { + for (j = numHosts; j > i; j--){ hostArray[j] = hostArray[j-1]; hostReplied[j] = hostReplied[j-1]; } hostArray[i] = newHost; hostReplied[i] = 0; } - for(j = 0; j < numBlocks; j++) - { + for(j = 0; j < numBlocks; j++){ if (blockOwnerArray[j] >= i) blockOwnerArray[j]++; } @@ -976,8 +963,7 @@ void writeHostList() { struct in_addr tmpAddr; fprintf(logfile, "numHosts = %d\n", numHosts); - for (i = 0; i < numHosts; i++) - { + for (i = 0; i < numHosts; i++){ tmpAddr.s_addr = htonl(hostArray[i].ipAddr); fprintf(logfile, "%d) %s, %d\n", i, inet_ntoa(tmpAddr), hostArray[i].maxKeyCapacity); @@ -1053,19 +1039,19 @@ void *udpListen() { oldState = state; if (pollret < 0){ perror("udpListen():poll()"); - } else if (pollret > 0) { + } else if (pollret > 0) { bytesRcvd = recvfrom(udpPollSock.fd, inBuffer, MAX_MSG_SIZE, 0, (struct sockaddr *)&peerAddr, &socklen); if (bytesRcvd < 1){ dhtLog("udpListen(): ERROR: bytesRcvd = %d\n", bytesRcvd); - } else if (inBuffer[0] >= NUM_MSG_TYPES) { + } else if (inBuffer[0] >= NUM_MSG_TYPES) { dhtLog("udpListen(): ERROR: unknown msg type = %d\n", inBuffer[0]); - } else if (!msgSizeOk(inBuffer, bytesRcvd)) { + } else if (!msgSizeOk(inBuffer, bytesRcvd)) { dhtLog("udpListen(): ERROR: msg size not ok: type = %s\n, size = %d\n", msg_types[inBuffer[0]], bytesRcvd); - } else if (state == EXIT2_STATE) { + } else if (state == EXIT2_STATE) { //do nothing - } else if (state == INIT1_STATE) { //after initialization with seed, do not proceed until seed replies + } else if (state == INIT1_STATE) { //after initialization with seed, do not proceed until seed replies dhtLog("udpListen(): received %s from %s, %d bytes\n", msg_types[inBuffer[0]], inet_ntoa(peerAddr.sin_addr), bytesRcvd); for (i = 0; i < bytesRcvd; i++) @@ -1192,7 +1178,7 @@ void *udpListen() { outBuffer[0] = JOIN_RES; outBuffer[1] = 0; //status, success udpSend(outBuffer, 2, peerIp); - } else if (state == LEAD_REBUILD1_STATE) { + } else if (state == LEAD_REBUILD1_STATE) { //note: I don't need to addHost(). checkReplied(peerIp); outBuffer[0] = JOIN_RES; @@ -1216,7 +1202,7 @@ void *udpListen() { case JOIN_RES: if (state == REBUILD1_STATE){ setState(REBUILD2_STATE); - } else if (state == INIT2_STATE) { + } else if (state == INIT2_STATE) { setState(NORMAL_STATE); } break; diff --git a/Robust/src/Runtime/DSTM/interface/mlookup.c b/Robust/src/Runtime/DSTM/interface/mlookup.c index a554d62f..21951a10 100644 --- a/Robust/src/Runtime/DSTM/interface/mlookup.c +++ b/Robust/src/Runtime/DSTM/interface/mlookup.c @@ -195,8 +195,7 @@ unsigned int *mhashGetKeys(unsigned int *numKeys) { keys = calloc(*numKeys, sizeof(unsigned int)); keyindex = 0; - for (i = 0; i < mlookup.size; i++) - { + for (i = 0; i < mlookup.size; i++){ if (mlookup.table[i].key != 0){ curr = &mlookup.table[i]; while (curr != NULL){ diff --git a/Robust/src/Runtime/DSTM/interface/trans.c b/Robust/src/Runtime/DSTM/interface/trans.c index 0fe01246..8b18916f 100644 --- a/Robust/src/Runtime/DSTM/interface/trans.c +++ b/Robust/src/Runtime/DSTM/interface/trans.c @@ -1800,7 +1800,7 @@ plistnode_t *pInsert(plistnode_t *pile, objheader_t *headeraddr, unsigned int mi tmp->numcreated++; GETSIZE(tmpsize, headeraddr); tmp->sum_bytes += sizeof(objheader_t) + tmpsize; - } else if (STATUS(headeraddr) & DIRTY) { + } else if (STATUS(headeraddr) & DIRTY) { tmp->oidmod[tmp->nummod] = OID(headeraddr); tmp->nummod++; GETSIZE(tmpsize, headeraddr); diff --git a/Robust/src/Runtime/SimpleHash.c b/Robust/src/Runtime/SimpleHash.c index b43fb0ab..41e07508 100755 --- a/Robust/src/Runtime/SimpleHash.c +++ b/Robust/src/Runtime/SimpleHash.c @@ -80,7 +80,7 @@ int RuntimeHashremovekey(struct RuntimeHash *thisvar, int key) { } if (toremove->lnext!=NULL) { toremove->lnext->lprev=toremove->lprev; - } else{ + } else { thisvar->listtail=toremove->lprev; } RUNFREE(toremove); diff --git a/Robust/src/Runtime/multicoretask.c b/Robust/src/Runtime/multicoretask.c index dd3bd789..11680236 100644 --- a/Robust/src/Runtime/multicoretask.c +++ b/Robust/src/Runtime/multicoretask.c @@ -3404,7 +3404,7 @@ parameterpresent: }*/ /* Actually call task */ #ifdef PRECISE_GC - ((int *)taskpointerarray)[0]=currtpd->numParameters; + ((int *)taskpointerarray)[0]=currtpd->numParameters; taskpointerarray[1]=NULL; #endif execute: diff --git a/Robust/src/Runtime/task.c b/Robust/src/Runtime/task.c index e1430679..e44a0737 100644 --- a/Robust/src/Runtime/task.c +++ b/Robust/src/Runtime/task.c @@ -903,7 +903,7 @@ int enqueuetasks(struct parameterwrapper *parameter, struct parameterwrapper *pr backtrackinit: if(toiHasNext(¶meter->iterators[j], taskpointerarray OPTARG(failed))){ toiNext(¶meter->iterators[j], taskpointerarray OPTARG(failed)); - } else if (j>0) { + } else if (j>0) { /* Need to backtrack */ toiReset(¶meter->iterators[j]); j--; @@ -953,7 +953,7 @@ backtrackinit: backtrackinc: if(toiHasNext(¶meter->iterators[j], taskpointerarray OPTARG(failed))){ toiNext(¶meter->iterators[j], taskpointerarray OPTARG(failed)); - } else if (j>0) { + } else if (j>0) { /* Need to backtrack */ toiReset(¶meter->iterators[j]); j--; @@ -1200,7 +1200,7 @@ parameterpresent: } /* Actually call task */ #ifdef PRECISE_GC - ((int *)taskpointerarray)[0]=currtpd->numParameters; + ((int *)taskpointerarray)[0]=currtpd->numParameters; taskpointerarray[1]=NULL; #endif #ifdef OPTIONAL diff --git a/Robust/src/java.cfg b/Robust/src/java.cfg index e44548e8..545f6e79 100644 --- a/Robust/src/java.cfg +++ b/Robust/src/java.cfg @@ -23,6 +23,7 @@ sp_inside_fparen = remove sp_func_call_paren = Remove sp_fparen_brace = Add sp_sparen_brace = Add +sp_paren_brace = Add sp_else_brace = Add sp_brace_else = Add sp_catch_brace = Add -- 2.34.1