private void run_buttonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_run_buttonActionPerformed
    	String result = "";
    	ArrayList<String> solution,submission;
    	if(numTests == 1) {
    		result = Shell.pythonCall(submission_fp, CourseAccess.accessTestIn(courseID, actName));
    		submission_output_test_area.setText(result);
    		submission = new ArrayList<String>(Arrays.asList(submission_output_test_area.getText().split("\n")));
    		String out = "";
    		try {
				Scanner in = new Scanner(new FileReader(CourseAccess.accessTestOut(courseID, actName)));
				while(in.hasNext())
					out += in.nextLine();
				in.close();
			} catch (FileNotFoundException e) {
				e.printStackTrace();
			}
    		solution_output_text_area.setText(out);
    		solution = new ArrayList<String>(Arrays.asList(solution_output_text_area.getText().split("\n")));
    	} else {
    		result = Shell.pythonCall(submission_fp);
    		submission_output_test_area.setText(result);
    		submission = new ArrayList<String>(Arrays.asList(submission_output_test_area.getText().split("\n")));
    		result = Shell.pythonCall(solution_fp);
    		solution_output_text_area.setText(result);
    		solution = new ArrayList<String>(Arrays.asList(solution_output_text_area.getText().split("\n")));
    	}
    	Patch patch = DiffUtils.diff(solution,submission);
    	List<String> diff = DiffUtils.generateUnifiedDiff("Solution","Submission",solution,patch,3);
    	String diffText = "";
    	for(String s : diff)
    		diffText += s + "\n";
    	if(diffText.equals(""))
    		diff_text_area.setText("No differences.");
    	else
    		diff_text_area.setText(diffText);

		DefaultHighlighter.DefaultHighlightPainter red = new DefaultHighlighter.DefaultHighlightPainter(
				java.awt.Color.RED);
		DefaultHighlighter.DefaultHighlightPainter green = new DefaultHighlighter.DefaultHighlightPainter(
				java.awt.Color.GREEN);
    	try {
    		for(int i=0; i<diffText.length(); ) {
    			if(diffText.startsWith("+",i)) {
    				diff_text_area.getHighlighter().addHighlight(diffText.indexOf("+",i),diffText.indexOf("\n",diffText.indexOf("+",i)),green);
    				i = diffText.indexOf("\n",diffText.indexOf("+",i)) + 1;
    			} else if (diffText.startsWith("-",i)){
    				diff_text_area.getHighlighter().addHighlight(diffText.indexOf("-",i),diffText.indexOf("\n",diffText.indexOf("-",i)),red);
    				i = diffText.indexOf("\n",diffText.indexOf("-",i)) + 1;
    			} else {
    				i = diffText.indexOf("\n",i) + 1;
    			}
    		}
    	} catch (BadLocationException e) {
			e.printStackTrace();
		}
    }//GEN-LAST:event_run_buttonActionPerformed