jkoppel / quixbugs Goto Github PK
View Code? Open in Web Editor NEWA multi-lingual program repair benchmark set based on the Quixey Challenge
License: MIT License
A multi-lingual program repair benchmark set based on the Quixey Challenge
License: MIT License
I'm looking at the *_TEST.java files. Since they don't contain assertions, it is unclear what the correct expected value is. Is it the one with output:
in comment?
Hi, for my own research I have unified some the test cases for the graph algorithms (i.e., use the Python test cases also for Java programs) and have come across some inconsistencies in the Java implementations.
It seems the Java implementations copy the node set.
QuixBugs/correct_java_programs/MINIMUM_SPANNING_TREE.java
Lines 38 to 44 in 6ee7474
However, since equality is tested using ==
(object identity) this seems invalid?
The following makes all Python tests pass, so I wonder: why the copy constructor?
public static Map<Node,Set<Node>> update(Map<Node,Set<Node>> groupByNode, Node vertex_u, Node vertex_v) {
Set<Node> vertex_u_span = groupByNode.get(vertex_u);
vertex_u_span.addAll(groupByNode.get(vertex_v));
groupByNode.put(vertex_u, vertex_u_span);
return groupByNode;
}
Some algorithms support negative weights/lengths. However, while the Python implementations use inf
, in Java a magic integer constant is used:
This causes a wrong result when summing weights here:
QuixBugs/correct_java_programs/SHORTEST_PATH_LENGTHS.java
Lines 35 to 36 in 6ee7474
I fixed this by explicitly checking for INF
when summing:
int update_length = Math.min(length_by_path.get(Arrays.asList(i,j)), sumLengths(length_by_path.get(Arrays.asList(i,k)), length_by_path.get(Arrays.asList(k,j))));
where sumLengths
is defined as:
static private int sumLengths(int a, int b) {
if(a == INF || b == INF) {
return INF;
}
return a + b;
}
Brought up in PR #38. I believe we're on spaces.
Follow-up of #1
For running Java repair tools, one usually needs Junit test cases. It seems possible to generate those test cases based on the JSON test data. Both the generator and the generated Java/Junit files could be added to the repo.
Hi,
Iām a master student at COINSE, KAIST and developing a Genetic Improvement framework called PyGGI.
First of all, thanks for providing a multi-lingual program benchmark.
I am currently running an APR experiment on this benchmark and found that there are some faulty programs that have no passing test at all (ex. mergesort, bucketsort, shunting_yard, ā¦). This makes it difficult to distinguish the original faulty program from even worse programs.
So, I've created several passing test cases for some of those programs by automatically generating inputs that satisfy the described input precondition and yield the same output on both correct and faulty program. To do so, I repeatedly mutated the original failing test inputs until finding such test inputs.
If you think this may help, I'd like to open a pull request which will add passing test inputs to the existing JSON files. Thank you!
Hi, since there's no explicit licensing on the repository, I wanted to clarify if I'm permitted to modify (create a JavaScript version of the programs) and use it for my own purposes (my honours project).
I'm assuming the answer is rest, but I figured I'd ask to be sure - You never know :)
For comparison with automatic generated patches by repair tool.
Hi, I've prepared a gradle build file that is compatible with Travis. It would ensure that everything compiles.
I'll create a pull request once the compilation errors are fixed in #1.
Could you activate Travis on this repo?
We should have a convention. I suggest the Google Java Style Guide. If someone could go through the repository and fix that, that's a nice PR.
Nopol is an automatic software repair tool for Java.We use Nopol to generate patches for java programs.
So the bug in bitcount.py is in that n^=n-1
creates an infinite loop in the program.
When tester.py executes this program with the line return getattr(fx,algo)(*args)
, the tester program itself does not return.
In my own use of the Quixbugs project, I am just setting a time out that determines the cause of failure to be an infinite loop after some reasonable period, but I thought it was worth mentioning here for others using the project.
Integrate Matias work to existing Junit test generator, so that less or none manually fix is needed.
Update all the generated tests as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.