nus-yam/ex-repair huggingface dataset:
Buggy code:
public class AwardsFragment extends Fragment { public static final String TAG = "AwardsFragment" ; public static final String AWARD_PIN = "awardPin" ; private View mAwardsFragView ; private List < Award > mAwardList ; private CustomGrid mAdapter ; private ParseQuery < Award > currentQuery ; @ Nullable @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onDestroyView ( ) { } private void setUpGridView ( ) { } private ParseQuery < ParseObject > getBaseQuery ( ) { } private void getLatestParseData ( ) { } private void getLocalParseData ( ) { } private void getRemoteParseData ( ) { } private void processAwardsList ( List < ParseObject > awardsList ) { } public static class AwardDialog extends DialogFragment { View mProfile ; String mImageLocation ; String mTitle ; String mPrize ; String mSponsor ; String mWebsite ; String mDesc ; @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { AlertDialog . Builder builder = new AlertDialog . Builder ( getActivity ( ) ) ; LayoutInflater inflater = getActivity ( ) . getLayoutInflater ( ) ; mProfile = inflater . inflate ( award_dialog , null ) ; ImageView sponsorImage = ( ( ImageView ) ( mProfile . findViewById ( award_sponsor_pic ) ) ) ; if ( ( mImageLocation ) != null ) { Picasso . with ( getActivity ( ) ) . load ( mImageLocation ) . into ( sponsorImage ) ; } else { sponsorImage . setImageResource ( launcher_icon ) ; } TextView awardTitle = ( ( TextView ) ( mProfile . findViewById ( award_title ) ) ) ; awardTitle . setText ( mTitle ) ; TextView awardDesc = ( ( TextView ) ( mProfile . findViewById ( award_desc ) ) ) ; <START_BUG> if ( ( mDesc . length ( ) ) <= 0 ) { <END_BUG> awardDesc . setVisibility ( GONE ) ; } else { awardDesc . setText ( mDesc ) ; } TextView awardPrize = ( ( TextView ) ( mProfile . findViewById ( award_prize ) ) ) ; awardPrize . setText ( mPrize ) ; TextView awardWebsite = ( ( TextView ) ( mProfile . findViewById ( award_website ) ) ) ; if ( ( ( mWebsite ) != null ) && ( ( mWebsite . length ( ) ) > 0 ) ) { awardWebsite . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { Intent intent = new Intent ( Intent . ACTION_VIEW , Uri . parse ( mWebsite ) ) ; startActivity ( intent ) ; } } ) ; } else { awardWebsite . setVisibility ( INVISIBLE ) ; } TextView awardSponsor = ( ( TextView ) ( mProfile . findViewById ( award_sponsor ) ) ) ; awardSponsor . setText ( mSponsor ) ; Button okButton = ( ( Button ) ( mProfile . findViewById ( award_detail_ok ) ) ) ; okButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { AwardsFragment . AwardDialog . this . getDialog ( ) . cancel ( ) ; } } ) ; builder . setView ( mProfile ) ; return builder . create ( ) ; } AwardsFragment . AwardDialog newInstance ( Award award ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } } }

Fix:
if ( ( ( mDesc ) != null ) && ( ( mDesc . length ( ) ) <= 0 ) ) {
Buggy code:
public class Ilasm extends org . apache . tools . ant . taskdefs . MatchingTask { protected static final String exe_name = "ilasm" ; protected static final String file_ext = "il" ; protected static final String file_pattern = "**//*." + ( Ilasm . file_ext ) ; protected static final String exe_title = "ilasm" ; protected boolean _debug ; protected String _extraOptions ; protected boolean _failOnError ; protected boolean _listing ; protected File _outputFile ; protected File _resourceFile ; protected String _targetType ; protected boolean _verbose ; private File _keyfile ; private File _srcDir ; public Ilasm ( ) throws TaskException { } public void setDebug ( boolean f ) { } public void setExtraOptions ( String extraOptions ) { } public void setFailOnError ( boolean b ) { } public void setKeyfile ( File keyfile ) { } public void setListing ( boolean b ) { } public void setOutputFile ( File params ) { } public void setOwner ( String s ) { } public void setResourceFile ( File fileName ) { } public void setSrcDir ( File srcDirName ) { } public void setTargetType ( String targetType ) throws TaskException { } public void setVerbose ( boolean b ) { } public boolean getDebug ( ) { } public String getExtraOptions ( ) { } public boolean getFailFailOnError ( ) { } public String getTargetType ( ) { } public void Clear ( ) { } public void execute ( ) throws TaskException { if ( ( _srcDir ) == null ) _srcDir = resolveFile ( "." ) ; DirectoryScanner scanner = super . getDirectoryScanner ( _srcDir ) ; String [ ] dependencies = scanner . getIncludedFiles ( ) ; <START_BUG> log ( ( ( ( "assembling<seq2seq4repair_space>" + ( dependencies . length ) ) + "<seq2seq4repair_space>file" ) + ( ( dependencies . length ) == 1 ? "" : "s" ) ) ) ; <END_BUG> String baseDir = scanner . getBasedir ( ) . toString ( ) ; for ( int i = 0 ; i < ( dependencies . length ) ; i ++ ) { String targetFile = dependencies [ i ] ; targetFile = ( baseDir + ( File . separator ) ) + targetFile ; executeOneFile ( targetFile ) ; } } public void executeOneFile ( String targetFile ) throws TaskException { } protected String getDebugParameter ( ) { } protected String getExtraOptionsParameter ( ) { } protected String getKeyfileParameter ( ) { } protected String getListingParameter ( ) { } protected String getOutputFileParameter ( ) { } protected String getResourceFileParameter ( ) { } protected String getTargetTypeParameter ( ) { } protected String getVerboseParameter ( ) { } protected boolean notEmpty ( String s ) { } }

Fix:
getLogger ( ) . info ( ( ( ( "assembling<seq2seq4repair_space>" + ( dependencies . length ) ) + "<seq2seq4repair_space>file" ) + ( ( dependencies . length ) == 1 ? "" : "s" ) ) ) ;
Buggy code:
public class ServletWebRequest extends ServletRequestAttributes implements NativeWebRequest { private static final String HEADER_IF_MODIFIED_SINCE = "If-Modified-Since" ; private static final String HEADER_LAST_MODIFIED = "Last-Modified" ; private HttpServletResponse response ; private boolean notModified = false ; public ServletWebRequest ( HttpServletRequest request ) { } public ServletWebRequest ( HttpServletRequest request , HttpServletResponse response ) { } public final HttpServletResponse getResponse ( ) { } public Object getNativeRequest ( ) { } public Object getNativeResponse ( ) { } @ SuppressWarnings ( "unchecked" ) public < T > T getNativeRequest ( Class < T > requiredType ) { } @ SuppressWarnings ( "unchecked" ) public < T > T getNativeResponse ( Class < T > requiredType ) { } public String getHeader ( String headerName ) { } @ SuppressWarnings ( "unchecked" ) public String [ ] getHeaderValues ( String headerName ) { } @ SuppressWarnings ( "unchecked" ) public Iterator < String > getHeaderNames ( ) { } public String getParameter ( String paramName ) { } public String [ ] getParameterValues ( String paramName ) { } @ SuppressWarnings ( "unchecked" ) public Iterator < String > getParameterNames ( ) { } @ SuppressWarnings ( "unchecked" ) public Map < String , String [ ] > getParameterMap ( ) { } public Locale getLocale ( ) { } public String getContextPath ( ) { } public String getRemoteUser ( ) { } public Principal getUserPrincipal ( ) { } public boolean isUserInRole ( String role ) { } public boolean isSecure ( ) { } public boolean checkNotModified ( long lastModifiedTimestamp ) { if ( ( ( lastModifiedTimestamp >= 0 ) && ( ! ( this . notModified ) ) ) && ( ( ( this . response ) == null ) || ( ! ( this . response . containsHeader ( ServletWebRequest . HEADER_LAST_MODIFIED ) ) ) ) ) { long ifModifiedSince = getRequest ( ) . getDateHeader ( ServletWebRequest . HEADER_IF_MODIFIED_SINCE ) ; this . notModified = ifModifiedSince >= ( ( lastModifiedTimestamp // 1000 ) * 1000 ) ; if ( ( this . response ) != null ) { <START_BUG> if ( this . notModified ) { <END_BUG> this . response . setStatus ( SC_NOT_MODIFIED ) ; } else { this . response . setDateHeader ( ServletWebRequest . HEADER_LAST_MODIFIED , lastModifiedTimestamp ) ; } } } return this . notModified ; } public boolean isNotModified ( ) { } public String getDescription ( boolean includeClientInfo ) { } @ Override public String toString ( ) { } }

Fix:
if ( ( this . notModified ) && ( "GET" . equals ( getRequest ( ) . getMethod ( ) ) ) ) {
Buggy code:
public class XmppPlugin implements BundleActivator { public static final String PLUGIN_ID = "org.eclipse.ecf.provider.xmpp" ; protected static final String NAMESPACE_IDENTIFIER = "ecf.xmpp" ; protected static final String SECURE_NAMESPACE_IDENTIFIER = "ecf.xmpps" ; protected static final String ROOM_NAMESPACE_IDENTIFIER = "xmpp.room.jive" ; private static XmppPlugin plugin ; private BundleContext context = null ; private ServiceTracker logServiceTracker = null ; public static void log ( String message ) { } public static void log ( String message , Throwable e ) { <START_BUG> XmppPlugin . getDefault ( ) . log ( new Status ( IStatus . ERROR , XmppPlugin . PLUGIN_ID , IStatus . OK , "Caught<seq2seq4repair_space>exception" , e ) ) ; <END_BUG> } public XmppPlugin ( ) { } protected LogService getLogService ( ) { } public void log ( IStatus status ) { } public void start ( BundleContext context ) throws Exception { } public void stop ( BundleContext context ) throws Exception { } public static synchronized XmppPlugin getDefault ( ) { } public String getNamespaceIdentifier ( ) { } public String getSecureNamespaceIdentifier ( ) { } public String getRoomNamespaceIdentifier ( ) { } }

Fix:
XmppPlugin . getDefault ( ) . log ( new Status ( IStatus . ERROR , XmppPlugin . PLUGIN_ID , IStatus . OK , message , e ) ) ;
Buggy code:
public class MapViewActivity extends Activity implements OnClickListener { private static final String TAG = "MapViewActivity" ; private MapView mapView ; private MapController mapController ; private MyLocationNewOverlay myLocationOverlay ; private final int DEFAULT_ZOOM_LEVEL = 18 ; private final int MINIMAL_ZOOM_LEVEL = 10 ; private final int MAXIMAL_ZOOM_LEVEL = 20 ; private final ITileSource DEFAULT_TILESOURCE = TileSourceFactory . MAPNIK ; @ Override public void onCreate ( Bundle savedInstanceState ) { } public void onClick ( View v ) { switch ( v . getId ( ) ) { case id . return_to_actual_Position : <START_BUG> if ( myLocationOverlay . isMyLocationEnabled ( ) ) { <END_BUG> Log . i ( MapViewActivity . TAG , ( "Set<seq2seq4repair_space>Mapcenter<seq2seq4repair_space>to" + ( myLocationOverlay . getMyLocation ( ) . toString ( ) ) ) ) ; mapController . setCenter ( myLocationOverlay . getMyLocation ( ) ) ; mapView . postInvalidate ( ) ; } break ; case id . upload_data : break ; case id . switch_to_satellite_map : break ; case id . to_camera : break ; case id . new_point : break ; } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } }

Fix:
if ( ( myLocationOverlay . isMyLocationEnabled ( ) ) && ( ( myLocationOverlay . getMyLocation ( ) ) != null ) ) {
Buggy code:
public class Square implements ISquare { private int xPos ; private int yPos ; private boolean hasMine = false ; private SquareStatus status = COVERED ; private int adjacentMines = 0 ; public Square ( int yPos , int xPos ) { } public int getxPos ( ) { } public void setxPos ( int xPos ) { } public int getyPos ( ) { } public void setyPos ( int yPos ) { } public boolean hasMine ( ) { } public void setMine ( boolean mine ) { <START_BUG> this . hasMine = hasMine ; <END_BUG> } public SquareStatus getStatus ( ) { } public void setStatus ( SquareStatus status ) { } public int getAdjacentMines ( ) { } public void setAdjacentMines ( int adjacentMines ) { } public SquareStatus clic ( ) { } }

Fix:
this . hasMine = mine ;
Buggy code:
public final class TabController { private final JTabbedPane tabbedPane ; private static boolean isInitialized = false ; private final List < ChatTab > chatTabs = new ArrayList < > ( ) ; private final int persistentTabs = 1 ; private int activeChatTab = 0 ; public TabController ( JTabbedPane tabPane ) { } public void init ( ) { } public void terminate ( ) { } public int addTab ( List < String > persons , ChatType chatType ) { <START_BUG> ChatTab chatTab = new ChatTab ( chatType , tabbedPane , persons ) ; <END_BUG> if ( ( persons . size ( ) ) > 1 ) { } else { tabbedPane . add ( persons . get ( 0 ) , chatTab . getScrollPane ( ) ) ; } if ( chatType . hasCloseElement ( ) ) { tabbedPane . setTabComponentAt ( chatTab . getIndex ( ) , new ButtonTabComponent ( chatTab ) ) ; } chatTabs . add ( chatTab ) ; return chatTab . getIndex ( ) ; } public boolean removeTab ( String title ) { } public void removeTab ( int index ) { } public ChatTab getCurrentChatTab ( ) { } public ChatTab getTabAt ( int index ) { } public int getTabIndexByTitle ( String title ) { } public ChatType getCurrentChatType ( ) { } public boolean setFocusAt ( String title ) { } public boolean setFocusAt ( int index ) { } public synchronized void outputLineOnGui ( String message ) { } public synchronized boolean outputLineOnGui ( String message , String person ) { } public synchronized void outputLineOnGui ( String message , int tabIndex ) { } public void appendTextToChat ( String message , int index ) { } public void setActiveChatTab ( int index ) { } public ChatTab getActiveChatTab ( ) { } public static boolean isInitialized ( ) { } }

Fix:
ChatTab chatTab = new ChatTab ( chatType , tabbedPane , this , persons ) ;
Buggy code:
public class SoapSamplerGui extends AbstractSamplerGui { private JLabeledTextField urlField ; private JLabeledTextField soapAction ; private JCheckBox sendSoapAction ; private JLabeledTextArea soapXml ; private FilePanel soapXmlFile = new FilePanel ( ) ; public SoapSamplerGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement s ) { } public void clear ( ) { } private void init ( ) { setLayout ( new BorderLayout ( ) ) ; setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) , BorderLayout . NORTH ) ; urlField = new JLabeledTextField ( JMeterUtils . getResString ( "url" ) , 10 ) ; <START_BUG> soapXml = new JLabeledTextArea ( JMeterUtils . getResString ( "soap_data_title" ) , null ) ; <END_BUG> soapAction = new JLabeledTextField ( "" , 10 ) ; sendSoapAction = new JCheckBox ( JMeterUtils . getResString ( "soap_send_action" ) , true ) ; JPanel mainPanel = new JPanel ( new BorderLayout ( ) ) ; JPanel soapActionPanel = new JPanel ( ) ; soapActionPanel . setLayout ( new GridBagLayout ( ) ) ; GridBagConstraints c = new GridBagConstraints ( ) ; c . fill = GridBagConstraints . HORIZONTAL ; c . gridwidth = 2 ; c . gridx = 0 ; c . gridy = 0 ; c . weightx = 1 ; soapActionPanel . add ( urlField , c ) ; c . fill = GridBagConstraints . NONE ; c . gridwidth = 1 ; c . gridy = 1 ; c . weightx = 0 ; soapActionPanel . add ( sendSoapAction , c ) ; c . gridx = 1 ; c . fill = GridBagConstraints . HORIZONTAL ; c . weightx = 1 ; soapActionPanel . add ( soapAction , c ) ; mainPanel . add ( soapActionPanel , BorderLayout . NORTH ) ; mainPanel . add ( soapXml , BorderLayout . CENTER ) ; mainPanel . add ( soapXmlFile , BorderLayout . SOUTH ) ; sendSoapAction . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent e ) { soapAction . setEnabled ( sendSoapAction . isSelected ( ) ) ; } } ) ; add ( mainPanel , BorderLayout . CENTER ) ; } public void configure ( TestElement el ) { } public Dimension getPreferredSize ( ) { } }

Fix:
soapXml = new JLabeledTextArea ( JMeterUtils . getResString ( "soap_data_title" ) ) ;
Buggy code:
public class FormTagTests extends AbstractHtmlElementTagTests { private static final String REQUEST_URI = "//my//form" ; private static final String QUERY_STRING = "foo=bar" ; private FormTag tag ; private MockHttpServletRequest request ; @ Override @ SuppressWarnings ( "serial" ) protected void onSetUp ( ) { } @ Override protected void extendRequest ( MockHttpServletRequest request ) { } public void testWriteForm ( ) throws Exception { } public void testWithActionFromRequest ( ) throws Exception { } public void testPrependServletPath ( ) throws Exception { this . request . setContextPath ( "//myApp" ) ; this . request . setServletPath ( "//main" ) ; this . request . setPathInfo ( "//index.html" ) ; String commandName = "myCommand" ; String action = "//form.html" ; String enctype = "my//enctype" ; String method = "POST" ; String onsubmit = "onsubmit" ; String onreset = "onreset" ; this . tag . setCommandName ( commandName ) ; <START_BUG> this . tag . setAction ( action ) ; <END_BUG> this . tag . setMethod ( method ) ; this . tag . setEnctype ( enctype ) ; this . tag . setOnsubmit ( onsubmit ) ; this . tag . setOnreset ( onreset ) ; int result = this . tag . doStartTag ( ) ; assertEquals ( EVAL_BODY_INCLUDE , result ) ; assertEquals ( "Form<seq2seq4repair_space>attribute<seq2seq4repair_space>not<seq2seq4repair_space>exposed" , commandName , getPageContext ( ) . getAttribute ( MODEL_ATTRIBUTE_VARIABLE_NAME , REQUEST_SCOPE ) ) ; result = this . tag . doEndTag ( ) ; assertEquals ( EVAL_PAGE , result ) ; this . tag . doFinally ( ) ; assertNull ( "Form<seq2seq4repair_space>attribute<seq2seq4repair_space>not<seq2seq4repair_space>cleared<seq2seq4repair_space>after<seq2seq4repair_space>tag<seq2seq4repair_space>ends" , getPageContext ( ) . getAttribute ( MODEL_ATTRIBUTE_VARIABLE_NAME , REQUEST_SCOPE ) ) ; String output = getOutput ( ) ; FormTagTests . assertFormTagOpened ( output ) ; FormTagTests . assertFormTagClosed ( output ) ; assertContainsAttribute ( output , "action" , "//myApp//main//form.html" ) ; assertContainsAttribute ( output , "method" , method ) ; assertContainsAttribute ( output , "enctype" , enctype ) ; assertContainsAttribute ( output , "onsubmit" , onsubmit ) ; assertContainsAttribute ( output , "onreset" , onreset ) ; assertAttributeNotPresent ( output , "name" ) ; } public void testWithNullResolvedCommand ( ) throws Exception { } public void testXSSScriptingExploitWhenActionIsResolvedFromQueryString ( ) throws Exception { } public void testGet ( ) throws Exception { } public void testPost ( ) throws Exception { } public void testPut ( ) throws Exception { } public void testDelete ( ) throws Exception { } public void testCustomMethodParameter ( ) throws Exception { } public void testClearAttributesOnFinally ( ) throws Exception { } public void testRequestDataValueProcessorHooks ( ) throws Exception { } private String getFormTag ( String output ) { } private String getInputTag ( String output ) { } private static void assertFormTagOpened ( String output ) { } private static void assertFormTagClosed ( String output ) { } }

Fix:
this . tag . setServletRelativeAction ( action ) ;
Buggy code:
public abstract class AjaxEventBehavior extends AbstractDefaultAjaxBehavior { private static long sequence = 0 ; private static final long serialVersionUID = 1L ; private final String event ; private AjaxEventBehavior . ThrottlingSettings throttlingSettings ; public AjaxEventBehavior ( final String event ) { } public final AjaxEventBehavior setThrottleDelay ( Duration throttleDelay ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { super . onComponentTag ( tag ) ; Component myComponent = getComponent ( ) ; <START_BUG> if ( ( myComponent . isEnabled ( ) ) && ( myComponent . isEnableAllowed ( ) ) ) { <END_BUG> tag . put ( event , getEventHandler ( ) ) ; } } protected CharSequence getEventHandler ( ) { } @ Override protected CharSequence generateCallbackScript ( CharSequence partialCall ) { } protected void onCheckEvent ( final String event ) { } public final String getEvent ( ) { } @ Override protected final void respond ( final AjaxRequestTarget target ) { } protected abstract void onEvent ( final AjaxRequestTarget target ) { } private static class ThrottlingSettings implements IClusterable { private static final long serialVersionUID = 1L ; private final Duration delay ; private final String id ; public ThrottlingSettings ( final String id , final Duration delay ) { } public Duration getDelay ( ) { } public String getId ( ) { } } }

Fix:
if ( myComponent . isEnabledInHierarchy ( ) ) {
Buggy code:
class GroupInfo extends JobTreeElement implements IProgressMonitor { private List infos = new ArrayList ( ) ; private Object lock = new Object ( ) ; private String taskName ; boolean isActive = false ; double total = - 1 ; double currentWork ; Object getParent ( ) { } boolean hasChildren ( ) { } Object [ ] getChildren ( ) { } String getDisplayString ( ) { } int getPercentDone ( ) { } boolean isJobInfo ( ) { } public int compareTo ( Object arg0 ) { } public void beginTask ( String name , int totalWork ) { taskName = name ; total = totalWork ; synchronized ( lock ) { isActive = true ; } <START_BUG> ProgressManager . getInstance ( ) . addGroup ( this ) ; <END_BUG> } public void done ( ) { } public void internalWorked ( double work ) { } public boolean isCanceled ( ) { } public void setCanceled ( boolean value ) { } public void setTaskName ( String name ) { } public void subTask ( String name ) { } public void worked ( int work ) { } void removeJobInfo ( final JobInfo job ) { } void addJobInfo ( final JobInfo job ) { } boolean isActive ( ) { } public void cancel ( ) { } public boolean isCancellable ( ) { } String getTaskName ( ) { } }

Fix:
ProgressManager . getInstance ( ) . refreshGroup ( this ) ;
Buggy code:
public class Include extends WebComponent { private static final long serialVersionUID = 1L ; private static final String VALID_SCHEME_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+.-" ; public Include ( final String id ) { } public Include ( String id , IModel < String > model ) { } public Include ( String id , String modelObject ) { } protected String importAsString ( ) { } @ Override protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } protected final boolean isAbsolute ( String url ) { } private String importRelativeUrl ( CharSequence url ) { HttpServletRequest req = ( ( org . apache . wicket . protocol . http . servlet . ServletWebRequest ) ( getRequest ( ) ) ) . getHttpServletRequest ( ) ; <START_BUG> StringBuffer buildUrl = new StringBuffer ( url . length ( ) ) ; <END_BUG> String scheme = req . getScheme ( ) ; int port = req . getServerPort ( ) ; buildUrl . append ( scheme ) ; buildUrl . append ( ":////" ) ; buildUrl . append ( req . getServerName ( ) ) ; if ( ( ( scheme . equals ( "http" ) ) && ( port != 80 ) ) || ( ( scheme . equals ( "https" ) ) && ( port != 443 ) ) ) { buildUrl . append ( ':' ) ; buildUrl . append ( req . getServerPort ( ) ) ; } buildUrl . append ( req . getContextPath ( ) ) . append ( '//' ) . append ( url ) ; return importAbsoluteUrl ( buildUrl ) ; } private String importAbsoluteUrl ( CharSequence url ) { } public Charset getCharset ( ) { } private final String importUrl ( URL url ) { } }

Fix:
StringBuilder buildUrl = new StringBuilder ( url . length ( ) ) ;
Buggy code:
@ Controller @ RequestMapping ( "//task" ) public class TaskController { public static final String REDIRECT_TO_TASK_HOME = "redirect://task" ; public static final String SHOW_TASK_EDIT_PAGE = "tasker//task" ; @ Autowired private TaskService taskService ; @ RequestMapping ( method = RequestMethod . GET ) public String home ( Model model ) { } @ RequestMapping ( value = "//new" , method = RequestMethod . GET ) public String initAddTask ( Model model ) { } @ RequestMapping ( value = "//new" , method = RequestMethod . POST ) public String processAddTask ( @ Valid Task task , BindingResult result ) { if ( result . hasErrors ( ) ) { return TaskController . SHOW_TASK_EDIT_PAGE ; } <START_BUG> taskService . saveTaskByName ( task . getName ( ) ) ; <END_BUG> return TaskController . REDIRECT_TO_TASK_HOME ; } @ RequestMapping ( value = "//{id}//drop" , method = RequestMethod . GET ) public String deleteTask ( @ PathVariable ( "id" ) Long id ) { } @ RequestMapping ( value = "//{id}//edit" , method = RequestMethod . GET ) public String initUpdateTask ( @ PathVariable Long id , Model model ) { } @ RequestMapping ( value = "//{id}//edit" , method = RequestMethod . POST ) public String processUpdateTask ( @ Valid Task task , BindingResult result ) { } }

Fix:
taskService . saveTask ( task ) ;
Buggy code:
public abstract class AbstractErrors implements Serializable , Errors { private String nestedPath = "" ; private final Stack nestedPathStack = new Stack ( ) ; public void setNestedPath ( String nestedPath ) { } public String getNestedPath ( ) { } public void pushNestedPath ( String subPath ) { } public void popNestedPath ( ) throws IllegalArgumentException { } protected void doSetNestedPath ( String nestedPath ) { } protected String fixedField ( String field ) { } protected String canonicalFieldName ( String field ) { } public void reject ( String errorCode ) { } public void reject ( String errorCode , String defaultMessage ) { } public void rejectValue ( String field , String errorCode ) { } public void rejectValue ( String field , String errorCode , String defaultMessage ) { } public boolean hasErrors ( ) { } public int getErrorCount ( ) { } public List getAllErrors ( ) { } public boolean hasGlobalErrors ( ) { } public int getGlobalErrorCount ( ) { } public ObjectError getGlobalError ( ) { } public boolean hasFieldErrors ( ) { } public int getFieldErrorCount ( ) { } public FieldError getFieldError ( ) { } public boolean hasFieldErrors ( String field ) { } public int getFieldErrorCount ( String field ) { } public List getFieldErrors ( String field ) { } public FieldError getFieldError ( String field ) { } public Class getFieldType ( String field ) { } protected boolean isMatchingFieldError ( String field , FieldError fieldError ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( getClass ( ) . getName ( ) ) ; <END_BUG> sb . append ( ":<seq2seq4repair_space>" ) . append ( getErrorCount ( ) ) . append ( "<seq2seq4repair_space>errors" ) ; Iterator it = getAllErrors ( ) . iterator ( ) ; while ( it . hasNext ( ) ) { sb . append ( '\n' ) . append ( it . next ( ) ) ; } return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( getClass ( ) . getName ( ) ) ;
Buggy code:
public class DefaultTransformer implements Serializable , NumberTransformer { private static final long serialVersionUID = 4019938025047800455L ; public double transform ( Object o ) throws MathIllegalArgumentException , NullArgumentException { if ( o == null ) { throw new NullArgumentException ( LocalizedFormats . OBJECT_TRANSFORMATION ) ; } if ( o instanceof Number ) { return ( ( Number ) ( o ) ) . doubleValue ( ) ; } try { <START_BUG> return Double . valueOf ( o . toString ( ) ) . doubleValue ( ) ; <END_BUG> } catch ( NumberFormatException e ) { throw new MathIllegalArgumentException ( LocalizedFormats . CANNOT_TRANSFORM_TO_DOUBLE , o . toString ( ) ) ; } } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } }

Fix:
return Double . parseDouble ( o . toString ( ) ) ;
Buggy code:
public class AlwaysPrototypeScopeResolver implements ScopeMetadataResolver { @ Override public ScopeMetadata resolveScopeMetadata ( BeanDefinition beanDefinition ) { ScopeMetadata meta = new ScopeMetadata ( ) ; <START_BUG> meta . setScopedProxyMode ( INTERFACES ) ; <END_BUG> meta . setScopeName ( "prototype" ) ; return meta ; } }

Fix:
meta . setScopedProxyMode ( NO ) ;
Buggy code:
public class StorageUtils { public static String getInternalStorageDirectory ( ) { } <START_BUG> @ SuppressWarnings ( "unused" ) <END_BUG> public static long getInternalStorageAvailableSize ( ) { StatFs stat = new StatFs ( StorageUtils . getInternalStorageDirectory ( ) ) ; if ( ( VERSION . SDK_INT ) >= ( VERSION_CODES . JELLY_BEAN_MR2 ) ) { return ( stat . getBlockSizeLong ( ) ) * ( stat . getAvailableBlocksLong ( ) ) ; } else { return ( ( long ) ( stat . getBlockSize ( ) ) ) * ( ( long ) ( stat . getAvailableBlocks ( ) ) ) ; } } public static boolean isExternalStorageAvailable ( ) { } @ SuppressWarnings ( "unused" ) public static String getExternalStorageDirectory ( ) { } }

Fix:
@ SuppressWarnings ( { "deprecation" , "unused" } )
Buggy code:
public class PanelLogin extends JPanel { private BufferedImage image ; public JLabel userLabel ; public JTextField userText ; public JLabel passwordLabel ; public JPasswordField passwordText ; public JButton login ; public JButton Handleiding ; public boolean done = false ; public PanelLogin ( ) { } public class EventLogin implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { char [ ] user = passwordText . getPassword ( ) ; try { int maybe = db . checkPass ( userText . getText ( ) , PanelLogin . encode ( new String ( user ) ) ) ; switch ( maybe ) { case 0 : done = false ; JOptionPane . showMessageDialog ( null , config . getString ( "LoginFout" ) ) ; break ; case 1 : done = true ; break ; case 2 : done = true ; Main . manager = true ; } } catch ( Exception ex ) { Logger . getLogger ( PanelLogin . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } } public class EventHand implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { try { <START_BUG> Desktop . getDesktop ( ) . open ( new File ( "src//res//handleiding.docx" ) ) ; <END_BUG> } catch ( Exception ex ) { Logger . getLogger ( PanelLogin . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } } public static String encode ( String data ) throws Exception { } }

Fix:
Desktop . getDesktop ( ) . open ( new File ( "src//res//handleiding.pdf" ) ) ;
Buggy code:
public class ContactImplTest { private Contact testContact ; private int input1 ; private String input2 ; private String input3 ; @ Before public void buildUp ( ) { } @ Test public void testGetId ( ) { } @ Test public void testGetName ( ) { } @ Test public void testGetNotesEmpty ( ) { String output = testContact . getNotes ( ) ; <START_BUG> assertEquals ( "Mismatch<seq2seq4repair_space>between<seq2seq4repair_space>expected<seq2seq4repair_space>and<seq2seq4repair_space>actual<seq2seq4repair_space>notes" , input3 , output ) ; <END_BUG> } @ Test public void testGetNotesNotEmpty ( ) { } No newline ; at end ; of file ; }

Fix:
assertEquals ( "Mismatch<seq2seq4repair_space>between<seq2seq4repair_space>expected<seq2seq4repair_space>and<seq2seq4repair_space>actual<seq2seq4repair_space>notes" , "" , output ) ;
Buggy code:
public class SimpleLongValue implements Collectable < SimpleLongValue > { public long value ; public SimpleLongValue ( long value ) { } @ Override public SimpleLongValue clone ( ) { } @ Override public SimpleLongValue deepClone ( ) { } @ Override public void merge ( SimpleLongValue v ) throws Exception { } @ Override public void minus ( SimpleLongValue v ) throws Exception { } @ Override public SimpleLongValue getEmptyInstance ( ) { } @ Override public String toString ( ) { } public void breakDown ( SimpleLongValue src , SimpleLongValue des , SimpleLongValue . Adjustor adj , int count ) throws Exception { } public class Adjustor { private TreeMap < Double , List < SimpleLongValue > > adjMap = new TreeMap < Double , List < SimpleLongValue > > ( ) ; private long curSum = 0 ; public Adjustor ( ) { } public void register ( double d , SimpleLongValue s ) { } public void adjust ( SimpleLongValue des ) { long diff = ( des . value ) - ( this . curSum ) ; if ( diff > 0 ) { double lastkey = 1 ; while ( diff > 0 ) { lastkey = this . adjMap . lowerKey ( lastkey ) ; List < SimpleLongValue > list = this . adjMap . get ( lastkey ) ; for ( SimpleLongValue slv : list ) { while ( diff > 0 ) { slv . value += 1 ; diff -- ; } } } } else { double firstkey = - 1 ; while ( diff < 0 ) { <START_BUG> firstkey = this . adjMap . lowerKey ( firstkey ) ; <END_BUG> List < SimpleLongValue > list = this . adjMap . get ( firstkey ) ; for ( SimpleLongValue slv : list ) { while ( diff < 0 ) { slv . value -= 1 ; diff ++ ; } } } } } } }

Fix:
firstkey = this . adjMap . higherKey ( firstkey ) ;
Buggy code:
public class Workspace extends JPanel { private static final long serialVersionUID = 1L ; private WeltObjekt welt ; private File file ; Workspace ( IDE ide , WeltObjekt welt ) { } Workspace ( IDE ide , File file , WeltObjekt welt ) { } File getFile ( ) { } void setFile ( File file ) { } WeltObjekt getWorld ( ) { } @ Override public Dimension getPreferredSize ( ) { } int getXPos ( ) { } int getYPos ( ) { } @ Override public void update ( Graphics g ) { } @ Override public void paint ( Graphics g ) { } private void paintOrt ( OrtErweitert ort , Graphics graph , int xPos , int yPos , int width , int height ) { int x = ort . position . x ; int y = ort . position . y ; int w = ort . groesse . width ; int h = ort . groesse . height ; int xGap = 10 ; int yGap = 20 ; int beschrLength = 100 ; if ( ( ( ( x < ( xPos + width ) ) && ( ( x + w ) > xPos ) ) && ( y < ( yPos + height ) ) ) && ( ( y + h ) > yPos ) ) { graph . drawRect ( ( x - xPos ) , ( y - yPos ) , w , h ) ; String text = ( ort . ort . getName ( ) ) + "\n" ; <START_BUG> String beschreibung = ort . ort . getDescription ( ) ; <END_BUG> if ( ( beschreibung . length ( ) ) <= beschrLength ) { text += beschreibung + "\n\n" ; } else { text += ( beschreibung . substring ( 0 , beschrLength ) ) + "...\n\n" ; } text += "Untersuch.<seq2seq4repair_space>Obj.:<seq2seq4repair_space>" ; UntersuchbaresObjekt [ ] untersuchObjs = ort . ort . getUnteruschbareObjekte ( ) ; for ( int i = 0 ; i < ( untersuchObjs . length ) ; i ++ ) { text += ( untersuchObjs [ i ] . getName ( ) ) + ",<seq2seq4repair_space>" ; } text = ( text . substring ( 0 , ( ( text . length ( ) ) - 2 ) ) ) + "\nGegenstände:<seq2seq4repair_space>" ; Gegenstand . GEGENSTAENDE = welt . getGegenstaende ( ) ; Gegenstand [ ] gegenstaende = ort . ort . getGegenstaende ( ) ; for ( int i = 0 ; i < ( gegenstaende . length ) ; i ++ ) { int anz = ort . ort . getGegenstandAnzahl ( gegenstaende [ i ] ) ; if ( anz > 1 ) text += ( ( anz + "<seq2seq4repair_space>" ) + ( gegenstaende [ i ] . getPlural ( ) ) ) + ",<seq2seq4repair_space>" ; else text += ( gegenstaende [ i ] . getName ( ) ) + ",<seq2seq4repair_space>" ; } text = text . substring ( 0 , ( ( text . length ( ) ) - 2 ) ) ; int stringY = ( y - yPos ) + yGap ; FontMetrics metrics = graph . getFontMetrics ( ) ; for ( String line : text . split ( "\n" ) ) { int stringX = ( x - xPos ) + xGap ; String [ ] woerter = line . split ( "<seq2seq4repair_space>" ) ; int index = 0 ; while ( ( index < ( woerter . length ) ) && ( stringY < ( ( y - yPos ) + h ) ) ) { if ( ( stringX + ( metrics . stringWidth ( woerter [ index ] ) ) ) > ( ( ( x - xPos ) + w ) - xGap ) ) { stringY += metrics . getHeight ( ) ; stringX = ( x - xPos ) + xGap ; } else { graph . drawString ( ( ( woerter [ index ] ) + "<seq2seq4repair_space>" ) , stringX , stringY ) ; stringX += metrics . stringWidth ( ( ( woerter [ index ] ) + "<seq2seq4repair_space>" ) ) ; index ++ ; } } stringY += metrics . getHeight ( ) ; } } } }

Fix:
String beschreibung = ort . ort . getBeschreibung ( ) ;
Buggy code:
public class ThemeSwitcher { private static final String DEFAULT_LF = "Plastic" ; public static void setTheme ( ) { XmlElement themeConfig = Config . getInstance ( ) . get ( "options" ) . getElement ( "//options//gui//theme" ) ; if ( themeConfig == null ) { XmlElement themeParent = Config . getInstance ( ) . get ( "options" ) . getElement ( "//options//gui" ) ; themeConfig = new XmlElement ( "theme" ) ; themeParent . addElement ( themeConfig ) ; } String pluginName = null ; try { <START_BUG> IExtensionHandler handler = PluginManager . getInstance ( ) . getHandler ( ORG_COLUMBA_CORE_THEME ) ; <END_BUG> pluginName = themeConfig . getAttribute ( "name" ) ; if ( pluginName == null ) { pluginName = ThemeSwitcher . getPlatformDefaultTheme ( ) ; themeConfig . addAttribute ( "name" , ThemeSwitcher . DEFAULT_LF ) ; themeConfig . addAttribute ( "theme" , "Experience<seq2seq4repair_space>Blue" ) ; } AbstractThemePlugin theme = null ; IExtension extension = handler . getExtension ( pluginName ) ; theme = ( ( AbstractThemePlugin ) ( extension . instanciateExtension ( null ) ) ) ; theme . setLookAndFeel ( ) ; } catch ( Exception ex ) { if ( Logging . DEBUG ) ex . printStackTrace ( ) ; JOptionPane . showMessageDialog ( null , ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>trying<seq2seq4repair_space>to<seq2seq4repair_space>load<seq2seq4repair_space>" + pluginName ) + "<seq2seq4repair_space>Look<seq2seq4repair_space>and<seq2seq4repair_space>Feel.\nSwitching<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>default." ) ) ; try { UIManager . setLookAndFeel ( UIManager . getCrossPlatformLookAndFeelClassName ( ) ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } public static String getPlatformDefaultTheme ( ) { } public static void updateFrame ( JFrame frame ) { } }

Fix:
IExtensionHandler handler = PluginManager . getInstance ( ) . getExtensionHandler ( ORG_COLUMBA_CORE_THEME ) ;
Buggy code:
public abstract class XmlSecurityActionAdapter implements IObjectActionDelegate { private IWorkbenchPart workbenchPart = null ; private Shell shell = null ; public abstract void run ( final IAction action ) { } public abstract void selectionChanged ( final IAction action , final ISelection selection ) { } public Shell getShell ( ) { } public IWorkbenchPart getWorkbenchPart ( ) { } public void setActivePart ( final IAction action , final IWorkbenchPart workbenchPart ) { } protected void log ( final String message , final Exception ex ) { } protected void showInfo ( final String title , final String message ) { } protected void showError ( final String title , final String message ) { } protected void showErrorDialog ( final String title , final String message , final Exception ex ) { } protected int showMissingParameterDialog ( final String title , final String message , final String prefId ) { } protected boolean parseSelection ( final String textSelection ) { <START_BUG> if ( ( textSelection == null ) || ( ( textSelection . length ( ) ) == 0 ) ) { <END_BUG> return false ; } Pattern p = Pattern . compile ( "[^<>]+" ) ; Matcher m = p . matcher ( textSelection ) ; if ( ! ( m . matches ( ) ) ) { SAXParserFactory spf = SAXParserFactory . newInstance ( ) ; spf . setNamespaceAware ( true ) ; try { XMLReader xmlReader = spf . newSAXParser ( ) . getXMLReader ( ) ; xmlReader . setErrorHandler ( null ) ; xmlReader . parse ( new InputSource ( new StringReader ( textSelection ) ) ) ; } catch ( IOException e ) { return false ; } catch ( SAXException e ) { return false ; } catch ( ParserConfigurationException e ) { return false ; } return true ; } return true ; } protected void saveEditorContent ( final ITextEditor openedEditor ) { } }

Fix:
if ( ( textSelection == null ) || ( ( textSelection . trim ( ) . length ( ) ) == 0 ) ) {
Buggy code:
public class ServiceInfoFactory extends AbstractMetadataFactory implements IServiceInfoFactory { protected Map < ServiceInfoFactory . ServiceInfoKey , IServiceInfo > serviceInfos = new HashMap ( ) ; protected class ServiceInfoKey { private EndpointDescription endpointDescription ; private Namespace discoveryNamespace ; private int hashCode = 7 ; public ServiceInfoKey ( EndpointDescription endpointDescription , Namespace discoveryNamespace ) { } public boolean equals ( Object other ) { } public int hashCode ( ) { } } public IServiceInfo createServiceInfoForDiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } protected IServiceInfo createServiceInfo ( URI uri , String serviceName , IServiceTypeID serviceTypeID , IServiceProperties serviceProperties ) { } protected IServiceProperties createServiceProperties ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName , URI uri ) { } protected URI createURI ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID , String serviceName ) throws URISyntaxException { String path = "//" + serviceName ; <START_BUG> String str = endpointDescription . getContainerID ( ) . getName ( ) ; <END_BUG> URI uri = null ; while ( true ) { try { uri = new URI ( str ) ; if ( ( uri . getHost ( ) ) != null ) { break ; } else { final String rawSchemeSpecificPart = uri . getRawSchemeSpecificPart ( ) ; if ( str . equals ( rawSchemeSpecificPart ) ) { uri = null ; break ; } else { str = rawSchemeSpecificPart ; } } } catch ( URISyntaxException e ) { uri = null ; break ; } } String scheme = RemoteConstants . SERVICE_TYPE ; int port = 32565 ; if ( uri != null ) { port = uri . getPort ( ) ; if ( port == ( - 1 ) ) port = 32565 ; } String host = null ; if ( uri != null ) { host = uri . getHost ( ) ; } else { try { host = InetAddress . getLocalHost ( ) . getHostAddress ( ) ; } catch ( Exception e ) { logInfo ( "createURI" , "failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>local<seq2seq4repair_space>host<seq2seq4repair_space>adress,<seq2seq4repair_space>falling<seq2seq4repair_space>back<seq2seq4repair_space>to<seq2seq4repair_space>\'localhost\'." , e ) ; host = "localhost" ; } } return new URI ( scheme , null , host , port , path , null , null ) ; } protected String createServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected String createDefaultServiceName ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser , IServiceTypeID serviceTypeID ) { } protected IServiceTypeID createServiceTypeID ( EndpointDescription endpointDescription , IDiscoveryAdvertiser advertiser ) { } public IServiceInfo removeServiceInfoForUndiscovery ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } public void close ( ) { } public boolean removeServiceInfo ( IDiscoveryAdvertiser advertiser , EndpointDescription endpointDescription ) { } public void removeAllServiceInfos ( ) { } }

Fix:
String str = endpointDescription . getId ( ) ;
Buggy code:
public class AccountWizardLauncher { public AccountWizardLauncher ( ) { } public void launchWizard ( ) { DataModel data = new DataModel ( ) ; Step [ ] steps ; if ( ( MailConfig . getAccountList ( ) . count ( ) ) == 0 ) { steps = new Step [ ] { new WelcomeStep ( ) , new IdentityStep ( data ) , new IncomingServerStep ( data ) , new OutgoingServerStep ( data , false ) , new FinishStep ( ) } ; } else { steps = new Step [ ] { new IdentityStep ( data ) , new IncomingServerStep ( data ) , new OutgoingServerStep ( data , true ) } ; } WizardModel model = new net . javaprog . ui . wizard . DefaultWizardModel ( steps ) ; model . addWizardModelListener ( new AccountCreator ( data ) ) ; <START_BUG> Wizard wizard = new Wizard ( model , MailResourceLoader . getString ( "dialog" , "accountwizard" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_preferences-32.png" ) ) ; <END_BUG> CSH . setHelpIDString ( wizard , "getting_started_1" ) ; JavaHelpSupport . enableHelp ( wizard , HelpManager . getHelpBroker ( ) ) ; wizard . pack ( ) ; wizard . setLocationRelativeTo ( null ) ; wizard . setVisible ( true ) ; } }

Fix:
Wizard wizard = new Wizard ( model , MailResourceLoader . getString ( "dialog" , "accountwizard" , "title" ) , ImageLoader . getSmallImageIcon ( "stock_preferences.png" ) ) ;
Buggy code:
public abstract class AbstractCoreModelTransformerAction implements IObjectActionDelegate { private IFile file ; protected static final String ANNO_SOURCE = "http:////www.eclipse.org//emf//2002//GenModel" ; protected static final String ANNO_KEY = "body" ; public AbstractCoreModelTransformerAction ( ) { } public void setActivePart ( final IAction action , final IWorkbenchPart targetPart ) { } public void run ( final IAction action ) { } public abstract void transform ( Resource r ) { } public void throwE ( final IOException e ) { final Shell shell = new Shell ( ) ; <START_BUG> MessageDialog . openError ( shell , "Xtend<seq2seq4repair_space>EMF<seq2seq4repair_space>Eclipse<seq2seq4repair_space>Plug-in" , e . getMessage ( ) ) ; <END_BUG> throw new RuntimeException ( e ) ; } public void selectionChanged ( final IAction action , final ISelection selection ) { } }

Fix:
MessageDialog . openError ( shell , AbstractCoreModelTransformerAction_PluginName , e . getMessage ( ) ) ;
Buggy code:
public class FileLoadingPanel extends JPanel { private static final long serialVersionUID = 4071238035793237990L ; FileLoadingPanel thisObj ; DefaultListModel < String > listModel = null ; JButton processButton ; MainFrame parent ; public FileLoadingPanel ( MainFrame mainFrame ) { } void init ( ) { SpringLayout layout = new SpringLayout ( ) ; setLayout ( layout ) ; Dimension listDim = new Dimension ( 300 , 400 ) ; listModel = new DefaultListModel < String > ( ) ; JList < String > list = new JList < String > ( listModel ) ; list . setSelectionMode ( ListSelectionModel . SINGLE_SELECTION ) ; list . setLayoutOrientation ( JList . VERTICAL ) ; list . setVisibleRowCount ( ( - 1 ) ) ; JScrollPane listScroller = new JScrollPane ( list ) ; listScroller . setPreferredSize ( listDim ) ; listScroller . setSize ( listDim ) ; add ( listScroller ) ; layout . putConstraint ( SpringLayout . NORTH , listScroller , 5 , SpringLayout . NORTH , this ) ; layout . putConstraint ( SpringLayout . EAST , listScroller , ( - 5 ) , SpringLayout . EAST , this ) ; JButton addButton = new JButton ( "add" ) ; addButton . addActionListener ( new ActionListener ( ) { @ Override public void actionPerformed ( ActionEvent e ) { List < File > chooseFile = FileChoosingUtils . chooseFile ( "sampleForm" , OPEN_DIALOG_MUlTIPLE ) ; if ( ( null != chooseFile ) && ( ( chooseFile . size ( ) ) > 0 ) ) { for ( File f : chooseFile ) { <START_BUG> listModel . addElement ( f . getName ( ) ) ; <END_BUG> } } else { JOptionPane . showMessageDialog ( thisObj , "No<seq2seq4repair_space>file<seq2seq4repair_space>chosen" ) ; } validate ( ) ; repaint ( ) ; } } ) ; add ( addButton ) ; layout . putConstraint ( SpringLayout . NORTH , addButton , 5 , SpringLayout . SOUTH , listScroller ) ; layout . putConstraint ( SpringLayout . EAST , addButton , ( - 5 ) , SpringLayout . EAST , this ) ; processButton = new JButton ( "process" ) ; processButton . addActionListener ( new ActionListener ( ) { @ Override public void actionPerformed ( ActionEvent e ) { while ( ( listModel . size ( ) ) > 0 ) { parent . processPicture ( listModel . get ( 0 ) ) ; listModel . remove ( 0 ) ; } } } ) ; add ( processButton ) ; layout . putConstraint ( SpringLayout . NORTH , processButton , 5 , SpringLayout . SOUTH , listScroller ) ; layout . putConstraint ( SpringLayout . EAST , processButton , ( - 5 ) , SpringLayout . WEST , addButton ) ; } }

Fix:
listModel . addElement ( f . getAbsolutePath ( ) ) ;