How to answer a reviewer asking for the methodology code of the paper?

You cannot answer “convincingly”, because your assumption that it is okay not to provide the code is incorrect, and the reviewer is correct to ask for it. And the fact that it’s time-consuming to prepare the code for release is neither here nor there: it’s also time-consuming to write a good paper and polish it over and over to make it into something people can read and understand; but that’s what good researchers do, because they understand it’s important and that this is the way to do good science.

For a related discussion, see here.


There are no models for this. I think you have answered your own question here:

answer the reviewer politely and convincingly while explaining that I am providing some part of my programs, not all of it.

You suggest several reasons why not all the code is called for. Some is extraneous. Some is working but not fit for public consumption (all too often true). Some you may want to keep private for future use. Those reasons might satisfy the editor.

What you do provide might be in a web accessible repository - not necessarily written up as part of the paper. It's becoming more common for journals (and editors and reviewers) to require at least that much public exposure of data and code.


Let me try to capture the thoughts in the comments and add a bit, though I can't be specific, not knowing your work.

The reviewer has asked for your code. It might be appropriate or not to release it, depending on too many things to list here. But if you don't want to release it since future work depends on it and you prefer to keep it private for now, it might be an acceptable reason to an editor, or not. I can't predict that. If knowing it is essential to evaluating the correctness of your work, then the editor has a right to object.

But, the original was rejected and, if you want to resubmit to that journal, then you need to do a fairly extensive rewrite in any case. Evaluate for yourself how essential it is for you to not (yet) reveal things and if it isn't essential, try, within page limits etc, to comply with the request. It might make the paper better and it might send it off into inessential areas resulting in cruft. But the decision is yours to make how to write up your work. And the editor's job is to judge its acceptance for the journal.

But the bottom line is that you don't need to reply to every concern or accede to every demand. The work is your own. But your readers, including the reviewers and editors will make judgments about it as to whether you make the case for any conclusions you hope to draw. Make sure that the proper connections are made.


I have a guess that you are worried about getting scooped on future work if you reveal too much. That may be a valid concern. If so, releasing a more complete version of the current paper close in time to the follow up might be a solution, so that there is less opportunity for others to jump on your methodology and break in line ahead of you.