nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ChangePassword extends ScarabTemplateAction { public void doChangepassword ( RunData data , TemplateContext context ) throws Exception { ScarabRequestTool scarabR = getScarabRequestTool ( context ) ; ScarabLocalizationTool l10n = getLocalizationTool ( context ) ; String template = getCurrentTemplate ( data , null ) ; IntakeTool intake = getIntakeTool ( context ) ; if ( intake . isAllValid ( ) ) { Object user = data . getUser ( ) . getTemp ( SESSION_REGISTER ) ; Group register = null ; if ( ( user != null ) && ( user instanceof ScarabUser ) ) { register = intake . get ( "Register" , ( ( ScarabUser ) ( user ) ) . getQueryKey ( ) , false ) ; } else { register = intake . get ( "Register" , DEFAULT_KEY , false ) ; } String username = data . getParameters ( ) . getString ( "username" ) ; String oldPassword = register . get ( "OldPassword" ) . toString ( ) ; String password = register . get ( "Password" ) . toString ( ) ; String passwordConfirm = register . get ( "PasswordConfirm" ) . toString ( ) ; if ( oldPassword . equals ( password ) ) { scarabR . setInfoMessage ( l10n . get ( "PasswordSame" ) ) ; setTarget ( data , template ) ; } else if ( password . equals ( passwordConfirm ) ) { try { ScarabUser confirmedUser = ( ( ScarabUser ) ( TurbineSecurity . getUser ( username ) ) ) ; confirmedUser . setPasswordExpire ( ) ; confirmedUser . setHasLoggedIn ( Boolean . FALSE ) ; data . setUser ( confirmedUser ) ; data . save ( ) ; TurbineSecurity . changePassword ( confirmedUser , oldPassword , password ) ; scarabR . setConfirmMessage ( l10n . get ( "PasswordChanged" ) ) ; setTarget ( data , "Login.vm" ) ; } catch ( PasswordMismatchException pme ) { <START_BUG> scarabR . setAlertMessage ( pme . getMessage ( ) ) ; <END_BUG> setTarget ( data , template ) ; } } else { scarabR . setAlertMessage ( l10n . get ( "PasswordsDoNotMatch" ) ) ; setTarget ( data , template ) ; } } else { scarabR . setAlertMessage ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>form<seq2seq4repair_space>input." ) ; setTarget ( data , template ) ; } } }

Fix:
scarabR . setAlertMessage ( l10n . getMessage ( pme ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//schedule" ) public class ScheduleController { @ RequestMapping ( value = "//list" , method = RequestMethod . GET ) public String schedule ( ) { <START_BUG> return "//schedule//list" ; <END_BUG> } }

Fix:
return "schedule//list" ;
Buggy code:
public class Receiver extends ParsePushBroadcastReceiver { @ Override protected void onPushOpen ( Context context , Intent intent ) { } @ Override public void onPushReceive ( Context context , Intent intent ) { super . onPushReceive ( context , intent ) ; Intent i ; UserServices userServices = new UserServices ( ) ; Log . e ( "Push" , "received" ) ; if ( ( ParseUser . getCurrentUser ( ) ) != null ) { try { JSONObject pushData = new JSONObject ( intent . getExtras ( ) . getString ( "com.parse.Data" ) ) ; String type = pushData . optString ( "pushType" ) ; if ( type . equals ( "AddNewGroup" ) ) { String groupUUID = pushData . optString ( "groupUUID" ) ; Group group = userServices . getGroupQuery ( groupUUID ) ; GroupDTO groupDTO = userServices . transformGroupToGroupDTO ( group ) ; List < GroupDTO > groupsDTOs = UserLocalDB . getGroupsDTOs ( ) ; if ( groupsDTOs == null ) groupsDTOs = new ArrayList ( ) ; if ( ! ( groupsDTOs . contains ( groupDTO ) ) ) { groupsDTOs . add ( groupDTO ) ; Collections . sort ( groupsDTOs , new Comparator < GroupDTO > ( ) { @ Override public int compare ( GroupDTO groupDTO , GroupDTO other ) { return groupDTO . getGroupName ( ) . compareTo ( other . getGroupName ( ) ) ; } } ) ; UserLocalDB . setUserGroups ( groupsDTOs ) ; } if ( getActivity ( context , intent ) . equals ( MainActivity . class ) ) { i = new Intent ( context , MainActivity . class ) ; i . putExtras ( intent . getExtras ( ) ) ; i . setFlags ( FLAG_ACTIVITY_NEW_TASK ) ; context . startActivity ( i ) ; } } else if ( type . equals ( "DeleteGroup" ) ) { String groupUUID = pushData . optString ( "groupUUID" ) ; for ( GroupDTO groupDTO : UserLocalDB . getGroupsDTOs ( ) ) if ( groupDTO . getGroupUuid ( ) . equals ( groupUUID ) ) { UserLocalDB . getGroupsDTOs ( ) . remove ( groupDTO ) ; break ; } <START_BUG> if ( intent . getExtras ( ) . getString ( "currentClass" ) . equals ( "MainActivity" ) ) { <END_BUG> i = new Intent ( context , MainActivity . class ) ; i . putExtras ( intent . getExtras ( ) ) ; i . setFlags ( FLAG_ACTIVITY_NEW_TASK ) ; context . startActivity ( i ) ; } } } catch ( JSONException e ) { Log . e ( "com.parse.ParsePushReceiver" , "Unexpected<seq2seq4repair_space>JSONException<seq2seq4repair_space>when<seq2seq4repair_space>receiving<seq2seq4repair_space>push<seq2seq4repair_space>data:<seq2seq4repair_space>" , e ) ; } } else super . onPushReceive ( context , intent ) ; } }

Fix:
if ( getActivity ( context , intent ) . equals ( MainActivity . class ) ) {
Buggy code:
public class WicketLinkTagHandler extends AbstractMarkupFilter { private Stack autolinkStatus ; private boolean autolinking = true ; public WicketLinkTagHandler ( final IMarkupFilter parent ) { } public void setAutomaticLinking ( final boolean enable ) { } public final MarkupElement nextTag ( ) throws ParseException { final ComponentTag tag = ( ( ComponentTag ) ( getParent ( ) . nextTag ( ) ) ) ; if ( tag == null ) { return tag ; } if ( ( ( autolinking ) == true ) && ( ( analyzeAutolinkCondition ( tag ) ) == true ) ) { tag . enableAutolink ( true ) ; tag . setId ( "_autolink_" ) ; return tag ; } if ( tag instanceof WicketTag ) { final WicketTag wtag = ( ( WicketTag ) ( tag ) ) ; if ( wtag . isLinkTag ( ) ) { if ( ( tag . isOpen ( ) ) || ( tag . isOpenClose ( ) ) ) { if ( tag . isOpen ( ) ) { if ( ( autolinkStatus ) == null ) { autolinkStatus = new Stack ( ) ; } autolinkStatus . push ( new Boolean ( autolinking ) ) ; } final String autolink = tag . getAttributes ( ) . getString ( "autolink" ) ; try { autolinking = ( Strings . isEmpty ( autolink ) ) || ( Strings . isTrue ( autolink ) ) ; } catch ( StringValueConversionException e ) { throw new WicketRuntimeException ( ( ( "Invalid<seq2seq4repair_space>autolink<seq2seq4repair_space>attribute<seq2seq4repair_space>value<seq2seq4repair_space>\"" + autolink ) + "\"" ) ) ; } } else if ( tag . isClose ( ) ) { autolinking = ( ( Boolean ) ( autolinkStatus . pop ( ) ) ) . booleanValue ( ) ; } <START_BUG> return nextTag ( ) ; <END_BUG> } } return tag ; } protected boolean analyzeAutolinkCondition ( final ComponentTag tag ) { } }

Fix:
return wtag ;
Buggy code:
public class Hex implements BinaryDecoder , BinaryEncoder { public static final String DEFAULT_CHARSET_NAME = CharEncoding . UTF_8 ; private static final char [ ] DIGITS_LOWER = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'a' , 'b' , 'c' , 'd' , 'e' , 'f' } ; private static final char [ ] DIGITS_UPPER = new char [ ] { '0' , '1' , '2' , '3' , '4' , '5' , '6' , '7' , '8' , '9' , 'A' , 'B' , 'C' , 'D' , 'E' , 'F' } ; public static byte [ ] decodeHex ( char [ ] data ) throws DecoderException { } public static char [ ] encodeHex ( byte [ ] data ) { } public static char [ ] encodeHex ( byte [ ] data , boolean toLowerCase ) { } protected static char [ ] encodeHex ( byte [ ] data , char [ ] toDigits ) { } public static String encodeHexString ( byte [ ] data ) { } protected static int toDigit ( char ch , int index ) throws DecoderException { int digit = Character . digit ( ch , 16 ) ; if ( digit == ( - 1 ) ) { <START_BUG> throw new DecoderException ( ( ( ( "Illegal<seq2seq4repair_space>hexadecimal<seq2seq4repair_space>charcter<seq2seq4repair_space>" + ch ) + "<seq2seq4repair_space>at<seq2seq4repair_space>index<seq2seq4repair_space>" ) + index ) ) ; <END_BUG> } return digit ; } private final String charsetName ; public Hex ( ) { } public Hex ( String csName ) { } public byte [ ] decode ( byte [ ] array ) throws DecoderException { } public Object decode ( Object object ) throws DecoderException { } public byte [ ] encode ( byte [ ] array ) { } public Object encode ( Object object ) throws EncoderException { } public String getCharsetName ( ) { } public String toString ( ) { } }

Fix:
throw new DecoderException ( ( ( ( "Illegal<seq2seq4repair_space>hexadecimal<seq2seq4repair_space>character<seq2seq4repair_space>" + ch ) + "<seq2seq4repair_space>at<seq2seq4repair_space>index<seq2seq4repair_space>" ) + index ) ) ;
Buggy code:
public class JSR223Timer extends JSR223TestElement implements Cloneable , TestBean , Timer { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final long serialVersionUID = 4 ; public long delay ( ) { long delay = 0 ; try { ScriptEngine scriptEngine = getScriptEngine ( ) ; Object o = processFileOrScript ( scriptEngine , null ) ; if ( o == null ) { JSR223Timer . log . warn ( "Script<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>return<seq2seq4repair_space>a<seq2seq4repair_space>value" ) ; return 0 ; } <START_BUG> delay = Long . valueOf ( o . toString ( ) ) . longValue ( ) ; <END_BUG> } catch ( NumberFormatException e ) { JSR223Timer . log . warn ( "Problem<seq2seq4repair_space>in<seq2seq4repair_space>JSR223<seq2seq4repair_space>script<seq2seq4repair_space>" , e ) ; } catch ( IOException e ) { JSR223Timer . log . warn ( "Problem<seq2seq4repair_space>in<seq2seq4repair_space>JSR223<seq2seq4repair_space>script<seq2seq4repair_space>" , e ) ; } catch ( ScriptException e ) { JSR223Timer . log . warn ( "Problem<seq2seq4repair_space>in<seq2seq4repair_space>JSR223<seq2seq4repair_space>script<seq2seq4repair_space>" , e ) ; } return delay ; } }

Fix:
delay = Long . parseLong ( o . toString ( ) ) ;
Buggy code:
public class SearchFacade { ExecutorService executor ; AirlineFacade af = new AirlineFacade ( ) ; StringBuilder sb = new StringBuilder ( ) ; public String getFlights ( String from , String to , String date , int tickets ) throws InterruptedException , ExecutionException , TimeoutException { executor = Executors . newFixedThreadPool ( 4 ) ; List listAirline = af . getActiveAirlines ( ) ; System . out . println ( ( "number<seq2seq4repair_space>of<seq2seq4repair_space>airlines<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>database:<seq2seq4repair_space>" + ( listAirline . size ( ) ) ) ) ; List < Future > futures = new ArrayList ( ) ; for ( Object a : listAirline ) { AirlineEntity ae = ( ( AirlineEntity ) ( a ) ) ; Callable c = new SearchCaller ( ae . getUrl ( ) , from , to , date , tickets ) ; Future < String > fut = executor . submit ( c ) ; futures . add ( fut ) ; } int countResults = 0 ; for ( Future < String > future : futures ) { String tmp = future . get ( 5 , TimeUnit . DAYS ) ; <START_BUG> if ( ( tmp . length ( ) ) < 1 ) { <END_BUG> sb . append ( future . get ( 5 , TimeUnit . SECONDS ) ) ; sb . append ( ",\n" ) ; } } String result = sb . toString ( ) ; if ( result . endsWith ( ",\n" ) ) { result = result . substring ( 0 , result . lastIndexOf ( "," ) ) ; } result = ( "[\n" + result ) + "\n]" ; return result ; } }

Fix:
if ( ( tmp . length ( ) ) > 0 ) {
Buggy code:
public class RequestMappingHandlerMapping extends RequestMappingInfoHandlerMapping { @ Override protected boolean isHandler ( Class < ? > beanType ) { } @ Override protected RequestMappingInfo getMappingForMethod ( Method method , Class < ? > handlerType ) { } private RequestMappingInfo createFromRequestMapping ( RequestMapping annotation ) { <START_BUG> return new RequestMappingInfo ( new org . springframework . web . servlet . mvc . condition . PatternsRequestCondition ( annotation . value ( ) , getUrlPathHelper ( ) , getPathMatcher ( ) ) , new org . springframework . web . servlet . mvc . condition . RequestMethodsRequestCondition ( annotation . method ( ) ) , new org . springframework . web . servlet . mvc . condition . ParamsRequestCondition ( annotation . params ( ) ) , new org . springframework . web . servlet . mvc . condition . HeadersRequestCondition ( annotation . headers ( ) ) , new org . springframework . web . servlet . mvc . condition . ConsumesRequestCondition ( annotation . consumes ( ) , annotation . headers ( ) ) , new org . springframework . web . servlet . mvc . condition . ProducesRequestCondition ( annotation . produces ( ) , annotation . headers ( ) ) ) ; <END_BUG> } }

Fix:
return new RequestMappingInfo ( new org . springframework . web . servlet . mvc . condition . PatternsRequestCondition ( annotation . value ( ) , getUrlPathHelper ( ) , getPathMatcher ( ) ) , new org . springframework . web . servlet . mvc . condition . RequestMethodsRequestCondition ( annotation . method ( ) ) , new org . springframework . web . servlet . mvc . condition . ParamsRequestCondition ( annotation . params ( ) ) , new org . springframework . web . servlet . mvc . condition . HeadersRequestCondition ( annotation . headers ( ) ) , new org . springframework . web . servlet . mvc . condition . ConsumesRequestCondition ( annotation . consumes ( ) , annotation . headers ( ) ) , new org . springframework . web . servlet . mvc . condition . ProducesRequestCondition ( annotation . produces ( ) , annotation . headers ( ) ) , null ) ;
Buggy code:
public class AccessRestriction { private char [ ] [ ] inclusionPatterns ; private char [ ] [ ] exclusionPatterns ; protected String messageTemplate ; AccessRestriction furtherRestriction ; public AccessRestriction ( String messageTemplate , char [ ] [ ] inclusionPatterns , char [ ] [ ] exclusionPatterns , AccessRestriction furtherRestriction ) { } public boolean equals ( Object object ) { } public AccessRestriction getViolatedRestriction ( char [ ] targetTypeName , char [ ] referringTypeName ) { } public char [ ] [ ] getExclusionPatterns ( ) { } public char [ ] [ ] getInclusionPatterns ( ) { } public String getMessageTemplate ( ) { } public String toString ( ) { <START_BUG> StringBuffer buffer = new StringBuffer ( 20 ) ; <END_BUG> buffer . append ( "AccessRestriction<seq2seq4repair_space>[includes:\"" ) . append ( CharOperation . concatWith ( this . inclusionPatterns , '//' ) ) . append ( "\"][excludes:\"" ) . append ( CharOperation . concatWith ( this . exclusionPatterns , '//' ) ) . append ( "\"][template:\"" ) . append ( this . messageTemplate ) . append ( "\"]" ) ; if ( ( this . furtherRestriction ) != null ) { buffer . append ( '\n' ) . append ( this . furtherRestriction ) ; } return buffer . toString ( ) ; } }

Fix:
StringBuffer buffer = new StringBuffer ( 200 ) ;
Buggy code:
public class WithDataPointMethod { @ RunWith ( Theories . class ) public static class HasDataPointMethod { @ DataPoint public static int oneHundred ( ) { } @ Theory public void allIntsOk ( int x ) { } } @ RunWith ( Theories . class ) public static class HasUglyDataPointMethod { @ DataPoint public static int oneHundred ( ) { } @ DataPoint public static int oneUglyHundred ( ) { } @ Theory public void allIntsOk ( int x ) { } } @ Test public void pickUpDataPointMethods ( ) { } @ Test public void ignoreExceptionsFromDataPointMethods ( ) { } @ RunWith ( Theories . class ) public static class DataPointMethodReturnsMutableObject { @ DataPoint public static List < Object > empty ( ) { } public static int ONE = 1 ; public static int TWO = 2 ; @ Theory public void everythingsEmpty ( List < Object > first , int number ) { } } @ Test public void mutableObjectsAreCreatedAfresh ( ) { } @ RunWith ( Theories . class ) public static class HasDateMethod { @ DataPoint public int oneHundred ( ) { } public Date notADataPoint ( ) { } @ Theory public void allIntsOk ( int x ) { } @ Theory public void onlyStringsOk ( String s ) { } @ Theory public void onlyDatesOk ( Date d ) { } } @ Test public void ignoreDataPointMethodsWithWrongTypes ( ) throws Exception { } @ Test public void ignoreDataPointMethodsWithoutAnnotation ( ) throws Throwable { } private List < PotentialAssignment > potentialValues ( Method method ) throws Exception { <START_BUG> return Assignments . allUnassigned ( method , WithDataPointMethod . HasDateMethod . class ) . potentialsForNextUnassigned ( ) ; <END_BUG> } private List < Failure > failures ( Class < ? > type ) { } private Matcher < Iterable < Failure > > empty ( ) { } }

Fix:
return Assignments . allUnassigned ( method , WithDataPointMethod . HasDateMethod . class , true ) . potentialsForNextUnassigned ( ) ;
Buggy code:
public class SearchContactDialog extends Dialog { Button closeButton ; Button searchButton ; MultiRosterAccount account ; Button addContactButton ; Button runInBackgroundButton ; Table tableResult ; Table tableFields ; public SearchContactDialog ( Shell parentShell , MultiRosterAccount account ) { } protected void addListeners ( ) { searchButton . addMouseListener ( new MouseAdapter ( ) { public void mouseUp ( MouseEvent e ) { IUserSearchManager userManager = account . getPresenceContainerAdapter ( ) . getUserSearchManager ( ) ; try { IRestriction selection = userManager . createRestriction ( ) ; final ICriteria criteria = userManager . createCriteria ( ) ; TableItem [ ] items = tableFields . getItems ( ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { TableItem item = items [ i ] ; if ( item . getChecked ( ) ) { ICriterion criterion = selection . eq ( item . getText ( 0 ) , item . getText ( 1 ) ) ; criteria . add ( criterion ) ; } } if ( runInBackgroundButton . getSelection ( ) ) { callAsynchronous ( userManager , criteria ) ; close ( ) ; } else { ISearch search = userManager . search ( criteria ) ; IResultList resultList = search . getResultList ( ) ; tableResult . removeAll ( ) ; <START_BUG> for ( Iterator iterator = resultList . geResults ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) { <END_BUG> IResult result = ( ( IResult ) ( iterator . next ( ) ) ) ; TableItem item = new TableItem ( tableResult , SWT . NONE ) ; item . setText ( 0 , result . getUser ( ) . getName ( ) ) ; item . setText ( 1 , result . getUser ( ) . getID ( ) . getName ( ) ) ; } } } catch ( UserSearchException e1 ) { Activator . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , Activator . PLUGIN_ID , IStatus . ERROR , e1 . getLocalizedMessage ( ) , e1 ) ) ; } } } ) ; addContactButton . addMouseListener ( new MouseAdapter ( ) { public void mouseUp ( MouseEvent e ) { TableItem contact = tableResult . getSelection ( ) [ 0 ] ; if ( MessageDialog . openConfirm ( null , AddContactDialog_DialogTitle , NLS . bind ( SearchContactDialog_AddContactMessage , contact . getText ( 0 ) ) ) ) { IPresenceContainerAdapter ipca = account . getPresenceContainerAdapter ( ) ; IRosterSubscriptionSender sender = ipca . getRosterManager ( ) . getRosterSubscriptionSender ( ) ; try { sender . sendRosterAdd ( contact . getText ( 1 ) , contact . getText ( 0 ) , null ) ; } catch ( ECFException e1 ) { Activator . getDefault ( ) . getLog ( ) . log ( new Status ( IStatus . ERROR , Activator . PLUGIN_ID , IStatus . ERROR , e1 . getLocalizedMessage ( ) , e1 ) ) ; } close ( ) ; } } } ) ; } protected void configureShell ( Shell newShell ) { } protected void createButtonsForButtonBar ( Composite parent ) { } protected Control createDialogArea ( Composite parent ) { } protected void callAsynchronous ( final IUserSearchManager userManager , final ICriteria criteria ) { } protected void fireEventComplete ( final IUserSearchCompleteEvent event ) { } }

Fix:
for ( Iterator iterator = resultList . getResults ( ) . iterator ( ) ; iterator . hasNext ( ) ; ) {
Buggy code:
public class Initializer implements IInitializer { private static Log log = LogFactory . getLog ( Initializer . class ) ; public void init ( wicket . Application application ) { try { String name = application . getName ( ) ; MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; String domain = "wicket.app." + name ; ObjectName appBeanName = new ObjectName ( ( domain + ":type=Application" ) ) ; String tempDomain = domain ; int i = 0 ; while ( mbs . isRegistered ( appBeanName ) ) { tempDomain = ( name + "-" ) + i ; <START_BUG> appBeanName = new ObjectName ( ( domain + ":type=Application" ) ) ; <END_BUG> } name = tempDomain ; Application appBean = new Application ( application ) ; mbs . registerMBean ( appBean , appBeanName ) ; mbs . registerMBean ( new ApplicationSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ApplicationSettings" ) ) ) ; mbs . registerMBean ( new DebugSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=DebugSettings" ) ) ) ; mbs . registerMBean ( new MarkupSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=MarkupSettings" ) ) ) ; mbs . registerMBean ( new ResourceSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ResourceSettings" ) ) ) ; mbs . registerMBean ( new PageSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=PageSettings" ) ) ) ; mbs . registerMBean ( new RequestCycleSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=RequestCycleSettings" ) ) ) ; mbs . registerMBean ( new SecuritySettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SecuritySettings" ) ) ) ; mbs . registerMBean ( new SessionSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SessionSettings" ) ) ) ; mbs . registerMBean ( new CookieValuePersisterSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=CookieValuePersisterSettings" ) ) ) ; RequestLogger sessionsBean = new RequestLogger ( application ) ; ObjectName sessionsBeanName = new ObjectName ( ( domain + ":type=RequestLogger" ) ) ; mbs . registerMBean ( sessionsBean , sessionsBeanName ) ; } catch ( MalformedObjectNameException e ) { throw new WicketRuntimeException ( e ) ; } catch ( InstanceAlreadyExistsException e ) { throw new WicketRuntimeException ( e ) ; } catch ( MBeanRegistrationException e ) { throw new WicketRuntimeException ( e ) ; } catch ( NotCompliantMBeanException e ) { throw new WicketRuntimeException ( e ) ; } } }

Fix:
appBeanName = new ObjectName ( ( tempDomain + ":type=Application" ) ) ;
Buggy code:
public class TypeParameterPattern extends JavaSearchPattern implements IIndexConstants { protected boolean findDeclarations ; protected boolean findReferences ; protected char [ ] name ; protected ITypeParameter typeParameter ; protected char [ ] declaringMemberName ; protected char [ ] methodDeclaringClassName ; protected char [ ] [ ] methodArgumentTypes ; public TypeParameterPattern ( boolean findDeclarations , boolean findReferences , ITypeParameter typeParameter , int matchRule ) { } public void findIndexMatches ( Index index , IndexQueryRequestor requestor , SearchParticipant participant , IJavaSearchScope scope , IProgressMonitor progressMonitor ) { IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( typeParameter . getAncestor ( IJavaElement . PACKAGE_FRAGMENT_ROOT ) ) ) ; String path ; if ( root . isArchive ( ) ) { IType type = ( ( IType ) ( typeParameter . getAncestor ( IJavaElement . TYPE ) ) ) ; String filePath = ( type . getFullyQualifiedName ( '//' ) . replace ( '.' , '//' ) ) + ( SuffixConstants . SUFFIX_STRING_class ) ; path = ( ( root . getPath ( ) ) + ( IJavaSearchScope . JAR_FILE_ENTRY_SEPARATOR ) ) + filePath ; } else { path = typeParameter . getPath ( ) . toString ( ) ; } if ( scope instanceof JavaSearchScope ) { JavaSearchScope javaSearchScope = ( ( JavaSearchScope ) ( scope ) ) ; AccessRestriction access = javaSearchScope . getAccessRestriction ( path ) ; <START_BUG> if ( ! ( UNINIT_RESTRICTION . equals ( access ) ) ) { <END_BUG> if ( ! ( requestor . acceptIndexMatch ( path , this , participant , access ) ) ) throw new OperationCanceledException ( ) ; } } else if ( scope . encloses ( path ) ) { if ( ! ( requestor . acceptIndexMatch ( path , this , participant , null ) ) ) throw new OperationCanceledException ( ) ; } } protected StringBuffer print ( StringBuffer output ) { } }

Fix:
if ( ( NOT_INITIALIZED_RESTRICTION ) != access ) {
Buggy code:
class LayoutHelper { private LayoutHelper ( ) { } public static final void addViewActivator ( PageLayout pageLayout , final String viewId ) { } public static final ViewPane createView ( ViewFactory factory , String viewId ) throws PartInitException { } public static final ViewPane createView ( ViewFactory factory , String viewId , String theme ) throws PartInitException { WorkbenchPartReference ref = ( ( WorkbenchPartReference ) ( factory . createView ( viewId ) ) ) ; ViewPane newPart = ( ( ViewPane ) ( ref . getPane ( ) ) ) ; if ( newPart == null ) { WorkbenchPage page = ( ( WorkbenchPage ) ( ref . getPage ( ) ) ) ; <START_BUG> newPart = new ViewPane ( ( ( IViewReference ) ( ref ) ) , page , theme ) ; <END_BUG> ref . setPane ( newPart ) ; } return newPart ; } }

Fix:
newPart = new ViewPane ( ( ( IViewReference ) ( ref ) ) , page ) ;
Buggy code:
public class XpathAssertionTests { private static final Map < String , String > NS = Collections . singletonMap ( "ns" , "http:////example.org//music//people" ) ; private MockMvc mockMvc ; @ Before public void setup ( ) throws Exception { <START_BUG> this . mockMvc = standaloneSetup ( new XpathAssertionTests . MusicController ( ) ) . defaultRequest ( get ( "//" ) . accept ( APPLICATION_XML ) ) . alwaysExpect ( status ( ) . isOk ( ) ) . alwaysExpect ( content ( ) . mimeType ( APPLICATION_XML ) ) . build ( ) ; <END_BUG> } @ Test public void testExists ( ) throws Exception { } @ Test public void testDoesNotExist ( ) throws Exception { } @ Test public void testString ( ) throws Exception { } @ Test public void testNumber ( ) throws Exception { } @ Test public void testBoolean ( ) throws Exception { } @ Test public void testNodeCount ( ) throws Exception { } @ Controller private static class MusicController { @ RequestMapping ( "//music//people" ) @ ResponseBody public XpathAssertionTests . PeopleWrapper getPeople ( ) { } } @ SuppressWarnings ( "unused" ) @ XmlRootElement ( name = "people" , namespace = "http:////example.org//music//people" ) @ XmlAccessorType ( XmlAccessType . FIELD ) private static class PeopleWrapper { @ XmlElementWrapper ( name = "composers" ) @ XmlElement ( name = "composer" ) private List < Person > composers ; @ XmlElementWrapper ( name = "performers" ) @ XmlElement ( name = "performer" ) private List < Person > performers ; public PeopleWrapper ( ) { } public PeopleWrapper ( List < Person > composers , List < Person > performers ) { } public List < Person > getComposers ( ) { } public List < Person > getPerformers ( ) { } } }

Fix:
this . mockMvc = standaloneSetup ( new XpathAssertionTests . MusicController ( ) ) . defaultRequest ( get ( "//" ) . accept ( APPLICATION_XML ) ) . alwaysExpect ( status ( ) . isOk ( ) ) . alwaysExpect ( content ( ) . contentType ( APPLICATION_XML ) ) . build ( ) ;
Buggy code:
@ Aspect public class A10 { M newM2 = new M ( "2" ) ; M newM3 = new M ( "3" ) ; @ Around ( "call(void<seq2seq4repair_space>M.method(String))<seq2seq4repair_space>&&<seq2seq4repair_space>args(p)<seq2seq4repair_space>&&<seq2seq4repair_space>this(t)<seq2seq4repair_space>&&<seq2seq4repair_space>target(t2)" ) public void a ( ProceedingJoinPoint pjp , M t , String p , M t2 ) throws Throwable { System . err . println ( "advice<seq2seq4repair_space>from<seq2seq4repair_space>ataj<seq2seq4repair_space>aspect" ) ; <START_BUG> pjp . proceed ( new Object [ ] { newM2 , "faked" , newM3 } ) ; <END_BUG> } public static void main ( String [ ] argv ) { } }

Fix:
pjp . proceed ( new Object [ ] { newM2 , newM3 , "faked" } ) ;
Buggy code:
class LZMA2Decoder extends CoderBase { LZMA2Decoder ( ) { } @ Override InputStream decode ( final InputStream in , long uncompressedLength , final Coder coder , byte [ ] password ) throws IOException { } @ Override OutputStream encode ( final OutputStream out , final Object opts ) throws IOException { } @ Override byte [ ] getOptionsAsProperties ( Object opts ) { } @ Override Object getOptionsFromCoder ( Coder coder , InputStream in ) { <START_BUG> return Integer . valueOf ( getDictionarySize ( coder ) ) ; <END_BUG> } private int getDictSize ( Object opts ) { } private int getDictionarySize ( Coder coder ) throws IllegalArgumentException { } private LZMA2Options getOptions ( Object opts ) throws IOException { } private int numberOptionOrDefault ( Object opts ) { } }

Fix:
return getDictionarySize ( coder ) ;
Buggy code:
public class WebServiceSEIPresentNoWebMethodRule extends AbstractAnnotationProcessor { public WebServiceSEIPresentNoWebMethodRule ( ) { } @ Override public void process ( ) { } private void checkWebMethods ( Messager messager ) { AnnotationTypeDeclaration webMethodDeclaration = ( ( AnnotationTypeDeclaration ) ( environment . getTypeDeclaration ( "javax.jws.WebMethod" ) ) ) ; Collection < Declaration > webMethodAnnotatedTypes = environment . getDeclarationsAnnotatedWith ( webMethodDeclaration ) ; for ( Declaration declaration : webMethodAnnotatedTypes ) { Collection < AnnotationMirror > annotationMirrors = declaration . getAnnotationMirrors ( ) ; for ( AnnotationMirror mirror : annotationMirrors ) { if ( mirror . getAnnotationType ( ) . toString ( ) . equals ( webMethodDeclaration . getQualifiedName ( ) ) ) { <START_BUG> messager . printError ( mirror . getPosition ( ) , WEBSERVICE_ENPOINTINTERFACE_NO_WEBMETHOS_ERROR_MESSAGE ) ; <END_BUG> } } } } }

Fix:
messager . printError ( mirror . getPosition ( ) , WEBSERVICE_ENPOINTINTERFACE_NO_WEBMETHODS_ERROR_MESSAGE ) ;
Buggy code:
public class TempResult { public static Map < Integer , Integer > vertexRank2Label = new HashMap < Integer , Integer > ( ) ; public static Map < Integer , Integer > edgeRank2Label = new HashMap < Integer , Integer > ( ) ; public static int maxVertexRank = 0 ; public static int maxEdgeRank = 0 ; private static List < TempResult . Node > roots = new ArrayList < TempResult . Node > ( ) ; private static TempResult . Node currentNode ; private static int depth = 0 ; static class Node { int count ; double confidency ; DFSCode code ; Set < Integer > subjects ; List < TempResult . Node > childs ; TempResult . Node parent ; Node ( DFSCode c ) { } void addChild ( TempResult . Node n ) { } } public static void add ( DFSCodeStack dfsCodeStack , Set < Graph > graphs ) { } public static void cutIfHasNoConcept ( ) { } private static boolean cut ( TempResult . Node n ) { } private static boolean hasConcept ( TempResult . Node n ) { <START_BUG> return ( n . code . a ) == 0 ; <END_BUG> } public static List < Concept > genConcept ( int subject ) { } private static void genConcept ( TempResult . Node n , int subject , List < Concept > concepts , int depth ) { } public static void print ( ) { } private static void print ( TempResult . Node n ) { } }

Fix:
return ( TempResult . edgeRank2Label . get ( n . code . a ) ) == 633 ;
Buggy code:
public class Worlds { public Waypoint plugin ; public Logger log = Logger . getLogger ( "Minecraft" ) ; protected Permission permission ; public Config config ; public Worlds ( Waypoint instance ) { } public void LoadWorlds ( ) { } public World Import ( String worldname , String env ) { } public World Import ( String worldname , String env , int mode ) { } public World Create ( String worldname , String env ) { Environment environment = Environment . valueOf ( env ) ; Configuration world = config . getWorld ( ) ; if ( ( ! ( new File ( worldname ) . exists ( ) ) ) && ( environment != null ) ) { World wx = plugin . getServer ( ) . createWorld ( worldname , environment ) ; log . info ( String . format ( "[Waypoint]<seq2seq4repair_space>Created<seq2seq4repair_space>world:<seq2seq4repair_space>{<seq2seq4repair_space>%s<seq2seq4repair_space>[ENV:%s(MODE:%s)]<seq2seq4repair_space>}<seq2seq4repair_space>--<seq2seq4repair_space>PVP:<seq2seq4repair_space>%s" , worldname , env . toUpperCase ( ) , "0" , Boolean . toString ( wx . getPVP ( ) ) ) ) ; world . setProperty ( ( ( "worlds." + worldname ) + ".env" ) , env . toUpperCase ( ) ) ; <START_BUG> world . setProperty ( ( ( "worlds." + worldname ) + ".mode" ) , "0" ) ; <END_BUG> world . setProperty ( ( ( "worlds." + worldname ) + ".pvp" ) , false ) ; world . save ( ) ; return wx ; } else if ( environment == null ) { return null ; } else { return null ; } } public World Create ( String worldname , String env , int mode ) { } }

Fix:
world . setProperty ( ( ( "worlds." + worldname ) + ".mode" ) , 0 ) ;
Buggy code:
public class Database { SQLiteDatabase db ; Context ctx ; public static int NOT_FOUND = 1000000 ; private static final String TAG = "DevDrawer-Database" ; public Database ( Context ctx ) { } @ SuppressWarnings ( "Deprecation" ) public void connectDB ( ) { } public void closeDB ( ) { } public void createTables ( ) { } public void dropTables ( ) { } public void addWidgetToDatabase ( int widgetId , String name ) { } public void renameWidget ( int widgetId , String name ) { connectDB ( ) ; <START_BUG> db . execSQL ( ( ( ( ( "UPDATE<seq2seq4repair_space>devdrawer_widgets<seq2seq4repair_space>SET<seq2seq4repair_space>name='" + name ) + "'<seq2seq4repair_space>WHERE<seq2seq4repair_space>id<seq2seq4repair_space>='" ) + widgetId ) + "'" ) ) ; <END_BUG> closeDB ( ) ; } public void removeWidgetFromDatabase ( int widgetId ) { } public Map < Integer , String > getWidgetNames ( ) { } public void addFilterToDatabase ( String p , int widgetId ) { } public void addAppToDatabase ( String p , String filterId , int widgetId ) { } public void removeFilterFromDatabase ( String i ) { } public void removeAppFromDatabase ( String filterId ) { } public List < PackageCollection > getAllFiltersInDatabase ( ) { } public List < PackageCollection > getAllFiltersInDatabase ( int widgetId ) { } public String [ ] getAllAppsInDatabase ( String order ) { } public String [ ] getAllAppsInDatabase ( String order , int widgetId ) { } public int getFiltersCount ( ) { } public boolean doesFilterExist ( String s , int appWidgetId ) { } public int getAppsCount ( ) { } public boolean doesAppExistInDb ( String s ) { } public void deleteAppFromDb ( String packageName ) { } public int parseAndMatch ( String p ) { } public int parseAndMatch ( String p , int widgetId ) { } public void amendFilterEntryTo ( String id , String newString ) { } public void addLocale ( String localeDescriptor ) { } public List < String > getLocales ( ) { } public void deleteLocale ( String localeDescriptor ) { } }

Fix:
db . execSQL ( ( ( ( ( "UPDATE<seq2seq4repair_space>devdrawer_widgets<seq2seq4repair_space>SET<seq2seq4repair_space>name='" + ( name . replace ( "'" , "''" ) ) ) + "'<seq2seq4repair_space>WHERE<seq2seq4repair_space>id<seq2seq4repair_space>='" ) + widgetId ) + "'" ) ) ;
Buggy code:
public class DateServiceActivator implements BundleActivator { public void start ( BundleContext bc ) throws Exception { String bundleName = ( ( String ) ( bc . getBundle ( ) . getHeaders ( ) . get ( Constants . BUNDLE_NAME ) ) ) ; System . out . println ( ( "Started<seq2seq4repair_space>" + bundleName ) ) ; Object obj = bc . getService ( bc . getServiceReference ( DependencyResolver . class . getName ( ) ) ) ; System . out . println ( obj . getClass ( ) . getName ( ) ) ; <START_BUG> ClientDependencyResolver cdr = ( ( ClientDependencyResolver ) ( obj ) ) ; <END_BUG> final CalendarService clock = cdr . getService ( CalendarService . class ) ; Thread t = new Thread ( new Runnable ( ) { public void run ( ) { DateService service = new DateService ( clock ) ; while ( ! ( Thread . interrupted ( ) ) ) { System . out . println ( service . getDateString ( ) ) ; try { Thread . sleep ( 5000 ) ; } catch ( InterruptedException e ) { break ; } } } } ) ; t . start ( ) ; } public void stop ( BundleContext bc ) throws Exception { } No newline ; at end ; of file ; }

Fix:
DependencyResolver cdr = ( ( DependencyResolver ) ( obj ) ) ;
Buggy code:
class ConditionEvaluator { private final ConditionEvaluator . ConditionContextImpl context ; public ConditionEvaluator ( BeanDefinitionRegistry registry , Environment environment , ResourceLoader resourceLoader ) { } public boolean shouldSkip ( AnnotatedTypeMetadata metadata ) { } public boolean shouldSkip ( AnnotatedTypeMetadata metadata , ConfigurationPhase phase ) { if ( ( metadata == null ) || ( ! ( metadata . isAnnotated ( Conditional . class . getName ( ) ) ) ) ) { return false ; } if ( phase == null ) { if ( ( metadata instanceof AnnotationMetadata ) && ( ConfigurationClassUtils . isConfigurationCandidate ( ( ( AnnotationMetadata ) ( metadata ) ) ) ) ) { return shouldSkip ( metadata , PARSE_CONFIGURATION ) ; } return shouldSkip ( metadata , REGISTER_BEAN ) ; } List < Condition > conditions = new ArrayList < Condition > ( ) ; for ( String [ ] conditionClasses : getConditionClasses ( metadata ) ) { for ( String conditionClass : conditionClasses ) { Condition condition = getCondition ( conditionClass , this . context . getClassLoader ( ) ) ; conditions . add ( condition ) ; } } <START_BUG> Collections . sort ( conditions , INSTANCE ) ; <END_BUG> for ( Condition condition : conditions ) { ConfigurationPhase requiredPhase = null ; if ( condition instanceof ConfigurationCondition ) { requiredPhase = ( ( ConfigurationCondition ) ( condition ) ) . getConfigurationPhase ( ) ; } if ( ( requiredPhase == null ) || ( requiredPhase == phase ) ) { if ( ! ( condition . matches ( this . context , metadata ) ) ) { return true ; } } } return false ; } @ SuppressWarnings ( "unchecked" ) private List < String [ ] > getConditionClasses ( AnnotatedTypeMetadata metadata ) { } private Condition getCondition ( String conditionClassName , ClassLoader classloader ) { } private static class ConditionContextImpl implements ConditionContext { private final BeanDefinitionRegistry registry ; private final ConfigurableListableBeanFactory beanFactory ; private final Environment environment ; private final ResourceLoader resourceLoader ; public ConditionContextImpl ( BeanDefinitionRegistry registry , Environment environment , ResourceLoader resourceLoader ) { } private ConfigurableListableBeanFactory deduceBeanFactory ( BeanDefinitionRegistry source ) { } private Environment deduceEnvironment ( BeanDefinitionRegistry source ) { } private ResourceLoader deduceResourceLoader ( BeanDefinitionRegistry source ) { } @ Override public BeanDefinitionRegistry getRegistry ( ) { } @ Override public ConfigurableListableBeanFactory getBeanFactory ( ) { } @ Override public Environment getEnvironment ( ) { } @ Override public ResourceLoader getResourceLoader ( ) { } @ Override public ClassLoader getClassLoader ( ) { } } }

Fix:
AnnotationAwareOrderComparator . sort ( conditions ) ;
Buggy code:
public class PreParsedItem { private boolean isParameter = false ; private boolean isOption = false ; private boolean isShortOption = false ; private String name = null ; private String value = null ; public PreParsedItem ( String arg ) { } public void setValue ( String value ) { } public boolean isParameter ( ) { } public boolean isOption ( ) { } public boolean isShortOption ( ) { } public String getName ( ) { } public String getValue ( ) { } public String getTypeDescString ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( "name=" + ( name ) ) + ",<seq2seq4repair_space>value=" ) + ( value ) ; <END_BUG> } }

Fix:
return ( ( ( "[" + ( name ) ) + "=>" ) + ( value ) ) + "]" ;
Buggy code:
public class Cache extends NameSet { private class CacheElement { RRset rrset ; byte credibility ; long timeIn ; int ttl ; int srcid ; public CacheElement ( int _ttl , byte cred , int src ) { } public CacheElement ( Record r , byte cred , int src ) { } public CacheElement ( RRset r , byte cred , int src ) { } public void update ( Record r ) { } public boolean expiredTTL ( ) { } public String toString ( ) { } } public Cache ( ) { } public Cache ( String file ) throws IOException { } public void addRecord ( Record r , byte cred , Object o ) { } public void addRRset ( RRset rrset , byte cred , Object o ) { } public void addNegative ( Name name , short type , int ttl , byte cred , Object o ) { } public CacheResponse lookupRecords ( Name name , short type , byte minCred ) { } RRset findRecords ( Name name , short type , byte minCred ) { } public RRset findRecords ( Name name , short type ) { <START_BUG> return findRecords ( name , type , NONAUTH_ADDITIONAL ) ; <END_BUG> } public RRset findAnyRecords ( Name name , short type ) { } public void addMessage ( Message in ) { } }

Fix:
return findRecords ( name , type , NONAUTH_ANSWER ) ;
Buggy code:
public class MyAppsFragment extends Fragment { private static final int MENU_ITEM_SEARCH_ID = 0 ; private MyAppsFragment . OnFragmentInteractionListener mListener ; public static MyAppsFragment newInstance ( ) { } public MyAppsFragment ( ) { } @ Override public void onResume ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { View view = inflater . inflate ( fragment_my_apps , container , false ) ; Toolbar appBar = ( ( Toolbar ) ( view . findViewById ( appBar ) ) ) ; ( ( AppCompatActivity ) ( getActivity ( ) ) ) . setSupportActionBar ( appBar ) ; appBar . setNavigationIcon ( ic_menu_white ) ; appBar . setNavigationOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { mListener . openDrawer ( ) ; } } ) ; getActivity ( ) . setTitle ( myApps ) ; appBar . setTitleTextColor ( getResources ( ) . getColor ( appBarTitleTextColor ) ) ; List < Category > dataList = DataUtils . getMyAppsData ( getActivity ( ) ) ; Category [ ] data = new Category [ dataList . size ( ) ] ; dataList . toArray ( data ) ; <START_BUG> MyAppsListViewPagerAdapter adapter = new MyAppsListViewPagerAdapter ( getActivity ( ) . getSupportFragmentManager ( ) , data ) ; <END_BUG> ViewPager viewPager = ( ( ViewPager ) ( view . findViewById ( myAppsListViewPager ) ) ) ; viewPager . setAdapter ( adapter ) ; TabLayout tabLayout = ( ( TabLayout ) ( view . findViewById ( myAppsListTabLayout ) ) ) ; tabLayout . setupWithViewPager ( viewPager ) ; return view ; } @ Override public void onAttach ( Context activity ) { } @ Override public void onDetach ( ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public interface OnFragmentInteractionListener { void openDrawer ( ) { } void setDrawerItemChecked ( final int itemId ) { } } }

Fix:
MyAppsListViewPagerAdapter adapter = new MyAppsListViewPagerAdapter ( getChildFragmentManager ( ) , data ) ;
Buggy code:
public final class ImageMap extends WebMarkupContainer { private static final long serialVersionUID = 1L ; private final List shapeLinks = new ArrayList ( ) ; private static final class CircleLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int radius ; private final int x ; private final int y ; public CircleLink ( final int x , final int y , final int radius , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private static final class PolygonLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int [ ] coordinates ; public PolygonLink ( final int [ ] coordinates , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private static final class RectangleLink extends ImageMap . ShapeLink { private static final long serialVersionUID = 1L ; private final int x1 ; private final int x2 ; private final int y1 ; private final int y2 ; public RectangleLink ( final int x1 , final int y1 , final int x2 , final int y2 , final Link link ) { } String getCoordinates ( ) { } String getType ( ) { } } private abstract static class ShapeLink implements Serializable { private final Link link ; public ShapeLink ( final Link link ) { } public String toString ( ) { } abstract String getCoordinates ( ) { } abstract String getType ( ) { } } public ImageMap ( final String id ) { } public ImageMap addCircleLink ( final int x1 , final int y1 , final int radius , final Link link ) { } public ImageMap addPolygonLink ( final int [ ] coordinates , final Link link ) { } public ImageMap addRectangleLink ( final int x1 , final int y1 , final int x2 , final int y2 , final Link link ) { } protected void onRender ( final MarkupStream markupStream ) { final ComponentTag tag = markupStream . getTag ( ) . mutable ( ) ; checkComponentTag ( tag , "img" ) ; tag . put ( "usemap" , ( "#" + ( getPath ( ) ) ) ) ; renderComponentTag ( tag ) ; markupStream . next ( ) ; final StringBuffer imageMap = new StringBuffer ( ) ; imageMap . append ( "\n<map<seq2seq4repair_space>name=\"" ) . append ( getPath ( ) ) . append ( "\"><seq2seq4repair_space>" ) ; for ( Iterator iterator = shapeLinks . iterator ( ) ; iterator . hasNext ( ) ; ) { final ImageMap . ShapeLink shapeLink = ( ( ImageMap . ShapeLink ) ( iterator . next ( ) ) ) ; imageMap . append ( '\n' ) ; imageMap . append ( shapeLink . toString ( ) ) ; <START_BUG> shapeLink . link . rendered ( ) ; <END_BUG> } imageMap . append ( "\n<//map>" ) ; getResponse ( ) . write ( imageMap . toString ( ) ) ; } }

Fix:
getPage ( ) . componentRendered ( shapeLink . link ) ;
Buggy code:
final class InvocationHandlerEJB3 extends AbstractInvocationHandler { private static final String EJB3_JNDI_PREFIX = "java:env//" ; private final IoCContainerProxy iocContainer ; private String containerName ; private SessionBeanComponent serviceEndpointContainer ; InvocationHandlerEJB3 ( ) { } public void init ( final Endpoint endpoint ) { } private synchronized SessionBeanComponent getEjb3Container ( ) { } public void invoke ( final Endpoint endpoint , final Invocation wsInvocation ) throws Exception { try { this . onBeforeInvocation ( wsInvocation ) ; final SessionBeanComponent ejbContainer = this . getEjb3Container ( ) ; final Method seiMethod = wsInvocation . getJavaMethod ( ) ; final Serializable sessionId = null ; final Map < String , Object > contextData = getWebServiceContext ( wsInvocation ) . getMessageContext ( ) ; final Class < ? > invokedBusinessInterface = null ; <START_BUG> final Method implMethod = ejbContainer . getComponentMethod ( seiMethod ) ; <END_BUG> final Object [ ] args = wsInvocation . getArgs ( ) ; final Object retObj = ejbContainer . invoke ( sessionId , contextData , invokedBusinessInterface , implMethod , args ) ; wsInvocation . setReturnValue ( retObj ) ; } catch ( Throwable t ) { this . log . error ( ( "Method<seq2seq4repair_space>invocation<seq2seq4repair_space>failed<seq2seq4repair_space>with<seq2seq4repair_space>exception:<seq2seq4repair_space>" + ( t . getMessage ( ) ) ) , t ) ; this . handleInvocationException ( t ) ; } finally { this . onAfterInvocation ( wsInvocation ) ; } } public Context getJNDIContext ( final Endpoint ep ) throws NamingException { } @ Override public void onBeforeInvocation ( final Invocation invocation ) { } @ Override public void onAfterInvocation ( final Invocation invocation ) { } private WebServiceContext getWebServiceContext ( final Invocation invocation ) { } private static final class WebServiceContextAdapter implements WebServiceContext { private final WebServiceContext delegate ; private WebServiceContextAdapter ( final WebServiceContext delegate ) { } public MessageContext getMessageContext ( ) { } public Principal getUserPrincipal ( ) { } public boolean isUserInRole ( final String role ) { } public EndpointReference getEndpointReference ( final Element ... referenceParameters ) { } public < T extends EndpointReference > T getEndpointReference ( final Class < T > clazz , final Element ... referenceParameters ) { } } private static final class EJB3InvocationContextCallback implements InvocationContextCallback { private Invocation wsInvocation ; public EJB3InvocationContextCallback ( final Invocation wsInvocation ) { } public < T > T get ( final Class < T > attachmentType ) { } } }

Fix:
final Method implMethod = seiMethod ;