squareslab / darjeeling Goto Github PK
View Code? Open in Web Editor NEWLanguage-independent, search-based program repair -- just your cup of tea! ☕
License: Apache License 2.0
Language-independent, search-based program repair -- just your cup of tea! ☕
License: Apache License 2.0
Avoids the need to compute live_after
(which isn't exposed by Clang).
Should return the normal form for a given snippet, allowing us to remove duplicates of snippets that are determined to be semantically equivalent.
def partition(block, effects) -> List[List[InsertionPoint]]:
Should automatically publish all tagged releases on PyPI.
It should be possible to order tests by their expected likelihood of failure, resource consumption, or a combination of both.
It should be possible to pass a list of callables of the form Callable[[FileLine, Snippet] bool]
to the problem constructor. Each item in the list implements a filter that should return False
if a particular snippet shouldn't be considered as a transformation target.
restrict_to_files
into its own methodrestrict_to_lines
into its own methodrestrict_with_filter
methodvalidate
method for ensuring a problem is validBasic stuff like Python version, as well as other SL properties (BugZoo, etc). Esp for latter, include links to associated projects.
All other transformation targets (e.g., statements and lines) can be described as character ranges, and so we should use FileCharRange to describe transformation targets.
Transition Roadmap
Also, if a statement deletion repairs a bug, should we bother looking at replacing that statement?
found 1 plausible patches
time taken: 0.08 minutes
# test evaluations: 10
# candidate evaluations: 6
unexpected exception when evaluating candidate: Candidate<#13d69559>
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/darjeeling/evaluator.py", line 213, in _evaluate
container = self.__problem.build_patch(patch)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/darjeeling/problem.py", line 172, in build_patch
container = mgr_ctr.provision(self.__bug)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/bugzoo/client/container.py", line 124, in provision
r = self.__api.post(endpoint, json=payload)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/bugzoo/client/api.py", line 105, in post
return requests.post(url, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
evaluated candidate: Candidate<#13d69559>
unexpected error occurred when evaluating candidate [13d69559]
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
http.client.RemoteDisconnected: Remote end closed connection without response
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/adapters.py", line 440, in send
timeout=timeout
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 639, in urlopen
_stacktrace=sys.exc_info()[2])
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/util/retry.py", line 357, in increment
raise six.reraise(type(error), error, _stacktrace)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/packages/six.py", line 685, in reraise
raise value.with_traceback(tb)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 601, in urlopen
chunked=chunked)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 387, in _make_request
six.raise_from(e, None)
File "<string>", line 2, in raise_from
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/urllib3/connectionpool.py", line 383, in _make_request
httplib_response = conn.getresponse()
File "/usr/lib/python3.6/http/client.py", line 1331, in getresponse
response.begin()
File "/usr/lib/python3.6/http/client.py", line 297, in begin
version, status, reason = self._read_status()
File "/usr/lib/python3.6/http/client.py", line 266, in _read_status
raise RemoteDisconnected("Remote end closed connection without"
urllib3.exceptions.ProtocolError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/darjeeling/evaluator.py", line 266, in evaluate
outcome = self._evaluate(candidate)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/darjeeling/evaluator.py", line 213, in _evaluate
container = self.__problem.build_patch(patch)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/darjeeling/problem.py", line 172, in build_patch
container = mgr_ctr.provision(self.__bug)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/bugzoo/client/container.py", line 124, in provision
r = self.__api.post(endpoint, json=payload)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/bugzoo/client/api.py", line 105, in post
return requests.post(url, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/api.py", line 112, in post
return request('post', url, data=data, json=json, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/api.py", line 58, in request
return session.request(method=method, url=url, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/sessions.py", line 508, in request
resp = self.send(prep, **send_kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/sessions.py", line 618, in send
r = adapter.send(request, **kwargs)
File "/home/chris/.local/share/virtualenvs/darjeeling-KYygC-ZZ/lib/python3.6/site-packages/requests/adapters.py", line 490, in send
raise ConnectionError(err, request=request)
requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response',))
Should accept a code snippet and return a set of labels.
def find_referenced_labels(snippet: str) -> Set[str]:
...
Or, better yet, it should return a use
set and a def
set of labels.
class TransformationDatabase(object):
@staticmethod
def from_file(fn: str) -> 'TransformationDatabase':
...
def to_file(self, fn: str) -> None:
...
Maintain an internal snippet database.
Let's say that we discover a patch at a given location, if that patch is a deletion, we should remove all other transformations at that location from the transformation space. Alternatively, we may want to update the fault localisation in response to patch results (i.e., online MBFL).
Needs to be defined as part of a search strategy.
What does mutation tell us about the shape and location of the patch? Can we combine mutation and semantics-based repair?
class Algorithm(object):
def __next__(self) -> Candidate:
...
def evaluated(outcome: CandidateOutcome) -> None:
...
Implement a magical setter for Localization
that propagates its update to the transformation database.
Should prevent the insertion of DeclStmt
and the deletion/replacement of DeclStmt
, but should allow other statements that contain declarations to be modified.
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.