nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RUILabel extends RUIElement { protected String fontName_c ; protected TrueTypeFont font_c ; protected float fontSize_c ; protected int horalign_c ; protected int veralign_c ; public RUILabel ( RUIElement parent ) { } @ Override protected void loadDefaultValues ( ) { super . loadDefaultValues ( ) ; values . set ( "default" , "text" , new RUIValue ( "" ) ) ; values . set ( "default" , "font-name" , new RUIValue ( "FreeSans" ) ) ; values . set ( "default" , "font-size" , SIZE_0 ) ; values . set ( "default" , "horizontal-alignment" , new RUIValue ( "left" ) ) ; <START_BUG> values . set ( "default" , "verticla-alignment" , new RUIValue ( "top" ) ) ; <END_BUG> } @ Override public void loadDefinition ( RUIParserDefinition definition ) { } @ Override public void update ( double timeDelta ) { } @ Override protected void renderForeground ( ) { } }

Fix:
values . set ( "default" , "vertical-alignment" , new RUIValue ( "top" ) ) ;
Buggy code:
public class TypeSelector extends BaseExtendSelector { private String type = null ; public static final String TYPE_KEY = "type" ; public TypeSelector ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( "{typeselector<seq2seq4repair_space>type:<seq2seq4repair_space>" ) ; <END_BUG> buf . append ( type ) ; buf . append ( "}" ) ; return buf . toString ( ) ; } public void setType ( TypeSelector . FileType fileTypes ) { } public void setParameters ( Parameter [ ] parameters ) { } public void verifySettings ( ) { } public boolean isSelected ( File basedir , String filename , File file ) { } public static class FileType extends EnumeratedAttribute { public static final String FILE = "file" ; public static final String DIR = "dir" ; public String [ ] getValues ( ) { } } }

Fix:
StringBuilder buf = new StringBuilder ( "{typeselector<seq2seq4repair_space>type:<seq2seq4repair_space>" ) ;
Buggy code:
public class Snippet94 { public static void main ( String [ ] args ) { <START_BUG> Display display = Display . getDefault ( ) ; <END_BUG> final Clipboard cb = new Clipboard ( display ) ; final Shell shell = new Shell ( display ) ; shell . setLayout ( new FormLayout ( ) ) ; final Text text = new Text ( shell , ( ( ( ( SWT . BORDER ) | ( SWT . MULTI ) ) | ( SWT . V_SCROLL ) ) | ( SWT . H_SCROLL ) ) ) ; Button copy = new Button ( shell , SWT . PUSH ) ; copy . setText ( "Copy" ) ; copy . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event e ) { String textData = text . getSelectionText ( ) ; TextTransfer textTransfer = TextTransfer . getInstance ( ) ; cb . setContents ( new Object [ ] { textData } , new Transfer [ ] { textTransfer } ) ; } } ) ; Button paste = new Button ( shell , SWT . PUSH ) ; paste . setText ( "Paste" ) ; paste . addListener ( Selection , new Listener ( ) { public void handleEvent ( Event e ) { TextTransfer transfer = TextTransfer . getInstance ( ) ; String data = ( ( String ) ( cb . getContents ( transfer ) ) ) ; if ( data != null ) { text . insert ( data ) ; } } } ) ; FormData data = new FormData ( ) ; data . right = new FormAttachment ( 100 , ( - 5 ) ) ; data . top = new FormAttachment ( 0 , 5 ) ; copy . setLayoutData ( data ) ; data = new FormData ( ) ; data . right = new FormAttachment ( 100 , ( - 5 ) ) ; data . top = new FormAttachment ( copy , 5 ) ; paste . setLayoutData ( data ) ; data = new FormData ( ) ; data . left = new FormAttachment ( 0 , 5 ) ; data . top = new FormAttachment ( 0 , 5 ) ; data . right = new FormAttachment ( copy , ( - 5 ) ) ; data . bottom = new FormAttachment ( 100 , ( - 5 ) ) ; text . setLayoutData ( data ) ; shell . setSize ( 200 , 200 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } cb . dispose ( ) ; display . dispose ( ) ; } }

Fix:
Display display = new Display ( ) ;
Buggy code:
public final class Job { private static final Logger log = LoggerFactory . getLogger ( Job . class ) ; private static final String CLUSTERED_POINTS_OUTPUT_DIRECTORY = "//clusteredPoints" ; private Job ( ) { } public static void main ( String [ ] args ) throws Exception { } private static void runJob ( String input , String output , String measureClassName , double t1 , double t2 , double convergenceDelta , int maxIterations ) throws IOException { JobClient client = new JobClient ( ) ; JobConf conf = new JobConf ( Job . class ) ; Path outPath = new Path ( output ) ; client . setConf ( conf ) ; FileSystem dfs = FileSystem . get ( outPath . toUri ( ) , conf ) ; if ( dfs . exists ( outPath ) ) { dfs . delete ( outPath , true ) ; } String directoryContainingConvertedInput = output + ( Constants . DIRECTORY_CONTAINING_CONVERTED_INPUT ) ; InputDriver . runJob ( input , directoryContainingConvertedInput ) ; <START_BUG> MeanShiftCanopyJob . runJob ( directoryContainingConvertedInput , ( output + "//meanshift" ) , measureClassName , t1 , t2 , convergenceDelta , maxIterations ) ; <END_BUG> FileStatus [ ] status = dfs . listStatus ( new Path ( ( output + "//meanshift" ) ) ) ; OutputDriver . runJob ( status [ ( ( status . length ) - 1 ) ] . getPath ( ) . toString ( ) , ( output + ( Job . CLUSTERED_POINTS_OUTPUT_DIRECTORY ) ) ) ; } }

Fix:
MeanShiftCanopyJob . runJob ( directoryContainingConvertedInput , ( output + "//meanshift" ) , measureClassName , t1 , t2 , convergenceDelta , maxIterations , true ) ;
Buggy code:
public final class KeySequence implements Comparable { private static final KeySequence EMPTY_KEY_SEQUENCE = new KeySequence ( Collections . EMPTY_LIST ) ; private static final int HASH_FACTOR = 89 ; private static final int HASH_INITIAL = KeySequence . class . getName ( ) . hashCode ( ) ; public static final String KEY_STROKE_DELIMITERS = ( KeyFormatter . KEY_STROKE_DELIMITER ) + "\b\r\f\n\t<seq2seq4repair_space>" ; public static KeySequence getInstance ( ) { } public static KeySequence getInstance ( KeySequence keySequence , KeyStroke keyStroke ) { } public static KeySequence getInstance ( KeyStroke keyStroke ) { } public static KeySequence getInstance ( KeyStroke [ ] keyStrokes ) { } public static KeySequence getInstance ( List keyStrokes ) { } public static KeySequence getInstance ( String string ) throws ParseException { } private transient int hashCode ; private transient boolean hashCodeComputed ; private List keyStrokes ; private KeySequence ( List keyStrokes ) { } public int compareTo ( Object object ) { } public boolean equals ( Object object ) { } public String format ( ) { <START_BUG> return format ( XEMACS ) ; <END_BUG> } public String format ( int format ) { } public List getKeyStrokes ( ) { } public int hashCode ( ) { } public boolean isComplete ( ) { } public boolean isEmpty ( ) { } public boolean startsWith ( KeySequence keySequence , boolean equals ) { } public String toString ( ) { } }

Fix:
return format ( NATIVE ) ;
Buggy code:
public class AndroidLauncher extends AndroidApplication { @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; AndroidApplicationConfiguration config = new AndroidApplicationConfiguration ( ) ; String version ; try { version = getPackageManager ( ) . getPackageInfo ( getPackageName ( ) , 0 ) . versionName ; } catch ( PackageManager e ) { version = "???" ; } <START_BUG> initialize ( new PixelDungeon ( new com . watabou . utils . PDPlatformSupport < com . watabou . pixeldungeon . input . GameAction > ( version , "Documents//pixeldungeon.cn//saves//" , new AndroidInputProcessor ( ) ) ) , config ) ; <END_BUG> } }

Fix:
initialize ( new PixelDungeon ( new com . watabou . utils . PDPlatformSupport < com . watabou . pixeldungeon . input . GameAction > ( version , "Documents//pixeldungeon.cn//saves//" , new AndroidInputProcessor ( this ) ) ) , config ) ;
Buggy code:
public class EjbCorbaServant extends Servant implements LocalIIOPInvoker , InvokeHandler { private static final Logger logger = Logger . getLogger ( EjbCorbaServant . class ) ; private final ComponentView componentView ; private final ORB orb ; private final Current poaCurrent ; private final Map < String , SkeletonStrategy > methodInvokerMap ; private final String [ ] repositoryIds ; private final InterfaceDef interfaceDef ; private final String securityDomain ; private final boolean home ; private volatile HomeHandle homeHandle = null ; private volatile EJBMetaData ejbMetaData ; private final SASCurrent sasCurrent ; private final InboundTransactionCurrent inboundTxCurrent ; private final TransactionManager transactionManager ; private final MarshallerFactory factory ; private final MarshallingConfiguration configuration ; private final ClassLoader classLoader ; public EjbCorbaServant ( final Current poaCurrent , final Map < String , SkeletonStrategy > methodInvokerMap , final String [ ] repositoryIds , final InterfaceDef interfaceDef , final ORB orb , final ComponentView componentView , final MarshallerFactory factory , final MarshallingConfiguration configuration , final TransactionManager transactionManager , final ClassLoader classLoader , final boolean home , final String securityDomain ) { } public Object _get_interface_def ( ) { } public String [ ] _all_interfaces ( POA poa , byte [ ] objectId ) { } public OutputStream _invoke ( final String opName , final InputStream in , final ResponseHandler handler ) { } private void prepareInterceptorContext ( final SkeletonStrategy op , final Object [ ] params , final InterceptorContext interceptorContext ) throws IOException , ClassNotFoundException { if ( ! ( home ) ) { if ( ( componentView . getComponent ( ) ) instanceof StatefulSessionComponent ) { final SessionID sessionID = ( ( SessionID ) ( unmarshalIdentifier ( ) ) ) ; <START_BUG> interceptorContext . putPrivateData ( SESSION_ID_KEY , sessionID ) ; <END_BUG> } else if ( ( componentView . getComponent ( ) ) instanceof EntityBeanComponent ) { final Object pk = unmarshalIdentifier ( ) ; interceptorContext . putPrivateData ( PRIMARY_KEY_CONTEXT_KEY , pk ) ; } } interceptorContext . setContextData ( new HashMap < String , Object > ( ) ) ; interceptorContext . setParameters ( params ) ; interceptorContext . setMethod ( op . getMethod ( ) ) ; interceptorContext . putPrivateData ( ComponentView . class , componentView ) ; interceptorContext . putPrivateData ( Component . class , componentView . getComponent ( ) ) ; } private boolean handleIsIdentical ( final Object val ) { } private Object unmarshalIdentifier ( ) throws IOException , ClassNotFoundException { } public Object invoke ( String opName , Object [ ] arguments , Transaction tx , Principal identity , Object credential ) throws Exception { } public void setHomeHandle ( final HomeHandle homeHandle ) { } public void setEjbMetaData ( final EJBMetaData ejbMetaData ) { } }

Fix:
interceptorContext . putPrivateData ( SessionID . class , sessionID ) ;
Buggy code:
public class SelectionOnQualifiedSuperReference extends QualifiedSuperReference { public SelectionOnQualifiedSuperReference ( TypeReference name , int pos , int sourceEnd ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { TypeBinding binding = super . resolveType ( scope ) ; if ( ( binding == null ) || ( ! ( binding . isValidBinding ( ) ) ) ) throw new SelectionNodeFound ( ) ; else <START_BUG> throw new SelectionNodeFound ( binding ) ; <END_BUG> } }

Fix:
throw new SelectionNodeFound ( this , binding ) ;
Buggy code:
public class BlockedJobsDialog extends IconAndMessageDialog { protected static BlockedJobsDialog singleton ; private NewProgressViewer viewer ; private String blockedTaskName = null ; private Job blockingJob ; private Button cancelSelected ; private Cursor arrowCursor ; private Cursor waitCursor ; private IProgressMonitor blockingMonitor ; private JobTreeElement blockedElement = new BlockedJobsDialog . BlockedUIElement ( ) ; private class BlockedUIElement extends JobTreeElement { Object [ ] getChildren ( ) { } String getDisplayString ( ) { } public Image getDisplayImage ( ) { } Object getParent ( ) { } boolean hasChildren ( ) { } boolean isActive ( ) { } boolean isJobInfo ( ) { } public void cancel ( ) { } public boolean isCancellable ( ) { } } public static BlockedJobsDialog createBlockedDialog ( Shell parentShell , IProgressMonitor blockedMonitor , IStatus reason , String taskName ) { if ( ( BlockedJobsDialog . singleton ) != null ) return BlockedJobsDialog . singleton ; BlockedJobsDialog . singleton = new BlockedJobsDialog ( parentShell , blockedMonitor , reason ) ; if ( taskName == null ) { if ( ( BlockedJobsDialog . singleton . getParentShell ( ) ) != null ) BlockedJobsDialog . singleton . setBlockedTaskName ( BlockedJobsDialog . singleton . getParentShell ( ) . getText ( ) ) ; } else BlockedJobsDialog . singleton . setBlockedTaskName ( taskName ) ; if ( parentShell == null ) { WorkbenchJob dialogJob = new WorkbenchJob ( WorkbenchMessages . getString ( "EventLoopProgressMonitor.OpenDialogJobName" ) ) { public IStatus runInUIThread ( IProgressMonitor monitor ) { if ( ( BlockedJobsDialog . singleton ) == null ) return Status . CANCEL_STATUS ; <START_BUG> if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this , null ) ) <END_BUG> return Status . CANCEL_STATUS ; BlockedJobsDialog . singleton . open ( ) ; return Status . OK_STATUS ; } } ; dialogJob . setSystem ( true ) ; dialogJob . schedule ( PlatformUI . getWorkbench ( ) . getProgressService ( ) . getLongOperationTime ( ) ) ; } else BlockedJobsDialog . singleton . open ( ) ; return BlockedJobsDialog . singleton ; } public static void clear ( IProgressMonitor monitor ) { } private BlockedJobsDialog ( Shell parentShell , IProgressMonitor blocking , IStatus blockingStatus ) { } protected Control createDialogArea ( Composite parent ) { } void showJobDetails ( Composite parent ) { } private ProgressTreeContentProvider getContentProvider ( ) { } private void clearCursors ( ) { } private void clearCursor ( Control control ) { } protected void configureShell ( Shell shell ) { } private void setMessage ( String messageString ) { } protected Image getImage ( ) { } public IProgressMonitor getProgressMonitor ( ) { } public boolean close ( IProgressMonitor monitor ) { } public boolean close ( ) { } protected Control createButtonBar ( Composite parent ) { } void setBlockedTaskName ( String taskName ) { } }

Fix:
if ( ProgressManagerUtil . rescheduleIfModalShellOpen ( this ) )
Buggy code:
public class POP3Server { private AccountItem accountItem ; private File file ; public POP3Protocol pop3Connection ; private boolean alreadyLoaded ; private POP3Store store ; protected POP3HeaderCache headerCache ; public POP3Server ( AccountItem accountItem ) { } public void save ( ) throws Exception { } public File getConfigFile ( ) { } public AccountItem getAccountItem ( ) { } public Folder getFolder ( ) { } public void logout ( ) throws Exception { } public void forceLogout ( ) throws Exception { } public List getUIDList ( int totalMessageCount ) throws Exception { } public List getMessageSizeList ( ) throws Exception { } protected boolean existsLocally ( Object uid , HeaderList list ) throws Exception { } protected boolean existsRemotely ( Object uid , List uidList ) throws Exception { } public List synchronize ( List newList ) throws Exception { } public void deleteMessages ( int [ ] indexes ) throws Exception { } public void deleteMessage ( int index ) throws Exception { } public int getMessageCount ( ) throws Exception { } public ColumbaMessage getMessage ( int index , Object uid ) throws Exception { ColumbaMessage message = getStore ( ) . fetchMessage ( index ) ; if ( message == null ) return null ; <START_BUG> ColumbaHeader header = ( ( ColumbaHeader ) ( message . getHeaderInterface ( ) ) ) ; <END_BUG> header . set ( "columba.pop3uid" , uid ) ; header . set ( "columba.flags.recent" , Boolean . TRUE ) ; String contentType = ( ( String ) ( header . get ( "Content-Type" ) ) ) ; if ( contentType != null ) { if ( ( contentType . indexOf ( "multipart" ) ) != ( - 1 ) ) header . set ( "columba.attachment" , Boolean . TRUE ) ; else header . set ( "columba.attachment" , Boolean . FALSE ) ; } headerCache . getHeaderList ( ) . add ( header , uid ) ; return message ; } public String getFolderName ( ) { } public POP3Store getStore ( ) { } public StatusObservable getObservable ( ) { } }

Fix:
ColumbaHeader header = ( ( ColumbaHeader ) ( message . getHeader ( ) ) ) ;
Buggy code:
public class DailyRollingFileAppender extends FileAppender { static final int TOP_OF_TROUBLE = - 1 ; static final int TOP_OF_MINUTE = 0 ; static final int TOP_OF_HOUR = 1 ; static final int HALF_DAY = 2 ; static final int TOP_OF_DAY = 3 ; static final int TOP_OF_WEEK = 4 ; static final int TOP_OF_MONTH = 5 ; private String datePattern = "'.'yyyy-MM-dd" ; private String scheduledFilename ; private long nextCheck = ( System . currentTimeMillis ( ) ) - 1 ; Date now = new Date ( ) ; SimpleDateFormat sdf ; RollingCalendar rc = new RollingCalendar ( ) ; int checkPeriod = DailyRollingFileAppender . TOP_OF_TROUBLE ; public DailyRollingFileAppender ( ) { } public DailyRollingFileAppender ( Layout layout , String filename , String datePattern ) throws IOException { } public void setDatePattern ( String pattern ) { } public String getDatePattern ( ) { } public void activateOptions ( ) { } void printPeriodicity ( int type ) { } int computeCheckPeriod ( ) { } void rollOver ( ) throws IOException { if ( ( datePattern ) == null ) { errorHandler . error ( "Missing<seq2seq4repair_space>DatePattern<seq2seq4repair_space>option<seq2seq4repair_space>in<seq2seq4repair_space>rollOver()." ) ; return ; } String datedFilename = ( fileName ) + ( sdf . format ( now ) ) ; if ( scheduledFilename . equals ( datedFilename ) ) { return ; } this . closeFile ( ) ; File target = new File ( scheduledFilename ) ; if ( target . exists ( ) ) { target . delete ( ) ; } File file = new File ( fileName ) ; file . renameTo ( target ) ; LogLog . debug ( ( ( ( fileName ) + "<seq2seq4repair_space>-><seq2seq4repair_space>" ) + ( scheduledFilename ) ) ) ; try { <START_BUG> this . setFile ( fileName , false ) ; <END_BUG> } catch ( IOException e ) { errorHandler . error ( ( ( "setFile(" + ( fileName ) ) + ",<seq2seq4repair_space>false)<seq2seq4repair_space>call<seq2seq4repair_space>failed." ) ) ; } scheduledFilename = datedFilename ; } protected void subAppend ( LoggingEvent event ) { } }

Fix:
this . setFile ( fileName , false , this . bufferedIO , this . bufferSize ) ;
Buggy code:
public class Snippet73 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; final Tree tree = new Tree ( shell , ( ( SWT . BORDER ) | ( SWT . MULTI ) ) ) ; final Menu menu = new Menu ( shell , SWT . POP_UP ) ; tree . setMenu ( menu ) ; for ( int i = 0 ; i < 12 ; i ++ ) { <START_BUG> TreeItem treeItem = new TreeItem ( tree , SWT . NULL ) ; <END_BUG> treeItem . setText ( ( "Item<seq2seq4repair_space>" + i ) ) ; MenuItem menuItem = new MenuItem ( menu , SWT . PUSH ) ; menuItem . setText ( treeItem . getText ( ) ) ; } menu . addListener ( Show , new Listener ( ) { public void handleEvent ( Event event ) { MenuItem [ ] menuItems = menu . getItems ( ) ; TreeItem [ ] treeItems = tree . getSelection ( ) ; for ( int i = 0 ; i < ( menuItems . length ) ; i ++ ) { String text = menuItems [ i ] . getText ( ) ; int index = 0 ; while ( index < ( treeItems . length ) ) { if ( treeItems [ index ] . getText ( ) . equals ( text ) ) break ; index ++ ; } menuItems [ i ] . setEnabled ( ( index != ( treeItems . length ) ) ) ; } } } ) ; tree . setSize ( 200 , 200 ) ; shell . setSize ( 300 , 300 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
TreeItem treeItem = new TreeItem ( tree , SWT . NONE ) ;
Buggy code:
public class DashboardFragment extends Fragment { private View parentView ; private ExpandableListAdapter listAdapter ; private ExpandableListView expListView ; private TextView listItem ; private List < String > listDataHeader ; private HashMap < String , List < String > > listDataChild ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { parentView = inflater . inflate ( fragment_dashboard , container , false ) ; CRUDFlinger . setApplication ( getActivity ( ) . getApplication ( ) ) ; for ( Area area : CRUDFlinger . getAreas ( ) ) { for ( Household household : area . getResources ( ) ) { } } expListView = ( ( ExpandableListView ) ( parentView . findViewById ( lvExp ) ) ) ; listItem = ( ( TextView ) ( parentView . findViewById ( lblListItem ) ) ) ; expListView . setOnChildClickListener ( new ExpandableListView . OnChildClickListener ( ) { @ Override public boolean onChildClick ( ExpandableListView parent , View v , int groupPosition , int childPosition , long id ) { if ( ( CRUDFlinger . getAreas ( ) ) == null ) { Intent goToLogin = new Intent ( getActivity ( ) . getBaseContext ( ) , Login . class ) ; startActivity ( goToLogin ) ; } else { Toast . makeText ( parentView . getContext ( ) , ( ( ( listDataHeader . get ( groupPosition ) ) + "<seq2seq4repair_space>:<seq2seq4repair_space>" ) + ( listDataChild . get ( listDataHeader . get ( groupPosition ) ) . get ( childPosition ) ) ) , LENGTH_SHORT ) . show ( ) ; <START_BUG> AreasFragment goToHouse = new AreasFragment ( ) ; <END_BUG> Bundle args = new Bundle ( ) ; args . putInt ( "Area<seq2seq4repair_space>Index" , groupPosition ) ; args . putInt ( "Household<seq2seq4repair_space>Id" , childPosition ) ; goToHouse . setArguments ( args ) ; getFragmentManager ( ) . beginTransaction ( ) . replace ( main_fragment , goToHouse , "household" ) . setTransition ( TRANSIT_FRAGMENT_OPEN ) . addToBackStack ( null ) . commit ( ) ; } return false ; } } ) ; try { prepareListData ( ) ; } catch ( JSONException e ) { } System . out . println ( ( "After<seq2seq4repair_space>Preparing..." + ( listDataChild . get ( "Juja" ) ) ) ) ; listAdapter = new ExpandableListAdapter ( parentView . getContext ( ) , listDataHeader , listDataChild ) ; expListView . setAdapter ( listAdapter ) ; return parentView ; } private void prepareListData ( ) throws JSONException { } }

Fix:
MemberFragment goToHouse = new MemberFragment ( ) ;
Buggy code:
public class DefaultJavascriptCompressor implements IJavascriptCompressor { public String compress ( String original ) { <START_BUG> return JavascriptStripper . stripCommentsAndWhitespace ( original ) ; <END_BUG> } }

Fix:
return new JavascriptStripper ( ) . stripCommentsAndWhitespace ( original ) ;
Buggy code:
public class AddAnnotationToTypeTest extends AbstractAnnotationTest { @ Override public String getPackageName ( ) { } @ Override public String getClassName ( ) { } @ Override public String getClassContents ( ) { } @ Override public Annotation getAnnotation ( ) { } public void testAddAnnotationToType ( ) { try { assertNotNull ( annotation ) ; assertEquals ( WebService . class . getSimpleName ( ) , AnnotationUtils . getAnnotationName ( annotation ) ) ; <START_BUG> textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( source . findPrimaryType ( ) , WebService . class ) ) ; <END_BUG> textFileChange . addEdit ( AnnotationUtils . createAddAnnotationTextEdit ( source . findPrimaryType ( ) , annotation ) ) ; assertTrue ( executeChange ( new NullProgressMonitor ( ) , textFileChange ) ) ; assertTrue ( AnnotationUtils . isAnnotationPresent ( source , AnnotationUtils . getAnnotationName ( annotation ) ) ) ; assertTrue ( source . getImport ( WebService . class . getCanonicalName ( ) ) . exists ( ) ) ; } catch ( CoreException ce ) { fail ( ce . getLocalizedMessage ( ) ) ; } } }

Fix:
textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( source . findPrimaryType ( ) , WebService . class . getCanonicalName ( ) ) ) ;
Buggy code:
public class SplashActivity extends Activity { @ Override protected void onCreate ( Bundle savedInstanceState ) { } public boolean isThereLoginInstance ( ) { } public void updateUserData ( ) { int id = SharedPreferencesManager . getIntegerValue ( USER_ID ) ; String email = SharedPreferencesManager . getStringValue ( USER_EMAIL ) ; String name = SharedPreferencesManager . getStringValue ( USER_NAME ) ; String gender = SharedPreferencesManager . getStringValue ( USER_GENDER ) ; String birthday = SharedPreferencesManager . getStringValue ( USER_BIRTHDAY ) ; <START_BUG> User . setUserData ( id , email , name , gender , birthday , null ) ; <END_BUG> } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
User . setUserData ( id , email , name , gender , birthday ) ;
Buggy code:
public class TestKeepWordFilter extends BaseTokenStreamTestCase { public void testStopAndGo ( ) throws Exception { } public void testRandomStrings ( ) throws Exception { final Set < String > words = new HashSet < String > ( ) ; words . add ( "a" ) ; words . add ( "b" ) ; Analyzer a = new Analyzer ( ) { @ Override protected TokenStreamComponents createComponents ( String fieldName , Reader reader ) { Tokenizer tokenizer = new MockTokenizer ( reader , MockTokenizer . WHITESPACE , false ) ; TokenStream stream = new KeepWordFilter ( true , tokenizer , new org . apache . lucene . analysis . util . CharArraySet ( TEST_VERSION_CURRENT , words , true ) ) ; return new TokenStreamComponents ( tokenizer , stream ) ; } } ; <START_BUG> checkRandomData ( random ( ) , a , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , a , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class ChatSessionWindow extends JFrame implements ActionListener { private JTextPane displayPane ; private JTextArea editorPane ; private JButton sendButton ; private JButton disconnectButton ; private ChatSession chatSession ; private JButton colorChooserButton ; private JButton kickUser ; private JButton sendFileButton ; private JButton requestKeyButton ; private JButton encryptionChooserButton ; private JComboBox encryptionChooser ; private JComboBox userChooser ; public ChatSessionWindow ( ChatSession session ) { } public void printMessage ( ChatMessage message ) { } public void printNotification ( String errorMessage ) { } @ Override public void actionPerformed ( ActionEvent e ) { if ( ( ( e . getSource ( ) ) == ( sendButton ) ) & ( ! ( editorPane . getText ( ) . equals ( "" ) ) ) ) { ChatMessage myMessage = chatSession . inputToChatMessage ( chatSession . getUserName ( ) , chatSession . getMessageColor ( ) , editorPane . getText ( ) ) ; this . printMessage ( myMessage ) ; if ( ! ( chatSession . getConnectionList ( ) . isEmpty ( ) ) ) { chatSession . sendMessageToAll ( myMessage ) ; } editorPane . setText ( "" ) ; } if ( ( e . getSource ( ) ) == ( colorChooserButton ) ) { Color newColor = JColorChooser . showDialog ( this , "Choose<seq2seq4repair_space>Text<seq2seq4repair_space>Color" , chatSession . getMessageColor ( ) ) ; if ( newColor != null ) { chatSession . setMessageColor ( newColor ) ; } } if ( ( e . getSource ( ) ) == ( disconnectButton ) ) { if ( ( ! ( chatSession . getConnectionList ( ) . isEmpty ( ) ) ) & ( chatSession . connected ) ) { chatSession . disconnectFromSession ( ) ; } this . dispose ( ) ; } if ( ( e . getSource ( ) ) == ( kickUser ) ) { if ( ! ( chatSession . getConnectionList ( ) . isEmpty ( ) ) ) { ChatConnection connection = ( ( ChatConnection ) ( userChooser . getSelectedItem ( ) ) ) ; chatSession . sendMessageToAll ( new ChatMessage ( chatSession . getUserName ( ) , new Color ( 255 , 0 , 0 ) , ( "has<seq2seq4repair_space>KICKED<seq2seq4repair_space>user<seq2seq4repair_space>" + ( connection . getConnectedUserName ( ) ) ) , "message" ) ) ; connection . killConnection ( ) ; } } if ( ( e . getSource ( ) ) == ( sendFileButton ) ) { new ChatFileTransferSendWindow ( ( ( ChatConnection ) ( userChooser . getSelectedItem ( ) ) ) ) ; } if ( ( e . getSource ( ) ) == ( encryptionChooserButton ) ) { chatSession . setSessionEncryption ( encryptionChooser . getSelectedItem ( ) . toString ( ) ) ; } if ( ( e . getSource ( ) ) == ( requestKeyButton ) ) { ChatConnection chosenConnection = ( ( ChatConnection ) ( userChooser . getSelectedItem ( ) ) ) ; <START_BUG> new ChatKeyRequestWindow ( chosenConnection ) ; <END_BUG> } } }

Fix:
chosenConnection . openKeyRequestWindow ( ) ;
Buggy code:
public class BriefJUnitResultFormatter implements JUnitResultFormatter { private static final double ONE_SECOND = 1000.0 ; private OutputStream out ; private BufferedWriter output ; private StringWriter results ; private BufferedWriter resultWriter ; private NumberFormat numberFormat = NumberFormat . getInstance ( ) ; private String systemOutput = null ; private String systemError = null ; public BriefJUnitResultFormatter ( ) { } public void setOutput ( OutputStream out ) { } public void setSystemOutput ( String out ) { } public void setSystemError ( String err ) { } public void startTestSuite ( JUnitTest suite ) { } public void endTestSuite ( JUnitTest suite ) { } public void startTest ( Test test ) { } public void endTest ( Test test ) { } public void addFailure ( Test test , Throwable t ) { } public void addFailure ( Test test , AssertionFailedError t ) { } public void addError ( Test test , Throwable error ) { } protected String formatTest ( Test test ) { } protected synchronized void formatError ( String type , Test test , Throwable error ) { if ( test != null ) { endTest ( test ) ; } try { resultWriter . write ( ( ( formatTest ( test ) ) + type ) ) ; resultWriter . newLine ( ) ; <START_BUG> resultWriter . write ( error . getMessage ( ) ) ; <END_BUG> resultWriter . newLine ( ) ; String strace = JUnitTestRunner . getFilteredTrace ( error ) ; resultWriter . write ( strace ) ; resultWriter . newLine ( ) ; resultWriter . newLine ( ) ; } catch ( IOException ex ) { throw new BuildException ( ex ) ; } } }

Fix:
resultWriter . write ( String . valueOf ( error . getMessage ( ) ) ) ;
Buggy code:
public class FileUtilities { public static final String TAG = FileUtilities . class . getSimpleName ( ) ; public static File getFileDirectory ( Context context ) { } public static void logResults ( Context context , String classTag , String messageResult ) { } public static boolean isExternalStorageAvailable ( ) { } public static String getSubdirectoryName ( Context context ) { } public static File getSharedExternalDirectory ( Context context ) { } public static File getCachedDirectory ( ) { } public static List < File > getPostedImages ( Context context ) { } public static List < File > getCachedImages ( ) { } public static void deleteCachedImages ( ) { } public static void deletePostedImages ( Context context ) { } public static boolean deleteImage ( Uri deleteUri ) { } public static void copyFile ( String src , String dst ) throws IOException { } public static void copyImage ( Context context , String path , int numCopies ) throws IOException { } public static void saveImageForSharing ( Context context , String imagePath ) throws IOException { } public static File savePostedImage ( Context context ) { } public static File saveCachedImage ( Context context ) { } private static String getImageFileName ( ) { } public static String createCachedFileName ( String uniqueId ) { } public static String getSimpleName ( String absolutePath ) { } public static Bitmap getValidSizedBitmap ( ContentResolver cr , Uri mImageUri ) { } public static Bitmap getThumbnailSizedBitmap ( ContentResolver cr , Uri mImageUri ) { } public static Bitmap getXYCompressedBitmap ( ContentResolver cr , Uri mImageUri , int x , int y ) { } public static String getUniqueId ( String filename ) { <START_BUG> return filename . substring ( 5 , ( ( filename . length ( ) ) - 4 ) ) ; <END_BUG> } }

Fix:
return filename . substring ( 4 , ( ( filename . length ( ) ) - 4 ) ) ;
Buggy code:
public class RealNaiveMHSampler extends MHSampler < Real > { @ Override public void propose ( Random random , Callback callback ) { final double oldValue = variable . get ( ) ; callback . setProposalLogRatio ( 0.0 ) ; <START_BUG> variable . set ( ( oldValue + ( ( random . nextGaussian ( ) ) * ( random . nextGaussian ( ) ) ) ) ) ; <END_BUG> if ( ! ( callback . sampleAcceptance ( ) ) ) variable . set ( oldValue ) ; } }

Fix:
variable . set ( ( oldValue + ( random . nextGaussian ( ) ) ) ) ;
Buggy code:
class StressCategory { static Level [ ] level = new Level [ ] { Level . DEBUG , Level . INFO , Level . WARN , Level . ERROR , Level . FATAL } ; static Level defaultLevel = Category . getRoot ( ) . getLevel ( ) ; static int LENGTH ; static String [ ] names ; static Category [ ] cat ; static StressCategory . CT [ ] ct ; static Random random = new Random ( 10 ) ; public static void main ( String [ ] args ) { } static void permute ( int n ) { } static void swap ( String [ ] names , int i , int j ) { } public static void permutationDump ( ) { } static void createLoop ( int n ) { if ( n == ( StressCategory . LENGTH ) ) { for ( int i = 0 ; i < ( StressCategory . LENGTH ) ; i ++ ) { if ( ( StressCategory . ct [ i ] ) == null ) StressCategory . cat [ i ] = null ; else { StressCategory . cat [ i ] = Category . getInstance ( StressCategory . ct [ i ] . catstr ) ; StressCategory . cat [ i ] . setLevel ( StressCategory . ct [ i ] . level ) ; } } StressCategory . test ( ) ; <START_BUG> defaultHierarchy . clear ( ) ; <END_BUG> } else { StressCategory . ct [ n ] = null ; StressCategory . createLoop ( ( n + 1 ) ) ; StressCategory . ct [ n ] = new StressCategory . CT ( StressCategory . names [ n ] , null ) ; StressCategory . createLoop ( ( n + 1 ) ) ; int r = StressCategory . random . nextInt ( ) ; if ( r < 0 ) r = - r ; StressCategory . ct [ n ] = new StressCategory . CT ( StressCategory . names [ n ] , StressCategory . level [ ( r % 5 ) ] ) ; StressCategory . createLoop ( ( n + 1 ) ) ; } } static void test ( ) { } static void ctDump ( ) { } static void catDump ( ) { } static boolean checkCorrectness ( int i ) { } static Level getExpectedPrioriy ( StressCategory . CT ctParam ) { } static class CT { public String catstr ; public Level level ; CT ( String catstr , Level level ) { } } }

Fix:
LogManager . getLoggerRepository ( ) . clear ( ) ;
Buggy code:
public class WebPage extends Page { private static final long serialVersionUID = 1L ; private BodyContainer bodyContainer ; protected WebPage ( ) { } protected WebPage ( final IModel model ) { } protected WebPage ( final PageMap pageMap ) { } protected WebPage ( final PageMap pageMap , final IModel model ) { } protected WebPage ( final PageParameters parameters ) { } public BodyContainer getBodyContainer ( ) { } public String getMarkupType ( ) { } protected void configureResponse ( ) { } protected final WebRequestCycle getWebRequestCycle ( ) { } protected final BookmarkablePageLink homePageLink ( final String id ) { } private void commonInit ( ) { MarkupStream markupStream = getAssociatedMarkupStream ( false ) ; if ( markupStream != null ) { while ( markupStream . hasMore ( ) ) { final MarkupElement element = markupStream . next ( ) ; if ( element instanceof ComponentTag ) { final ComponentTag tag = ( ( ComponentTag ) ( element ) ) ; <START_BUG> if ( ( ( tag . isOpen ( ) ) && ( "body" . equals ( tag . getName ( ) ) ) ) && ( ( tag . getNamespace ( ) ) == null ) ) { <END_BUG> if ( BODY_ID . equals ( tag . getId ( ) ) ) { add ( new HtmlBodyContainer ( ) ) ; } bodyContainer = new BodyContainer ( this , tag . getId ( ) ) ; break ; } } } } } }

Fix:
if ( ( ( tag . isOpen ( ) ) && ( "body" . equalsIgnoreCase ( tag . getName ( ) ) ) ) && ( ( tag . getNamespace ( ) ) == null ) ) {
Buggy code:
public class Main { private List < String > seeds ; private Setting settings ; private String path ; private List < String > output ; private String outputInfo ; private List < String > zipPath ; public static boolean diskusia ; public static ResourceBundle getResourceBundle ( ) { } public void setSeeds ( List < String > seeds ) { } public List < String > getSeeds ( ) { } public Setting getSettings ( ) { } public String getOutputInfo ( ) { } public List < String > getZipPath ( ) { zipPath = new ArrayList < > ( ) ; TravelDirectory travelDirectory = new TravelDirectory ( path ) ; List < String > directories = travelDirectory . getDirectories ( ) ; for ( String p : directories ) { if ( new File ( ( p + "author.zip" ) ) . exists ( ) ) { String authorPath = p + "author.zip" ; <START_BUG> zipPath . add ( ( ( ( ( "<a<seq2seq4repair_space>href=\"//getfile?name=" + authorPath ) + "\"><seq2seq4repair_space>" ) + ( authorPath . substring ( ( ( authorPath . indexOf ( "//" ) ) + 1 ) , authorPath . lastIndexOf ( "//" ) ) . replace ( "//" , "." ) ) ) + ".zip<//a>" ) ) ; <END_BUG> } } return zipPath ; } public void setSettings ( Setting settings ) { } public Main ( ) { } public void clean ( ) { } public void crawlWithoutClean ( boolean disc ) throws Exception { } public void crawl ( boolean disc ) throws Exception { } public void analyze ( boolean disc ) throws Exception { } public void start ( boolean disc ) throws Exception { } private String findLink ( File f ) throws Exception { } public List < String > getOutput ( ) throws Exception { } private static boolean validateUrl ( String value ) { } public List < String > getCorpusFiles ( ) throws Exception { } public String viewXML ( String path ) { } public static void main ( String [ ] args ) throws Exception { } }

Fix:
zipPath . add ( ( ( ( ( "<a<seq2seq4repair_space>href=\"getfile?name=" + authorPath ) + "\"><seq2seq4repair_space>" ) + ( authorPath . substring ( ( ( authorPath . indexOf ( "//" ) ) + 1 ) , authorPath . lastIndexOf ( "//" ) ) . replace ( "//" , "." ) ) ) + ".zip<//a>" ) ) ;
Buggy code:
public class ResponseFromServer { private SuperMarket mSuperMarket ; private float mTotal ; private static List < ProductToSend > listSh ; private float mDistance ; private static String toParse ; private static List < ResponseFromServer > offers ; private static ResponseFromServer responseOffers ; private static SuperMarket superMarket ; private static List < ProductToSend > lip ; public ResponseFromServer ( List < ProductToSend > list , SuperMarket supermarket , float total , float distance ) { } public SuperMarket getSuperMarket ( ) { } public float getDistance ( ) { } public float getTotal ( ) { } public List < ProductToSend > getList ( ) { } public void setList ( List < ProductToSend > list ) { } public static List < ResponseFromServer > parseJSONResult ( String result ) { } public static float round ( float value , int places ) { } public static List < ProductToSend > getParsing ( JSONArray listShopping ) { List < ProductToSend > lit = new ArrayList < ProductToSend > ( ) ; try { for ( int j = 0 ; j < ( listShopping . length ( ) ) ; j ++ ) { ProductToSend p ; JSONObject jb2 = listShopping . getJSONObject ( j ) ; String name = jb2 . getString ( "name" ) ; String unit = jb2 . getString ( "unit" ) ; <START_BUG> String initQuantity = jb2 . getString ( "init_quantity" ) ; <END_BUG> String price = jb2 . getString ( "price" ) ; String product_positionx = jb2 . getString ( "product_positionx" ) ; String product_positiony = jb2 . getString ( "product_positiony" ) ; p = new ProductToSend ( name , name , Integer . parseInt ( initQuantity ) , unit , Float . parseFloat ( product_positionx ) , Float . parseFloat ( product_positiony ) , ResponseFromServer . round ( Float . parseFloat ( price ) , 2 ) , false ) ; lit . add ( p ) ; } } catch ( JSONException e ) { e . printStackTrace ( ) ; } return lit ; } }

Fix:
String initQuantity = jb2 . getString ( "quantity" ) ;
Buggy code:
public class CheckRegionTask implements Runnable { private final transient Server server ; private final RegionManager regionManager ; public CheckRegionTask ( Server server , RegionManager regionManager ) { } @ Override public void run ( ) { ArrayList < Location > regionsToDestroy = null ; Map < Location , Region > liveRegions = regionManager . getRegions ( ) ; for ( Iterator < Location > locations = liveRegions . keySet ( ) . iterator ( ) ; locations . hasNext ( ) ; ) { Location l = locations . next ( ) ; Region currentRegion = liveRegions . get ( l ) ; RegionType currentRegionType = regionManager . getRegionType ( currentRegion . getType ( ) ) ; int radius = currentRegionType . getRadius ( ) ; for ( Player p : server . getOnlinePlayers ( ) ) { Location loc = p . getLocation ( ) ; <START_BUG> if ( ( Math . sqrt ( loc . distanceSquared ( l ) ) ) < radius ) { <END_BUG> PlayerInRegionEvent pIREvent = new PlayerInRegionEvent ( currentRegion . getLocation ( ) , p , currentRegionType . getEffects ( ) ) ; server . getPluginManager ( ) . callEvent ( pIREvent ) ; ArrayList < Location > localRegions = pIREvent . getRegionsToDestroy ( ) ; if ( ( localRegions != null ) && ( ! ( localRegions . isEmpty ( ) ) ) ) { if ( regionsToDestroy == null ) { regionsToDestroy = localRegions ; } else { for ( Location lo : localRegions ) { regionsToDestroy . add ( lo ) ; } } } } } if ( ( Math . random ( ) ) < ( currentRegionType . getUpkeepChance ( ) ) ) { UpkeepEvent uEvent = new UpkeepEvent ( l ) ; server . getPluginManager ( ) . callEvent ( uEvent ) ; ArrayList < Location > localRegions = uEvent . getRegionsToDestroy ( ) ; if ( ( localRegions != null ) && ( ! ( localRegions . isEmpty ( ) ) ) ) { if ( regionsToDestroy == null ) { regionsToDestroy = localRegions ; } else { for ( Location lo : localRegions ) { regionsToDestroy . add ( lo ) ; } } } } } if ( regionsToDestroy != null ) { for ( Location lo : regionsToDestroy ) { regionManager . removeRegion ( lo ) ; } } } }

Fix:
if ( ( loc . getWorld ( ) . getName ( ) . equals ( l . getWorld ( ) . getName ( ) ) ) && ( ( Math . sqrt ( loc . distanceSquared ( l ) ) ) < radius ) ) {
Buggy code:
public class ModClusterListProxies implements OperationStepHandler , DescriptionProvider { static final ModClusterListProxies INSTANCE = new ModClusterListProxies ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { <START_BUG> if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { <END_BUG> context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( NAME ) ; ModCluster modcluster = ( ( ModCluster ) ( controller . getValue ( ) ) ) ; Map < InetSocketAddress , String > map = modcluster . getProxyInfo ( ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "Mod_cluster<seq2seq4repair_space>ListProxies<seq2seq4repair_space>%s" , map ) ; if ( ! ( map . isEmpty ( ) ) ) { final ModelNode result = new ModelNode ( ) ; Object [ ] addr = map . keySet ( ) . toArray ( ) ; for ( int i = 0 ; i < ( addr . length ) ; i ++ ) { InetSocketAddress address = ( ( InetSocketAddress ) ( addr [ i ] ) ) ; result . add ( ( ( ( address . getHostName ( ) ) + ":" ) + ( address . getPort ( ) ) ) ) ; } context . getResult ( ) . set ( result ) ; } context . completeStep ( ) ; } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
if ( context . getProcessType ( ) . isServer ( ) ) {
Buggy code:
public class GlobalModuleDependencyProcessor implements DeploymentUnitProcessor { private final ModelNode globalModules ; public GlobalModuleDependencyProcessor ( final ModelNode globalModules ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; if ( globalModules . isDefined ( ) ) { for ( final ModelNode module : globalModules . asList ( ) ) { final String name = module . get ( NAME ) . asString ( ) ; String slot = module . get ( SLOT ) . asString ( ) ; if ( slot == null ) { slot = "main" ; } final ModuleIdentifier identifier = ModuleIdentifier . create ( name , slot ) ; <START_BUG> moduleSpecification . addDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( Module . getBootModuleLoader ( ) , identifier , false , false , true ) ) ; <END_BUG> } } } @ Override public void undeploy ( final DeploymentUnit context ) { } }

Fix:
moduleSpecification . addSystemDependency ( new org . jboss . as . server . deployment . module . ModuleDependency ( Module . getBootModuleLoader ( ) , identifier , false , false , true ) ) ;
Buggy code:
public class BookmarkablePageRequestTarget implements IBookmarkablePageRequestTarget { private Page page ; private final Class pageClass ; private final String pageMapName ; private final PageParameters pageParameters ; public BookmarkablePageRequestTarget ( Class pageClass ) { } public BookmarkablePageRequestTarget ( Class pageClass , PageParameters pageParameters ) { } public BookmarkablePageRequestTarget ( String pageMapName , Class pageClass ) { } public BookmarkablePageRequestTarget ( String pageMapName , Class pageClass , PageParameters pageParameters ) { } public void detach ( RequestCycle requestCycle ) { } public boolean equals ( Object obj ) { } public final Page getPage ( ) { } public final Class getPageClass ( ) { } public final String getPageMapName ( ) { } public final PageParameters getPageParameters ( ) { } public int hashCode ( ) { } public void processEvents ( RequestCycle requestCycle ) { } public void respond ( RequestCycle requestCycle ) { if ( ( pageClass ) != null ) { if ( requestCycle . getRedirect ( ) ) { IRequestCycleProcessor processor = requestCycle . getProcessor ( ) ; <START_BUG> String redirectUrl = processor . getRequestCodingStrategy ( ) . encode ( requestCycle , this ) ; <END_BUG> requestCycle . getResponse ( ) . redirect ( redirectUrl ) ; } else { getPage ( requestCycle ) . renderPage ( ) ; } } } public Object getLock ( RequestCycle requestCycle ) { } public String toString ( ) { } protected Page newPage ( final Class pageClass , final RequestCycle requestCycle ) { } private final Page getPage ( RequestCycle requestCycle ) { } }

Fix:
String redirectUrl = processor . getRequestCodingStrategy ( ) . encode ( requestCycle , this ) . toString ( ) ;
Buggy code:
public class NewFieldTypeMunger extends ResolvedTypeMunger { public NewFieldTypeMunger ( ResolvedMember signature , Set superMethodsCalled , List typeVariableAliases ) { } public ResolvedMember getInitMethod ( UnresolvedType aspectType ) { } public void write ( DataOutputStream s ) throws IOException { } public static ResolvedTypeMunger readField ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public ResolvedMember getMatchingSyntheticMember ( Member member , ResolvedType aspectType ) { } public ResolvedTypeMunger parameterizedFor ( ResolvedType target ) { ResolvedType genericType = target ; if ( ( target . isRawType ( ) ) || ( target . isParameterizedType ( ) ) ) genericType = genericType . getGenericType ( ) ; ResolvedMember parameterizedSignature = null ; if ( target . isGenericType ( ) ) { TypeVariable [ ] vars = target . getTypeVariables ( ) ; UnresolvedTypeVariableReferenceType [ ] varRefs = new UnresolvedTypeVariableReferenceType [ vars . length ] ; for ( int i = 0 ; i < ( vars . length ) ; i ++ ) { varRefs [ i ] = new UnresolvedTypeVariableReferenceType ( vars [ i ] ) ; } parameterizedSignature = getSignature ( ) . parameterizedWith ( varRefs , genericType , true , typeVariableAliases ) ; } else { parameterizedSignature = getSignature ( ) . parameterizedWith ( target . getTypeParameters ( ) , genericType , target . isParameterizedType ( ) , typeVariableAliases ) ; } NewFieldTypeMunger nftm = new NewFieldTypeMunger ( parameterizedSignature , getSuperMethodsCalled ( ) , typeVariableAliases ) ; <START_BUG> nftm . setOriginalSignature ( getSignature ( ) ) ; <END_BUG> return nftm ; } }

Fix:
nftm . setDeclaredSignature ( getSignature ( ) ) ;
Buggy code:
public class FolderOptionsAction extends AbstractColumbaAction implements SelectionListener { public FolderOptionsAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( ( ( AbstractMailFrameController ) ( frameMediator ) ) . getTreeSelection ( ) ) ) ; AbstractFolder folder = r [ 0 ] . getFolder ( ) ; <START_BUG> new FolderOptionsDialog ( ( ( MessageFolder ) ( folder ) ) , ( ( AbstractMailFrameController ) ( frameMediator ) ) ) ; <END_BUG> } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
new FolderOptionsDialog ( ( ( MessageFolder ) ( folder ) ) , true , ( ( AbstractMailFrameController ) ( frameMediator ) ) ) ;