Giter Site home page Giter Site logo

squareslab / darjeeling Goto Github PK

View Code? Open in Web Editor NEW
28.0 28.0 10.0 830 KB

Language-independent, search-based program repair -- just your cup of tea! ☕

License: Apache License 2.0

Python 97.98% Dockerfile 0.88% Makefile 0.23% Shell 0.61% P4 0.01% Raku 0.01% Lua 0.01% C 0.27% Roff 0.01%
bug bugzoo defect genetic genprog program repair search

darjeeling's People

Contributors

christimperley avatar i-question-this avatar pdreiter avatar ruricolist avatar yxliang01 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

darjeeling's Issues

Unexpected error during teardown when using multiple threads

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',))

Ability to update search space in response to patch evaluations

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.

Decouple fault localization and Problem

  • decouple fault localisation
  • separate restrict_to_files into its own method
  • separate restrict_to_lines into its own method
  • add restrict_with_filter method
  • add validate method for ensuring a problem is valid
  • decouple snippet database
  • use attrs to implement snippets

Use character ranges as transformation targets

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

  • add function for quickly converting line numbers to character ranges
  • obtain coverage information for arbitrary character ranges
  • replace concrete line transformation generators with character range equivalents

Add repair minimisation

Also, if a statement deletion repairs a bug, should we bother looking at replacing that statement?

Add snippet normalisation feature

Should return the normal form for a given snippet, allowing us to remove duplicates of snippets that are determined to be semantically equivalent.

List dependencies in the README.

Basic stuff like Python version, as well as other SL properties (BugZoo, etc). Esp for latter, include links to associated projects.

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.