Projects >> Sentiment-Analysis >>35056b3acd386dd3d54b63ecfd04a263f7892de0

Chunk
Conflicting content
	private static String P_FOLDER = "/afs/andrew.cmu.edu/usr13/skandam/RPCS/RPCS-Dispatcher/"+
										"bin/cmu/edu/rpcs/events/user/response_params/";

<<<<<<< HEAD
	private String[][] ParamReader(File p_file) {
		String[][] params = null;
		try {
			FileInputStream fstream = new FileInputStream(p_file);
			DataInputStream in = new DataInputStream(fstream);
			BufferedReader br = new BufferedReader(new InputStreamReader(in));
			String strLine = "";
	    
			params = new String[Integer.decode(br.readLine())][2];
			
			for(int i = 0; i < params.length; i++, strLine = br.readLine()) {
				params[i][0] = strLine;
			}
	    
			return params;
		} catch (Exception e) { 
			Dispatcher.LogException(e);
		}
		
		return params;
	}

	private String[][] Fill (String[][] params, ResultSet rs) {
		try {
			for (int i = 0; i < params.length; i++) {
						params[i][1] = rs.getString(params[i][0]);
			}

		} catch (Exception ex) {
			Dispatcher.LogException(ex);
		}
		return params;	
	}
=======
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13
	
	public boolean ValidateSession (int id, String session_key)
	{
Solution content
	private static String P_FOLDER = "/afs/andrew.cmu.edu/usr13/skandam/RPCS/RPCS-Dispatcher/"+
										"bin/cmu/edu/rpcs/events/user/response_params/";

<<<<<<< HEAD:src/cmu/edu/rpcs/events/general/GeneralCommandHandler.java
	private String[][] ParamReader(File p_file) {
		String[][] params = null;
		try {
			FileInputStream fstream = new FileInputStream(p_file);
			DataInputStream in = new DataInputStream(fstream);
			BufferedReader br = new BufferedReader(new InputStreamReader(in));
			String strLine = "";
	    
			params = new String[Integer.decode(br.readLine())][2];
			
			for(int i = 0; i < params.length; i++, strLine = br.readLine()) {
				params[i][0] = strLine;
			}
	    
			return params;
		} catch (Exception e) { 
			Dispatcher.LogException(e);
		}
		
		return params;
	}

	private String[][] Fill (String[][] params, ResultSet rs) {
		try {
			for (int i = 0; i < params.length; i++) {
						params[i][1] = rs.getString(params[i][0]);
			}

		} catch (Exception ex) {
			Dispatcher.LogException(ex);
		}
		return params;	
	}
=======
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13:src/cmu/edu/rpcs/events/general/GeneralCommandHandler.java
	
	public boolean ValidateSession (int id, String session_key)
	{
File
GeneralCommandHandler.java
Developer's decision
Manual
Kind of conflict
Method declaration
Chunk
Conflicting content
			try {
				System.out.println ("General.post Command Handler");
				System.out.println ("Command = " + command.toString());
<<<<<<< HEAD

				String[][] file = super.GetGeneralPost(Integer.valueOf(command.ParamValue("id")));
				String reply = "\n";
				reply += "\n";
				for (int i = 1; i < file.length; i++) {
					reply += "<" + file[i][0] + ">" +
								   file[i][1] +
						    "\n";
				}				
				reply += "\n";
				// Done
				command.Reply (reply);
			} catch(Exception e) {
=======
				
				if (super.ValidateSession(Integer.valueOf(command.ParamValue("id"))))
				{
					String newPost = command.ParamValue("post");
					
					// Mark the user as having an 'offline' status
					super.PostGeneralPost(Integer.valueOf(command.ParamValue("id")));
					
					// Done
					command.Reply ("" +
									"" +
									"type_id" +
									"Person Name" +
									"topic_id" +
									"Subject" +
									"##########" +
									"##########" +
									"Discussion blah blah... blah blah" +
									"" +
									"");
				} else {
					command.ReplyError(-3, "Your session information is not valid");
				}
			}
			catch(Exception e)
			{
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13
				command.ReplyError(-2, "Error executing 'user.connect' command: " + e.toString());
			}
		} else {
Solution content
			try {
				System.out.println ("General.post Command Handler");
				System.out.println ("Command = " + command.toString());
<<<<<<< HEAD:src/cmu/edu/rpcs/events/general/post.java

				String[][] file = super.GetGeneralPost(Integer.valueOf(command.ParamValue("id")));
				String reply = "\n";
				reply += "\n";
				for (int i = 1; i < file.length; i++) {
					reply += "<" + file[i][0] + ">" +
								   file[i][1] +
						    "\n";
				}				
				reply += "\n";
				// Done
				command.Reply (reply);
			} catch(Exception e) {
=======
				
				if (super.ValidateSession(Integer.valueOf(command.ParamValue("id"))))
				{
					String newPost = command.ParamValue("post");
					
					// Mark the user as having an 'offline' status
					super.PostGeneralPost(Integer.valueOf(command.ParamValue("id")));
					
					// Done
					command.Reply ("" +
									"" +
									"type_id" +
									"Person Name" +
									"topic_id" +
									"Subject" +
									"##########" +
									"##########" +
									"Discussion blah blah... blah blah" +
									"" +
									"");
				} else {
					command.ReplyError(-3, "Your session information is not valid");
				}
			}
			catch(Exception e)
			{
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13:src/cmu/edu/rpcs/events/general/post.java
				command.ReplyError(-2, "Error executing 'user.connect' command: " + e.toString());
			}
		} else {
File
post.java
Developer's decision
Manual
Kind of conflict
Array access
Catch clause
Comment
For statement
If statement
Method invocation
Variable
Chunk
Conflicting content
			command.ReplyError(-3, "Your post information is not valid");
		}
	}
<<<<<<< HEAD
}
=======
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13
Solution content
			command.ReplyError(-3, "Your post information is not valid");
		}
	}
<<<<<<< HEAD:src/cmu/edu/rpcs/events/general/post.java
}
=======
>>>>>>> 53930a9d555e5c81712f1dfcaa939e0586f6bf13:src/cmu/edu/rpcs/events/general/post.java
File
post.java
Developer's decision
Manual
Kind of conflict
Other