Buggy code:
private Object infoMessage ; private Object alertMessage ; private final TimeZone timezone ; public ScarabRequestTool ( ) { } public void init ( Object data ) { } public void refresh ( ) { } public void setAlert ( Object message ) { } public Object getAlert ( ) { } public void setAttachment ( Attachment attachment ) { } public void setAttribute ( Attribute attribute ) { } public void setDepend ( Depend depend ) { } public void setQuery ( Query query ) { } private IntakeTool getIntakeTool ( ) { } public ROptionOption getROptionOption ( ) { } public void setROptionOption ( ROptionOption roo ) { } public void setIssueTemplateInfo ( IssueTemplateInfo templateInfo ) { } public void setIssueType ( IssueType issuetype ) { } public ParentChildAttributeOption getParentChildAttributeOption ( ) { } public void setParentChildAttributeOption ( ParentChildAttributeOption roo ) { } public void setAttributeOption ( AttributeOption option ) { } public AttributeOption getAttributeOption ( ) throws Exception { } public void setUser ( ScarabUser user ) { } public ScarabUser getUser ( ) { } public ScarabUser getUser ( Object id ) throws Exception { } public ScarabUser getUserByUserName ( String username ) throws Exception { } public Attribute getAttribute ( ) throws Exception { } public Attribute getAttribute ( Integer pk ) throws Exception { } public AttributeOption getAttributeOption ( Integer pk ) throws Exception { } public AttributeOption getAttributeOption ( String key ) throws Exception { } public MITList getCurrentMITList ( ) throws Exception { } public List getRModuleUserAttributes ( ) { } public List getValidIssueListAttributes ( ) { } public Query getQuery ( ) throws Exception { } public IssueTemplateInfo getIssueTemplateInfo ( ) throws Exception { } public Issue getIssueTemplate ( ) throws Exception { } public Issue getIssueTemplate ( String templateId ) throws Exception { } public Depend getDepend ( ) throws Exception { } public String getActivityReason ( ActivitySet activitySet , Activity activity ) throws Exception { } public Attachment getAttachment ( ) throws Exception { } public AttributeGroup getAttributeGroup ( ) throws Exception { } public AttributeGroup getAttributeGroup ( String key ) { } public IssueType getIssueType ( String key ) { } public IssueType getIssueType ( ) throws Exception { } public AttributeValue getNewAttributeValue ( Attribute attribute , Issue issue ) throws Exception { } public RModuleAttribute getRModuleAttribute ( ) throws Exception { } public void setAttributeGroup ( AttributeGroup group ) { } public void setModule ( Module module ) { } public Module getModule ( ) throws Exception { } public Module getModule ( String key ) { } public Module getCurrentModule ( ) { } public IssueType getCurrentIssueType ( ) throws Exception { } public void setCurrentIssueType ( IssueType type ) { } public RModuleIssueType getCurrentRModuleIssueType ( ) { } public String getNextEntryTemplate ( ) { } public String getCurrentTemplate ( ) { } public Issue getReportingIssue ( ) throws Exception { } private void getNewReportingIssue ( ) throws Exception { } public void setReportingIssue ( Issue issue ) { } public void setCurrentModule ( Module me ) { } public void setIssue ( Issue issue ) { } public Issue getIssue ( ) throws Exception { } public Issue getIssue ( boolean createNew ) throws Exception { } public Issue getIssue ( String id ) { } public Issue getIssueByPk ( String key ) { } public List getIssues ( ) throws Exception { } public List getIssues ( List issueIds ) throws Exception { } public List getScopes ( ) throws Exception { } public List getFrequencies ( ) throws Exception { } public String getExecuteLink ( String link , Query query ) { } public String getEditLink ( String link , Query query ) { <START_BUG> link = ( ( ( ( link + "?queryId=" ) + ( query . getQueryId ( ) ) ) + "&refine=true" ) + "&action=Search&eventSubmit_doGotoEditQuery=foo" ) + ( query . getValue ( ) ) ; <END_BUG> Long listId = query . getListId ( ) ; if ( listId != null ) { link += ( ( '&' + ( ScarabConstants . CURRENT_MITLIST_ID ) ) + '=' ) + listId ; } else { link += ( '&' + ( ScarabConstants . REMOVE_CURRENT_MITLIST_QKEY ) ) + "=true" ; } return link ; } public Intake getConditionalIntake ( String parameter ) throws Exception { } public IssueSearch getNewSearch ( ) throws Exception , MaxConcurrentSearchException { } public IssueSearch getPopulatedSearch ( String query ) throws Exception { } public IssueSearch getPopulatedSearch ( ) throws Exception { } public Intake parseQuery ( String query ) throws Exception { } public List getCurrentSearchResults ( ) { } private List getUnprotectedCurrentSearchResults ( ) throws Exception { } private List getUncachedCurrentSearchResults ( ) throws Exception { } public int getCurrentSearchResultsSize ( ) { } public int getIssuePosInList ( ) throws Exception , ScarabException { } public String getNextIssue ( ) throws Exception , ScarabException { } public String getPrevIssue ( ) throws Exception , ScarabException { } private void resetIssueIdList ( List idList , int pos ) { } private boolean checkDate ( IssueSearch search , String date ) throws Exception { } public String convertPath ( String path ) throws Exception { } public List getAllIssueTemplates ( ) throws Exception { } public List getPrivateTemplates ( ) throws Exception { } public List getGlobalTemplates ( ) throws Exception { } public List getAllQueries ( ) throws Exception { } public List getPrivateQueries ( ) throws Exception { } public List getGlobalQueries ( ) throws Exception { } public ReportBridge getReport ( ) throws Exception { } private ReportBridge getNewReport ( ) throws Exception { } public void setReport ( ReportBridge report ) { } public List getUsers ( Module module , IssueType issueType ) throws Exception { } public List getUsers ( ) throws Exception { } public ScarabPaginatedList getUserSearchResults ( MITList mitList , int pageNum , int resultsPerPage , String sortColumn , String sortPolarity , boolean includeCommitters ) throws Exception { }

Fix:
link = ( ( ( ( link + "?queryId=" ) + ( query . getQueryId ( ) ) ) + "&refine=true" ) + "&action=Search&eventSubmit_doPreparequery=foo" ) + ( query . getValue ( ) ) ;