This repository has been archived by the owner on Jan 5, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add complexity and line count limits.
- Loading branch information
Showing
10 changed files
with
80 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1123,7 +1123,7 @@ | |
"type": "KLASS", | ||
"klass": "Question", | ||
"metadata": { | ||
"contentHash": "0f5d87fda490b597fa6cf22e0d1d96d1", | ||
"contentHash": "85cad84d1b50bd029f2262d40c3c9d1c", | ||
"packageName": "com.examples.testing.withconstructornotnull", | ||
"version": "2022.10.0", | ||
"author": "[email protected]", | ||
|
@@ -1135,7 +1135,7 @@ | |
"annotatedControls": {}, | ||
"question": { | ||
"klass": "Question", | ||
"contents": "import edu.illinois.cs.cs125.jenisol.core.NotNull;\nimport edu.illinois.cs.cs125.questioner.lib.Correct;\n\n/*\n * Testing @NotNull annotation on constructor parameters.\n */\n\n@Correct(name = \"Test Constructor NotNull\", version = \"2022.10.0\", author = \"[email protected]\", focused = true)\npublic class Question {\n private final int stringLength;\n\n public Question(@NotNull String value) {\n stringLength = value.length();\n }\n\n public int getStringLength() {\n return stringLength;\n }\n}", | ||
"contents": "import edu.illinois.cs.cs125.jenisol.core.NotNull;\nimport edu.illinois.cs.cs125.questioner.lib.Correct;\n\n/*\n * Testing @NotNull annotation on constructor parameters.\n */\n\n@Correct(\n name = \"Test Constructor NotNull\",\n version = \"2022.10.0\",\n author = \"[email protected]\",\n focused = true)\npublic class Question {\n private final int stringLength;\n\n public Question(@NotNull String value) {\n stringLength = value.length();\n }\n\n public int getStringLength() {\n return stringLength;\n }\n}", | ||
"language": "java", | ||
"path": "/Users/challen/code/questioner-problems/src/main/java/com/examples/testing/withconstructornotnull/Question.java" | ||
}, | ||
|
@@ -3334,13 +3334,14 @@ | |
"type": "METHOD", | ||
"klass": "Question", | ||
"metadata": { | ||
"contentHash": "1de3e62a1da5371e08f407b53e2861c9", | ||
"contentHash": "cf69028309acfa6fae8cc88f3063f219", | ||
"packageName": "com.examples.addone", | ||
"version": "2021.6.0", | ||
"author": "[email protected]", | ||
"javaDescription": "<p>Write a method <code>addOne</code> that returns its <code>int</code> argument plus one.</p>", | ||
"kotlinDescription": "<p>Write a method <code>addOne</code> that returns its <code>Int</code> argument plus one.</p>", | ||
"usedFiles": [ | ||
"/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/incorrect/java/memoization/Question.java", | ||
"/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/incorrect/java/timeout/Question.java", | ||
"/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/incorrect/java/toolong/Question.java", | ||
"/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/incorrect/java/memorylimit/Question.java", | ||
|
@@ -3354,13 +3355,13 @@ | |
"annotatedControls": {}, | ||
"question": { | ||
"klass": "Question", | ||
"contents": "import edu.illinois.cs.cs125.questioner.lib.Correct;\nimport edu.illinois.cs.cs125.questioner.lib.Wrap;\n\n/*\n * Write a method `addOne` that returns its `int` argument plus one.\n */\n\n@Correct(name = \"Add One\", author = \"[email protected]\", version = \"2021.6.0\")\n@Wrap\npublic class Question {\n int addOne(int value) {\n return value + 1;\n }\n}", | ||
"contents": "import edu.illinois.cs.cs125.jenisol.core.FixedParameters;\nimport edu.illinois.cs.cs125.questioner.lib.Correct;\nimport edu.illinois.cs.cs125.questioner.lib.Wrap;\nimport java.util.Arrays;\nimport java.util.List;\n\n/*\n * Write a method `addOne` that returns its `int` argument plus one.\n */\n\n@Correct(name = \"Add One\", author = \"[email protected]\", version = \"2021.6.0\")\n@Wrap\npublic class Question {\n // Here to avoid dead code errors in the memoization test\n @FixedParameters\n private static final List<Integer> FIXED = Arrays.asList(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12);\n\n int addOne(int value) {\n return value + 1;\n }\n}", | ||
"language": "java", | ||
"path": "/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/Question.java" | ||
}, | ||
"correct": { | ||
"klass": "Question", | ||
"contents": "int addOne(int value) {\n return value + 1;\n}", | ||
"contents": "// Here to avoid dead code errors in the memoization test\n\nint addOne(int value) {\n return value + 1;\n}", | ||
"language": "java", | ||
"path": "/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/Question.java", | ||
"complexity": 1, | ||
|
@@ -3379,8 +3380,8 @@ | |
}, | ||
"lineCount": { | ||
"source": 3, | ||
"comment": 0, | ||
"blank": 0 | ||
"comment": 1, | ||
"blank": 1 | ||
}, | ||
"expectedDeadCount": 1 | ||
}, | ||
|
@@ -3434,6 +3435,15 @@ | |
} | ||
], | ||
"incorrect": [ | ||
{ | ||
"klass": "Question", | ||
"contents": "int addOne(int value) {\n if (value == 1) {\n return 2;\n } else if (value == 2) {\n return 3;\n } else if (value == 3) {\n return 4;\n } else if (value == 4) {\n return 5;\n } else if (value == 5) {\n return 6;\n } else if (value == 6) {\n return 7;\n } else if (value == 7) {\n return 8;\n } else if (value == 8) {\n return 9;\n } else if (value == 9) {\n return 10;\n } else if (value == 10) {\n return 11;\n } else if (value == 11) {\n return 12;\n } else {\n return value + 1;\n }\n}", | ||
"reason": "MEMOIZATION", | ||
"language": "java", | ||
"path": "/Users/challen/code/questioner-problems/src/main/java/com/examples/addone/incorrect/java/memoization/Question.java", | ||
"starter": false, | ||
"needed": true | ||
}, | ||
{ | ||
"klass": "Question", | ||
"contents": "int addOne(int value) {\n int j = 0;\n for (int i = 0; i < 1024; i++) {\n j++;\n }\n return value + 1;\n}", | ||
|
@@ -3546,8 +3556,8 @@ | |
"lineCounts": { | ||
"java": { | ||
"source": 3, | ||
"comment": 0, | ||
"blank": 0 | ||
"comment": 1, | ||
"blank": 1 | ||
}, | ||
"kotlin": { | ||
"source": 3, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
server/src/main/resources/edu.illinois.cs.cs125.questioner.server.version
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
version=2022.10.6 | ||
version=2022.10.7 |