Git Product home page Git Product logo

errgoengine's Introduction

Maligayang Pagdating! ๐Ÿ‘‹๏ธ

I am Ned Palacios, a 22-year-old computer science student and polyglot software developer based in Davao City, Philippines. My primary focus at the moment is to build stuff on the web and on technologies that help shape developer experiences. I also find time to entertrain myself by watching Korean dramas, animes, as well as reading mangas.

Programming Languages I touched

  • Go
  • Dart
  • Crystal
  • Typescript / Javascript
  • Java
  • V
  • Ruby
  • Python
  • Kotlin
  • Elixir
  • PHP

Other Links

Imong mama sophisticated

errgoengine's People

Contributors

nedpals avatar

Stargazers

 avatar

Watchers

 avatar  avatar

errgoengine's Issues

[ERROR TEMPLATE] Java - ... in ... cannot be applied to

Name Type Code Language
... in ... cannot be applied to Compile-time Error java.lang.CannotBeAppliedError Java

Description

The method or operation cannot be applied to the given arguments or context.

Sample Code

// CannotBeApplied.java
public class CannotBeApplied {
    public static void main(String[] args) {
        String text = "Hello";

        // Method 'charAt' cannot be applied to String with arguments
        char firstChar = text.charAt(0, 1);
    }
}

Sample Error Message

CannotBeApplied.java:7: error: method charAt in class String cannot be applied to given types;
        char firstChar = text.charAt(0, 1);
                             ^
  required: int
  found: int,int
  reason: actual and formal argument lists differ in length
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Array required, but <type> found

Name Type Code Language
Array required, but found Compile-time Error java.lang.ArrayRequiredError Java

Description

An array was expected, but a different type was found in the code.

Sample Code

public class NotArray {
    public static void main(String[] args) {
        int number = 5;
        int value = number[0];
    }
}

Sample Error Message

NotArray.java:4: error: array required, but int found
        int value = number[0];
                            ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.util.FileNotFoundException

Name Type Code Language
java.util.FileNotFoundException Runtime Exception java.util.FileNotFoundError Java

Description

An attempt to access a file that does not exist or cannot be opened.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.util.StringIndexOutOfBoundsException

Name Type Code Language
java.util.StringIndexOutOfBoundsException Runtime Exception java.util.StringIndexOutOfBoundsException Java

Description

An attempt to access a string's index that is out of its range.

Sample Code

public class Main {
    public static void main(String[] args) {
        String text = "Hello, World!";
        // Attempting to access an index beyond the string's length
        char character = text.charAt(20);
        System.out.println(character);
    }
}

Sample Error Message

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 20
        at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:47)
        at java.base/java.lang.String.charAt(String.java:693)
        at Main.main(Main.java:5)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Python - NameError

Name Type Code Language
NameError Runtime Exception python.lang.NameError Python

Description

Raised when a local or global name is not found.

Sample Code

print(test)

Sample Error Message

Traceback (most recent call last):
  File "name_error.py", line 1, in <module>
    print(test)
          ^^^^
NameError: name 'test' is not defined

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Invalid method declaration

Name Type Code Language
Invalid method declaration Compile-time Error java.lang.InvalidMethodDeclarationError Java

Description

The method declaration is invalid or incorrect in syntax.

Sample Code

class InvalidMethodExample {
    public static void main(String[] args) {
        int result = addNumbers(5, 10);
        System.out.println("Sum: " + result);
    }

    // Invalid method declaration with missing return type
    addNumbers(int a, int b) {
        return a + b;
    }
}

Sample Error Message

InvalidMethodExample.java:8: error: invalid method declaration; return type required
    addNumbers(int a, int b) {
    ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Unreachable statement

Name Type Code Language
Unreachable statement Compile-time Error java.lang.UnreachableStatementError Java

Description

A statement in the code is not reachable due to the existing flow of the program.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - NegativeArraySizeException

Name Type Code Language
NegativeArraySizeException Runtime Exception java.lang.NegativeArraySizeError Java

Description

An attempt to create an array with a negative size.

Sample Code

public class Main {
    public static void main(String[] args) {
        // Attempting to create an array with a negative size
        int[] array = new int[-5];
        System.out.println(array.length);
    }
}

Sample Error Message

Exception in thread "main" java.lang.NegativeArraySizeException: -5
	at Main.main(Main.java:4)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Reached end of file while parsing

Name Type Code Language
Reached end of file while parsing Compile-time Error java.lang.ParseEndOfFileError Java

Description

The compiler reached the end of the file unexpectedly while parsing the code.

Sample Code

public class EOF {
    public static void main(String[] args) {
        System.out.println("This is a sample program.");
    }

Sample Error Message

EOF.java:4: error: reached end of file while parsing
    }
     ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.util.NoSuchElementException

Name Type Code Language
java.util.NoSuchElementException Runtime Exception java.util.NoSuchElementException Java

Description

There's no element available in a collection when one is expected.

Sample Code

// Main.java
import java.util.*;

public class Main {
    public static void main(String[] args) {
        List<String> myList = new ArrayList<>();
        Iterator<String> iterator = myList.iterator();
        // Attempting to get an element from an empty list
        String element = iterator.next();
        System.out.println(element);
    }
}

Sample Error Message

Exception in thread "main" java.util.NoSuchElementException
	at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1052)
	at Main.main(Main.java:8)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.lang.ArithmeticException: / by zero

Name Type Code Language
java.lang.ArithmeticException: / by zero Runtime Exception java.lang.DivisionByZeroError Java

Description

An arithmetic operation attempted division by zero.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Missing return statement/value

Name Type Code Language
Missing return statement/value Compile-time Error java.MissingReturnError Java

Description

A method requires a return statement or value that is missing in the code.

Sample Code

// MissingReturn.java
public class MissingReturn {
    public int addNumbers(int a, int b) {
        // Missing return statement
    }

    public static void main(String[] args) {
        MissingReturn calculator = new MissingReturn();
        int result = calculator.addNumbers(5, 7);
        System.out.println("Result: " + result);
    }
}

Sample Error Message

MissingReturn.java:4: error: missing return statement
    }
    ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Class not found

Name Type Code Language
Class not found Compile-time Error java.lang.ClassNotFoundError Java

Description

The specified class cannot be found within the program or libraries.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - class <class name> is public, should be declared in a file named <class name>.java

Name Type Code Language
class is public, should be declared in a file named .java Compile-time Error java.lang.PublicClassFilenameMismatchError Java

Description

The public class needs to be in a file with the same name in Java.

Sample Code

public class Right {
	public static void main(String[] args) {

	}
}

Sample Error Message

Wrong.java:1: error: class Right is public, should be declared in a file named Right.java
    public class Right {
            ^
    1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Variable ... might not have been initialized

Name Type Code Language
Variable ... might not have been initialized Compile-time Error java.lang.UninitializedVariableError Java

Description

Using a variable that might not have been initialized with a value.

Sample Code

// UninitializedVariable.java
public class UninitializedVariable {
    public static void main(String[] args) {
        int number;
        
        // Variable 'number' might not have been initialized
        System.out.println(number);
    }
}

Sample Error Message

UninitializedVariable.java:6: error: variable number might not have been initialized
        System.out.println(number);
                           ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - NullPointerException

Name Type Code Language
NullPointerException Runtime Exception java.lang.NullPointerException Java

Description

An attempt to access an object reference that is null.

Sample Code

public class ShouldBeNull {
	public static void main(String args[]) {
		String test = null;
		System.out.println(test.toUpperCase());
	}
}

Sample Error Message

Exception in thread "main" java.lang.NullPointerException
    at ShouldBeNull.main(ShouldBeNull.java:4)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Python - AttributeError

Name Type Code Language
AttributeError Runtime Exception python.lang.AttributeError Python

Description

Raised when an attribute reference or assignment fails.

Sample Code

# Sample program that triggers AttributeError
x = 5
x.append(3)

Sample Error Message

Traceback (most recent call last):
  File "attribute_error.py", line 3, in <module>
    x.append(3)
AttributeError: 'int' object has no attribute 'append'

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Not a statement

Name Type Code Language
Not a statement Compile-time Error java.lang.NotAStatementError Java

Description

The code does not represent a valid statement in the context of the language.

Sample Code

// NotAStatement.java
public class NotAStatement {
    public static void main(String[] args) {
        "test";
    }
}

Sample Error Message

NotAStatement.java:3: error: not a statement
        "test";
        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Python - IndentationError

Name Type Code Language
IndentationError Compile-time Error python.lang.IndentationError Python

Description

Raised when indentation is not correctly specified.

Sample Code

def my_function():
    print("Hello, world!")
  print("This line is indented with two spaces instead of four.")

Sample Error Message

  File "indentation_error.py", line 3
    print("This line is indented with two spaces instead of four.")
                                                                  ^
IndentationError: unindent does not match any outer indentation level

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Operator ... cannot be applied to ...

Name Type Code Language
Operator ... cannot be applied to ... Compile-time Error java.lang.OperatorCannotBeAppliedError Java

Description

The specified operator cannot be used with the given types or values.

Sample Code

// OperatorCannotBeApplied.java
public class OperatorCannotBeApplied {
    public static void main(String[] args) {
        String text = "Hello";
        int number = 5;

        // Operator '<' cannot be applied to String and int
        if (text < number) {}
    }
}

Sample Error Message

error: bad operand types for binary operator '<'
        if (text < number) {}
                 ^
  first type:  String
  second type: int
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Incompatible/inconvertible types

Name Type Code Language
Incompatible/inconvertible types Compile-time Error java.lang.IncompatibleTypesError Java

Description

Types in the code are incompatible and cannot be converted or used together.

Sample Code

// IncompatibleTypes.java
public class IncompatibleTypes {
    public static void main(String[] args) {
        int number = 10;
        String text = "Hello";

        // Incompatible types: Cannot convert int to String
        text = number;
    }
}

Sample Error Message

IncompatibleTypes.java:7: error: incompatible types: int cannot be converted to String
        text = number;
               ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ArithmeticException

Name Type Code Language
ArithmeticException Runtime Exception java.lang.ArithmeticException Java

Description

Generic arithmetic error, like division by zero or an overflow.

Sample Code

public class Arith {
	public static void main(String[] args) {
		double out = 3 / 0;
		System.out.println(out);
	}
}

Sample Error Message

Exception in thread "main" java.lang.ArithmeticException: / by zero
    at Arith.main(Arith.java:3)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.util.InputMismatchException

Name Type Code Language
java.util.InputMismatchException Runtime Exception java.util.InputMismatchError Java

Description

Input of a different type than expected (e.g., parsing an int but receiving a String).

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - NoClassDefError

Name Type Code Language
NoClassDefError Runtime Exception java.lang.NoClassDefError Java

Description

The Java Virtual Machine (JVM) cannot find the definition of a class at runtime.

Sample Code

// MyClass.java
public class MyClass {
    public static void main(String[] args) {
        // Attempting to create an instance of a non-existing class
        NonExistingClass obj = new NonExistingClass();
    }
}

Sample Error Message

template: "Java.NoClassDefError"
---
MyClass.java:5: error: cannot find symbol
        NonExistingClass obj = new NonExistingClass();
        ^
    symbol:   class NonExistingClass
    location: class MyClass
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Code outside a method/main method class

Name Type Code Language
Code outside a method/main method class Compile-time Error java.lang.CodeOutsideMethodError Java

Description

Code found outside any method or the main method class.

Sample Code

public class Main {
    int x = 5;

    System.out.println("Hello, World!");

    public static void main(String[] args) {
        System.out.println("Inside the main method.");
    }
}

Sample Error Message

Main.java:4: error: <identifier> expected
    System.out.println("Hello, World!");
                      ^
Main.java:4: error: illegal start of type
    System.out.println("Hello, World!");
                       ^
2 errors

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ... is already defined in ...

Name Type Code Language
... is already defined in ... Compile-time Error java.lang.AlreadyDefinedError Java

Description

Attempting to re-declare or redefine a variable, method, or class that's already defined elsewhere.

Sample Code

// Main.java
public class Main {
    public static void main(String[] args) {
        int x = 5;
        // Attempting to redeclare the variable 'x'
        int x = 10;
        System.out.println(x);
    }
}

Sample Error Message

Main.java:5: error: variable x is already defined in method main(String[])
        int x = 10;
            ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ... has private access in ...

Name Type Code Language
... has private access in ... Compile-time Error java.lang.PrivateAccessError Java

Description

Accessing a member with private access from an external class or context.

Sample Code

public class Main {
    public static void main(String[] args) {
        AnotherClass anotherClass = new AnotherClass();
        // Attempting to access a private variable from another class
        int value = anotherClass.privateVariable;
        System.out.println(value);
    }
}

class AnotherClass {
    private int privateVariable = 10;
}

Sample Error Message

Main.java:5: error: privateVariable has private access in AnotherClass
        int value = anotherClass.privateVariable;
                                ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ArrayIndexOutOfBoundsException

Name Type Code Language
ArrayIndexOutOfBoundsException Runtime Exception java.lang.ArrayIndexOutOfBoundsException Java

Description

An attempt to access an array element with an index outside the allowed range.

Sample Code

public class Arith {
	public static void main(String[] args) {
		double out = 3 / 0;
		System.out.println(out);
	}
}

Sample Error Message

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: Index 5 out of bounds for length 4
    at OOB.main(OOB.java:4)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - <character> expected

Name Type Code Language
expected Compile-time Error java.lang.CharacterExpectedError Java

Description

A specific character was expected at a particular location in the code.

Sample Code

public class Main {
    public static void main(String[] args) {
        if (1 > 0 then {
            System.out.println("Condition is true.");
        }
    }
}

Sample Error Message

public class Main {
    public static void main(String[] args) {
        if (1 > 0 then {
            System.out.println("Condition is true.");
        }
    }
}

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ... expected

Name Type Code Language
... expected Compile-time Error java.lang.ExpectedError Java

Description

An expected token, character, or syntax was missing in the code.

Sample Code

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, World!" // Error: Expected ';'
    }
}

Sample Error Message

Main.java:3: error: ')' or ',' expected
        System.out.println("Hello, World!" // Error: Expected ';'
                                          ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - MethodNotFoundError

Name Type Code Language
MethodNotFoundError Runtime Exception java.lang.MethodNotFoundError Java

Description

The method being called or referenced cannot be found or does not exist.

Sample Code

// Test.java
public class Test {
    public static void main(String[] args) {
        int[] numbers = {1, 2, 3, 4, 5};
        // Attempting to call a non-existing method
        displayArray(numbers);
    }
}

Sample Error Message

Test.java:4: error: cannot find symbol
        displayArray(numbers);
        ^
    symbol:   method displayArray(int[])
    location: class Test
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Unclosed character literal

Name Type Code Language
Unclosed character literal Compile-time Error java.lang.UnclosedCharacterLiteralError Java

Description

A character literal (in single quotes) is not closed properly in the code.

Sample Code

public class UnclosedCharacterLiteralError {

    public static void main(String[] args) {
        char ch = 'Hello World'; // This will cause an error because the character literal is not closed.
    }
}

Sample Error Message

UnclosedCharacterLiteralError.java:4: error: unclosed character literal
        char ch = 'Hello World'; // This will cause an error because the character literal is not closed.
                  ^
UnclosedCharacterLiteralError.java:4: error: unclosed character literal
        char ch = 'Hello World'; // This will cause an error because the character literal is not closed.
                              ^
2 errors

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.util.NumberFormatException

Name Type Code Language
java.util.NumberFormatException Runtime Exception java.util.NumberFormatError Java

Description

Parsing a string into a number format that's invalid.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Cannot find symbol

Name Type Code Language
Cannot find symbol Compile-time Error java.lang.SymbolNotFoundError Java

Description

The compiler cannot find a referenced symbol (variable, method, class, etc.) in the code.

Sample Code

public class Program {
    public static void main(String[] args) {
        System.out.println(a);
    }
}

Sample Error Message

Program.java:3: error: cannot find symbol
        System.out.println(a);
                           ^
  symbol:   variable a
  location: class Program
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ClassCastException

Name Type Code Language
ClassCastException Runtime Exception java.lang.ClassCastError Java

Description

An attempt to cast an object to a type to which it is not compatible.

Sample Code

public class Main {
    public static void main(String[] args) {
        Object obj = "Hello, World!";
        Integer number = (Integer) obj;
    }
}

Sample Error Message

Exception in thread "main" java.lang.ClassCastException: class java.lang.String cannot be cast to class java.lang.Integer (java.lang.String and java.lang.Integer are in module java.base of loader 'bootstrap')
	at Main.main(Main.java:5)

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Unclosed string literal

Name Type Code Language
Unclosed string literal Compile-time Error java.lang.UnclosedStringLiteralError Java

Description

A string literal (in double quotes) is not closed properly in the code.

Sample Code

public class Main {
    public static void main(String[] args) {
        // Unclosed string literal
        String message = "Hello, World!;
        System.out.println(message);
    }
}

Sample Error Message

Main.java:4: error: unclosed string literal
        String message = "Hello, World!;
                         ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - DateTimeException

Name Type Code Language
DateTimeException Runtime Exception java.lang.DateTimeError Java

Description

Exception thrown when an error occurs while dealing with date and time.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Illegal Start of type

Name Type Code Language
Illegal Start of type Compile-time Error java.lang.IllegalStartTypeError Java

Description

The code has an illegal start for a specific type (class, interface, etc.).

Sample Code

// https://stackoverflow.com/questions/2448768/why-does-the-program-give-illegal-start-of-type-error
public class Rand {
    public static Rand searchCount() {
        Rand countA = new Rand() ;
        }
        return countA ;   
    }
}

Sample Error Message

Rand.java:11: error: illegal start of type
        return countA ;
        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Unreachable statement

Name Type Code Language
Unreachable statement Compile-time Error java.lang.UnreachableStatementException Java

Description

The code contains a statement that cannot be reached in the program's flow.

Sample Code

public class Unreachable {
	public static void main(String[] args) {
		System.out.println("b");
		return;
		System.out.println("c");
	}
}

Sample Error Message

Unreachable.java:5: error: unreachable statement
        System.out.println("c");
        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Possible loss of precision

Name Type Code Language
Possible loss of precision Compile-time Error java.lang.PrecisionLossError Java

Description

A potential loss of precision is identified, usually in numerical conversions.

Sample Code

// PrecisionLoss.java
public class PrecisionLoss {
    public static void main(String[] args) {
        double largeNumber = 12345678901234567890.123456789;
        
        // Potential loss of precision: Found double, required float
        float smallNumber = largeNumber;
    }
}

Sample Error Message

PrecisionLoss.java:7: error: incompatible types: possible lossy conversion from double to float
        float smallNumber = largeNumber;
                            ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Illegal start of expression

Name Type Code Language
Illegal start of expression Compile-time Error java.lang.IllegalExpressionStartError Java

Description

The code contains an illegal start for a particular expression.

Sample Code

public class Main {
    public static void main(String[] args) {
        // Attempting to use an illegal expression start
        int x = (int) + * 5;
        System.out.println(x);
    }
}

Sample Error Message

Main.java:4: error: illegal start of expression
        int x = (int) + * 5;
                        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - UnsupportedOperationException

Name Type Code Language
UnsupportedOperationException Runtime Exception java.lang.UnsupportedOperationError Java

Description

An unsupported operation is attempted, typically in collection modification.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Illegal character <character>

Name Type Code Language
Illegal character Compile-time Error java.lang.IllegalCharacterError Java

Description

A character used is illegal within the context of the code.

Sample Code

public class Main {
    public static void main(String[] args) {
        System.out.println("Hello, World!"+\uFEFF); // Error: Illegal character (BOM)
    }
}

Sample Error Message

Main.java:3: error: illegal character: '\ufeff'
        System.out.println("Hello, World!"+\uFEFF); // Error: Illegal character (BOM)
                                           ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Forget to create object in accessing a non-static method

Name Type Code Language
Forget to create object in accessing a non-static method Compile-time Error java.lang.NonStaticMethodAccessError Java

Description

Accessing a non-static method without creating an object of its class.

Sample Code

public class Main {
    // Non-static method
    public void printMessage() {
        System.out.println("Hello, World!");
    }

    public static void main(String[] args) {
        // Attempt to call the non-static method without creating an object
        printMessage(); // This will result in an error
    }
}

Sample Error Message

Main.java:9: error: non-static method printMessage() cannot be referenced from a static context
        printMessage(); // This will result in an error
        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Variable not found

Name Type Code Language
Variable not found Compile-time Error java.lang.VariableNotFoundError Java

Description

The specified variable cannot be found within the scope.

Sample Code

public class Program {
    public static void main(String[] args) {
        System.out.println(a);
    }
}

Sample Error Message

Program.java:3: error: cannot find symbol
        System.out.println(a);
                           ^
  symbol:   variable a
  location: class Program
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Identifier expected

Name Type Code Language
Identifier expected Compile-time Error java.lang.IdentifierExpectedError Java

Description

An identifier (e.g., variable name) was expected at a specific location in the code.

Sample Code

public class MyClass {
  String input = "";
  input.equals("");
}

Sample Error Message

MyClass.java:3: error: <identifier> expected
  input.equals("");
              ^
MyClass.java:3: error: illegal start of type
  input.equals("");
               ^
2 errors

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Mismatched brackets/parentheses

Name Type Code Language
Mismatched brackets/parentheses Compile-time Error java.lang.BracketMismatchError Java

Description

There is an unequal number of opening and closing brackets or parentheses.

Sample Code

// BracketMismatch.java
public class BracketMismatch {
    public static void main(String[] args) {
        int x = 10;
        if (x > 5) {
            System.out.println("x is greater than 5.");
        }  // Missing closing bracket for if statement
    }
}

Sample Error Message

BracketMismatch.java:7: error: '}' expected
        System.out.println("x is greater than 5.");
        ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - Missing []/{} in array

Name Type Code Language
Missing []/{} in array Compile-time Error java.lang.MissingArrayBracketsError Java

Description

The array declaration is missing opening or closing brackets ([]) or curly braces ({})

Sample Code

public class MissingArrayBracketsExample {
    public static void main(String[] args) {
        // Missing closing bracket in the array declaration
        int[] numbers = {1, 2, 3;
        for (int num : numbers) {
            System.out.println(num);
        }
    }
}

Sample Error Message

MissingArrayBracketsExample.java:4: error: '}' expected
        int[] numbers = {1, 2, 3;
                                ^
1 error

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - ConcurrentModificationException

Name Type Code Language
ConcurrentModificationException Runtime Exception java.lang.ConcurrentModificationException Java

Description

An attempt to modify a collection while iterating over it concurrently.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

[ERROR TEMPLATE] Java - java.lang.ArrayStoreException

Name Type Code Language
java.lang.ArrayStoreException Runtime Exception java.lang.ArrayStoreError Java

Description

An attempt to store an object of an incompatible type in an array.

Sample Code

Add code here

Sample Error Message

Add message here

Implementation Checklist

  • Implemented analysis
  • Implemented explanation translation
  • Implemented bug fix generation
  • Add tests

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.