criyle/codenet-compile-errors huggingface dataset:
Language: Java

import java.io.*;
import java.util.*;

public class List
{
    public static void main(String[] args)
    {
        InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        try{
            int i;
            int n = Integer.parseInt(br.readLine());
            ArrayDeque<Integer> list = new ArrayDeque<Integer>();
            String[] num = new String[2];
            String command;
            char c;
            for(i=0; i<n; i++)
            {
                command = br.readLine();
                c = command.charAt(0);
                num = command.split(" ",0);

                if(c == 'd')
                {
                    c = command.charAt(6);
                    if(c == 'F')
                    {
                        list.pollFirst();
                    }
                    else if(c == 'L')
                    {
                        list.pollLast();
                    }
                    else
                    {
                        list.remove((Integer)(Integer.parseInt(num[1])));
                    }
                }
                else
                {
                    list.offerFirst(Integer.parseInt(num[1]));
                }
            }
            int size = list.size();
            for(i=0; i<size-1; i++)
            {
                System.out.printf("%d ",list.poll());
            }
            System.out.println(list.poll());
        }
        catch(Exception e)
        {
        }
    }
}

Compiler output:
Main.java:4: error: class List is public, should be declared in a file named List.java
public class List
       ^
1 error
Language: Java

import java.io.*;
import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            int i;
            int n = Integer.parseInt(br.readLine());
            ArrayDeque<String> list = new ArrayDeque<String>();
            String[] num = new String[2];
            String command;
            char c;
            for(i=0; i<n; i++)
            {
                command = br.readLine();
                c = command.charAt(0);

                if(c == 'd')
                {
                    c = command.charAt(6);
                    if(c == 'F')
                    {
                        list.pollFirst();
                    }
                    else if(c == 'L')
                    {
                        list.pollLast();
                    }
                    else
                    {
                        num = command.split(" ",0);
                        list.remove(num[1]);
                    }
                }
                else
                {
                    num = command.split(" ",0);
                    list.offerFirst(num[1]);
                }
            }

            StringBuilder s = new StringBuilder();
            s.append(list.poll())
            for(command:list)
            {
                s.append(' ').append(i);
            }
            s.append('\n');
            System.out.print(s);
        }
        catch(Exception e)
        {
        }
    }
}

Compiler output:
Main.java:46: error: ';' expected
            s.append(list.poll())
                                 ^
Main.java:47: error: bad initializer for for-loop
            for(command:list)
                ^
2 errors
Language: Java

import java.io.*;
import java.util.*;

public class Main
{
    public static void main(String[] args)
    {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        try{
            int i;
            int n = Integer.parseInt(br.readLine());
            ArrayDeque<String> list = new ArrayDeque<String>();
            String[] num = new String[2];
            String command;
            char c;
            for(i=0; i<n; i++)
            {
                command = br.readLine();
                c = command.charAt(0);

                if(c == 'd')
                {
                    c = command.charAt(6);
                    if(c == 'F')
                    {
                        list.pollFirst();
                    }
                    else if(c == 'L')
                    {
                        list.pollLast();
                    }
                    else
                    {
                        num = command.split(" ",0);
                        list.remove(num[1]);
                    }
                }
                else
                {
                    num = command.split(" ",0);
                    list.offerFirst(num[1]);
                }
            }

            StringBuilder s = new StringBuilder();
            s.append(list.poll())
            while(list.size()>0)
            {
                s.append(" ").append(list.poll());
            }
            System.out.println(s);
        }
        catch(Exception e)
        {
        }
    }
}

Compiler output:
Main.java:46: error: ';' expected
            s.append(list.poll())
                                 ^
1 error
Language: Java

import java.util.LinkedList;
import java.util.Scanner;
 class Main {
	static LinkedList<Integer> list = new LinkedList<Integer>();
	
	
	public static void insert(int key){
		list.add(key);
	}
	
	public static void delete(int key){
		list.remove(key);
	}
	
	public static void deleteFirst(){
		list.removeFirst();
	}
	
	public static void deleteLast(){
		list.removeLast();
	}
	
   public static void main(String[] args) {
	   int key,n,i,j,k,m;
	   
	   Scanner sc =new Scanner(System.in);
	   n=sc.nextInt();
	   
	   for(i=0;i<n;i++){
		 char com[] = sc.next().toCharArray();  
		 
		 
	  
	 if(com[0] =='i'){
		 key=sc.nextInt();
			  insert(key);
	    }else if(com[0]=='d'){
		   if(com.length>6){
			   if(com[6]=='F'){
				   deleteLast();
			   }else if(com[6]=='L'){
				   deleteFirst();
			   }
		   }else{
			   key=sc.nextInt();
			   for(k=list.size();k>0;k--){
				   if(list.get(k-1)==key){
					   delete(k-1);
					   break;
				   }
			   }
			   
		   }
	  } 
	   }
????????????Collections.reverse(list);
	  System.out.println(list.toString().replaceAll("\\[|\\]","").replace(",", ""));
		   sc.close();
}
}

Compiler output:
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
 ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
  ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
   ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
    ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
     ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
      ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
       ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
        ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
         ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
          ^
Main.java:56: error: illegal start of expression
????????????Collections.reverse(list);
           ^
Main.java:56: error: : expected
????????????Collections.reverse(list);
                                     ^
13 errors
Language: Java

import java.util.LinkedList;
import java.util.Scanner;
import java.util.Collections;
 class Main {
	static LinkedList<Integer> list = new LinkedList<Integer>();
	
	
	public static void insert(int key){
		list.add(key);
	}
	
	public static void delete(int key){
		list.remove(key);
	}
	
	public static void deleteFirst(){
		list.removeFirst();
	}
	
	public static void deleteLast(){
		list.removeLast();
	}
	
   public static void main(String[] args) {
	   int key,n,i,j,k,m;
	   
	   Scanner sc =new Scanner(System.in);
	   n=sc.nextInt();
	   
	   for(i=0;i<n;i++){
		 char com[] = sc.next().toCharArray();  
		 
		 
	  
	 if(com[0] =='i'){
		 key=sc.nextInt();
			  insert(key);
	    }else if(com[0]=='d'){
		   if(com.length>6){
			   if(com[6]=='F'){
				   deleteLast();
			   }else if(com[6]=='L'){
				   deleteFirst();
			   }
		   }else{
			   key=sc.nextInt();
			   for(k=list.size();k>0;k--){
				   if(list.get(k-1)==key){
					   delete(k-1);
					   break;
				   }
			   }
			   
		   }
	  } 
	   }
????????????Collections.reverse(list);
	  System.out.println(list.toString().replaceAll("\\[|\\]","").replace(",", ""));
		   sc.close();
}
}

Compiler output:
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
 ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
  ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
   ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
    ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
     ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
      ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
       ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
        ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
         ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
          ^
Main.java:57: error: illegal start of expression
????????????Collections.reverse(list);
           ^
Main.java:57: error: : expected
????????????Collections.reverse(list);
                                     ^
13 errors
Language: Java



import java.io.*;
import java.util.ArrayList;
import java.util.List;


/**
 * Created by ??\??? on 2016/12/6.
 */
public class ALDS1_3_C {
    static int si(String s){
        return Integer.parseInt(s);
    }
    static int run(String[] args) throws Exception{
        BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));
        int T = si(scan.readLine());

        List<Integer> l = new ArrayList<>();
        for(int i=0;i<T;i++){
            String[] lines = scan.readLine().split(" ");
            if(lines[0].equals("deleteFirst")){
                l.remove(0);
                continue;
            }
            if(lines[0].equals("deleteLast")){
                l.remove(l.size()-1);
                continue;
            }
            int v = Integer.parseInt(lines[1]);
            if(lines[0].equals("insert")){
                l.add(0,v);
            }
            if(lines[0].equals("delete")){
                if(l.contains(v))
                    l.remove(l.indexOf(v));
            }
        }
        for(int i = 0;i < l.size();i++){
            if(i==0)
                System.out.print(l.get(i));
            else
                System.out.print(" "+l.get(i));
        }
        System.out.println();
        scan.close();
        return 1;
    }
    public static void main(String[] args)throws Exception{
        run(args);
    }
}

Compiler output:
Main.java:11: error: class ALDS1_3_C is public, should be declared in a file named ALDS1_3_C.java
public class ALDS1_3_C {
       ^
1 error
Language: Java



import java.io.*;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;


/**
 * Created by ??\??? on 2016/12/6.
 */
public class ALDS1_3_C {
    static int si(String s){
        return Integer.parseInt(s);
    }
    static int run(String[] args) throws Exception{
        BufferedReader scan = new BufferedReader(new InputStreamReader(System.in));
        int T = si(scan.readLine());

        List<Integer> l = new LinkedList<>();
        for(int i=0;i<T;i++){
            String[] lines = scan.readLine().split(" ");
            if(lines[0].equals("deleteFirst")){
                l.remove(0);
                continue;
            }
            if(lines[0].equals("deleteLast")){
                l.remove(l.size()-1);
                continue;
            }
            int v = Integer.parseInt(lines[1]);
            if(lines[0].equals("insert")){
                l.add(0,v);
            }
            if(lines[0].equals("delete")){
                if(l.contains(v))
                    l.remove(l.indexOf(v));
            }
        }
        for(int i = 0;i < l.size();i++){
            if(i==0)
                System.out.print(l.get(i));
            else
                System.out.print(" "+l.get(i));
        }
        System.out.println();
        scan.close();
        return 1;
    }
    public static void main(String[] args)throws Exception{
        run(args);
    }
}

Compiler output:
Main.java:12: error: class ALDS1_3_C is public, should be declared in a file named ALDS1_3_C.java
public class ALDS1_3_C {
       ^
1 error
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){

		Deque<Integer> list = new LinkedList<Integer>();
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			String str = scan.nextLine();
			if(str.equals("deleteFirst"))
				list.remove();
			else if(str.equals("deleteLast"))
				list.removeLast();
			else{
				if(str.startsWith("insert"))
					list.addFirst(Integer.parseInt(str.substring(7)));
				else if(str.startsWith("delete"))
					list.remove(Integer.parseInt(str.substrig(7)));
			}
		}
		for(int i = 0; i < list.size(); i++){
			System.out.printf(i != list.size()-1? "%d " : "%d\n", list.get(i));
		}
	}
}

Compiler output:
Main.java:20: error: cannot find symbol
					list.remove(Integer.parseInt(str.substrig(7)));
					                                ^
  symbol:   method substrig(int)
  location: variable str of type String
Main.java:24: error: cannot find symbol
			System.out.printf(i != list.size()-1? "%d " : "%d\n", list.get(i));
			                                                          ^
  symbol:   method get(int)
  location: variable list of type Deque<Integer>
2 errors
Language: Java

import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){

		Deque<Integer> list = new LinkedList<Integer>();
		int n = scan.nextInt();
		for(int i = 0; i < n; i++){
			String str = scan.nextLine();
			if(str.equals("deleteFirst"))
				list.remove();
			else if(str.equals("deleteLast"))
				list.removeLast();
			else{
				if(str.startsWith("insert"))
					list.addFirst(Integer.parseInt(str.substring(7)));
				else if(str.startsWith("delete"))
					list.remove(Integer.parseInt(str.substrig(7)));
			}
		}
		StringBuffer sb = new StringBuffer(Integer.toString(list.poll));
		for(int i : list){
			sb.append(" " + i);
		}
		String str = sb.toString();
		System.out.prinf("%s\n", str);
	}
}

Compiler output:
Main.java:20: error: cannot find symbol
					list.remove(Integer.parseInt(str.substrig(7)));
					                                ^
  symbol:   method substrig(int)
  location: variable str of type String
Main.java:23: error: cannot find symbol
		StringBuffer sb = new StringBuffer(Integer.toString(list.poll));
		                                                        ^
  symbol:   variable poll
  location: variable list of type Deque<Integer>
Main.java:28: error: cannot find symbol
		System.out.prinf("%s\n", str);
		          ^
  symbol:   method prinf(String,String)
  location: variable out of type PrintStream
3 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayDeque;

public class Main{

    public static void main(String[] args) throws NumberFormatException, IOException\
{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        int n = Integer.parseInt(br.readLine());
        ArrayDeque<Integer> list = new ArrayDeque<Integer>();
        for(int i = 0; i < n; i++){
            String[] in = br.readLine().split(" ");
            if(in[0].equals("insert")){
                int key = Integer.parseInt(in[1]);
                list.addFirst(key);
            }else if(in[0].equals("deleteFirst")){
                list.removeFirst();
            }else if(in[0].equals("deleteLast")){
                    list.removeLast();
            }else if(in[0].equals("delete")){
                int key = Integer.parseInt(in[1]);
                list.remove((Integer)key);
            }
        }
        StringBuilder sb = new StringBuilder();
        sb.append(list.poll());
        for(int num: list){
            sb.append(" ").append(num);
        }
        System.out.println(sb);
    }
}

Compiler output:
Main.java:8: error: illegal character: '\'
    public static void main(String[] args) throws NumberFormatException, IOException\
                                                                                    ^
1 error
Language: Java

import java.util.*;
import java.io.*;

public class Main implements Iterable<Integer> {  

	private Node virtualNode;

	class Node {
		int value;
		Node prev;
		Node next;

		Node(int x) {
			value = x;
			prev = null;
			next = null;
		}
	}

	public DoublyLinkedList() {
		virtualNode = new Node(0);
		virtualNode.next = virtualNode;
		virtualNode.prev = virtualNode;
	}

	// insert to the front
	public void insert(int x) {
		Node node = new Node(x);
		node.next = virtualNode.next;
		virtualNode.next.prev = node;
		virtualNode.next = node;
		node.prev = virtualNode;
	}

	private Node linearSearch(int x) {
		Node currentNode = virtualNode.next;
		// there is no element
		if (currentNode == virtualNode)
			return null;
		while (currentNode != virtualNode) {
			if (currentNode.value != x)
				currentNode = currentNode.next;
			else 
				return currentNode;
		}

	// nothing matched found
		return null;
	}

	
	public void delete(int x) throws Exception {
		Node nodeDeleted = linearSearch(x);
		if (nodeDeleted == null) {
			return;
		}else {
			delete(nodeDeleted);
		}
	}

	private void delete(Node nodeDeleted) throws Exception {

		if (!isEmpty()){
			Node prevNode = nodeDeleted.prev;
			Node nextNode = nodeDeleted.next;
			prevNode.next = nextNode;
			nextNode.prev = prevNode;
		}else {
			throw new Exception("List is empty");
		}
		
	}

	public void deleteFirst() throws Exception {
		delete(virtualNode.next);
	}

	public void deleteLast() throws Exception {
		delete(virtualNode.prev);
	}

	public int pop() throws Exception {
		int v = virtualNode.next.value;
		deleteFirst();
		return v;			
	}

	private boolean isEmpty() {
		return virtualNode.next == virtualNode;
	}

	public Iterator<Integer> iterator() {
		return new Iterator<Integer>() {
			private Node currentNode = virtualNode.next;

			public boolean hasNext() {
				return currentNode != virtualNode;
			}

			public Integer next() {
				int v = currentNode.value;
				currentNode = currentNode.next;
				return v;
			}
		};
	}




	public static void main(String[] args) throws IOException {

		DoublyLinkedList list = new DoublyLinkedList();

		// BufferedReader reader = new BufferedReader(new FileReader("input.txt"));
	
		BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));

		try{
			int n = Integer.parseInt(reader.readLine());

			System.out.println(n+"");

			String line;

			for (int i = 0; i < n; i++) {

				line = reader.readLine();
			
				if (line.charAt(0) == 'i') {
					list.insert(Integer.parseInt(line.substring(7)));
				}else if (line.charAt(6) == ' ') {
					list.delete(Integer.parseInt(line.substring(7)));
				}else if (line.charAt(6) == 'F') {
					list.deleteFirst();
				}else {
					list.deleteLast();
				}

				System.out.println(line);
			}

			StringBuilder builder = new StringBuilder();
			builder.append(list.pop());

			for (int i: list) {
				builder.append(" " + i);
			}
			System.out.println(builder.toString());

		} catch (Exception e) {
			e.printStackTrace();
		}

	}

}

Compiler output:
Main.java:20: error: invalid method declaration; return type required
	public DoublyLinkedList() {
	       ^
1 error
Language: Java

import java.util.Scanner;
import java.util.ArrayList;
class Main {
   public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int m = 0;
		String meirei;
		ArrayList<Integer> list = new ArrayList<Integer>();
		
		int i;
		int size;
		
		for(i = 0; i < n; i++){
			 meirei = scan.next();
			 size = list.size();
			 
			if(meirei.equals("deleteFirst")){
					list.remove(size - 1);
			}else if(meirei.equals("deleteLast")){
					list.remove(0);
			}else if(meirei.equals("insert") || meirei.equals("delete")){
				m = scan.nextInt();
				if(meirei.equals("insert")){
					list.add(m);
				}else{
					for(int j = size - 1; j >= 0; j--){
						if(m == list.get(j)){
							list.remove(j);
							break;
						}
					}
				}
			}
		}
		
		size = list.size();
		return;
		for(i = size - 1; i >= 1; i--){	
			System.out.print(list.get(i) + " ");
		}
		System.out.println(list.get(i));
	}
	
}

Compiler output:
Main.java:39: error: unreachable statement
		for(i = size - 1; i >= 1; i--){	
		^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.List;
import java.util.ArrayList;
import java.lang.StringBuffer;

/*Question
/??\?????????????????????????????????????????£???????????????????£??????????????????????
/insert x: ??£?????????????????????????????? x ?????????????´?????¶?????¶???????
/delete x: ?????? x ??????????????????????´??????£????????????????????????????????????????????????????´?????????¨???????????´????????????????????????
/deleteFirst: ?????????????????????????´???????????????????
/deleteLast: ????????????????°????????´??????????????????? 
*/

/*Input
/??\????????\????????¢?????§?????????????????????
/n
/command1
/command2
/...
/commandn
???????????????????????° n ?????????????????????????¶???? n ??????????????????????????????????????????????¨?4?????????????????????????????§?????????????????´??°??¨???????????? 
*/

//DLList???????????????????????£????????????????????????
public class Main {
	public static void main(String[] args) throws Exception {
		String i = DLList();
		System.out.print(i);
	}

	/*DLList????????????
	/??????????§£??????????????????????????????????????????
	/??¨????????????n???????´??????????n????????????????????????
	/?????????????????????????????????????????????????????????
	/delete?????\???????????????????????¢???????????????????????????????????????????????????
	/@return String
	*/

	static String DLList() throws Exception {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		//????????¨
		StringBuffer br = new StringBuffer();
		//n?????\???
		int n = Integer.parseInt(sc.readLine());
		//??????????????\?????¨
		String[] s = new String[2];
		//??\?????¨
		List <String> x = new ArrayList <String>();
		//???????????\???
		for (int i = 0;i < n;i++) {
			s = sc.readLine().split(" ");
			if (s[0].charAt(0) == 'i')) {
				x.add(s[1]);
			}
			else if (s[0].charAt(7) == 'F') {
				x.remove(x.size()-1);
			}
			else if (s[0].charAt(7) == 'L') {
				x.remove(0);
			}
			else {
				for (int j = x.size()-1;j >= 0;j--) 
					if (x.get(j).equals(s[1])){
						x.remove(j);
						break;
					}
			}
		}
		for (int i = x.size()-1;i >= 0;i--) 
			br.append(x.get(i)+" ");
		br.deleteCharAt(br.lastIndexOf(" "));
		br.append("\n");
		return br.toString();
	}
}

Compiler output:
Main.java:53: error: illegal start of expression
			if (s[0].charAt(0) == 'i')) {
			                          ^
Main.java:56: error: 'else' without 'if'
			else if (s[0].charAt(7) == 'F') {
			^
2 errors
Language: Java

import java.util.*;

public class Test1 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int commandNum = Integer.parseInt(s.nextLine());
		List<Integer> array = new ArrayList<Integer>();
		for(int i = 0; i < commandNum; i++){
			//System.out.println(i);
			String[] line = s.nextLine().split(" ");
			switch (line[0]){
			case "insert":
				array.add(0, Integer.parseInt(line[1]));
				break;
			case "delete":
				int target =  Integer.parseInt(line[1]);
				for(int j = 0; j < array.size(); j++){
					if (array.get(j) == target){
						array.remove(j);
						break;
					}
				}
				break;
			case "deleteFirst":
				array.remove(0);
				break;
			case "deleteLast":
				array.remove(array.size() - 1);
				break;
			}
		}
		String result = "";
		for(int num : array){
			result += Integer.toString(num) + " ";
		}
		result = result.trim();
		System.out.println(result);
		s.close();
	}
}

Compiler output:
Main.java:3: error: class Test1 is public, should be declared in a file named Test1.java
public class Test1 {
       ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            String[] line = s.nextLine().split(" ");
            switch (line[0]){
            case "insert":
                array.add(0, Integer.parseInt(line[1]));
                break;
            case "delete":
                int target =  Integer.parseInt(line[1]);
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        for (int j = 0; j < array.size(); ++i) {
            if (j > 0) System.out.print(" ");
            System.out.print(array.get(j));
        }
        System.out.println("");
        s.close();
    }
}

Compiler output:
Main.java:31: error: cannot find symbol
        for (int j = 0; j < array.size(); ++i) {
                                            ^
  symbol:   variable i
  location: class Main
1 error
Language: Java

import sys

class Node:
    def __init__(self, num):
        self.prev = None
        self.next_node = None
        self.num = num
    def delete(self):
        if self.prev is not None:
            self.prev.next_node = self.next_node
        if self.next_node is not None:
            self.next_node.prev = self.prev

class LinkedList:
    def __init__(self):
        self.start_node = None
        self.last_node = None
    def add(self, num):
        node = Node(num)
        if self.start_node is None:
            self.start_node = node
            self.last_node = node
        elif self.last_node is None:
            self.last_node = self.start_node
            node.next_node = self.last_node
            self.last_node.prev = node
            self.start_node = node
        else:   
            self.start_node.prev = node
            node.next_node = self.start_node
            self.start_node = node
    def delete(self, num):
        node = self.start_node
        while node is not None:
            if node.num == num:
                if node == self.start_node:
                    self.delete_first()
                elif node == self.last_node:
                    self.delete_last()
                else:
                    node.delete()
                break
            node = node.next_node
    def delete_last(self):
        if self.start_node == self.last_node:
            self.start_node = None
            self.last_node = None
        else:
            node = self.last_node
            self.last_node = self.last_node.prev
            node.delete()
    def delete_first(self):
        if self.start_node == self.last_node:
            self.start_node = None
            self.last_node = None
        else:
            node = self.start_node
            self.start_node = self.start_node.next_node
            node.delete()
    def __str__(self):
        a = []
        node = self.start_node
        while node is not None:
            a.append(str(node.num))
            node = node.next_node

        return ' '.join(a)

def main():
    linked_list = LinkedList()
    c_num = int(sys.stdin.readline().strip())
    for i in range(0, c_num):
        line = sys.stdin.readline().strip().split(" ")
        op = line[0]
        if op == "insert":
            linked_list.add(int(line[1]))
        if op == "delete":
            linked_list.delete(int(line[1]))
        if op == "deleteFirst":
            linked_list.delete_first()
        if op == "deleteLast":
            linked_list.delete_last()
        #print linked_list
    print str(linked_list)
    
if __name__ == "__main__":
    main()

Compiler output:
Main.java:1: error: '.' expected
import sys
          ^
Main.java:3: error: '{' expected
class Node:
          ^
Main.java:14: error: '{' expected
class LinkedList:
                ^
Main.java:71: error: class, interface, enum, or record expected
    c_num = int(sys.stdin.readline().strip())
            ^
Main.java:83: error: illegal character: '#'
        #print linked_list
        ^
5 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            String[] line = s.nextLine().split(" ");
            switch (line[0]){
            case "insert":
                array.add(0, Integer.parseInt(line[1]));
                break;
            case "delete":
                int target =  Integer.parseInt(line[1]);
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.add(Integer.toString(num) + " ");
        }
        result.delete(result.size()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:33: error: cannot find symbol
            result.add(Integer.toString(num) + " ");
                  ^
  symbol:   method add(String)
  location: variable result of type StringBuilder
Main.java:35: error: cannot find symbol
        result.delete(result.size()-1);
                            ^
  symbol:   method size()
  location: variable result of type StringBuilder
2 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            String[] line = s.nextLine().split(" ");
            switch (line[0]){
            case "insert":
                array.add(0, Integer.parseInt(line[1]));
                break;
            case "delete":
                int target =  Integer.parseInt(line[1]);
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.append(Integer.toString(num) + " ");
        }
        result.delete(result.size()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:35: error: cannot find symbol
        result.delete(result.size()-1);
                            ^
  symbol:   method size()
  location: variable result of type StringBuilder
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            String[] line = s.nextLine().split(" ");
            switch (line[0]){
            case "insert":
                array.add(0, Integer.parseInt(line[1]));
                break;
            case "delete":
                int target =  Integer.parseInt(line[1]);
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.append(Integer.toString(num) + " ");
        }
        result.delete(result.length()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:35: error: method delete in class StringBuilder cannot be applied to given types;
        result.delete(result.length()-1);
              ^
  required: int,int
  found:    int
  reason: actual and formal argument lists differ in length
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        String[] cs = new String[commandNum];
        int[] ns = new int[commandNum];
        String elems[];
        for (int i = 0; i < commandNum; i++) {
          elems = s.nextLine.split(" ");
          cs[i] = elems[0];
          if (cs[i].equals("insert") || cs[i].equals("delete"))
            ns[i] = Integer.parseInt(elems[1]);
        }
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            switch (cs[i]){
            case "insert":
                array.add(0, ns[1]);
                break;
            case "delete":
                int target =  ns[1]);
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.add(Integer.toString(num) + " ");
        }
        result.delete(result.size()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:23: error: ';' expected
                int target =  ns[1]);
                                   ^
1 error
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        String[] cs = new String[commandNum];
        int[] ns = new int[commandNum];
        String elems[];
        for (int i = 0; i < commandNum; i++) {
          elems = s.nextLine.split(" ");
          cs[i] = elems[0];
          if (cs[i].equals("insert") || cs[i].equals("delete"))
            ns[i] = Integer.parseInt(elems[1]);
        }
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            switch (cs[i]){
            case "insert":
                array.add(0, ns[1]);
                break;
            case "delete":
                int target =  ns[1];
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.add(Integer.toString(num) + " ");
        }
        result.delete(result.size()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
          elems = s.nextLine.split(" ");
                   ^
  symbol:   variable nextLine
  location: variable s of type Scanner
Main.java:41: error: cannot find symbol
            result.add(Integer.toString(num) + " ");
                  ^
  symbol:   method add(String)
  location: variable result of type StringBuilder
Main.java:43: error: cannot find symbol
        result.delete(result.size()-1);
                            ^
  symbol:   method size()
  location: variable result of type StringBuilder
3 errors
Language: Java

import java.util.*;
public class Main {
    public static void main(String[] args) {
        Scanner s = new Scanner(System.in);
        int commandNum = Integer.parseInt(s.nextLine());
        String[] cs = new String[commandNum];
        int[] ns = new int[commandNum];
        String[] elems;
        for (int i = 0; i < commandNum; i++) {
          elems = s.nextLine.split(" ");
          cs[i] = elems[0];
          if (cs[i].equals("insert") || cs[i].equals("delete"))
            ns[i] = Integer.parseInt(elems[1]);
        }
        List<Integer> array = new LinkedList<Integer>();
        for(int i = 0; i < commandNum; i++){
            //System.out.println(i);
            switch (cs[i]){
            case "insert":
                array.add(0, ns[1]);
                break;
            case "delete":
                int target =  ns[1];
                for(int j = 0; j < array.size(); j++){
                    if (array.get(j) == target){
                        array.remove(j);
                        break;
                    }
                }
                break;
            case "deleteFirst":
                array.remove(0);
                break;
            case "deleteLast":
                array.remove(array.size() - 1);
                break;
            }
        }
        StringBuilder result = new StringBuilder();
        for(int num : array){
            result.append(Integer.toString(num) + " ");
        }
        result.deleteCharAt(result.length()-1);
        System.out.println(result);
        s.close();
    }
}

Compiler output:
Main.java:10: error: cannot find symbol
          elems = s.nextLine.split(" ");
                   ^
  symbol:   variable nextLine
  location: variable s of type Scanner
1 error
Language: Java

import java.io.*;
import java.util.LinkedList;

class Main {
    public static void main (String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        
        int n = Integer.parseInt(br.readLine());
        LinkedList<String> list = new LinkedList<String>();
        String[] input;

        for (int i = 0; i < n; i++) {
            input = br.readLine().split(" ");

            if (input[0].equals("insert")) {
                list.addFirst(input[1]);
            } else if (input[0].equals("delete")) {
                list.poll(input[1]);
            } else if (input[0].equals("deleteFirst")) {
                list.pollFirst();
            } else {
                list.pollLast();
            }
        }

        StringBuilder sb = new StringBuilder("");
        for (int i = 0; i < list.size(); i++) {
            sb.append(list.get(i)).append(" ");
        }
        sb.deleteCharAt(sb.length() - 1);
        System.out.println(sb.toString());
    }
}

Compiler output:
Main.java:18: error: method poll in class LinkedList<E> cannot be applied to given types;
                list.poll(input[1]);
                    ^
  required: no arguments
  found:    String
  reason: actual and formal argument lists differ in length
  where E is a type-variable:
    E extends Object declared in class LinkedList
1 error
Language: Java

import java.util.Deque;
import java.util.LinkedList;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

class Main {

	public static void main(String[] args) {

		InputOutput stdIO = new InputOutput();

		int n = stdIO.getValue();
		Deque<Integer> dll = new LinkedList<>();

		int value;
		String[] inputline;

		long t1 = System.nanoTime();

		for (int i = 0; i < n; i++) {
			inputline = stdIO.getLineStringArray();
			switch (inputline[0]) {
			case "insert":
				insert(dll, Integer.parseInt(inputline[1]));
				break;
			case "delete":
				delete(dll, Integer.parseInt(inputline[1]));
				break;
			case "deleteFirst":
				deleteFirst(dll);
				break;
			case "deleteLast":
				deleteLast(dll);
				break;
			}
		}
		long t2 = System.nanoTime();
//		System.out.println(((t2-t1)/1000000000.0) + "?§?");
		StringBuilder sb = new StringBuilder();
		for(int i =0; i < dll.size()+1;i++) {
			sb.append(dll.pop()+ " ");
		}
		sb.delete(sb.length()-1, sb.length());
		System.out.println(sb);
		stdIO.close();
	}

	private static void insert(Deque<Integer> dll, int value) {
		dll.push(value);
	}

	private static void delete(Deque<Integer> dll, int value) {
		dll.remove((Integer) value);
	}

	private static void deleteFirst(Deque<Integer> dll) {
		dll.removeFirst();
	}

	private static void deleteLast(Deque<Integer> dll) {
		dll.removeLast();
	}
}

package ALDS1;

class InputOutput {
	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public int getValue() {
		int n = 0;
		try {
			n = Integer.parseInt(br.readLine());
		} catch (IOException e) {
			e.printStackTrace();
		}
		return n;
	}
	public String[] getLineStringArray() {
		try {
			return br.readLine().trim().split(" ");
		} catch (IOException e) {
			e.printStackTrace();
		}
		return null;
	}


	public void close() {
		try {
			br.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}

Compiler output:
Main.java:70: error: class, interface, enum, or record expected
package ALDS1;
^
1 error
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.utli.ArrayDeque;

public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    ArrayDeque<Integer> list = new ArrayDeque<Integer>();
    for(int i = 0; i < n; i++){
      String[] tmp = br.readLine().split(" ");
      if(tmp[0].equals("insert")){
        list.addFirst(Integer.parseInt(tmp[1]));
      }else if(tmp[0].equals("deleteFirst")){
        list.removeFirst();
      }else if(tmp[0].equals("deleteLast")){
        list.removeLast();
      }else{
        list.remove(Integer.parseInt(temp[1]));
      }
    }
    StringBuilder sb = new StringBuilder();
    sb.append(list.poll());
    for(list.peekFirst() != null){
      sb.append(" ").sppend(list.poll());
    }
    System.out.println(sb);
  }
}

Compiler output:
Main.java:25: error: not a statement
    for(list.peekFirst() != null){
                         ^
Main.java:25: error: ';' expected
    for(list.peekFirst() != null){
                                ^
2 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.utli.ArrayDeque;

public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    ArrayDeque<Integer> list = new ArrayDeque<Integer>();
    for(int i = 0; i < n; i++){
      String[] tmp = br.readLine().split(" ");
      if(tmp[0].equals("insert")){
        list.addFirst(Integer.parseInt(tmp[1]));
      }else if(tmp[0].equals("deleteFirst")){
        list.removeFirst();
      }else if(tmp[0].equals("deleteLast")){
        list.removeLast();
      }else{
        list.remove(Integer.parseInt(temp[1]));
      }
    }
    StringBuilder sb = new StringBuilder();
    sb.append(list.poll());
    while(list.peekFirst() != null){
      sb.append(" ").sppend(list.poll());
    }
    System.out.println(sb);
  }
}

Compiler output:
Main.java:4: error: package java.utli does not exist
import java.utli.ArrayDeque;
                ^
Main.java:10: error: cannot find symbol
    ArrayDeque<Integer> list = new ArrayDeque<Integer>();
    ^
  symbol:   class ArrayDeque
  location: class Main
Main.java:10: error: cannot find symbol
    ArrayDeque<Integer> list = new ArrayDeque<Integer>();
                                   ^
  symbol:   class ArrayDeque
  location: class Main
Main.java:20: error: cannot find symbol
        list.remove(Integer.parseInt(temp[1]));
                                     ^
  symbol:   variable temp
  location: class Main
4 errors
Language: Java

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;
import java.util.ArrayDeque;

public class Main{
  public static void main(String[] args)throws IOException{
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    int n = Integer.parseInt(br.readLine());
    ArrayDeque<Integer> list = new ArrayDeque<Integer>();
    for(int i = 0; i < n; i++){
      String[] tmp = br.readLine().split(" ");
      if(tmp[0].equals("insert")){
        list.addFirst(Integer.parseInt(tmp[1]));
      }else if(tmp[0].equals("deleteFirst")){
        list.removeFirst();
      }else if(tmp[0].equals("deleteLast")){
        list.removeLast();
      }else{
        list.remove(Integer.parseInt(temp[1]));
      }
    }
    StringBuilder sb = new StringBuilder();
    sb.append(list.poll());
    while(list.peekFirst() != null){
      sb.append(" ").sppend(list.poll());
    }
    System.out.println(sb);
  }
}

Compiler output:
Main.java:20: error: cannot find symbol
        list.remove(Integer.parseInt(temp[1]));
                                     ^
  symbol:   variable temp
  location: class Main
Main.java:26: error: cannot find symbol
      sb.append(" ").sppend(list.poll());
                    ^
  symbol:   method sppend(Integer)
  location: class StringBuilder
2 errors