package twitterSearch;

public class decodeURL {
	
public static String returnDecoded(String str){
		
		//char[] charURL=str.toCharArray();
		
	int i;
		StringBuffer sb=new StringBuffer();
		for(i=0;i<str.length();i++){
			
			if(str.charAt(i)=='"')
					break;
			
			if(i==(str.length())-1)
				return str;
		//System.out.println(i);
		}
		i=i+1;
		while(str.charAt(i)!='"'){
			sb.append(str.charAt(i));
			i++;
		//	System.out.println(i);
		}
		
		
		
		//	while(str.charAt(i)!)
			
		return sb.toString();
	}
	
	
}

@@ -1,143 +1,368 @@
-package twitterSearch;%0A%0Apublic class decodeURL %7B%0A%09%0Apublic static String returnDecoded(String str)%7B%0A%09%09%0A%09%09//char%5B%5D charURL=str.toCharArray();
+// Author: Nilesh Singh, George Mason University%0A// This class provides methods to decode the URL and print it in proper form without tags %0A%0Apackage twitterSearch;%0A%0Apublic class decodeURL %7B%0A%09%0Apublic static String returnDecoded(String str)%7B%0A%09//requires: URL String input %0A%09//Effects: Remove the tags form the URL String and returns the string in proper URL form %0A%09%09
 %0A%09%09%0A
@@ -532,33 +532,8 @@
 r;%0A%09
-%09//System.out.println(i);
 %0A%09%09%7D
@@ -613,74 +613,21 @@
 +;%0A%09
-%09//%09System.out.println(i);%0A%09%09%7D%0A%09%09%0A%09%09%0A%09%09%0A%09%09//%09while(str.charAt(i)!)
+%0A%09%09%7D%0A%09%09%0A%09%09%0A%09%09
 %0A%09%09%09

Update decodeURL.java