Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions issues-fest.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/tests" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/tests/integration" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="issues-fest2" scope="TEST" />
</component>
</module>
9 changes: 9 additions & 0 deletions src/issues-fest2.iml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
6 changes: 6 additions & 0 deletions src/java/Authentication.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public void registerUser(String username, String password) {
// BUG: No null checks - will throw NullPointerException
// BUG: Plain text password comparison - SECURITY ISSUE
public boolean login(String username, String password) {
if (username == null || password == null) {
return false;
}
if (!users.containsKey(username)) {
return false;
}
String storedPassword = users.get(username);
boolean isValid = storedPassword.equals(password);

Expand Down
2 changes: 1 addition & 1 deletion src/python/csv_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def filter_rows(data, column_name, value):
# TYPO: "aggrigate" instead of "aggregate"
# BUG: Assumes all values are numeric without validation
# BUG: No error handling for non-numeric values
def aggrigate_column(data, column_name):
def aggregate_column(data, column_name):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please only keep this change - the other file changes are not necessary

"""Sum all values in a column"""
values = get_column(data, column_name)
return sum(float(v) for v in values)
Expand Down
4 changes: 2 additions & 2 deletions tests/TestRunner.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ public void printSummary() {
System.out.println("Tests passed: " + passedTests);
System.out.println("Tests failed: " + failedTests);
}
}


// TYPO: "reportt" instead of "report"
public String reportt() {
return "Passed: " + passedTests + ", Failed: " + failedTests;
}
}