project
string | commit_sha
string | parent_sha
string | file_path
string | project_url
string | likely_bug
bool | comodified
bool | in_function
bool | diff
string | before
string | after
string | sstub_pattern
string | edit_script
string |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
pyfilesystem
|
3a3f4991137b2b6fc850207a1a158d0fcd68889a
|
c564dcf1611d7c51cbafd1203be90019f25de2cc
|
fs/expose/http.py
|
https://github.com/smartfile/pyfilesystem
| true
| false
| true
|
@@ -119,45 +119,45 @@ class FSHTTPRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
self.send_header("Content-Length", str(length))
self.end_headers()
return f
-
+
def translate_path(self, path):
# abandon query parameters
path = path.split('?',1)[0]
path = path.split('#',1)[0]
path = posixpath.normpath(urllib.unquote(path))
return path
-
+
def serve_fs(fs, address='', port=8000):
-
+
"""Serve an FS instance over http
-
+
:param fs: an FS object
:param address: IP address to serve on
:param port: port number
-
+
"""
-
+
def Handler(request, client_address, server):
return FSHTTPRequestHandler(fs, request, client_address, server)
-
+
#class ThreadedTCPServer(SocketServer.ThreadingMixIn, SocketServer.TCPServer):
- # pass
- httpd = SocketServer.TCPServer((address, port), Handler, bind_and_activate=False)
+ # pass
+ httpd = SocketServer.TCPServer((address, port), Handler, bind_and_activate=False)
#httpd = ThreadedTCPServer((address, port), Handler, bind_and_activate=False)
httpd.allow_reuse_address = True
httpd.server_bind()
httpd.server_activate()
-
- server_thread = threading.Thread(target=httpd.serve_forever)
- server_thread.start()
+
+ server_thread = threading.Thread(target=httpd.serve_forever)
+ server_thread.start()
try:
while True:
time.sleep(0.1)
except (KeyboardInterrupt, SystemExit):
httpd.shutdown()
-
+
if __name__ == "__main__":
-
+
from fs.osfs import OSFS
serve_fs(OSFS('~/'))
\ No newline at end of file
|
"""Serve an FS instance over http
:param fs: an FS object
:param address: IP address to serve on
:param port: port number
"""
|
"""Serve an FS instance over http
:param fs: an FS object
:param address: IP address to serve on
:param port: port number
"""
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"\"\"Serve an FS instance over http\n \n :param fs: an FS object\n :param address: IP address to serve on\n :param port: port number\n \n \"\"\"", 14, 5, 20, 8], "\"\"\"Serve an FS instance over http\n \n :param fs: an FS object\n :param address: IP address to serve on\n :param port: port number\n \n \"\"\""]]
|
boofuzz
|
a23454763fba8be879a372a0b90c4743d271edbd
|
c842f35912fd7c24d56d8c81e86f8143323377bb
|
process_monitor.py
|
https://github.com/yasong/boofuzz
| true
| false
| false
|
@@ -365,7 +365,7 @@ if __name__ == "__main__":
ignore_pid = int(arg)
if opt in ("-l", "--log_level"):
log_level = int(arg)
- if opt in ("-p", "--proc_Name"):
+ if opt in ("-p", "--proc_name"):
proc_name = arg
if opt in ("-P", "--port"):
PORT = int(arg)
|
if opt in ( "-p" , "--proc_Name" ) : proc_name = arg
|
if opt in ( "-p" , "--proc_name" ) : proc_name = arg
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"--proc_Name\"", 3, 26, 3, 39], "\"--proc_name\""]]
|
nuxeo-drive
|
ad7e3fe636f50b5d825392ebc18012261bd1ba96
|
9f3d33a377fbce1e90c260ba17b5409099d54fbc
|
nuxeo-drive-client/nxdrive/client.py
|
https://github.com/mconstantin/nuxeo-drive
| true
| false
| true
|
@@ -438,7 +438,7 @@ class NuxeoClient(object):
self.attach_blob(ref, content, name)
def _check_ref(self, ref):
- if ref.startswith('/'):
+ if ref.startswith('/') and self._base_folder_path != '/':
ref = self._base_folder_path + ref
return ref
|
if ref . startswith ( '/' ) : ref = self . _base_folder_path + ref
|
if ref . startswith ( '/' ) and self . _base_folder_path != '/' : ref = self . _base_folder_path + ref
|
MORE_SPECIFIC_IF
|
[["Insert", ["if_statement", 3, 9, 4, 47], ["boolean_operator", "N0"], 1], ["Move", "N0", ["call", 3, 12, 3, 31], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["!=:!=", "T"], 1], ["Insert", "N1", ["string:'/'", "T"], 2], ["Insert", "N2", ["identifier:self", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:_base_folder_path", "T"], 2]]
|
nav
|
daaad28d0127e036471fa8bfb4d9d25c5fa4f2c1
|
525b5fea4f22880103f75a289c6e04d9d01d7751
|
python/nav/ipdevpoll/shadows.py
|
https://github.com/Uninett/nav
| true
| false
| true
|
@@ -674,9 +674,9 @@ class GwPortPrefix(Shadow):
data = self._parse_description_with_all_parsers()
if not data:
- self._logger.info("ifalias did not match any known router port "
- "description conventions: %s",
- self.interface.ifalias)
+ self._logger.debug("ifalias did not match any known router port "
+ "description conventions: %s",
+ self.interface.ifalias)
self.prefix.vlan.netident = self.interface.ifalias
return
|
self . _logger . info ( "ifalias did not match any known router port " "description conventions: %s" , self . interface . ifalias )
|
self . _logger . debug ( "ifalias did not match any known router port " "description conventions: %s" , self . interface . ifalias )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:info", 3, 26, 3, 30], "debug"]]
|
ansible-modules-extras
|
58f02344d417ce3976dfa2bed7397faf2da248c9
|
f4d5b68aa33cd4406c5d4680ca62c431749f4064
|
database/misc/mongodb_user.py
|
https://github.com/StackPointCloud/ansible-modules-extras
| true
| false
| true
|
@@ -265,7 +265,7 @@ def main():
uinfo = user_find(client, user, db_name)
if update_password != 'always' and uinfo:
password = None
- if 'roles' in uinfo and list(map((lambda x: x['role']), uinfo['roles'])) == roles:
+ if list(map((lambda x: x['role']), uinfo.get('roles', []))) == roles:
module.exit_json(changed=False, user=user)
try:
|
if 'roles' in uinfo and list ( map ( ( lambda x : x [ 'role' ] ) , uinfo [ 'roles' ] ) ) == roles : module . exit_json ( changed = False , user = user )
|
if list ( map ( ( lambda x : x [ 'role' ] ) , uinfo . get ( 'roles' , [ ] ) ) ) == roles : module . exit_json ( changed = False , user = user )
|
SINGLE_STMT
|
[["Move", ["if_statement", 3, 13, 4, 59], ["comparison_operator", 3, 37, 3, 94], 1], ["Insert", ["argument_list", 3, 45, 3, 84], ["call", "N0"], 3], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["identifier:uinfo", 3, 69, 3, 74], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:get", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Move", "N2", ["string:'roles'", 3, 75, 3, 82], 1], ["Insert", "N2", [",:,", "T"], 2], ["Insert", "N2", ["list", "N3"], 3], ["Insert", "N2", ["):)", "T"], 4], ["Insert", "N3", ["[:[", "T"], 0], ["Move", "N3", ["]:]", 3, 82, 3, 83], 1], ["Delete", ["string:'roles'", 3, 16, 3, 23]], ["Delete", ["in:in", 3, 24, 3, 26]], ["Delete", ["identifier:uinfo", 3, 27, 3, 32]], ["Delete", ["comparison_operator", 3, 16, 3, 32]], ["Delete", ["and:and", 3, 33, 3, 36]], ["Delete", ["[:[", 3, 74, 3, 75]], ["Delete", ["subscript", 3, 69, 3, 83]], ["Delete", ["boolean_operator", 3, 16, 3, 94]]]
|
fdroidserver
|
51a6d1602fa2c6684b0a4af618b4a0676c2d2ebd
|
063d581b71d06b108e4e6fbe98c2bc20b7dd4855
|
fdroidserver/update.py
|
https://github.com/fdroidtravis/fdroidserver
| true
| false
| true
|
@@ -438,7 +438,7 @@ def scan_apks(apps, apkcache, repodir, knownapks, use_date_from_apk=False):
icon_pat = re.compile(".*application-icon-([0-9]+):'([^']+?)'.*")
icon_pat_nodpi = re.compile(".*icon='([^']+?)'.*")
sdkversion_pat = re.compile(".*'([0-9]*)'.*")
- string_pat = re.compile(".*'([^']*)'.*")
+ string_pat = re.compile(".* name='([^']*)'.*")
for apkfile in glob.glob(os.path.join(repodir, '*.apk')):
apkfilename = apkfile[len(repodir) + 1:]
|
string_pat = re . compile ( ".*'([^']*)'.*" )
|
string_pat = re . compile ( ".* name='([^']*)'.*" )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\".*'([^']*)'.*\"", 3, 29, 3, 44], "\".* name='([^']*)'.*\""]]
|
gl
|
344828cc3d882734f5ba5536b9baa9474976ecdf
|
97e966f2dbc4442c105c80021718f970901790e6
|
glance/client.py
|
https://github.com/darren-wang/gl
| true
| false
| false
|
@@ -59,7 +59,7 @@ class ImageBodyIterator(object):
tuple from `glance.client.Client.get_image`
"""
- CHUNKSIZE = 10
+ CHUNKSIZE = 65536
def __init__(self, response):
"""
|
"""
CHUNKSIZE = 10
def __init__(self, response):
"""
|
"""
CHUNKSIZE = 65536
def __init__(self, response):
"""
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"\"\"\n \n CHUNKSIZE = 10\n \n def __init__(self, response):\n \"\"\"", 1, 5, 6, 12], "\"\"\"\n \n CHUNKSIZE = 65536\n \n def __init__(self, response):\n \"\"\""]]
|
python-social-auth
|
8faed089ea8dad3f4d271b0bcd0211de9ad2cb7b
|
aca26711ebb62bef9f82ad94b88e9713402bbb7d
|
social/pipeline/mail.py
|
https://github.com/JJediny/python-social-auth
| true
| false
| true
|
@@ -7,7 +7,7 @@ def mail_validation(backend, details, is_new=False, *args, **kwargs):
requires_validation = backend.REQUIRES_EMAIL_VALIDATION or \
backend.setting('FORCE_EMAIL_VALIDATION', False)
send_validation = details.get('email') and \
- (is_new or backend.settings('PASSWORDLESS', False))
+ (is_new or backend.setting('PASSWORDLESS', False))
if requires_validation and send_validation:
data = backend.strategy.request_data()
if 'verification_code' in data:
|
send_validation = details . get ( 'email' ) and ( is_new or backend . settings ( 'PASSWORDLESS' , False ) )
|
send_validation = details . get ( 'email' ) and ( is_new or backend . setting ( 'PASSWORDLESS' , False ) )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:settings", 3, 42, 3, 50], "setting"]]
|
gajim
|
2d7b41ecb9343c4ff9549a1275bf97f00e6b6b36
|
9768940b3a792fbb04448865f72b7cef6db4177a
|
src/common/config.py
|
https://github.com/gajim/gajim
| true
| false
| false
|
@@ -285,7 +285,7 @@ class Config:
'state_muc_directed_msg_color': [ opt_color, 'red2' ],
}, {}),
'contacts': ({
- 'gpg_enabled': [ opt_bool, False ],
+ 'gpg_enabled': [ opt_bool, True ],
}, {}),
}
|
'contacts' : ( { 'gpg_enabled' : [ opt_bool , False ] , } , { } ) ,
|
'contacts' : ( { 'gpg_enabled' : [ opt_bool , True ] , } , { } ) ,
|
CHANGE_BOOLEAN_LITERAL
|
[["Insert", ["list", 3, 19, 3, 38], ["true:True", "T"], 3], ["Delete", ["false:False", 3, 31, 3, 36]]]
|
botocore
|
bb6f0194c8aae1773b3d8b9684902f16a8874f3e
|
9243739dc96e6537cd3a402915d62a45422583f1
|
botocore/session.py
|
https://github.com/punkrokk/botocore
| true
| false
| true
|
@@ -230,7 +230,7 @@ class Session(object):
if 'config' in methods:
build_chain_config_args['config_property'] = config_name
mapping[name] = chain_builder.build_config_chain(
- **build_chain_config_args,
+ **build_chain_config_args
)
config_provider_component = ConfigProviderComponent(
mapping=mapping
|
mapping [ name ] = chain_builder . build_config_chain ( ** build_chain_config_args , )
|
mapping [ name ] = chain_builder . build_config_chain ( ** build_chain_config_args )
|
SAME_FUNCTION_LESS_ARGS
|
[["Delete", [",:,", 3, 42, 3, 43]]]
|
w3af
|
930872cf3b62b775331eb39793157a80e8be40a9
|
a313df4d37bdbc7d3e85682112847879f2cdfbac
|
lib/request/inject.py
|
https://github.com/digideskio/w3af
| true
| false
| true
|
@@ -482,7 +482,7 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
if isinstance(value, basestring):
value = value.strip().lower()
if value in ("true", "false"):
- value = bool(value)
+ value = value == "true"
elif value in ("1", "-1"):
value = True
elif value == "0":
|
value = bool ( value )
|
value = value == "true"
|
SINGLE_STMT
|
[["Insert", ["assignment", 3, 17, 3, 36], ["comparison_operator", "N0"], 2], ["Move", "N0", ["identifier:value", 3, 30, 3, 35], 0], ["Insert", "N0", ["==:==", "T"], 1], ["Insert", "N0", ["string:\"true\"", "T"], 2], ["Delete", ["identifier:bool", 3, 25, 3, 29]], ["Delete", ["(:(", 3, 29, 3, 30]], ["Delete", ["):)", 3, 35, 3, 36]], ["Delete", ["argument_list", 3, 29, 3, 36]], ["Delete", ["call", 3, 25, 3, 36]]]
|
cpython
|
9ddac3e166f0bc5b9226067c5dfc9f462318ce67
|
7377bec6ae20e2a3b83f7084bc98af47e5bd3886
|
Lib/ntpath.py
|
https://github.com/wwjiang007/cpython
| true
| false
| false
|
@@ -22,7 +22,7 @@
extsep = '.'
sep = '\\'
pathsep = ';'
-altsep = None
+altsep = '/'
defpath = '.;C:\\bin'
if 'ce' in sys.builtin_module_names:
defpath = '\\Windows'
|
altsep = None
|
altsep = '/'
|
SINGLE_TOKEN
|
[["Insert", ["assignment", 3, 1, 3, 14], ["string:'/'", "T"], 2], ["Delete", ["none:None", 3, 10, 3, 14]]]
|
frappe
|
b8dbe693a8401c92279083795b2224c644f687dc
|
14d4362d8a2a1f2b99a833849df3f3e76a00f920
|
frappe/utils/data.py
|
https://github.com/mainul94/frappe
| true
| false
| true
|
@@ -42,7 +42,7 @@ def add_to_date(date, years=0, months=0, days=0):
from dateutil.relativedelta import relativedelta
as_string, as_datetime = False, False
- if not isinstance(date, basestring):
+ if isinstance(date, basestring):
as_string = True
if " " in date:
as_datetime = True
|
if not isinstance ( date , basestring ) : as_string = True if " " in date : as_datetime = True
|
if isinstance ( date , basestring ) : as_string = True if " " in date : as_datetime = True
|
CHANGE_UNARY_OPERATOR
|
[["Move", ["if_statement", 3, 2, 6, 22], ["call", 3, 9, 3, 37], 1], ["Delete", ["not:not", 3, 5, 3, 8]], ["Delete", ["not_operator", 3, 5, 3, 37]]]
|
SickRage
|
e0490f0884542a76cd682b2de344e0e17577c14a
|
3cb9e1027ee397ca7d6e57474fd64960d9930a61
|
sickbeard/providers/hdtorrents.py
|
https://github.com/Mhynlo/SickRage
| true
| false
| false
|
@@ -18,7 +18,7 @@
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
import re
-from six.moves import urllib
+import urllib
import requests
from bs4 import BeautifulSoup
|
from six . moves import urllib
|
import urllib
|
SINGLE_STMT
|
[["Insert", ["module", 0, 1, 7, 0], ["import_statement", "N0"], 1], ["Move", "N0", ["import:import", 3, 16, 3, 22], 0], ["Move", "N0", ["dotted_name", 3, 23, 3, 29], 1], ["Delete", ["from:from", 3, 1, 3, 5]], ["Delete", ["identifier:six", 3, 6, 3, 9]], ["Delete", [".:.", 3, 9, 3, 10]], ["Delete", ["identifier:moves", 3, 10, 3, 15]], ["Delete", ["dotted_name", 3, 6, 3, 15]], ["Delete", ["import_from_statement", 3, 1, 3, 29]]]
|
iterative-Random-Forest
|
6f3263f569ceebbc0bbe48d4ef8c4a4a23e5844b
|
48be6424179b8e4072c7de8a76c5f841508d4a34
|
examples/plot_kernel_approximation.py
|
https://github.com/Yu-Group/iterative-Random-Forest
| true
| false
| false
|
@@ -76,5 +76,5 @@ pl.xlim(sample_sizes[0], sample_sizes[-1])
pl.ylim(np.min(approx_kernel_scores),1)
pl.xlabel("Sampling steps = transformed feature dimension")
pl.ylabel("Classification accuracy")
-pl.legend()
+pl.legend(loc='best')
pl.show()
|
pl . legend ( )
|
pl . legend ( loc = 'best' )
|
SAME_FUNCTION_MORE_ARGS
|
[["Insert", ["argument_list", 3, 10, 3, 12], ["keyword_argument", "N0"], 1], ["Insert", "N0", ["identifier:loc", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:'best'", "T"], 2]]
|
cpython
|
38acd4c028f72a80079c27d68c8da2efd059a38d
|
51669d8c188dad5b4e9fc071e5d2e8f8cde9ed37
|
Lib/urllib/robotparser.py
|
https://github.com/wwjiang007/cpython
| true
| false
| true
|
@@ -172,7 +172,7 @@ def applies_to(self, filename):
return self.path == "*" or filename.startswith(self.path)
def __str__(self):
- return (self.allowance and "Allow" or "Disallow") + ": " + self.path
+ return ("Allow" if self.allowance else "Disallow") + ": " + self.path
class Entry:
|
return ( self . allowance and "Allow" or "Disallow" ) + ": " + self . path
|
return ( "Allow" if self . allowance else "Disallow" ) + ": " + self . path
|
SINGLE_STMT
|
[["Insert", ["parenthesized_expression", 3, 16, 3, 58], ["conditional_expression", "N0"], 1], ["Insert", "N0", ["string:\"Allow\"", "T"], 0], ["Insert", "N0", ["if:if", "T"], 1], ["Move", "N0", ["attribute", 3, 17, 3, 31], 2], ["Insert", "N0", ["else:else", "T"], 3], ["Move", "N0", ["string:\"Disallow\"", 3, 47, 3, 57], 4], ["Delete", ["and:and", 3, 32, 3, 35]], ["Delete", ["string:\"Allow\"", 3, 36, 3, 43]], ["Delete", ["boolean_operator", 3, 17, 3, 43]], ["Delete", ["or:or", 3, 44, 3, 46]], ["Delete", ["boolean_operator", 3, 17, 3, 57]]]
|
reformed
|
c900983cb9f696cb20b22158743e5166461bb7e9
|
6f96e4c9babb9febea261b6cc94e15a4ea46ea1a
|
node_runner.py
|
https://github.com/kindly/reformed
| true
| false
| true
|
@@ -240,7 +240,7 @@ class NodeToken(object):
""" Helper function send status data to front end. """
self._set_action('general_error', data = error)
- def _set_action(action, link = None, data = None):
+ def _set_action(self, action, link = None, data = None):
""" Set the action for the node token. """
if self.action:
raise Exception('Action has already been set for this NodeToken')
|
def _set_action ( action , link = None , data = None ) : """ Set the action for the node token. """ if self . action : raise Exception ( 'Action has already been set for this NodeToken' )
|
def _set_action ( self , action , link = None , data = None ) : """ Set the action for the node token. """ if self . action : raise Exception ( 'Action has already been set for this NodeToken' )
|
SINGLE_STMT
|
[["Insert", ["parameters", 3, 20, 3, 54], ["identifier:self", "T"], 1], ["Insert", ["parameters", 3, 20, 3, 54], [",:,", "T"], 2]]
|
molecule
|
4c3bcba684071632beafc9fb131ab13c808de66a
|
347186f9e39f3fc77bf3bbfae608628eb250c86e
|
test/functional/docker/test_scenarios.py
|
https://github.com/ssbarnea/molecule
| true
| false
| false
|
@@ -291,7 +291,7 @@ def test_command_test_destroy_strategy_always(scenario_to_test, with_scenario,
msg = 'An error occured during the test sequence. Cleaning up.'
assert msg in str(e.value.stdout)
- assert 'PLAY [Destroy]' in e.value.stdout
+ assert 'PLAY [Destroy]' in str(e.value.stdout)
assert 0 != e.value.exit_code
|
assert 'PLAY [Destroy]' in e . value . stdout
|
assert 'PLAY [Destroy]' in str ( e . value . stdout )
|
ADD_FUNCTION_AROUND_EXPRESSION
|
[["Insert", ["comparison_operator", 3, 12, 3, 46], ["call", "N0"], 2], ["Insert", "N0", ["identifier:str", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["attribute", 3, 32, 3, 46], 1], ["Insert", "N1", ["):)", "T"], 2]]
|
odemis
|
0c76e4986309f65223f6ccc0778a439663fb1400
|
94a5cbe73b36b5400fc95f9c65a2c9b4aac3a4c1
|
src/odemis/driver/simcam.py
|
https://github.com/pieleric/odemis
| true
| false
| true
|
@@ -264,7 +264,7 @@ class Camera(model.DigitalCamera):
shape = image.shape
binning = self.binning.value
fnt_size = int(80/binning[0])
- fnt = ImageFont.truetype('/Library/Fonts/Arial.ttf', fnt_size)
+ fnt = ImageFont.truetype('FreeSans.ttf', fnt_size)
# create txt image for overlay
im_txt = Image.new('F', shape[::-1], 0)
d = ImageDraw.Draw(im_txt)
|
fnt = ImageFont . truetype ( '/Library/Fonts/Arial.ttf' , fnt_size )
|
fnt = ImageFont . truetype ( 'FreeSans.ttf' , fnt_size )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'/Library/Fonts/Arial.ttf'", 3, 34, 3, 60], "'FreeSans.ttf'"]]
|
salt
|
8a2f7dfda6f1add1850d0c2c6c217b5dabf36cba
|
a73e6035220e5d3332690763bf1e8d89062d802b
|
salt/utils/schedule.py
|
https://github.com/TargetHolding/salt
| true
| false
| true
|
@@ -45,7 +45,7 @@ class Schedule(object):
if 'config.option' in self.functions:
- return self.functions['config.option'](opt)
+ return self.functions['config.option'](opt, {})
return self.opts.get(opt, {})
def handle_func(self, func, data):
|
return self . functions [ 'config.option' ] ( opt )
|
return self . functions [ 'config.option' ] ( opt , { } )
|
SAME_FUNCTION_MORE_ARGS
|
[["Insert", ["argument_list", 1, 51, 1, 56], [",:,", "T"], 2], ["Insert", ["argument_list", 1, 51, 1, 56], ["dictionary", "N0"], 3], ["Insert", "N0", ["{:{", "T"], 0], ["Insert", "N0", ["}:}", "T"], 1]]
|
poky
|
864797ab8d42488a811135db82c9f2e99f842178
|
7cd835177ae0208859f790c0c638cde908386d5c
|
meta/lib/oeqa/selftest/prservice.py
|
https://github.com/lgirdk/poky
| true
| false
| true
|
@@ -34,7 +34,7 @@ class BitbakePrTests(oeSelfTest):
return str(stamps[0])
def increment_package_pr(self, package_name):
- inc_data = "do_package_append() {\nbb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
+ inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime.datetime.now()
self.write_recipeinc(package_name, inc_data)
bitbake("-ccleansstate %s" % package_name)
res = bitbake(package_name, ignore_status=True)
|
inc_data = "do_package_append() {\nbb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime . datetime . now ( )
|
inc_data = "do_package_append() {\n bb.build.exec_func('do_test_prserv', d)\n}\ndo_test_prserv() {\necho \"The current date is: %s\"\n}" % datetime . datetime . now ( )
|
CHANGE_BINARY_OPERAND
|
[["Update", ["string:\"do_package_append() {\\nbb.build.exec_func('do_test_prserv', d)\\n}\\ndo_test_prserv() {\\necho \\\"The current date is: %s\\\"\\n}\"", 3, 20, 3, 144], "\"do_package_append() {\\n bb.build.exec_func('do_test_prserv', d)\\n}\\ndo_test_prserv() {\\necho \\\"The current date is: %s\\\"\\n}\""]]
|
QOS_OS
|
2daab1f1fed020ef4576bba7265509fa752bb9a4
|
9a115f734eb93c54b8985470ca991cbd1924686c
|
neutron_juno/neutron/db/migration/models/frozen.py
|
https://github.com/MobileCloudNetworking/QOS_OS
| true
| false
| false
|
@@ -1848,7 +1848,7 @@ class Qos(BASEV2, HasId, HasTenant):
sa.ForeignKey('ports.id', ondelete="CASCADE"),
nullable=False)
net_id = sa.Column(sa.String(36),
- sa.ForeignKey('ports.id', ondelete="CASCADE"),
+ sa.ForeignKey('networks.id', ondelete="CASCADE"),
nullable=False)
qos_params = orm.relationship('QosQosParamAssociation',
backref='qoss',
|
nullable = False ) net_id = sa . Column ( sa . String ( 36 ) , sa . ForeignKey ( 'ports.id' , ondelete = "CASCADE" ) , nullable = False )
|
nullable = False ) net_id = sa . Column ( sa . String ( 36 ) , sa . ForeignKey ( 'networks.id' , ondelete = "CASCADE" ) , nullable = False )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'ports.id'", 3, 38, 3, 48], "'networks.id'"]]
|
Flashlight
|
0c3aeb931c2d520193944d6d5d6b9a39cae98693
|
798e4a9659f9db12430ab3d617d326d0e594b6cd
|
PluginDirectories/1/genius.bundle/plugin.py
|
https://github.com/undeadinu/Flashlight
| true
| false
| true
|
@@ -17,7 +17,7 @@ def results(parsed, original_query):
- "webview_user_agent": "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
+ "webview_user_agent": "Mozilla/5.0 AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53",
"webview_links_open_in_browser": True
}
|
"webview_user_agent" : "Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" ,
|
"webview_user_agent" : "Mozilla/5.0 AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53" ,
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53\"", 0, 39, 0, 176], "\"Mozilla/5.0 AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53\""]]
|
buildbot
|
695b4dcfad92e101cfba79e770b4590ac16d7ad4
|
838da4944de56ac60ccd78008209677ef23b0cf0
|
master/buildbot/db/enginestrategy.py
|
https://github.com/rapyuta/buildbot
| true
| false
| true
|
@@ -116,7 +116,8 @@ class BuildbotEngineStrategy(strategies.ThreadLocalEngineStrategy):
def connect_listener_enable_fk(connection, record):
# fk must be enabled for all connections
if not getattr(engine, "fk_disabled", False):
- connection.execute('pragma foreign_keys=ON')
+ return # http://trac.buildbot.net/ticket/3490#ticket
+ # connection.execute('pragma foreign_keys=ON')
sa.event.listen(engine.pool, 'connect', connect_listener_enable_fk)
# try to enable WAL logging
|
connection . execute ( 'pragma foreign_keys=ON' )
|
return
|
SINGLE_STMT
|
[["Insert", ["block", 3, 17, 3, 61], ["return_statement", "N0"], 0], ["Insert", "N0", ["return:return", "T"], 0], ["Delete", ["identifier:connection", 3, 17, 3, 27]], ["Delete", [".:.", 3, 27, 3, 28]], ["Delete", ["identifier:execute", 3, 28, 3, 35]], ["Delete", ["attribute", 3, 17, 3, 35]], ["Delete", ["(:(", 3, 35, 3, 36]], ["Delete", ["string:'pragma foreign_keys=ON'", 3, 36, 3, 60]], ["Delete", ["):)", 3, 60, 3, 61]], ["Delete", ["argument_list", 3, 35, 3, 61]], ["Delete", ["call", 3, 17, 3, 61]], ["Delete", ["expression_statement", 3, 17, 3, 61]]]
|
ansible
|
46d2a3eddc674d4d7654cfcc3aa1a2e68dbb448f
|
974c45a5f57297e1123488584c7965796893b759
|
lib/ansible/modules/packaging/os/rhsm_repository.py
|
https://github.com/cchurch/ansible
| true
| false
| false
|
@@ -74,7 +74,7 @@ RETURN = '''
repositories:
description:
- The list of RHSM repositories with their states.
- - When this module is used to change the repositories states, this list contains the updated states after the changes.
+ - When this module is used to change the repository states, this list contains the updated states after the changes.
returned: success
type: list
|
with their states . - When this module is used to change the repositories states , this list contains the updated states after the changes . returned : success
|
with their states . - When this module is used to change the repository states , this list contains the updated states after the changes . returned : success
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:repositories", 3, 46, 3, 58], "repository"]]
|
django-oscar
|
d28cc5afb0ebef23b2af487879bf89fb8ed77c7f
|
b9a7fbc56da224178546dac1be1581002fbcd9f4
|
oscar/apps/basket/views.py
|
https://github.com/caravancoop/django-oscar
| true
| false
| true
|
@@ -50,7 +50,7 @@ class BasketView(ModelFormSetView):
def formset_valid(self, formset):
needs_auth = False
for form in formset:
- if form.cleaned_data['save_for_later']:
+ if hasattr(form, 'cleaned_data') and form.cleaned_data['save_for_later']:
line = form.instance
if self.request.user.is_authenticated():
|
if form . cleaned_data [ 'save_for_later' ] : line = form . instance if self . request . user . is_authenticated ( ) :
|
if hasattr ( form , 'cleaned_data' ) and form . cleaned_data [ 'save_for_later' ] : line = form . instance if self . request . user . is_authenticated ( ) :
|
MORE_SPECIFIC_IF
|
[["Insert", ["if_statement", 3, 13, 5, 57], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["call", "N1"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["subscript", 3, 16, 3, 51], 2], ["Insert", "N1", ["identifier:hasattr", "T"], 0], ["Insert", "N1", ["argument_list", "N2"], 1], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["identifier:form", "T"], 1], ["Insert", "N2", [",:,", "T"], 2], ["Insert", "N2", ["string:'cleaned_data'", "T"], 3], ["Insert", "N2", ["):)", "T"], 4]]
|
sphinx
|
595be7aef06489fb9e7545232cdd5a7d5e4061aa
|
1a4c41a7691e8f78d42e2db221192962c53b27df
|
sphinx/ext/napoleon/docstring.py
|
https://github.com/ghane/sphinx
| true
| false
| false
|
@@ -33,7 +33,7 @@ _google_section_regex = re.compile(r'^(\s|\w)+:\s*$')
_google_typed_arg_regex = re.compile(r'\s*(.+?)\s*\(\s*(.*[^\s]+)\s*\)')
_numpy_section_regex = re.compile(r'^[=\-`:\'"~^_*+#<>]{2,}\s*$')
_single_colon_regex = re.compile(r'(?<!:):(?!:)')
-_xref_regex = re.compile(r'(:\w+:\S+:`.+?`|:\S+:`.+?`|`.+?`)')
+_xref_regex = re.compile(r'(:(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:`.+?`)')
_bullet_list_regex = re.compile(r'^(\*|\+|\-)(\s+\S|\s*$)')
_enumerated_list_regex = re.compile(
r'^(?P<paren>\()?'
|
_xref_regex = re . compile ( r'(:\w+:\S+:`.+?`|:\S+:`.+?`|`.+?`)' )
|
_xref_regex = re . compile ( r'(:(?:[a-zA-Z0-9]+[\-_+:.])*[a-zA-Z0-9]+:`.+?`)' )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:r'(:\\w+:\\S+:`.+?`|:\\S+:`.+?`|`.+?`)'", 3, 26, 3, 62], "r'(:(?:[a-zA-Z0-9]+[\\-_+:.])*[a-zA-Z0-9]+:`.+?`)'"]]
|
electrum-zcl
|
d50e36f3a274a4cd6360a44d5e849861136c1fd8
|
08a9de688ac5d85db341830257beed5de3868ea3
|
gui/gui_qt.py
|
https://github.com/BTCP-community/electrum-zcl
| true
| false
| false
|
@@ -389,7 +389,7 @@ def ok_cancel_buttons(dialog):
default_column_widths = { "history":[40,140,350,140], "contacts":[350,330],
- "receive":[[310],[310,200,130,130],[310,200,130,130]] }
+ "receive":[[370],[370,200,130,130],[370,200,130,130]] }
class ElectrumWindow(QMainWindow):
|
default_column_widths = { "history" : [ 40 , 140 , 350 , 140 ] , "contacts" : [ 350 , 330 ] , "receive" : [ [ 310 ] , [ 310 , 200 , 130 , 130 ] , [ 310 , 200 , 130 , 130 ] ] }
|
default_column_widths = { "history" : [ 40 , 140 , 350 , 140 ] , "contacts" : [ 350 , 330 ] , "receive" : [ [ 370 ] , [ 370 , 200 , 130 , 130 ] , [ 370 , 200 , 130 , 130 ] ] }
|
SINGLE_STMT
|
[["Update", ["integer:310", 3, 14, 3, 17], "370"], ["Update", ["integer:310", 3, 20, 3, 23], "370"], ["Update", ["integer:310", 3, 38, 3, 41], "370"]]
|
simfactory2
|
00f58d909bf8d3bae1d1913014f10378d3fd2dad
|
ab304285e4c73a61cda36a9b73cc67644932e3a2
|
lib/simrestart.py
|
https://bitbucket.org/simfactory/simfactory2
| true
| false
| true
|
@@ -990,7 +990,7 @@ class SimRestart:
scratchdir = machineEntry.GetKey('scratchdir')
if not(scratchdir.startswith("/")):
- sspath = self.SimLib.BuildPath(self.RestartDir, scratchdir)
+ sspath = self.SimLib.BuildPath([self.RestartDir, scratchdir])
if os.path.exists(sspath):
shutil.rmtree(sspath, True)
|
sspath = self . SimLib . BuildPath ( self . RestartDir , scratchdir )
|
sspath = self . SimLib . BuildPath ( [ self . RestartDir , scratchdir ] )
|
SINGLE_STMT
|
[["Insert", ["argument_list", 3, 34, 3, 63], ["list", "N0"], 1], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["attribute", 3, 35, 3, 50], 1], ["Move", "N0", [",:,", 3, 50, 3, 51], 2], ["Move", "N0", ["identifier:scratchdir", 3, 52, 3, 62], 3], ["Insert", "N0", ["]:]", "T"], 4]]
|
folium
|
9e1e50d40edccac666b82e2914b1e74fd570d06a
|
87eae3a0fe017d641707bb0481182945970c6d7e
|
folium/utilities.py
|
https://github.com/tomzhang/folium
| true
| false
| true
|
@@ -159,7 +159,7 @@ def color_brewer(color_code, n=6):
'RdGy': ['#b2182b', '#ef8a62', '#fddbc7', '#e0e0e0', '#999999', '#4d4d4d'],
'RdYlBu': ['#d73027', '#fc8d59', '#fee090', '#e0f3f8', '#91bfdb', '#4575b4'],
'RdYlGn': ['#d73027', '#fc8d59', '#fee08b', '#d9ef8b', '#91cf60', '#1a9850'],
- 'Spectral': ['#d53e4f' '#fc8d59' '#fee08b' '#e6f598' '#99d594' '#3288bd'],
+ 'Spectral': ['#d53e4f', '#fc8d59', '#fee08b', '#e6f598', '#99d594', '#3288bd'],
'Accent': ['#7fc97f', '#beaed4', '#fdc086', '#ffff99', '#386cb0', '#f0027f'],
'Dark2': ['#1b9e77', '#d95f02', '#7570b3', '#e7298a', '#66a61e', '#e6ab02'],
'Paired': ['#a6cee3', '#1f78b4', '#b2df8a', '#33a02c', '#fb9a99', '#e31a1c'],
|
'Spectral' : [ '#d53e4f' '#fc8d59' '#fee08b' '#e6f598' '#99d594' '#3288bd' ] ,
|
'Spectral' : [ '#d53e4f' , '#fc8d59' , '#fee08b' , '#e6f598' , '#99d594' , '#3288bd' ] ,
|
SINGLE_STMT
|
[["Move", ["subscript", 3, 16, 3, 89], ["string:'#d53e4f'", 3, 29, 3, 38], 3], ["Insert", ["subscript", 3, 16, 3, 89], [",:,", "T"], 4], ["Move", ["subscript", 3, 16, 3, 89], ["string:'#fc8d59'", 3, 39, 3, 48], 5], ["Insert", ["subscript", 3, 16, 3, 89], [",:,", "T"], 6], ["Move", ["subscript", 3, 16, 3, 89], ["string:'#fee08b'", 3, 49, 3, 58], 7], ["Insert", ["subscript", 3, 16, 3, 89], [",:,", "T"], 8], ["Move", ["subscript", 3, 16, 3, 89], ["string:'#e6f598'", 3, 59, 3, 68], 9], ["Insert", ["subscript", 3, 16, 3, 89], [",:,", "T"], 10], ["Move", ["subscript", 3, 16, 3, 89], ["string:'#99d594'", 3, 69, 3, 78], 11], ["Insert", ["subscript", 3, 16, 3, 89], [",:,", "T"], 12], ["Move", ["subscript", 3, 16, 3, 89], ["string:'#3288bd'", 3, 79, 3, 88], 13], ["Delete", ["concatenated_string", 3, 29, 3, 88]]]
|
scrapy
|
dabb064293a2f7721bf32f6b40fc693f6517b7ce
|
12475fccbed1227cbd9467b5443b6699f3609c7a
|
scrapy/commands/parse.py
|
https://github.com/Tepira/scrapy
| true
| false
| true
|
@@ -125,7 +125,7 @@ class Command(ScrapyCommand):
log.msg(format='Unable to find spider: %(spider)s',
level=log.ERROR, spider=opts.spider)
else:
- self.spider = create_spider_for_request(self.crawler.spiders, url)
+ self.spider = create_spider_for_request(self.crawler.spiders, Request(url))
if not self.spider:
log.msg(format='Unable to find spider for: %(url)s',
level=log.ERROR, url=url)
|
else : self . spider = create_spider_for_request ( self . crawler . spiders , url )
|
else : self . spider = create_spider_for_request ( self . crawler . spiders , Request ( url ) )
|
ADD_FUNCTION_AROUND_EXPRESSION
|
[["Insert", ["argument_list", 3, 52, 3, 79], ["call", "N0"], 3], ["Insert", ["argument_list", 3, 52, 3, 79], ["):)", "T"], 4], ["Insert", "N0", ["identifier:Request", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:url", 3, 75, 3, 78], 1], ["Move", "N1", ["):)", 3, 78, 3, 79], 2]]
|
avocado
|
1bf7eb269dbdf59679f09ad6b17da7547c225406
|
c4d9ea0c9449e467ee154bc92c4bfacae2ae34c7
|
avocado/plugins/yaml_to_mux.py
|
https://github.com/bright-sparks/avocado
| true
| false
| true
|
@@ -270,7 +270,7 @@ class YamlToMux(CLI):
if multiplex_files:
msg = ("The use of `--multiplex` is deprecated, use `--mux-yaml` "
"instead.")
- logging.getLogger("avocado.test").warning(msg)
+ logging.getLogger("avocado.app").warning(msg)
debug = getattr(args, "mux_debug", False)
try:
args.mux.data_merge(create_from_yaml(multiplex_files, debug))
|
logging . getLogger ( "avocado.test" ) . warning ( msg )
|
logging . getLogger ( "avocado.app" ) . warning ( msg )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"avocado.test\"", 3, 31, 3, 45], "\"avocado.app\""]]
|
electrum-tes
|
f225a269528618a9ee89fb5b57bc253fa17eaa26
|
f0611c456938eb485da765895dc482456fa292d1
|
lib/wallet.py
|
https://github.com/endlessloop2/electrum-tes
| true
| false
| true
|
@@ -1560,7 +1560,7 @@ class Standard_Wallet(Deterministic_Wallet, P2PK_Wallet):
self.keystore.delete_imported_key(pubkey)
self.save_keystore()
self.receiving_pubkeys.remove(pubkey)
- self.receiving_addresses.remove(addr)
+ self.receiving_addresses.remove(address)
self.storage.write()
def can_import_privkey(self):
|
self . receiving_addresses . remove ( addr )
|
self . receiving_addresses . remove ( address )
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:addr", 3, 41, 3, 45], "address"]]
|
conda
|
a8c140049c8581dea5118dc391023b8b760dbba5
|
2060458e0c546a3c70fa041e738cb73b41c4b0d3
|
conda/history.py
|
https://github.com/mingwandroid/conda
| true
| false
| true
|
@@ -163,7 +163,7 @@ class History(object):
specs = literal_eval(specs)
elif '[' not in specs:
specs = specs.split(',')
- specs = [spec for spec in specs if not spec.endswith('@')]
+ specs = [spec for spec in specs if spec and not spec.endswith('@')]
if specs and action in ('update', 'install', 'create'):
item['update_specs'] = item['specs'] = specs
elif specs and action in ('remove', 'uninstall'):
|
specs = [ spec for spec in specs if not spec . endswith ( '@' ) ]
|
specs = [ spec for spec in specs if spec and not spec . endswith ( '@' ) ]
|
SINGLE_STMT
|
[["Insert", ["if_clause", 3, 53, 3, 78], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["identifier:spec", "T"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["not_operator", 3, 56, 3, 78], 2]]
|
w3af
|
9d040cc66a634fe0b934787bd8d472a09d1cb9b2
|
af4bda2fe16638f798550afae4987ae68f28f91e
|
core/controllers/w3afCore.py
|
https://github.com/Vidocapt/w3af
| true
| false
| true
|
@@ -138,7 +138,7 @@ class w3afCore(object):
# A dict with plugin types as keys and a list of plugin instances as values
self._plugins = {'audit':[], 'grep':[], 'bruteforce':[], 'discovery':[], \
- 'evasion':[], 'mangle':[], 'output':[]}
+ 'evasion':[], 'mangle':[], 'output':[], 'auth': []}
self._fuzzableRequestList = []
|
self . _plugins = { 'audit' : [ ] , 'grep' : [ ] , 'bruteforce' : [ ] , 'discovery' : [ ] , 'evasion' : [ ] , 'mangle' : [ ] , 'output' : [ ] }
|
self . _plugins = { 'audit' : [ ] , 'grep' : [ ] , 'bruteforce' : [ ] , 'discovery' : [ ] , 'evasion' : [ ] , 'mangle' : [ ] , 'output' : [ ] , 'auth' : [ ] }
|
ADD_ELEMENTS_TO_ITERABLE
|
[["Insert", ["dictionary", 1, 25, 2, 48], [",:,", "T"], 14], ["Insert", ["dictionary", 1, 25, 2, 48], ["pair", "N0"], 15], ["Insert", "N0", ["string:'auth'", "T"], 0], ["Insert", "N0", [":::", "T"], 1], ["Insert", "N0", ["list", "N1"], 2], ["Insert", "N1", ["[:[", "T"], 0], ["Insert", "N1", ["]:]", "T"], 1]]
|
phase1-regtest
|
4322395e1f4f9666b038b8c8d167b85f9b7eec9e
|
f2fdf23efa7f4194d9123095b5ff3fe656641db5
|
commission.py
|
https://github.com/elaird/phase1-regtest
| true
| false
| true
|
@@ -320,7 +320,7 @@ class commissioner(driver.driver):
fecs = "hbfec2"
sfp = 2 * (self.sector - 6) - 1
elif self.sector == 13:
- fecs = "hbfec3"
+ fecs = "hbfec4"
sfp = self.sector - 12
print
|
"hbfec3"
|
"hbfec4"
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"hbfec3\"", 3, 24, 3, 32], "\"hbfec4\""]]
|
djblets
|
b3f1e26acf8baafee0982183c569575667a17108
|
a3e88c977efb9f4f1c1e9d84d8cd39bc04257700
|
djblets/gravatars/templatetags/gravatars.py
|
https://github.com/dekoza/djblets
| true
| false
| true
|
@@ -48,7 +48,7 @@ def gravatar(user, size=None):
- if not user.email:
+ if user.is_anonymous() or not user.email:
return ""
email = user.email.strip().lower()
|
if not user . email : return ""
|
if user . is_anonymous ( ) or not user . email : return ""
|
LESS_SPECIFIC_IF
|
[["Insert", ["if_statement", 0, 5, 1, 18], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["call", "N1"], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Move", "N0", ["not_operator", 0, 8, 0, 22], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["identifier:user", "T"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:is_anonymous", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["):)", "T"], 1]]
|
op25
|
b89edde80deab13034171459ff52448dfa981f87
|
8a6229239bbbd75df49424e1816fc19583a780b6
|
op25/gr-op25_repeater/apps/cfgtrunk.py
|
https://github.com/boatbod/op25
| true
| false
| true
|
@@ -92,7 +92,7 @@ def edit_config(hdrmap, configs, p_pos, p_value):
if (idx not in configs) or (param < 0) or (param > len(hdrmap)):
return 2
- if (p_value is not None) or (p_value != ""):
+ if (p_value is not None) and (p_value != ""):
configs[idx][hdrmap[param]] = p_value
else:
del configs[idx][hdrmap[param]]
|
if ( p_value is not None ) or ( p_value != "" ) : configs [ idx ] [ hdrmap [ param ] ] = p_value else : del configs [ idx ] [ hdrmap [ param ] ]
|
if ( p_value is not None ) and ( p_value != "" ) : configs [ idx ] [ hdrmap [ param ] ] = p_value else : del configs [ idx ] [ hdrmap [ param ] ]
|
CHANGE_BINARY_OPERATOR
|
[["Insert", ["boolean_operator", 3, 8, 3, 48], ["and:and", "T"], 1], ["Delete", ["or:or", 3, 30, 3, 32]]]
|
electrum-dash
|
aa69f42ac01d15f3d382a38e35f593bd9ea68f11
|
ba0efd9b7597966a0c595e4e26ad305aa9437ec5
|
client/version.py
|
https://github.com/Geopay/electrum-dash
| true
| false
| false
|
@@ -1,2 +1,2 @@
-ELECTRUM_VERSION = "0.43b"
+ELECTRUM_VERSION = "0.43c"
SEED_VERSION = 4 # bump this everytime the seed generation is modified
|
ELECTRUM_VERSION = "0.43b"
|
ELECTRUM_VERSION = "0.43c"
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:\"0.43b\"", 0, 20, 0, 27], "\"0.43c\""]]
|
Cortex-Analyzers
|
58c1e1c077c67c3ca60795addf0381b92ccb1da2
|
466a88abd5bfacf12cc8e7847921cb07f31b273b
|
analyzers/Virusshare/virusshare.py
|
https://github.com/Foneman38/Cortex-Analyzers
| true
| false
| true
|
@@ -45,7 +45,7 @@ class VirusshareAnalyzer(Analyzer):
if self.data_type == 'hash':
searchhash = self.getData()
if len(searchhash) != 32:
- self.report({'isonvs': 'unknown',
+ self.report({'isonvs': 'Unknown',
'hash': searchhash})
elif self.data_type == 'file':
filepath = self.getParam('file')
|
self . report ( { 'isonvs' : 'unknown' , 'hash' : searchhash } )
|
self . report ( { 'isonvs' : 'Unknown' , 'hash' : searchhash } )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'unknown'", 3, 40, 3, 49], "'Unknown'"]]
|
ganeti
|
035566e317b53ea031bc515ed4d1397b862ace22
|
2cc6781aac8b53426d83d4cb8a42dc7c58efb8d6
|
lib/cmdlib.py
|
https://github.com/candlerb/ganeti
| true
| false
| true
|
@@ -2307,7 +2307,7 @@ class LUAddNode(LogicalUnit):
_RedistributeAncillaryFiles(self)
self.context.ReaddNode(new_node)
else:
- _RedistributeAncillaryFiles(self, additional_nodes=node)
+ _RedistributeAncillaryFiles(self, additional_nodes=[node])
self.context.AddNode(new_node)
|
else : _RedistributeAncillaryFiles ( self , additional_nodes = node )
|
else : _RedistributeAncillaryFiles ( self , additional_nodes = [ node ] )
|
SINGLE_STMT
|
[["Insert", ["keyword_argument", 3, 41, 3, 62], ["list", "N0"], 2], ["Insert", "N0", ["[:[", "T"], 0], ["Move", "N0", ["identifier:node", 3, 58, 3, 62], 1], ["Insert", "N0", ["]:]", "T"], 2]]
|
gaffer
|
6a901fbb25af5e923d3d0e770b6065d7a11bc6d8
|
7c2eb0819f59967f96bbd981b98d38ac9bc7adf6
|
python/GafferUI/NameWidget.py
|
https://github.com/drewp/gaffer
| true
| false
| true
|
@@ -68,7 +68,7 @@ class NameWidget( GafferUI.TextWidget ) :
def __setName( self, *unwantedArgs ) :
- with Gaffer.UndoContext( self.__graphComponent.scriptNode() ) :
+ with Gaffer.UndoContext( self.__graphComponent.ancestor( Gaffer.ScriptNode().staticTypeId() ) ) :
self.setText( self.__graphComponent.setName( self.getText() ) )
def __setText( self, *unwantedArgs ) :
|
with Gaffer . UndoContext ( self . __graphComponent . scriptNode ( ) ) : self . setText ( self . __graphComponent . setName ( self . getText ( ) ) )
|
with Gaffer . UndoContext ( self . __graphComponent . ancestor ( Gaffer . ScriptNode ( ) . staticTypeId ( ) ) ) : self . setText ( self . __graphComponent . setName ( self . getText ( ) ) )
|
SINGLE_STMT
|
[["Insert", ["call", 3, 28, 3, 62], ["argument_list", "N0"], 1], ["Update", ["identifier:scriptNode", 3, 50, 3, 60], "ancestor"], ["Insert", "N0", ["(:(", "T"], 0], ["Insert", "N0", ["call", "N1"], 1], ["Insert", "N0", ["):)", "T"], 2], ["Insert", "N1", ["attribute", "N2"], 0], ["Insert", "N1", ["argument_list", "N3"], 1], ["Insert", "N2", ["call", "N4"], 0], ["Insert", "N2", [".:.", "T"], 1], ["Insert", "N2", ["identifier:staticTypeId", "T"], 2], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["):)", "T"], 1], ["Insert", "N4", ["attribute", "N5"], 0], ["Move", "N4", ["argument_list", 3, 60, 3, 62], 1], ["Insert", "N5", ["identifier:Gaffer", "T"], 0], ["Insert", "N5", [".:.", "T"], 1], ["Insert", "N5", ["identifier:ScriptNode", "T"], 2]]
|
ilastik
|
b2afa27ecda40b470dde0f3eac132e8a2d1c3258
|
0af5a456f9eece3b1cafee6d11c2d38251e14519
|
ilastik/applets/tracking/conservation/opConservationTracking.py
|
https://github.com/ilastik/ilastik
| true
| false
| false
|
@@ -7,7 +7,7 @@ from ilastik.applets.tracking.base.trackingUtilities import relabelMergers
class OpConservationTracking(OpTrackingBase):
- ClassMapping = InputSlot(stype=Opaque, rtype=List)
+ ClassMapping = InputSlot(stype=Opaque, rtype=List, optional=True)
MergerOutput = OutputSlot()
|
ClassMapping = InputSlot ( stype = Opaque , rtype = List )
|
ClassMapping = InputSlot ( stype = Opaque , rtype = List , optional = True )
|
SAME_FUNCTION_MORE_ARGS
|
[["Insert", ["argument_list", 3, 29, 3, 55], [",:,", "T"], 4], ["Insert", ["argument_list", 3, 29, 3, 55], ["keyword_argument", "N0"], 5], ["Insert", "N0", ["identifier:optional", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["true:True", "T"], 2]]
|
scikit-learn-categorical-tree
|
6de5e41c8faba1f2be6aeb7c5ff2d096d899ae8f
|
67ac5f77a736acafb8679493715b3a3384fb3179
|
benchmarks/bench_covertype.py
|
https://github.com/smartscheduling/scikit-learn-categorical-tree
| true
| false
| true
|
@@ -104,7 +104,7 @@ m = Memory(joblib_cache_folder, mmap_mode='r')
# Load the data, then cache and memmap the train/test split
@m.cache
-def load_data(dtype=np.float32, order='F'):
+def load_data(dtype=np.float32, order='C'):
######################################################################
## Load dataset
print("Loading dataset...")
|
def load_data ( dtype = np . float32 , order = 'F' ) : print ( "Loading dataset..." )
|
def load_data ( dtype = np . float32 , order = 'C' ) : print ( "Loading dataset..." )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'F'", 3, 39, 3, 42], "'C'"]]
|
noc
|
2f3c1d50185a7d5d3ace656845a9076d76dd8edf
|
fa2479293c4db70510bcf42ce1308586337ab4e0
|
fm/classifier/__init__.py
|
https://github.com/nocproject/noc
| true
| false
| true
|
@@ -560,7 +560,7 @@ class Classifier(Daemon):
try:
v = decoder(event, v)
except InterfaceTypeError, why:
- raise EventProcessingFailed("Cannot decode variable '%s'. Invalid %s: %s", ecv.name, ecv.type, repr(v))
+ raise EventProcessingFailed("Cannot decode variable '%s'. Invalid %s: %s" % (ecv.name, ecv.type, repr(v)))
r[ecv.name] = v
return r
|
raise EventProcessingFailed ( "Cannot decode variable '%s'. Invalid %s: %s" , ecv . name , ecv . type , repr ( v ) )
|
raise EventProcessingFailed ( "Cannot decode variable '%s'. Invalid %s: %s" % ( ecv . name , ecv . type , repr ( v ) ) )
|
SINGLE_STMT
|
[["Insert", ["argument_list", 3, 48, 3, 124], ["binary_operator", "N0"], 1], ["Insert", ["argument_list", 3, 48, 3, 124], ["):)", "T"], 2], ["Move", "N0", ["string:\"Cannot decode variable '%s'. Invalid %s: %s\"", 3, 49, 3, 94], 0], ["Insert", "N0", ["%:%", "T"], 1], ["Insert", "N0", ["tuple", "N1"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["attribute", 3, 96, 3, 104], 1], ["Move", "N1", [",:,", 3, 104, 3, 105], 2], ["Move", "N1", ["attribute", 3, 106, 3, 114], 3], ["Move", "N1", [",:,", 3, 114, 3, 115], 4], ["Move", "N1", ["call", 3, 116, 3, 123], 5], ["Move", "N1", ["):)", 3, 123, 3, 124], 6], ["Delete", [",:,", 3, 94, 3, 95]]]
|
mercurial
|
6b01a608c52920628c329ffc4230d1037e1bc25d
|
781077b91f1303b6c722e0475515ed9e5a928a02
|
contrib/perf.py
|
https://github.com/Distrotech/mercurial
| true
| false
| true
|
@@ -177,7 +177,7 @@ def perftemplating(ui, repo):
ui.popbuffer()
def perfcca(ui, repo):
- timer(lambda: scmutil.casecollisionauditor(ui, False, repo[None]))
+ timer(lambda: scmutil.casecollisionauditor(ui, False, repo.dirstate))
def perffncacheload(ui, repo):
from mercurial import scmutil, store
|
timer ( lambda : scmutil . casecollisionauditor ( ui , False , repo [ None ] ) )
|
timer ( lambda : scmutil . casecollisionauditor ( ui , False , repo . dirstate ) )
|
SINGLE_STMT
|
[["Insert", ["argument_list", 3, 47, 3, 70], ["attribute", "N0"], 5], ["Move", "N0", ["identifier:repo", 3, 59, 3, 63], 0], ["Insert", "N0", [".:.", "T"], 1], ["Insert", "N0", ["identifier:dirstate", "T"], 2], ["Delete", ["[:[", 3, 63, 3, 64]], ["Delete", ["none:None", 3, 64, 3, 68]], ["Delete", ["]:]", 3, 68, 3, 69]], ["Delete", ["subscript", 3, 59, 3, 69]]]
|
zulip
|
d7b7ae2d0fadb8072f98a1d08d084792f5a1fe76
|
05a40f11b354c2f37a2ec459f078c415e81b3f52
|
zerver/management/commands/rundjango.py
|
https://github.com/peterramsing/zulip
| true
| false
| true
|
@@ -6,7 +6,7 @@ def log_message_monkey(self, format, *args):
# Filter output for 200 or 304 responses.
if args[1] == '200' or args[1] == '304':
return
- return orig_log_message(self, format, *args)
+ orig_log_message(self, format, *args)
WSGIRequestHandler.log_message = log_message_monkey
|
return orig_log_message ( self , format , * args )
|
orig_log_message ( self , format , * args )
|
SINGLE_STMT
|
[["Insert", ["module", 0, 5, 7, 0], ["expression_statement", "N0"], 1], ["Move", "N0", ["call", 3, 12, 3, 49], 0], ["Delete", ["return:return", 3, 5, 3, 11]], ["Delete", ["return_statement", 3, 5, 3, 49]]]
|
scipy
|
d88397baff7bed0d749c929e762d617bfd1bc223
|
4ad1d9cd1f3b0e0afbc5b04343834820d9a468c4
|
scipy/sandbox/exmplpackage/tests/ntest.py
|
https://github.com/josephcslater/scipy
| true
| false
| true
|
@@ -14,7 +14,7 @@ def measure(code_str,times=1,label=None):
locs,globs = frame.f_locals,frame.f_globals
code = compile(code_str,
- 'Test name: %s ' % test_name,
+ 'Test name: %s ' % label,
'exec')
i = 0
elapsed = jiffies()
|
code = compile ( code_str , 'Test name: %s ' % test_name , 'exec' )
|
code = compile ( code_str , 'Test name: %s ' % label , 'exec' )
|
CHANGE_BINARY_OPERAND
|
[["Update", ["identifier:test_name", 3, 39, 3, 48], "label"]]
|
odoo
|
0ac2831f33536607cf8903afe7e40b1aa65451f9
|
5973022a953fd032925b9354d67e7dc37b423826
|
openerp/osv/orm.py
|
https://github.com/podemos-info/odoo
| true
| false
| true
|
@@ -4536,7 +4536,7 @@ class BaseModel(object):
order_direction = order_split[1].strip() if len(order_split) == 2 else ''
inner_clause = None
if order_field == 'id':
- order_by_clause = '"%s"."%s"' % (self._table, order_field)
+ inner_clause = '"%s"."%s"' % (self._table, order_field)
elif order_field in self._columns:
order_column = self._columns[order_field]
if order_column._classic_read:
|
order_by_clause = '"%s"."%s"' % ( self . _table , order_field )
|
inner_clause = '"%s"."%s"' % ( self . _table , order_field )
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:order_by_clause", 3, 21, 3, 36], "inner_clause"]]
|
snovault
|
92f5f4bd063b51a0893192651d04f70997e2570f
|
98c2339a102b7cf62510b0fb7372e02fd0d81626
|
src/encoded/audit/experiment.py
|
https://github.com/4dn-dcic/snovault
| true
| false
| true
|
@@ -206,7 +206,7 @@ def is_gtex_experiment(experiment_to_check):
for rep in experiment_to_check['replicates']:
if ('library' in rep) and ('biosample' in rep['library']) and \
('donor' in rep['library']['biosample']):
- if rep['library']['biosample']['donor'] in gtexDonorsList:
+ if rep['library']['biosample']['donor']['accession'] in gtexDonorsList:
return True
return False
|
if rep [ 'library' ] [ 'biosample' ] [ 'donor' ] in gtexDonorsList : return True
|
if rep [ 'library' ] [ 'biosample' ] [ 'donor' ] [ 'accession' ] in gtexDonorsList : return True
|
SINGLE_STMT
|
[["Move", ["subscript", 3, 16, 3, 52], ["subscript", 3, 16, 3, 52], 0], ["Insert", ["subscript", 3, 16, 3, 52], ["[:[", "T"], 1], ["Insert", ["subscript", 3, 16, 3, 52], ["string:'accession'", "T"], 2], ["Insert", ["subscript", 3, 16, 3, 52], ["]:]", "T"], 3]]
|
redbot
|
9842ec2a920f3a17fc48d6f2ea1926484f11012c
|
cb01ed742bc6fed94375ec20a32194dc41bc2ab1
|
redbot/headers/transfer_encoding.py
|
https://github.com/krux/redbot
| true
| false
| true
|
@@ -53,7 +53,7 @@ def parse(name, values, red):
unwanted_codings.add(coding)
if unwanted_codings:
red.set_message(name, rs.TRANSFER_CODING_UNWANTED,
- encoding=e(", ".join(unwanted_codings)))
+ unwanted_codings=e(", ".join(unwanted_codings)))
if 'identity' in codings:
red.set_message(name, rs.TRANSFER_CODING_IDENTITY)
return codings
|
red . set_message ( name , rs . TRANSFER_CODING_UNWANTED , encoding = e ( ", " . join ( unwanted_codings ) ) )
|
red . set_message ( name , rs . TRANSFER_CODING_UNWANTED , unwanted_codings = e ( ", " . join ( unwanted_codings ) ) )
|
CHANGE_KEYWORD_ARGUMENT_USED
|
[["Update", ["identifier:encoding", 3, 17, 3, 25], "unwanted_codings"]]
|
bots
|
0f1efeb029855d481688d8a7aef84527ec78a894
|
4d0df174319fc1f8519d3a9e215e2c20d29de54c
|
bots/bots_context.py
|
https://github.com/alexproca/bots
| true
| false
| true
|
@@ -39,7 +39,7 @@ def set_context(request):
#in bots.ini it is possible to add custom menu's
if botsglobal.ini.has_section('custommenus'):
custom_menuname = botsglobal.ini.get('custommenus','menuname','Custom')
- custom_menus = [(key.title(),value) for key,value in botsglobal.ini.iteritems('custommenus') if key != 'menuname']
+ custom_menus = [(key.title(),value) for key,value in botsglobal.ini.items('custommenus') if key != 'menuname']
else:
custom_menuname = None
custom_menus = None
|
custom_menus = [ ( key . title ( ) , value ) for key , value in botsglobal . ini . iteritems ( 'custommenus' ) if key != 'menuname' ]
|
custom_menus = [ ( key . title ( ) , value ) for key , value in botsglobal . ini . items ( 'custommenus' ) if key != 'menuname' ]
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:iteritems", 3, 77, 3, 86], "items"]]
|
account-invoicing
|
cfc8246ed991045a15d32a80ba2ca38c8519204a
|
88d899a322721b069d586078b1b1f8e9cc8690e4
|
project_task_portal_unfollow/project.py
|
https://github.com/bmya/account-invoicing
| true
| false
| false
|
@@ -3,7 +3,7 @@
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
-from openerp import models, api
+from openerp import models
class task(models.Model):
|
from openerp import models , api
|
from openerp import models
|
SINGLE_STMT
|
[["Delete", [",:,", 3, 27, 3, 28]], ["Delete", ["identifier:api", 3, 29, 3, 32]], ["Delete", ["dotted_name", 3, 29, 3, 32]]]
|
sims_catalogs_generation
|
e8cb90a37af01423ee49d7dffbe9d541916d4294
|
e81b515ab22d38df5afe29130855222a15d2e84c
|
python/lsst/sims/catalogs/generation/jobAllocator/jobAllocator.py
|
https://github.com/lsst/sims_catalogs_generation
| true
| false
| true
|
@@ -105,7 +105,7 @@ class JobAllocator:
self.metaDataManager.reset()
os.system('free -m')
for objectType in queryTypes:
- if objectType not in useTypes: useTypes.append(t)
+ if objectType not in useTypes: useTypes.append(objectType)
print 'Getting first %s instance catalog of size %i...' % (
objectType, self.chunkSize)
myQDB = queryDB.queryDB(
|
useTypes . append ( t )
|
useTypes . append ( objectType )
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:t", 3, 60, 3, 61], "objectType"]]
|
sconsUtils
|
c17c3e73a493ac1f6a038d9c143d8fa099f257bc
|
27e6f8d7bdae2db5d8a72a69154a2a89fa573d12
|
python/lsst/sconsUtils/builders.py
|
https://github.com/lsst/sconsUtils
| true
| false
| true
|
@@ -495,7 +495,7 @@ def VersionModule(self, filename, versionString=None):
info = tuple(int(v) for v in parts[0].split("."))
what = "__version_info__"
names.append(what)
- outFile.write("%s = %r\n" % (what, nfo,))
+ outFile.write("%s = %r\n" % (what, info))
except ValueError:
pass
|
outFile . write ( "%s = %r\n" % ( what , nfo , ) )
|
outFile . write ( "%s = %r\n" % ( what , info ) )
|
CHANGE_BINARY_OPERAND
|
[["Update", ["identifier:nfo", 3, 52, 3, 55], "info"], ["Delete", [",:,", 3, 55, 3, 56]]]
|
django-constance
|
d055821b59ff48b13c8eec8f8ddddd433b6d715a
|
041349764780f77583b89a23a535c2430cc53e4e
|
constance/backends/redisd.py
|
https://github.com/IDCubed/django-constance
| true
| false
| true
|
@@ -40,7 +40,7 @@ class RedisBackend(Backend):
if not keys:
return []
prefixed_keys = [self.add_prefix(key) for key in keys]
- values = (loads(value) for value in self._rd.mget(prefixed_keys))
+ values = (loads(value) for value in self._rd.mget(prefixed_keys) if value)
return itertools.izip(keys, values)
def set(self, key, value):
|
values = ( loads ( value ) for value in self . _rd . mget ( prefixed_keys ) )
|
values = ( loads ( value ) for value in self . _rd . mget ( prefixed_keys ) if value )
|
SINGLE_STMT
|
[["Insert", ["generator_expression", 3, 18, 3, 74], ["if_clause", "N0"], 3], ["Insert", "N0", ["if:if", "T"], 0], ["Insert", "N0", ["identifier:value", "T"], 1]]
|
scikit-learn
|
ea3f32ba7adec0443b48c41411c2e8266f083993
|
aa204678ee188c404486121ccb9c3b715389a87f
|
sklearn/feature_selection/rfe.py
|
https://github.com/tetrafolium/scikit-learn
| true
| false
| true
|
@@ -194,7 +194,7 @@ class RFE(BaseEstimator, MetaEstimatorMixin):
y : array of shape [n_samples]
The target values.
"""
- return self.estimator_.score(X[:, safe_mask(X, self.support)], y)
+ return self.estimator_.score(X[:, safe_mask(X, self.support_)], y)
def transform(self, X):
"""Reduce X to the selected features during the elimination.
|
return self . estimator_ . score ( X [ : , safe_mask ( X , self . support ) ] , y )
|
return self . estimator_ . score ( X [ : , safe_mask ( X , self . support_ ) ] , y )
|
CHANGE_ATTRIBUTE_USED
|
[["Update", ["identifier:support", 3, 61, 3, 68], "support_"]]
|
entropy
|
a5790ca9df96c98ab3dcf1beb73a323c7459cf9b
|
0bcc693bfc3d09cd9fc022b954a7f396daf9a3e7
|
client/equo.py
|
https://github.com/Heather/entropy
| true
| false
| false
|
@@ -227,7 +227,7 @@ myopts = [
(3,'multiremove',2,_('remove the provided injected atoms (all if no atom specified)')),
(4,'--branch=<branch>',1,_('choose on what branch operating')),
(3,'create-empty-database',1,_('create an empty repository database in the provided path')),
- (3,'switchbranch',2,_('switch to the specified branch the provided atoms (or world)')),
+ (3,'switchbranch <from branch> <to branch>',2,_('switch to the specified branch the provided atoms (or world)')),
(3,'md5check',2,_('verify integrity of the provided atoms (or world)')),
(3,'md5remote',2,_('verify remote integrity of the provided atoms (or world)')),
|
( 3 , 'switchbranch' , 2 , _ ( 'switch to the specified branch the provided atoms (or world)' ) ) ,
|
( 3 , 'switchbranch <from branch> <to branch>' , 2 , _ ( 'switch to the specified branch the provided atoms (or world)' ) ) ,
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'switchbranch'", 3, 16, 3, 30], "'switchbranch <from branch> <to branch>'"]]
|
2018-06-27-DIBSI-SWC
|
16f090864c8917543ed8663c70d4da0ea96248a2
|
77357274c1c6bf8c21a71d3487f110022606df52
|
bin/workshop_check.py
|
https://github.com/dib-lab/2018-06-27-DIBSI-SWC
| true
| false
| true
|
@@ -403,7 +403,7 @@ def main():
sys.exit(1)
root_dir = sys.argv[1]
- index_file = os.path.join(root_dir, 'index.html')
+ index_file = os.path.join(root_dir, 'index.md')
config_file = os.path.join(root_dir, '_config.yml')
reporter = Reporter()
|
index_file = os . path . join ( root_dir , 'index.html' )
|
index_file = os . path . join ( root_dir , 'index.md' )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'index.html'", 3, 41, 3, 53], "'index.md'"]]
|
openstates
|
93add3a3c5b41f9f556de70b37fb753aab8c98cf
|
54a2106d9820bd86ac1afe9e0f6036a55cd90cae
|
openstates/in/bills.py
|
https://github.com/jalbertbowden/openstates
| true
| false
| true
|
@@ -77,7 +77,7 @@ class INBillScraper(BillScraper):
page.make_links_absolute(url)
# check for Bill Withdrawn header
- h1text = page.get('//h1/text()')
+ h1text = page.xpath('//h1/text()')
if h1text and h1text[0] == 'Bill Withdrawn':
return
|
h1text = page . get ( '//h1/text()' )
|
h1text = page . xpath ( '//h1/text()' )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:get", 3, 27, 3, 30], "xpath"]]
|
ansible
|
300ee227a2e6d8017b9c9b34cf56702a827407f5
|
07b588f6c0065f5c91b95f96885b946852187197
|
lib/ansible/plugins/test/core.py
|
https://github.com/mensler/ansible
| true
| false
| true
|
@@ -36,7 +36,7 @@ def failed(*a, **kw):
def success(*a, **kw):
''' Test if task result yields success '''
- return not failed(*a, **kw)
+ return not failed(*a, **kw) and not skipped(*a, **kw)
def changed(*a, **kw):
''' Test if task result yields changed '''
|
return not failed ( * a , ** kw )
|
return not failed ( * a , ** kw ) and not skipped ( * a , ** kw )
|
SINGLE_STMT
|
[["Insert", ["not_operator", 3, 12, 3, 32], ["boolean_operator", "N0"], 1], ["Move", "N0", ["call", 3, 16, 3, 32], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["not_operator", "N1"], 2], ["Insert", "N1", ["not:not", "T"], 0], ["Insert", "N1", ["call", "N2"], 1], ["Insert", "N2", ["identifier:skipped", "T"], 0], ["Insert", "N2", ["argument_list", "N3"], 1], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["list_splat", "N4"], 1], ["Insert", "N3", [",:,", "T"], 2], ["Insert", "N3", ["dictionary_splat", "N5"], 3], ["Insert", "N3", ["):)", "T"], 4], ["Insert", "N4", ["*:*", "T"], 0], ["Insert", "N4", ["identifier:a", "T"], 1], ["Insert", "N5", ["**:**", "T"], 0], ["Insert", "N5", ["identifier:kw", "T"], 1]]
|
kivy-bak
|
4497f149e99013f500c7af357c8184e73172c791
|
dd7b173a381d96faca84c165c5c84de8e33d043a
|
kivy/uix/filechooser.py
|
https://github.com/kivatu/kivy-bak
| true
| false
| true
|
@@ -30,7 +30,7 @@ from fnmatch import filter as fnfilter
def is_hidden_unix(fn):
- return fn.startswith('.')
+ return basename(fn).startswith('.')
def is_hidden_win(fn):
|
return fn . startswith ( '.' )
|
return basename ( fn ) . startswith ( '.' )
|
ADD_FUNCTION_AROUND_EXPRESSION
|
[["Insert", ["attribute", 3, 12, 3, 25], ["call", "N0"], 0], ["Insert", "N0", ["identifier:basename", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:fn", 3, 12, 3, 14], 1], ["Insert", "N1", ["):)", "T"], 2]]
|
wearabouts
|
3ab5231ef73a1f698953b1a82caf85939d330b20
|
88e7262f27d24894ff78bc15f2fc309882169e9b
|
events/eventGenerator.py
|
https://github.com/lab11/wearabouts
| true
| false
| true
|
@@ -50,7 +50,7 @@ def main( ):
post_queue = Queue.Queue()
threads = []
if USE_RABBITMQ:
- threads.append(RabbitMQReceiverThread('wearabouts', 'wearabouts', recv_queue, log))
+ threads.append(RabbitMQReceiverThread('wearabouts.#', 'wearabouts', recv_queue, log))
threads.append(RabbitMQPoster('event.presence', post_queue, log=log))
else:
print("Events not supported in GATD currently. Run with --rabbit")
|
threads . append ( RabbitMQReceiverThread ( 'wearabouts' , 'wearabouts' , recv_queue , log ) )
|
threads . append ( RabbitMQReceiverThread ( 'wearabouts.#' , 'wearabouts' , recv_queue , log ) )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'wearabouts'", 3, 47, 3, 59], "'wearabouts.#'"]]
|
cython
|
f40c96907d1ee3b81b562bdf033cca44b14b68c9
|
d7764340707bef33b08c0d7df69ddd5c10647b87
|
runtests.py
|
https://github.com/rzr/cython
| true
| false
| false
|
@@ -498,7 +498,7 @@ if __name__ == '__main__':
test_suite.addTest(filetests.build_suite())
if options.system_pyregr:
- filetests = TestBuilder(ROOTDIR, WORKDIR, selectors,
+ filetests = TestBuilder(ROOTDIR, WORKDIR, selectors, exclude_selectors,
options.annotate_source, options.cleanup_workdir,
options.cleanup_sharedlibs, True,
options.cythononly)
|
filetests = TestBuilder ( ROOTDIR , WORKDIR , selectors , options . annotate_source , options . cleanup_workdir , options . cleanup_sharedlibs , True , options . cythononly )
|
filetests = TestBuilder ( ROOTDIR , WORKDIR , selectors , exclude_selectors , options . annotate_source , options . cleanup_workdir , options . cleanup_sharedlibs , True , options . cythononly )
|
SAME_FUNCTION_MORE_ARGS
|
[["Insert", ["argument_list", 3, 32, 6, 52], ["identifier:exclude_selectors", "T"], 7], ["Insert", ["argument_list", 3, 32, 6, 52], [",:,", "T"], 8]]
|
build-buildbot-configs
|
8b03dd762328ced04e1ed316d2f8d43750a09974
|
4b59e23f7d5bfa72049b5526002a5669ae7d3a71
|
mozilla/config.py
|
https://github.com/hwine/build-buildbot-configs
| true
| false
| false
|
@@ -1383,7 +1383,7 @@ BRANCHES['mozilla-aurora']['l10n_extra_configure_args']= ['--with-macbundlename-
BRANCHES['mozilla-esr10']['repo_path'] = 'releases/mozilla-esr10'
BRANCHES['mozilla-esr10']['update_channel'] = 'nightly-esr10'
BRANCHES['mozilla-esr10']['l10n_repo_path'] = 'releases/l10n/mozilla-release'
-BRANCHES['mozilla-esr10']['enable_weekly_bundle'] = False
+BRANCHES['mozilla-esr10']['enable_weekly_bundle'] = True
BRANCHES['mozilla-esr10']['start_hour'] = [3]
BRANCHES['mozilla-esr10']['start_minute'] = [45]
BRANCHES['mozilla-esr10']['enable_xulrunner'] = False
|
BRANCHES [ 'mozilla-esr10' ] [ 'enable_weekly_bundle' ] = False
|
BRANCHES [ 'mozilla-esr10' ] [ 'enable_weekly_bundle' ] = True
|
CHANGE_BOOLEAN_LITERAL
|
[["Insert", ["assignment", 3, 1, 3, 58], ["true:True", "T"], 2], ["Delete", ["false:False", 3, 53, 3, 58]]]
|
bika.lims
|
2091569180936deab9f70d3e01dfab95b1475619
|
e25ba775132d4dd583aaaae83ac9761d508ca3a1
|
bika/lims/browser/analysisrequest/add.py
|
https://github.com/zipho/bika.lims
| true
| false
| true
|
@@ -274,7 +274,7 @@ class ajaxAnalysisRequestSubmit():
)
if default_container_type:
container_type = bsc(UID=default_container_type)[0].getObject()
- containers = container_type.getcontainers()
+ containers = container_type.getContainers()
for partition in partitions:
if not partition.get(container, None):
partition['container'] = containers
|
containers = container_type . getcontainers ( )
|
containers = container_type . getContainers ( )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:getcontainers", 3, 45, 3, 58], "getContainers"]]
|
bokeh
|
ce5d51642e2330ad1337d6ec1a7e006ff833076b
|
92b79f59772c473128426c0b3127f5c9a9808899
|
examples/plotting/server/embedding_example.py
|
https://github.com/sphinxligustri/bokeh
| true
| false
| false
|
@@ -11,7 +11,7 @@ N = 80
x = np.linspace(0, 4*np.pi, N)
y = np.sin(x)
-output_server("line", url="http://localhost:5006/v4.5/")
+output_server("line")
plot = line(x,y, color="#0000FF", tools="pan,wheel_zoom,box_zoom,reset,previewsave")
plot2 = line(x,y, color="red", tools="pan,wheel_zoom,box_zoom,reset,previewsave")
tag = embed.autoload_server(plot, cursession())
|
output_server ( "line" , url = "http://localhost:5006/v4.5/" )
|
output_server ( "line" )
|
SAME_FUNCTION_LESS_ARGS
|
[["Delete", [",:,", 3, 21, 3, 22]], ["Delete", ["identifier:url", 3, 23, 3, 26]], ["Delete", ["=:=", 3, 26, 3, 27]], ["Delete", ["string:\"http://localhost:5006/v4.5/\"", 3, 27, 3, 56]], ["Delete", ["keyword_argument", 3, 23, 3, 56]]]
|
salt
|
c792f76d2ff5156e86d7525d23cfb739c0c29401
|
5f181cf00da122f660b79e24984ad0f6708fc896
|
salt/modules/file.py
|
https://github.com/jdsieci/salt
| true
| false
| false
|
@@ -1513,7 +1513,7 @@ def line(path, content, match=None, mode=None, location=None,
elif mode == 'replace':
if os.stat(path).st_size == 0:
- log.debug('Cannot find text to replace. File \'{0}\' is empty.'.format(path))
+ log.warning('Cannot find text to replace. File \'{0}\' is empty.'.format(path))
body = ''
else:
body = os.linesep.join([(_get_line_indent(file_line, content, indent)
|
log . debug ( 'Cannot find text to replace. File \'{0}\' is empty.' . format ( path ) )
|
log . warning ( 'Cannot find text to replace. File \'{0}\' is empty.' . format ( path ) )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:debug", 3, 17, 3, 22], "warning"]]
|
enigma2-plugins
|
e6ce11a0855996f5e5bca24b6b615f857d2441ff
|
e1c0403cd879f9dca0798dbaf928a5fa58a29518
|
imdb/src/plugin.py
|
https://github.com/beyonwiz/enigma2-plugins
| true
| false
| true
|
@@ -473,7 +473,7 @@ class IMDB(Screen):
# fetchurl = "http://" + self.IMDBlanguage + "imdb.com/find?q=" + self.event_quoted + "&s=tt&site=aka"
# else:
# fetchurl = "http://akas.imdb.com/find?s=tt;mx=20;q=" + self.event_quoted
- fetchurl = "http://imdb.com/find?q=" + self.event_quoted + "&s=tt&site=aka"
+ fetchurl = "http://imdb.com/find?q=" + event_quoted + "&s=tt&site=aka"
print("[IMDB] Downloading Query " + fetchurl + " to " + localfile)
downloadPage(fetchurl,localfile).addCallback(self.IMDBquery).addErrback(self.fetchFailed)
else:
|
fetchurl = "http://imdb.com/find?q=" + self . event_quoted + "&s=tt&site=aka"
|
fetchurl = "http://imdb.com/find?q=" + event_quoted + "&s=tt&site=aka"
|
CHANGE_BINARY_OPERAND
|
[["Move", ["binary_operator", 3, 15, 3, 60], ["identifier:event_quoted", 3, 48, 3, 60], 2], ["Delete", ["identifier:self", 3, 43, 3, 47]], ["Delete", [".:.", 3, 47, 3, 48]], ["Delete", ["attribute", 3, 43, 3, 60]]]
|
mygpo
|
33ef0bfedec56159c35ecc420b9ecece6437ace8
|
a3dc2b293bf6352f8634c1c62f0e1f0ac5d2b909
|
mygpo/core/models.py
|
https://github.com/gpodder/mygpo
| true
| false
| true
|
@@ -532,7 +532,7 @@ class PodcastGroup(Document):
def get_podcast_by_oldid(self, oldid):
- for podcast in self.podcasts:
+ for podcast in list(self.podcasts):
if podcast.oldid == oldid:
return podcast
|
for podcast in self . podcasts : if podcast . oldid == oldid : return podcast
|
for podcast in list ( self . podcasts ) : if podcast . oldid == oldid : return podcast
|
ADD_FUNCTION_AROUND_EXPRESSION
|
[["Insert", ["for_statement", 3, 9, 5, 31], ["call", "N0"], 3], ["Insert", "N0", ["identifier:list", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["attribute", 3, 24, 3, 37], 1], ["Insert", "N1", ["):)", "T"], 2]]
|
nacl-automake
|
47656a53b820a96a10292f917881d4d65384c6d5
|
4d6aebcd7437251eea89540872cb5e534a6e6a86
|
naclautomake/__init__.py
|
https://bitbucket.org/alexchicn/nacl-automake
| true
| false
| true
|
@@ -266,7 +266,7 @@ class NaClAutoMake:
self.__IncludePaths.add(value);
def includeFromSelf(self, value):
- self.__IncludePaths.add(value)
+ self.__IncludePaths.addFromSelf(value)
def library(self, path, lib):
self.__Libraries.add(path, lib)
|
self . __IncludePaths . add ( value )
|
self . __IncludePaths . addFromSelf ( value )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:add", 3, 29, 3, 32], "addFromSelf"]]
|
electrum
|
dd630a8bb7d482cb83cc875f74baa7d6d2855ce1
|
36bc0184f4e00b072761abf05daf422b132badc5
|
gui/gui_lite.py
|
https://github.com/PartTimeLegend/electrum
| true
| false
| true
|
@@ -912,7 +912,7 @@ class MiniActuator:
def copy_master_public_key(self):
- master_pubkey = self.wallet.master_public_key
+ master_pubkey = self.wallet.get_master_public_key()
qApp.clipboard().setText(master_pubkey)
QMessageBox.information(None, _("Copy successful"), _("Your master public key has been copied to your clipboard."))
|
master_pubkey = self . wallet . master_public_key
|
master_pubkey = self . wallet . get_master_public_key ( )
|
SINGLE_STMT
|
[["Insert", ["assignment", 3, 9, 3, 54], ["call", "N0"], 2], ["Move", "N0", ["attribute", 3, 25, 3, 54], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Update", ["identifier:master_public_key", 3, 37, 3, 54], "get_master_public_key"], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["):)", "T"], 1]]
|
chromium-infra
|
5dd282a961ed81a5f83a3b435a05e517d6c62532
|
d42708ed9156c110c6c35c0c8717c1731be2f455
|
codereview/models.py
|
https://github.com/mithro/chromium-infra
| true
| false
| true
|
@@ -95,9 +95,9 @@ class Issue(db.Model):
def user_can_edit(self, user):
"""Return true if the given user has permission to edit this issue."""
- return (user == self.owner or
- user.email().endswith("@chromium.org") or
- user.email().endswith("@google.com"))
+ return user and (user == self.owner or
+ user.email().endswith("@chromium.org") or
+ user.email().endswith("@google.com"))
@property
def edit_allowed(self):
|
return ( user == self . owner or user . email ( ) . endswith ( "@chromium.org" ) or user . email ( ) . endswith ( "@google.com" ) )
|
return user and ( user == self . owner or user . email ( ) . endswith ( "@chromium.org" ) or user . email ( ) . endswith ( "@google.com" ) )
|
SINGLE_STMT
|
[["Insert", ["return_statement", 3, 5, 5, 50], ["boolean_operator", "N0"], 1], ["Insert", "N0", ["identifier:user", "T"], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Move", "N0", ["parenthesized_expression", 3, 12, 5, 50], 2]]
|
migrate
|
12020a7b6fbf2d75085d9e31287a90af61ea0bff
|
af94dddd89de8bd27a0a79eeba45498ed2edae3d
|
questionnaire/models.py
|
https://github.com/kilsedar/migrate
| true
| false
| true
|
@@ -164,7 +164,7 @@ class Question(models.Model):
r = round(0.9999999-random.random(), 2)
x = 0.1 if r > 0.5 else 10
op = int(r * self.random_factor * x)
- while (op <= 100):
+ while (op <= 100 and len(ans)<=4):
ans.append(str(op)+"%")
r = round(0.9999999-random.random(), 2)
x = 0.1 if r > 0.5 else 10
|
while ( op <= 100 ) : ans . append ( str ( op ) + "%" ) r = round ( 0.9999999 - random . random ( ) , 2 ) x = 0.1 if r > 0.5 else 10
|
while ( op <= 100 and len ( ans ) <= 4 ) : ans . append ( str ( op ) + "%" ) r = round ( 0.9999999 - random . random ( ) , 2 ) x = 0.1 if r > 0.5 else 10
|
MORE_SPECIFIC_IF
|
[["Insert", ["parenthesized_expression", 3, 19, 3, 30], ["boolean_operator", "N0"], 1], ["Insert", ["parenthesized_expression", 3, 19, 3, 30], ["):)", "T"], 2], ["Move", "N0", ["comparison_operator", 3, 20, 3, 29], 0], ["Insert", "N0", ["and:and", "T"], 1], ["Insert", "N0", ["comparison_operator", "N1"], 2], ["Insert", "N1", ["call", "N2"], 0], ["Insert", "N1", ["<=:<=", "T"], 1], ["Insert", "N1", ["integer:4", "T"], 2], ["Insert", "N2", ["identifier:len", "T"], 0], ["Insert", "N2", ["argument_list", "N3"], 1], ["Insert", "N3", ["(:(", "T"], 0], ["Insert", "N3", ["identifier:ans", "T"], 1], ["Move", "N3", ["):)", 3, 29, 3, 30], 2]]
|
dlstats
|
30b9073d68b07003b89641ca5764305b8a7b1250
|
6c015e9d27628db4daf026d07f1b1d2def12a5ee
|
dlstats/configuration.py
|
https://github.com/Widukind/dlstats
| true
| false
| true
|
@@ -19,7 +19,7 @@ def _get_filename():
#TODO: Trouver une meilleure méthode
return ("%s/%s" % (os.environ["APPDATA"], appname+'/main.conf'))
else:
- raise UnsupportedOSError(os.name)
+ raise Exception("Not supported OS: %s" % os.name)
|
else : raise UnsupportedOSError ( os . name )
|
else : raise Exception ( "Not supported OS: %s" % os . name )
|
SINGLE_STMT
|
[["Update", ["identifier:UnsupportedOSError", 3, 15, 3, 33], "Exception"], ["Insert", ["argument_list", 3, 33, 3, 42], ["binary_operator", "N0"], 1], ["Insert", "N0", ["string:\"Not supported OS: %s\"", "T"], 0], ["Insert", "N0", ["%:%", "T"], 1], ["Move", "N0", ["attribute", 3, 34, 3, 41], 2]]
|
stbgui
|
ab927305ad491e1e556932fb947836986457a636
|
3962cc04bac1fefc02f560a1812a8c5aeb9c00b3
|
lib/python/Components/NimManager.py
|
https://github.com/openmips/stbgui
| true
| false
| true
|
@@ -101,7 +101,7 @@ class SecConfigure:
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcC.vals[nim.diseqcC.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 2)
self.addLNBSimple(slotid = x, orbpos = int(nim.diseqcD.vals[nim.diseqcD.value][1]), toneburstmode = 0, diseqcmode = 1, diseqcpos = 3)
elif nim.diseqcMode.value == 4: #Positioner
- self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = 0, loDirection = 0, latitude = 0, laDirection = 0)
+ self.addLNBSimple(slotid = x, diseqcmode = 3, longitude = float(str(nim.longitude.value[0]) + "." + str(nim.longitude.value[1])), loDirection = nim.longitudeOrientation.value - 2, latitude = float(str(nim.latitude.value[0]) + "." + str(nim.latitude.value[1])), laDirection = nim.latitudeOrientation.value)
pass
else: #advanced config
print "FIXME add support for advanced config"
|
elif nim . diseqcMode . value == 4 : self . addLNBSimple ( slotid = x , diseqcmode = 3 , longitude = 0 , loDirection = 0 , latitude = 0 , laDirection = 0 )
|
elif nim . diseqcMode . value == 4 : self . addLNBSimple ( slotid = x , diseqcmode = 3 , longitude = float ( str ( nim . longitude . value [ 0 ] ) + "." + str ( nim . longitude . value [ 1 ] ) ) , loDirection = nim . longitudeOrientation . value - 2 , latitude = float ( str ( nim . latitude . value [ 0 ] ) + "." + str ( nim . latitude . value [ 1 ] ) ) , laDirection = nim . latitudeOrientation . value )
|
SINGLE_STMT
|
[["Insert", ["keyword_argument", 3, 53, 3, 66], ["call", "N0"], 2], ["Insert", ["keyword_argument", 3, 68, 3, 83], ["binary_operator", "N1"], 2], ["Insert", ["keyword_argument", 3, 85, 3, 97], ["call", "N2"], 2], ["Insert", ["keyword_argument", 3, 99, 3, 114], ["attribute", "N3"], 2], ["Insert", "N0", ["identifier:float", "T"], 0], ["Insert", "N0", ["argument_list", "N4"], 1], ["Insert", "N1", ["attribute", "N5"], 0], ["Insert", "N1", ["-:-", "T"], 1], ["Insert", "N1", ["integer:2", "T"], 2], ["Insert", "N2", ["identifier:float", "T"], 0], ["Insert", "N2", ["argument_list", "N6"], 1], ["Insert", "N3", ["attribute", "N7"], 0], ["Insert", "N3", [".:.", "T"], 1], ["Insert", "N3", ["identifier:value", "T"], 2], ["Insert", "N4", ["(:(", "T"], 0], ["Insert", "N4", ["binary_operator", "N8"], 1], ["Insert", "N4", ["):)", "T"], 2], ["Insert", "N5", ["attribute", "N9"], 0], ["Insert", "N5", [".:.", "T"], 1], ["Insert", "N5", ["identifier:value", "T"], 2], ["Insert", "N6", ["(:(", "T"], 0], ["Insert", "N6", ["binary_operator", "N10"], 1], ["Insert", "N6", ["):)", "T"], 2], ["Insert", "N7", ["identifier:nim", "T"], 0], ["Insert", "N7", [".:.", "T"], 1], ["Insert", "N7", ["identifier:latitudeOrientation", "T"], 2], ["Insert", "N8", ["binary_operator", "N11"], 0], ["Insert", "N8", ["+:+", "T"], 1], ["Insert", "N8", ["call", "N12"], 2], ["Insert", "N9", ["identifier:nim", "T"], 0], ["Insert", "N9", [".:.", "T"], 1], ["Insert", "N9", ["identifier:longitudeOrientation", "T"], 2], ["Insert", "N10", ["binary_operator", "N13"], 0], ["Insert", "N10", ["+:+", "T"], 1], ["Insert", "N10", ["call", "N14"], 2], ["Insert", "N11", ["call", "N15"], 0], ["Insert", "N11", ["+:+", "T"], 1], ["Insert", "N11", ["string:\".\"", "T"], 2], ["Insert", "N12", ["identifier:str", "T"], 0], ["Insert", "N12", ["argument_list", "N16"], 1], ["Insert", "N13", ["call", "N17"], 0], ["Insert", "N13", ["+:+", "T"], 1], ["Insert", "N13", ["string:\".\"", "T"], 2], ["Insert", "N14", ["identifier:str", "T"], 0], ["Insert", "N14", ["argument_list", "N18"], 1], ["Insert", "N15", ["identifier:str", "T"], 0], ["Insert", "N15", ["argument_list", "N19"], 1], ["Insert", "N16", ["(:(", "T"], 0], ["Insert", "N16", ["subscript", "N20"], 1], ["Insert", "N16", ["):)", "T"], 2], ["Insert", "N17", ["identifier:str", "T"], 0], ["Insert", "N17", ["argument_list", "N21"], 1], ["Insert", "N18", ["(:(", "T"], 0], ["Insert", "N18", ["subscript", "N22"], 1], ["Insert", "N18", ["):)", "T"], 2], ["Insert", "N19", ["(:(", "T"], 0], ["Insert", "N19", ["subscript", "N23"], 1], ["Insert", "N19", ["):)", "T"], 2], ["Insert", "N20", ["attribute", "N24"], 0], ["Insert", "N20", ["[:[", "T"], 1], ["Insert", "N20", ["integer:1", "T"], 2], ["Insert", "N20", ["]:]", "T"], 3], ["Insert", "N21", ["(:(", "T"], 0], ["Insert", "N21", ["subscript", "N25"], 1], ["Insert", "N21", ["):)", "T"], 2], ["Insert", "N22", ["attribute", "N26"], 0], ["Insert", "N22", ["[:[", "T"], 1], ["Insert", "N22", ["integer:1", "T"], 2], ["Insert", "N22", ["]:]", "T"], 3], ["Insert", "N23", ["attribute", "N27"], 0], ["Insert", "N23", ["[:[", "T"], 1], ["Move", "N23", ["integer:0", 3, 65, 3, 66], 2], ["Insert", "N23", ["]:]", "T"], 3], ["Insert", "N24", ["attribute", "N28"], 0], ["Insert", "N24", [".:.", "T"], 1], ["Insert", "N24", ["identifier:value", "T"], 2], ["Insert", "N25", ["attribute", "N29"], 0], ["Insert", "N25", ["[:[", "T"], 1], ["Move", "N25", ["integer:0", 3, 96, 3, 97], 2], ["Insert", "N25", ["]:]", "T"], 3], ["Insert", "N26", ["attribute", "N30"], 0], ["Insert", "N26", [".:.", "T"], 1], ["Insert", "N26", ["identifier:value", "T"], 2], ["Insert", "N27", ["attribute", "N31"], 0], ["Insert", "N27", [".:.", "T"], 1], ["Insert", "N27", ["identifier:value", "T"], 2], ["Insert", "N28", ["identifier:nim", "T"], 0], ["Insert", "N28", [".:.", "T"], 1], ["Insert", "N28", ["identifier:longitude", "T"], 2], ["Insert", "N29", ["attribute", "N32"], 0], ["Insert", "N29", [".:.", "T"], 1], ["Insert", "N29", ["identifier:value", "T"], 2], ["Insert", "N30", ["identifier:nim", "T"], 0], ["Insert", "N30", [".:.", "T"], 1], ["Insert", "N30", ["identifier:latitude", "T"], 2], ["Insert", "N31", ["identifier:nim", "T"], 0], ["Insert", "N31", [".:.", "T"], 1], ["Insert", "N31", ["identifier:longitude", "T"], 2], ["Insert", "N32", ["identifier:nim", "T"], 0], ["Insert", "N32", [".:.", "T"], 1], ["Insert", "N32", ["identifier:latitude", "T"], 2], ["Delete", ["integer:0", 3, 82, 3, 83]], ["Delete", ["integer:0", 3, 113, 3, 114]]]
|
motioneye
|
bf4647a7c4c1b85461b19a6653b9a3252bdb9767
|
82dd9352c939700cd6bb5f7714bf0a34bcd418c9
|
src/config.py
|
https://github.com/JamesHagerman/motioneye
| true
| false
| true
|
@@ -837,7 +837,7 @@ def camera_dict_to_ui(data):
if (data['@storage_device'] == 'network-share') and settings.SMB_SHARES:
mount_point = smbctl.make_mount_point(data['@network_server'], data['@network_share_name'], data['@network_username'])
- ui['root_directory'] = data['target_dir'][len(mount_point):]
+ ui['root_directory'] = data['target_dir'][len(mount_point):] or '/'
elif data['@storage_device'].startswith('local-disk'):
target_dev = data['@storage_device'][10:].replace('-', '/')
|
ui [ 'root_directory' ] = data [ 'target_dir' ] [ len ( mount_point ) : ]
|
ui [ 'root_directory' ] = data [ 'target_dir' ] [ len ( mount_point ) : ] or '/'
|
SINGLE_STMT
|
[["Insert", ["assignment", 3, 9, 3, 69], ["boolean_operator", "N0"], 2], ["Move", "N0", ["subscript", 3, 32, 3, 69], 0], ["Insert", "N0", ["or:or", "T"], 1], ["Insert", "N0", ["string:'/'", "T"], 2]]
|
exotrac
|
439f99d5b125a1e4c43484c56d19b4d231841bea
|
db2e605c42725a60b0762ac49cf43562c87f98d7
|
trac/env.py
|
https://github.com/exocad/exotrac
| true
| false
| true
|
@@ -510,7 +510,7 @@ def open_environment(env_path=None):
'Trac environment.')
env = Environment(env_path)
- need_upgrade = False
+ needs_upgrade = False
try:
needs_upgrade = env.needs_upgrade()
except Exception, e: # e.g. no database connection
|
need_upgrade = False
|
needs_upgrade = False
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:need_upgrade", 3, 5, 3, 17], "needs_upgrade"]]
|
EX101
|
01892664561cab9ff9ae62c4595137d22c39ac6c
|
83e879d99fc855dfca597d222b4c5a372d1611eb
|
Lib/getopt.py
|
https://github.com/EX101/EX101
| true
| false
| true
|
@@ -39,7 +39,7 @@ import os
class GetoptError(Exception):
opt = ''
msg = ''
- def __init__(self, msg, opt):
+ def __init__(self, msg, opt=''):
self.msg = msg
self.opt = opt
Exception.__init__(self, msg, opt)
|
def __init__ ( self , msg , opt ) : self . msg = msg self . opt = opt Exception . __init__ ( self , msg , opt )
|
def __init__ ( self , msg , opt = '' ) : self . msg = msg self . opt = opt Exception . __init__ ( self , msg , opt )
|
SINGLE_STMT
|
[["Insert", ["parameters", 3, 17, 3, 33], ["default_parameter", "N0"], 5], ["Move", "N0", ["identifier:opt", 3, 29, 3, 32], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:''", "T"], 2]]
|
pytest
|
1294e4b2cb9c56d9acaf5ddee789481084df614c
|
6d6d86b7aa0c32b790d009c756ffc34e7cd4f7ba
|
py/bin/_docgen.py
|
https://github.com/Turbo87/pytest
| true
| false
| true
|
@@ -28,7 +28,7 @@ def build_apigen_docs(targetpath, testargs=''):
def build_docs(targetpath, testargs):
docpath = pypath.join('doc')
run_tests(docpath, '',
- testargs + ' --forcegen --apigenrelpath="apigen/"')
+ testargs + ' --forcegen --apigen="%s/apigen/apigen.py"' % (pypath,))
docpath.copy(targetpath)
def build_nav(targetpath, docs=True, api=True):
|
run_tests ( docpath , '' , testargs + ' --forcegen --apigenrelpath="apigen/"' )
|
run_tests ( docpath , '' , testargs + ' --forcegen --apigen="%s/apigen/apigen.py"' % ( pypath , ) )
|
CHANGE_BINARY_OPERAND
|
[["Insert", ["binary_operator", 3, 15, 3, 65], ["binary_operator", "N0"], 2], ["Update", ["string:' --forcegen --apigenrelpath=\"apigen/\"'", 3, 26, 3, 65], "' --forcegen --apigen=\"%s/apigen/apigen.py\"'"], ["Move", "N0", ["string:' --forcegen --apigenrelpath=\"apigen/\"'", 3, 26, 3, 65], 0], ["Insert", "N0", ["%:%", "T"], 1], ["Insert", "N0", ["tuple", "N1"], 2], ["Insert", "N1", ["(:(", "T"], 0], ["Insert", "N1", ["identifier:pypath", "T"], 1], ["Insert", "N1", [",:,", "T"], 2], ["Insert", "N1", ["):)", "T"], 3]]
|
saltstack
|
e61e1de1f5132a7ca1d085030d468794b5d6978a
|
39fa11b6966f0953582c86dc159f61e61bfe2760
|
salt/states/dockerio.py
|
https://github.com/aexeagmbh/saltstack
| true
| false
| true
|
@@ -471,7 +471,7 @@ def loaded(name, source=None, source_hash='', force=False):
remove_info = remove_image(name)
if not remove_info['status']:
return _invalid(name=name,
- comment='Image could not be removed: {1}'.format(name))
+ comment='Image could not be removed: {0}'.format(name))
load = __salt__['docker.load']
returned = load(tmp_filename)
|
return _invalid ( name = name , comment = 'Image could not be removed: {1}' . format ( name ) )
|
return _invalid ( name = name , comment = 'Image could not be removed: {0}' . format ( name ) )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'Image could not be removed: {1}'", 3, 37, 3, 70], "'Image could not be removed: {0}'"]]
|
pygments
|
8afe68084eced5e812608317c770d3269060714b
|
230909745e55477806ceee40e683252e11c0d799
|
pygments/lexers/webmisc.py
|
https://github.com/pseyfert/pygments
| true
| false
| false
|
@@ -833,7 +833,7 @@ class CirruLexer(RegexLexer):
(r'\$', Operator, 'function'),
(r'\(', Operator, 'function'),
(r'\)', Operator),
- (r'(?=\n)', Text, '#pop'),
+ (r'\n', Text, '#pop'),
(r'"', String, 'string'),
(r'[ ]+', Text.Whitespace),
(r'[+-]?[\d.]+\b', Number),
|
( r'(?=\n)' , Text , '#pop' ) ,
|
( r'\n' , Text , '#pop' ) ,
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:r'(?=\\n)'", 3, 14, 3, 23], "r'\\n'"]]
|
sugar-toolkit-gtk3
|
2647b964337df8cb859f1b17d309b2efa2bfe859
|
86bd6f50f0ad5eaaf2110e245c979687eb041d22
|
shell/PresenceService/PresenceService.py
|
https://github.com/tchx84/sugar-toolkit-gtk3
| true
| false
| true
|
@@ -612,7 +612,7 @@ class PresenceService(object):
# Add properties; ensure they are converted to ByteArray types
# because python sometimes can't figure that out
- info = dbus.Array([])
+ info = dbus.Array([], signature="ab")
for k, v in properties.items():
info.append(dbus.types.ByteArray("%s=%s" % (k, v)))
|
info = dbus . Array ( [ ] )
|
info = dbus . Array ( [ ] , signature = "ab" )
|
SAME_FUNCTION_MORE_ARGS
|
[["Insert", ["argument_list", 3, 21, 3, 25], [",:,", "T"], 2], ["Insert", ["argument_list", 3, 21, 3, 25], ["keyword_argument", "N0"], 3], ["Insert", "N0", ["identifier:signature", "T"], 0], ["Insert", "N0", ["=:=", "T"], 1], ["Insert", "N0", ["string:\"ab\"", "T"], 2]]
|
cpython
|
cd37dd8e05620ef5ee0277f30654878d71562661
|
670048de8040a954f504cfe3a992bf2b5983cf8a
|
Lib/hotshot/log.py
|
https://github.com/samuelcolvin/cpython
| true
| false
| true
|
@@ -30,7 +30,7 @@ class LogReader:
self._reader = _hotshot.logreader(logfn)
self._nextitem = self._reader.next
self._info = self._reader.info
- if self._info.has_key('current-directory'):
+ if 'current-directory' in self._info:
self.cwd = self._info['current-directory']
else:
self.cwd = None
|
if self . _info . has_key ( 'current-directory' ) : self . cwd = self . _info [ 'current-directory' ] else : self . cwd = None
|
if 'current-directory' in self . _info : self . cwd = self . _info [ 'current-directory' ] else : self . cwd = None
|
SINGLE_STMT
|
[["Insert", ["if_statement", 3, 9, 6, 28], ["comparison_operator", "N0"], 1], ["Insert", "N0", ["string:'current-directory'", "T"], 0], ["Insert", "N0", ["in:in", "T"], 1], ["Move", "N0", ["attribute", 3, 12, 3, 22], 2], ["Delete", [".:.", 3, 22, 3, 23]], ["Delete", ["identifier:has_key", 3, 23, 3, 30]], ["Delete", ["attribute", 3, 12, 3, 30]], ["Delete", ["(:(", 3, 30, 3, 31]], ["Delete", ["string:'current-directory'", 3, 31, 3, 50]], ["Delete", ["):)", 3, 50, 3, 51]], ["Delete", ["argument_list", 3, 30, 3, 51]], ["Delete", ["call", 3, 12, 3, 51]]]
|
syncdir
|
4bb9afc1b9a9282fc935c028b9f750b554faa95e
|
c8f5593c6bcc30fa7cb7f0869f93aa9fb407736a
|
syncdir.py
|
https://github.com/euske/syncdir
| true
| false
| true
|
@@ -390,7 +390,7 @@ def main(argv):
ignorecase = False
ignoreexts = set()
excludedirs = set()
- followlink = True
+ followlink = False
backupdir = '.backup'
trashdir = '.trash'
for (k, v) in opts:
|
followlink = True
|
followlink = False
|
CHANGE_BOOLEAN_LITERAL
|
[["Insert", ["assignment", 3, 5, 3, 22], ["false:False", "T"], 2], ["Delete", ["true:True", 3, 18, 3, 22]]]
|
galaxy-moffitt-dev
|
9f5dd6b988d5f9562e2a632e5826fd1960c18182
|
528138fdb8e394ab59c8d8bda0e079c3b45686cb
|
lib/galaxy/util/__init__.py
|
https://github.com/bornea/galaxy-moffitt-dev
| true
| false
| true
|
@@ -873,7 +873,7 @@ def send_mail( frm, to, subject, body, config ):
log.error( "Mail is not configured for this Galaxy instance." )
log.info( msg )
return
- smtp_ssl = asbool( config.smtp_ssl )
+ smtp_ssl = asbool( getattr(config, 'smtp_ssl', False ) )
if smtp_ssl:
s = smtplib.SMTP_SSL()
else:
|
smtp_ssl = asbool ( config . smtp_ssl )
|
smtp_ssl = asbool ( getattr ( config , 'smtp_ssl' , False ) )
|
SINGLE_STMT
|
[["Insert", ["argument_list", 3, 22, 3, 41], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 22, 3, 41], ["):)", "T"], 2], ["Insert", "N0", ["identifier:getattr", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["identifier:config", 3, 24, 3, 30], 1], ["Insert", "N1", [",:,", "T"], 2], ["Insert", "N1", ["string:'smtp_ssl'", "T"], 3], ["Insert", "N1", [",:,", "T"], 4], ["Insert", "N1", ["false:False", "T"], 5], ["Move", "N1", ["):)", 3, 40, 3, 41], 6], ["Delete", [".:.", 3, 30, 3, 31]], ["Delete", ["identifier:smtp_ssl", 3, 31, 3, 39]], ["Delete", ["attribute", 3, 24, 3, 39]]]
|
buildbot
|
499f42d43453466d37ea1b578f917e84b94f2204
|
d44758e47ce73594b978a3e21ae7a1ac71995499
|
master/buildbot/data/types.py
|
https://github.com/muarachmann/buildbot
| true
| false
| false
|
@@ -133,7 +133,7 @@ class String(Instance):
class Binary(Instance):
name = "binary"
- types = (str,)
+ types = (bytes,)
ramlType = "string"
def valueFromString(self, arg):
|
types = ( str , )
|
types = ( bytes , )
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:str", 3, 14, 3, 17], "bytes"]]
|
jenkins-job-builder
|
aa3bf5cc195b1e36e5aa8eda2cd7bfc4f192a0d9
|
af16f44439ce4a9dde336ae495219ca7bf67cf73
|
jenkins_jobs/builder.py
|
https://github.com/openstack-infra/jenkins-job-builder
| true
| false
| true
|
@@ -158,7 +158,7 @@ class Jenkins(object):
def get_job_md5(self, job_name):
xml = self.jenkins.get_job_config(job_name)
- return hashlib.md5(xml).hexdigest()
+ return hashlib.md5(xml.encode('utf-8')).hexdigest()
def delete_job(self, job_name):
if self.is_job(job_name):
|
return hashlib . md5 ( xml ) . hexdigest ( )
|
return hashlib . md5 ( xml . encode ( 'utf-8' ) ) . hexdigest ( )
|
ADD_METHOD_CALL
|
[["Insert", ["argument_list", 3, 27, 3, 32], ["call", "N0"], 1], ["Insert", ["argument_list", 3, 27, 3, 32], ["):)", "T"], 2], ["Insert", "N0", ["attribute", "N1"], 0], ["Insert", "N0", ["argument_list", "N2"], 1], ["Move", "N1", ["identifier:xml", 3, 28, 3, 31], 0], ["Insert", "N1", [".:.", "T"], 1], ["Insert", "N1", ["identifier:encode", "T"], 2], ["Insert", "N2", ["(:(", "T"], 0], ["Insert", "N2", ["string:'utf-8'", "T"], 1], ["Move", "N2", ["):)", 3, 31, 3, 32], 2]]
|
datalad
|
c9c11f4b58c84afeb775163f666fa4f5fbc41dad
|
0d16d4744791881bf90eae6a79b25e2817670d3d
|
datalad/distribution/create_sibling.py
|
https://github.com/bpoldrack/datalad
| true
| false
| false
|
@@ -692,7 +692,7 @@ class CreateSibling(Interface):
if not shell.get_annex_version():
raise MissingExternalDependency(
'git-annex',
- msg='on the remote system')
+ msg="It's required on the remote machine to create a sibling")
else:
shell = _RunnerAdapter() # cwd=sibling_ri.path)
|
raise MissingExternalDependency ( 'git-annex' , msg = 'on the remote system' )
|
raise MissingExternalDependency ( 'git-annex' , msg = "It's required on the remote machine to create a sibling" )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'on the remote system'", 3, 25, 3, 47], "\"It's required on the remote machine to create a sibling\""]]
|
garter
|
242c3810ecbd7c5dbd7e13c46a72ac7142aa2213
|
ac13eeeedfd9d990048d6af296ed6f38a52210aa
|
Lib/test/test_pathlib.py
|
https://github.com/mystor/garter
| true
| false
| true
|
@@ -1549,7 +1549,7 @@ class _BasePathTest(object):
self.assertTrue(p.is_dir())
if os.name != 'nt':
# the directory's permissions follow the mode argument
- self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o555 & mode)
+ self.assertEqual(stat.S_IMODE(p.stat().st_mode), 0o7555 & mode)
# the parent's permissions follow the default process settings
self.assertEqual(stat.S_IMODE(p.parent.stat().st_mode), mode)
|
self . assertEqual ( stat . S_IMODE ( p . stat ( ) . st_mode ) , 0o555 & mode )
|
self . assertEqual ( stat . S_IMODE ( p . stat ( ) . st_mode ) , 0o7555 & mode )
|
CHANGE_NUMERIC_LITERAL
|
[["Update", ["integer:0o555", 3, 62, 3, 67], "0o7555"]]
|
ganeti_webmgr
|
dce57c13398c075ec160f40ea88b8b69f8c7cdd0
|
69feaa13525403e750d435de9fb35351f3f81e4f
|
ganeti/urls.py
|
https://github.com/osuosl/ganeti_webmgr
| true
| false
| false
|
@@ -32,7 +32,7 @@ urlpatterns = patterns('ganeti.views.general',
url(r'^used_resources/?$', 'used_resources', name="used_resources"),
# clear errors
- url(r'^error/clear/?$', 'clear_ganeti_error', name="error-clear")
+ url(r'^error/clear/(?P<pk>\d+)/?$', 'clear_ganeti_error', name="error-clear")
)
# Users
|
url ( r'^error/clear/?$' , 'clear_ganeti_error' , name = "error-clear" )
|
url ( r'^error/clear/(?P<pk>\d+)/?$' , 'clear_ganeti_error' , name = "error-clear" )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:r'^error/clear/?$'", 3, 9, 3, 27], "r'^error/clear/(?P<pk>\\d+)/?$'"]]
|
oca-stock-logistics-workflow
|
f74010ee8b1e35f6e46120744196f041b09a4ee5
|
7d12a07fb413bffa238ea2070ac69a0ea9e42e21
|
stock_picking_priority/picking_priority.py
|
https://github.com/ClearCorp/oca-stock-logistics-workflow
| true
| false
| true
|
@@ -60,7 +60,7 @@ class StockPicking(orm.Model):
if errors:
message = '\n'.join(errors)
raise orm.except_orm(_(u'Warning'),
- _(u'The following errors were encountered:\n%s') % message)
+ _(u'No operations validated due to the following errors:\n%s') % message)
return cancelled_ids, assigned_ids
class StockPickingOut(orm.Model):
|
raise orm . except_orm ( _ ( u'Warning' ) , _ ( u'The following errors were encountered:\n%s' ) % message )
|
raise orm . except_orm ( _ ( u'Warning' ) , _ ( u'No operations validated due to the following errors:\n%s' ) % message )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:u'The following errors were encountered:\\n%s'", 3, 36, 3, 81], "u'No operations validated due to the following errors:\\n%s'"]]
|
cupy
|
2ea7b75ae6f3f5665bcf2bbed614584695824c0c
|
3c0d12a1058e4c08c2dae4468474d6e8fca0deda
|
chainer/functions/basic_math.py
|
https://github.com/kmatsuura/cupy
| true
| false
| true
|
@@ -158,7 +158,7 @@ class PowVarConst(Function):
cuda.elementwise(
'float* gx, const float* x, const float* gy, float value',
'gx[i] = value * __powf(x[i], value - 1) * gy[i]',
- 'pow_v_c_fwd')(gx, x[0], gy[0], self.value)
+ 'pow_var_const_bwd')(gx, x[0], gy[0], self.value)
return gx,
def pow(lhs, rhs): # lhs ** rhs
|
cuda . elementwise ( 'float* gx, const float* x, const float* gy, float value' , 'gx[i] = value * __powf(x[i], value - 1) * gy[i]' , 'pow_v_c_fwd' ) ( gx , x [ 0 ] , gy [ 0 ] , self . value )
|
cuda . elementwise ( 'float* gx, const float* x, const float* gy, float value' , 'gx[i] = value * __powf(x[i], value - 1) * gy[i]' , 'pow_var_const_bwd' ) ( gx , x [ 0 ] , gy [ 0 ] , self . value )
|
CHANGE_STRING_LITERAL
|
[["Update", ["string:'pow_v_c_fwd'", 3, 13, 3, 26], "'pow_var_const_bwd'"]]
|
DIRAC
|
1cd17fa43bd9de51cdfa573b643bd89ecf63cafa
|
95d272a8be943071fd8a3e2b226affcb27f17d6f
|
ResourceStatusSystem/scripts/dirac-rss-set-status.py
|
https://github.com/DIRACGrid/DIRAC
| true
| false
| true
|
@@ -109,8 +109,8 @@ def checkStatusTypes( statusTypes ):
for statusType in statusTypes:
if not statusType in acceptableStatusTypes and statusType != 'all':
acceptableStatusTypes.append('all')
- error( "'%s' is a wrong value for switch 'statusType'.\n\tThe acceptable values are:\n\t%s"
- % ( statusType, str( acceptableStatusTypes ) ) )
+ subLogger.error( "'%s' is a wrong value for switch 'statusType'.\n\tThe acceptable values are:\n\t%s"
+ % ( statusType, str( acceptableStatusTypes ) ) )
if 'all' in statusType:
|
error ( "'%s' is a wrong value for switch 'statusType'.\n\tThe acceptable values are:\n\t%s" % ( statusType , str ( acceptableStatusTypes ) ) )
|
subLogger . error ( "'%s' is a wrong value for switch 'statusType'.\n\tThe acceptable values are:\n\t%s" % ( statusType , str ( acceptableStatusTypes ) ) )
|
SINGLE_STMT
|
[["Insert", ["call", 3, 7, 4, 62], ["attribute", "N0"], 0], ["Insert", "N0", ["identifier:subLogger", "T"], 0], ["Insert", "N0", [".:.", "T"], 1], ["Move", "N0", ["identifier:error", 3, 7, 3, 12], 2]]
|
celery
|
e63af21d93cd09c629141fbaa0ec54a65b2becaf
|
497b92c7b35b1037b3f507abce50a9761526641e
|
celery/local.py
|
https://github.com/Meiqia/celery
| true
| false
| false
|
@@ -157,7 +157,7 @@ class Proxy(object):
__setattr__ = lambda x, n, v: setattr(x._get_current_object(), n, v)
__delattr__ = lambda x, n: delattr(x._get_current_object(), n)
__str__ = lambda x: str(x._get_current_object())
- __lt_ = lambda x, o: x._get_current_object() < o
+ __lt__ = lambda x, o: x._get_current_object() < o
__le__ = lambda x, o: x._get_current_object() <= o
__eq__ = lambda x, o: x._get_current_object() == o
__ne__ = lambda x, o: x._get_current_object() != o
|
__lt_ = lambda x , o : x . _get_current_object ( ) < o
|
__lt__ = lambda x , o : x . _get_current_object ( ) < o
|
CHANGE_IDENTIFIER_USED
|
[["Update", ["identifier:__lt_", 3, 5, 3, 10], "__lt__"]]
|
cmakeconverter
|
ffe2a2244656ebf03c074f1859cdec9c014308a5
|
fcaba6a62e562f273055505e7feef09b234f063d
|
cmake_converter/flags.py
|
https://github.com/pavelliavonau/cmakeconverter
| true
| false
| true
|
@@ -627,7 +627,7 @@ class CPPFlags(Flags):
def set_compile_as(self):
flag_values = {'CompileAsCpp': {cl_flags: '/TP'},
'CompileAsC': {cl_flags: '/TC'},
- default_value: {cl_flags: '/TP'}}
+ default_value: {}}
for setting in self.settings:
self.set_flag(setting,
|
flag_values = { 'CompileAsCpp' : { cl_flags : '/TP' } , 'CompileAsC' : { cl_flags : '/TC' } , default_value : { cl_flags : '/TP' } }
|
flag_values = { 'CompileAsCpp' : { cl_flags : '/TP' } , 'CompileAsC' : { cl_flags : '/TC' } , default_value : { } }
|
SINGLE_STMT
|
[["Delete", ["identifier:cl_flags", 3, 40, 3, 48]], ["Delete", [":::", 3, 48, 3, 49]], ["Delete", ["string:'/TP'", 3, 50, 3, 55]], ["Delete", ["pair", 3, 40, 3, 55]]]
|
cpython
|
f885458bff767c3ccf22700d0b19a8c70e992c6d
|
a2ddc15db0f3c164c8259ac47fbc2e94c3119bef
|
Lib/test/test_popen.py
|
https://github.com/myvyang/cpython
| true
| false
| true
|
@@ -17,7 +17,7 @@ python = sys.executable
class PopenTest(unittest.TestCase):
def _do_test_commandline(self, cmdline, expected):
- cmd = '"%s" -c "import sys;print sys.argv" %s' % (python, cmdline)
+ cmd = '%s -c "import sys;print sys.argv" %s' % (python, cmdline)
data = os.popen(cmd).read() + '\n'
got = eval(data)[1:] # strip off argv[0]
self.assertEqual(got, expected)
|
cmd = '"%s" -c "import sys;print sys.argv" %s' % ( python , cmdline )
|
cmd = '%s -c "import sys;print sys.argv" %s' % ( python , cmdline )
|
CHANGE_BINARY_OPERAND
|
[["Update", ["string:'\"%s\" -c \"import sys;print sys.argv\" %s'", 3, 15, 3, 55], "'%s -c \"import sys;print sys.argv\" %s'"]]
|
Sick-Beard
|
b00e652135c76666fbd776274931160df230361e
|
77ac341fd47e22a3f71e79abf7afd8a4437b005c
|
sickbeard/common.py
|
https://github.com/coach0742/Sick-Beard
| true
| false
| true
|
@@ -116,7 +116,7 @@ class Quality:
continue
regex = Quality.qualityStrings[x].replace(' ','\W')
- regex_match = re.match(regex, name, re.I)
+ regex_match = re.search(regex, name, re.I)
if regex_match:
return x
|
regex_match = re . match ( regex , name , re . I )
|
regex_match = re . search ( regex , name , re . I )
|
WRONG_FUNCTION_NAME
|
[["Update", ["identifier:match", 3, 30, 3, 35], "search"]]
|
cpython
|
88459359b160741c7abcad38a97db65004430125
|
3daf304f3b24a1ac01a11ae956ffe3d0bcfd693e
|
Lib/test/test_genexps.py
|
https://github.com/CTSRD-CHERI/cpython
| true
| false
| false
|
@@ -129,7 +129,7 @@ Verify late binding for the innermost for-expression
Verify re-use of tuples (a side benefit of using genexps over listcomps)
>>> tupleids = map(id, ((i,i) for i in xrange(10)))
- >>> max(tupleids) - min(tupleids)
+ >>> int(max(tupleids) - min(tupleids))
0
Verify that syntax error's are raised for genexps used as lvalues
|
max ( tupleids ) - min ( tupleids )
|
int ( max ( tupleids ) - min ( tupleids ) )
|
ADD_FUNCTION_AROUND_EXPRESSION
|
[["Insert", ["expression_statement", 3, 9, 3, 38], ["call", "N0"], 0], ["Insert", "N0", ["identifier:int", "T"], 0], ["Insert", "N0", ["argument_list", "N1"], 1], ["Insert", "N1", ["(:(", "T"], 0], ["Move", "N1", ["binary_operator", 3, 9, 3, 38], 1], ["Insert", "N1", ["):)", "T"], 2]]
|
freenas
|
8b00dc731e3b8013388d729a05e89051e0c2b330
|
543f71c75085682b51249bea6eb4a73724e13cf0
|
src/middlewared/middlewared/plugins/update_/upload_location_freebsd.py
|
https://github.com/yaplej/freenas
| true
| false
| true
|
@@ -69,7 +69,7 @@ class UpdateService(Service):
mddev = prov.text
subprocess.run(
- ['umount', f'/dev/label/{UPLOAD_LABEL}'], capture_output=True, check=False,
+ ['umount', UPLOAD_LOCATION], capture_output=True, check=False,
)
cp = subprocess.run(
['mdconfig', '-d', '-u', mddev],
|
subprocess . run ( [ 'umount' , f'/dev/label/{UPLOAD_LABEL}' ] , capture_output = True , check = False , )
|
subprocess . run ( [ 'umount' , UPLOAD_LOCATION ] , capture_output = True , check = False , )
|
SINGLE_TOKEN
|
[["Insert", ["list", 3, 13, 3, 53], ["identifier:UPLOAD_LOCATION", "T"], 3], ["Delete", ["string:f'/dev/label/{UPLOAD_LABEL}'", 3, 24, 3, 52]]]
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.