nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class AddConnectorUpdate extends AbstractRemotingSubsystemUpdate < Void > { private static final long serialVersionUID = - 1238913680118311381L ; private final String name ; private final String socketBinding ; private SaslElement saslElement ; private String authenticationProvider ; private final Map < String , String > properties = new HashMap < String , String > ( ) ; public AddConnectorUpdate ( String name , String socketBinding ) { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { final BatchBuilder batchBuilder = updateContext . getBatchBuilder ( ) ; final OptionMap . Builder builder = OptionMap . builder ( ) ; if ( ( saslElement ) != null ) saslElement . applyTo ( builder ) ; final ConnectorService connectorService = new ConnectorService ( ) ; connectorService . setOptionMap ( builder . getMap ( ) ) ; final UpdateResultHandler . ServiceStartListener < P > listener = new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ; final ServiceName connectorName = ConnectorElement . connectorName ( name ) ; final BatchServiceBuilder < ChannelListener < ConnectedStreamChannel < InetSocketAddress > > > serviceBuilder = batchBuilder . addService ( connectorName , connectorService ) ; serviceBuilder . addDependency ( connectorName . append ( "auth-provider" ) , ServerAuthenticationProvider . class , connectorService . getAuthenticationProviderInjector ( ) ) ; serviceBuilder . addDependency ( JBOSS_REMOTING_ENDPOINT , Endpoint . class , connectorService . getEndpointInjector ( ) ) ; serviceBuilder . addListener ( listener ) ; <START_BUG> serviceBuilder . setInitialMode ( IMMEDIATE ) ; <END_BUG> try { batchBuilder . install ( ) ; } catch ( ServiceRegistryException e ) { resultHandler . handleFailure ( e , param ) ; } } public AbstractSubsystemUpdate < RemotingSubsystemElement , ? > getCompensatingUpdate ( RemotingSubsystemElement original ) { } protected void applyUpdate ( RemotingSubsystemElement element ) throws UpdateFailedException { } public void setSaslElement ( SaslElement saslElement ) { } public void setAuthenticationProvider ( String authenticationProvider ) { } public Map < String , String > getProperties ( ) { } }

Fix:
serviceBuilder . setInitialMode ( ACTIVE ) ;
Buggy code:
public class RemoveFolderAction extends AbstractColumbaAction implements ISelectionListener { public RemoveFolderAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { } public void selectionChanged ( SelectionChangedEvent e ) { if ( ( ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) . length ) > 0 ) { AbstractFolder folder = ( ( org . columba . mail . gui . tree . selection . TreeSelectionChangedEvent ) ( e ) ) . getSelected ( ) [ 0 ] ; if ( ( folder != null ) && ( folder instanceof AbstractMessageFolder ) ) { IFolderItem item = folder . getConfiguration ( ) ; <START_BUG> if ( item . get ( "property" , "accessrights" ) . equals ( "user" ) ) { <END_BUG> setEnabled ( true ) ; } else { setEnabled ( false ) ; } } } else { setEnabled ( false ) ; } } }

Fix:
if ( item . getString ( "property" , "accessrights" ) . equals ( "user" ) ) {
Buggy code:
@ SuppressWarnings ( "unchecked" ) final class StringToEnumConverterFactory implements ConverterFactory < String , Enum > { public < T extends Enum > Converter < String , T > getConverter ( Class < T > targetType ) { } private class StringToEnum < T extends Enum > implements Converter < String , T > { private final Class < T > enumType ; public StringToEnum ( Class < T > enumType ) { } public T convert ( String source ) { <START_BUG> if ( "" . equals ( source ) ) { <END_BUG> return null ; } return ( ( T ) ( Enum . valueOf ( this . enumType , source . trim ( ) ) ) ) ; } } }

Fix:
if ( ( source . length ( ) ) == 0 ) {
Buggy code:
public class Position { public static final int BUY = 0 ; public static final int SELL = 1 ; private int type ; private double openPrice ; private boolean isClosed ; private double closePrice ; private Date date ; public Position ( int type , Date date , double openPrice ) { } public void close ( double price ) { } public boolean isClosed ( ) { } public int getType ( ) { } public Date getOpenDate ( ) { } public double getOpenPrice ( ) { } public double calculateProfit ( ) { <START_BUG> double profit = ( openPrice ) - ( closePrice ) ; <END_BUG> if ( ( type ) == ( Position . SELL ) ) profit *= - 1 ; return isClosed ? profit : 0 ; } @ Override public String toString ( ) { } }

Fix:
double profit = ( closePrice ) - ( openPrice ) ;
Buggy code:
public class NetworkDispatcher extends Thread { private final BlockingQueue < Request < ? > > mQueue ; private final Network mNetwork ; private final Cache mCache ; private final ResponseDelivery mDelivery ; private volatile boolean mQuit = false ; public NetworkDispatcher ( BlockingQueue < Request < ? > > queue , Network network , Cache cache , ResponseDelivery delivery ) { } public void quit ( ) { } @ TargetApi ( VERSION_CODES . ICE_CREAM_SANDWICH ) private void addTrafficStatsTag ( Request < ? > request ) { } @ Override public void run ( ) { Process . setThreadPriority ( THREAD_PRIORITY_BACKGROUND ) ; while ( true ) { long startTimeMs = SystemClock . elapsedRealtime ( ) ; Request < ? > request ; try { request = mQueue . take ( ) ; } catch ( InterruptedException e ) { if ( mQuit ) { return ; } continue ; } try { request . addMarker ( "network-queue-take" ) ; if ( request . isCanceled ( ) ) { request . finish ( "network-discard-cancelled" ) ; continue ; } addTrafficStatsTag ( request ) ; NetworkResponse networkResponse ; if ( ! ( Utils . isSpecialType ( request . getUrl ( ) ) ) ) { networkResponse = mNetwork . performRequest ( request ) ; request . addMarker ( "network-http-complete" ) ; if ( ( networkResponse . notModified ) && ( request . hasHadResponseDelivered ( ) ) ) { request . finish ( "not-modified" ) ; continue ; } } else { networkResponse = new NetworkResponse ( 0 , null , null , false ) ; } Response < ? > response = request . parseNetworkResponse ( networkResponse ) ; request . addMarker ( "network-parse-complete" ) ; <START_BUG> if ( ( request . shouldCache ( ) ) && ( ( response . cacheEntry ) != null ) ) { <END_BUG> mCache . put ( request . getCacheKey ( ) , response . cacheEntry ) ; request . addMarker ( "network-cache-written" ) ; } request . markDelivered ( ) ; mDelivery . postResponse ( request , response ) ; } catch ( VolleyError volleyError ) { volleyError . setNetworkTimeMs ( ( ( SystemClock . elapsedRealtime ( ) ) - startTimeMs ) ) ; parseAndDeliverNetworkError ( request , volleyError ) ; } catch ( Exception e ) { VolleyLog . e ( e , "Unhandled<seq2seq4repair_space>exception<seq2seq4repair_space>%s" , e . toString ( ) ) ; VolleyError volleyError = new VolleyError ( e ) ; volleyError . setNetworkTimeMs ( ( ( SystemClock . elapsedRealtime ( ) ) - startTimeMs ) ) ; mDelivery . postError ( request , volleyError ) ; } } } private void parseAndDeliverNetworkError ( Request < ? > request , VolleyError error ) { } }

Fix:
if ( ( ( ( mCache ) != null ) && ( request . shouldCache ( ) ) ) && ( ( response . cacheEntry ) != null ) ) {
Buggy code:
@ Controller public class ApplicationController { @ Autowired @ Qualifier ( "applicationService" ) private ApplicationService service ; public ApplicationService getService ( ) { } public void setService ( ApplicationService service ) { } @ RequestMapping ( value = "//" , method = RequestMethod . GET ) public ModelAndView getPages ( ) { } @ RequestMapping ( value = "//getAllTestDescriptions" , method = RequestMethod . GET ) @ ResponseBody public List < TestDescription > getAllTestDescriptions ( ) { } @ RequestMapping ( value = "//addNewTestDescription" , method = RequestMethod . POST ) @ ResponseBody public String addNewTestDescription ( @ RequestParam ( value = "testName" , required = true ) String testName , @ RequestParam ( value = "maxTimeToPassInMinutes" , required = true ) int maxTimeToPassInMinutes ) { TestDescription testDescription = new TestDescription ( ) ; testDescription . setTestName ( testName ) ; testDescription . setMaxTimeToPassInMinutes ( maxTimeToPassInMinutes ) ; service . addTestDescription ( testDescription ) ; <START_BUG> return "Successfully<seq2seq4repair_space>added<seq2seq4repair_space>new<seq2seq4repair_space>test" + ( testDescription . getTestName ( ) ) ; <END_BUG> } }

Fix:
return ( "{\"some\"<seq2seq4repair_space>:<seq2seq4repair_space>\"Successfully<seq2seq4repair_space>added<seq2seq4repair_space>new<seq2seq4repair_space>test<seq2seq4repair_space>" + ( testDescription . getTestName ( ) ) ) + "\"}" ;
Buggy code:
public class StringFromFile extends AbstractFunction implements TestListener { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final List < String > desc = new LinkedList < String > ( ) ; private static final String KEY = "__StringFromFile" ; static final String ERR_IND = "**ERR**" ; private static final int MIN_PARAM_COUNT = 1 ; private static final int PARAM_NAME = 2 ; private static final int PARAM_START = 3 ; private static final int PARAM_END = 4 ; private static final int MAX_PARAM_COUNT = 4 ; private String myValue ; private String myName ; private Object [ ] values ; private BufferedReader myBread = null ; private FileReader fis ; private boolean firstTime = false ; private String fileName ; public StringFromFile ( ) { } private void init ( ) { } private void closeFile ( ) { } private static final int COUNT_UNUSED = - 2 ; private int myStart = StringFromFile . COUNT_UNUSED ; private int myCurrent = StringFromFile . COUNT_UNUSED ; private int myEnd = StringFromFile . COUNT_UNUSED ; private void openFile ( ) { } @ Override public synchronized String execute ( SampleResult previousResult , Sampler currentSampler ) throws InvalidVariableException { } @ Override public synchronized void setParameters ( Collection < CompoundVariable > parameters ) throws InvalidVariableException { StringFromFile . log . debug ( ( ( this ) + "::StringFromFile.setParameters()" ) ) ; checkParameterCount ( parameters , StringFromFile . MIN_PARAM_COUNT , StringFromFile . MAX_PARAM_COUNT ) ; values = parameters . toArray ( ) ; <START_BUG> StringBuffer sb = new StringBuffer ( 40 ) ; <END_BUG> sb . append ( "setParameters(" ) ; for ( int i = 0 ; i < ( values . length ) ; i ++ ) { if ( i > 0 ) { sb . append ( "," ) ; } sb . append ( ( ( CompoundVariable ) ( values [ i ] ) ) . getRawParameters ( ) ) ; } sb . append ( ")" ) ; StringFromFile . log . info ( sb . toString ( ) ) ; firstTime = true ; } @ Override public String getReferenceKey ( ) { } public List < String > getArgumentDesc ( ) { } public void testStarted ( ) { } public void testStarted ( String host ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } }

Fix:
StringBuilder sb = new StringBuilder ( 40 ) ;
Buggy code:
public class NotSelector extends NoneSelector { public NotSelector ( ) { } public NotSelector ( FileSelector other ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> if ( hasSelectors ( ) ) { buf . append ( "{notselect:<seq2seq4repair_space>" ) ; buf . append ( super . toString ( ) ) ; buf . append ( "}" ) ; } return buf . toString ( ) ; } public void verifySettings ( ) { } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public interface ServiceRequestTransformer { ServiceRequest getOpen311ServiceRequestFromCirmSR ( Json cirmSR ) { } <START_BUG> Json getCirmSRfromOpen311ServiceRequest ( ServiceRequest open311Sr , Json cirmSRType ) ; <END_BUG> }

Fix:
Json getCirmSRfromOpen311ServiceRequest ( ServiceRequest open311Sr , Json cirmSrType ) ;
Buggy code:
public class DefaultDescription { public static void create ( GraphBuilder builder , String path ) throws IOException , AnimoException { builder . start ( _ ) ; builder . _ ( REF . _ , FILE ) ; builder . end ( ) ; <START_BUG> Iterator < String > it = new DefaultDescription . StringArrayIterator ( path . split ( Pattern . quote ( File . separator ) ) ) ; <END_BUG> while ( it . hasNext ( ) ) { String i = it . next ( ) ; for ( String s : new DefaultDescription . StringArrayIterator ( i . split ( Pattern . quote ( "." ) ) ) ) { builder . start ( _ ) ; builder . _ ( REF . _ , s ) ; builder . end ( ) ; } if ( ! ( it . hasNext ( ) ) ) { Iterator < String > jt = new DefaultDescription . StringArrayIterator ( i . split ( Pattern . quote ( "." ) ) ) ; if ( jt . hasNext ( ) ) { builder . start ( _ ) ; builder . _ ( REF . _ , NAME ) ; builder . _ ( jt . next ( ) ) ; builder . end ( ) ; } if ( jt . hasNext ( ) ) { builder . start ( _ ) ; builder . _ ( REF . _ , EXTENSION ) ; do { builder . _ ( jt . next ( ) ) ; } while ( jt . hasNext ( ) ) ; builder . end ( ) ; } } } } public static class StringArrayIterator implements Iterable < String > , Iterator < String > { private String [ ] a ; private String c = null ; int i = 0 ; public StringArrayIterator ( String [ ] a ) { } @ Override public Iterator < String > iterator ( ) { } @ Override public boolean hasNext ( ) { } @ Override public String next ( ) { } private String step ( ) { } @ Override public void remove ( ) { } } }

Fix:
Iterator < String > it = new DefaultDescription . StringArrayIterator ( path . split ( Pattern . quote ( "//" ) ) ) ;
Buggy code:
public class PlayerChooseDialog extends JDialog implements ActionListener { private static final long serialVersionUID = 1L ; private JPanel playerBlackChoice ; private JPanel playerWhiteChoice ; private JPanel finishButtons ; @ SuppressWarnings ( "rawtypes" ) private JComboBox optionsWhiteBox ; @ SuppressWarnings ( "rawtypes" ) private JComboBox optionsBlackBox ; private JButton OKButton ; private JButton cancelButton ; public static boolean cancelled ; public static boolean AIvsAI ; @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public PlayerChooseDialog ( Frame GUIFrame ) { } @ Override public void actionPerformed ( ActionEvent e ) { if ( ( e . getActionCommand ( ) ) == "OK" ) { String blackPlayer = ( ( String ) ( optionsBlackBox . getSelectedItem ( ) ) ) ; String whitePlayer = ( ( String ) ( optionsWhiteBox . getSelectedItem ( ) ) ) ; String currentPlayer = BoardJPanel . getPlayer ( ) ; if ( ( blackPlayer . equals ( "Human" ) ) && ( ( whitePlayer . equals ( "AlphaBeta" ) ) || ( whitePlayer . equals ( "MiniMax" ) ) ) ) { if ( currentPlayer . equals ( "White" ) ) boardJP . changePlayer ( ) ; GraphicalUI . aiType = whitePlayer ; GraphicalUI . updateMessage ( ( "AI<seq2seq4repair_space>type<seq2seq4repair_space>selected:<seq2seq4repair_space>" + whitePlayer ) ) ; PlayerChooseDialog . AIvsAI = false ; currentAILabel . setText ( whitePlayer ) ; } else if ( ( whitePlayer . equals ( "Human" ) ) && ( ( blackPlayer . equals ( "AlphaBeta" ) ) || ( blackPlayer . equals ( "MiniMax" ) ) ) ) { if ( currentPlayer . equals ( "Black" ) ) boardJP . changePlayer ( ) ; GraphicalUI . aiType = blackPlayer ; GraphicalUI . updateMessage ( ( "AI<seq2seq4repair_space>type<seq2seq4repair_space>selected:<seq2seq4repair_space>" + blackPlayer ) ) ; <START_BUG> PlayerChooseDialog . AIvsAI = true ; <END_BUG> currentAILabel . setText ( blackPlayer ) ; } if ( ( ( blackPlayer . equals ( "AlphaBeta" ) ) || ( blackPlayer . equals ( "MiniMax" ) ) ) && ( ( whitePlayer . equals ( "AlphaBeta" ) ) || ( whitePlayer . equals ( "MiniMax" ) ) ) ) { GraphicalUI . aiType = blackPlayer ; GraphicalUI . updateMessage ( ( "AI<seq2seq4repair_space>type<seq2seq4repair_space>selected:<seq2seq4repair_space>" + blackPlayer ) ) ; currentAILabel . setText ( blackPlayer ) ; PlayerChooseDialog . AIvsAI = true ; } PlayerChooseDialog . cancelled = false ; setVisible ( false ) ; } else { PlayerChooseDialog . cancelled = true ; setVisible ( false ) ; } } No newline ; at end ; of file ; }

Fix:
PlayerChooseDialog . AIvsAI = false ;
Buggy code:
public class SettingsFragment extends PreferenceFragment { SharedPreferences mPref ; Preference syncInterval ; Preference licenses ; Preference about ; Toolbar bar ; LinearLayout root ; public MainActivity getParentActivity ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( @ NonNull LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setupAboutPref ( ) { about = findPreference ( "about" ) ; about . setOnPreferenceClickListener ( new Preference . OnPreferenceClickListener ( ) { @ Override public boolean onPreferenceClick ( Preference preference ) { <START_BUG> new com . afollestad . materialdialogs . MaterialDialog . Builder ( getParentActivity ( ) ) . title ( ( ( getResources ( ) . getString ( app_name ) ) + "<seq2seq4repair_space>v0.3" ) ) . content ( Html . fromHtml ( ( "Designed<seq2seq4repair_space>and<seq2seq4repair_space>developed<seq2seq4repair_space>by<seq2seq4repair_space><b><seq2seq4repair_space>Tevin<seq2seq4repair_space>Jeffrey<//b><seq2seq4repair_space><br><seq2seq4repair_space>" + "<a<seq2seq4repair_space>href=\"http:////tevinjeffrey.com//\">Website<//a><seq2seq4repair_space>" ) ) ) . positiveText ( "Ok" ) . show ( ) ; <END_BUG> return true ; } } ) ; } private void setupIntervalPref ( ) { } private void setupLicensesPref ( ) { } private void setSummary ( ) { } void setInterval ( int intervalIndex ) { } int getInterval ( ) { } @ Override public void onDestroyView ( ) { } }

Fix:
new com . afollestad . materialdialogs . MaterialDialog . Builder ( getParentActivity ( ) ) . title ( ( ( getResources ( ) . getString ( application_name ) ) + "<seq2seq4repair_space>v0.3" ) ) . content ( Html . fromHtml ( ( "Designed<seq2seq4repair_space>and<seq2seq4repair_space>developed<seq2seq4repair_space>by<seq2seq4repair_space><b><seq2seq4repair_space>Tevin<seq2seq4repair_space>Jeffrey<//b><seq2seq4repair_space><br><seq2seq4repair_space>" + "<a<seq2seq4repair_space>href=\"http:////tevinjeffrey.com//\">Website<//a><seq2seq4repair_space>" ) ) ) . positiveText ( "Ok" ) . show ( ) ;
Buggy code:
public class TCPSyslogServer extends TCPNetSyslogServer { private static final Logger LOGGER = Logger . getLogger ( TCPSyslogServer . class ) ; @ SuppressWarnings ( "unchecked" ) public TCPSyslogServer ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public void run ( ) { try { TCPSyslogServer . LOGGER . debug ( "Creating<seq2seq4repair_space>Syslog<seq2seq4repair_space>server<seq2seq4repair_space>socket" ) ; this . serverSocket = createServerSocket ( ) ; } catch ( IOException e ) { TCPSyslogServer . LOGGER . error ( "ServerSocket<seq2seq4repair_space>creation<seq2seq4repair_space>failed." , e ) ; throw new SyslogRuntimeException ( e ) ; } while ( ! ( this . shutdown ) ) { try { final Socket socket = this . serverSocket . accept ( ) ; if ( TCPSyslogServer . LOGGER . isDebugEnabled ( ) ) { TCPSyslogServer . LOGGER . debug ( ( "Handling<seq2seq4repair_space>Syslog<seq2seq4repair_space>client<seq2seq4repair_space>" + ( socket . getInetAddress ( ) ) ) ) ; } new Thread ( new TCPSyslogSocketHandler ( this . sockets , this , socket ) ) . start ( ) ; } catch ( IOException e ) { <START_BUG> TCPSyslogServer . LOGGER . error ( "IOException<seq2seq4repair_space>occured." , e ) ; <END_BUG> } } } }

Fix:
TCPSyslogServer . LOGGER . error ( "IOException<seq2seq4repair_space>occurred." , e ) ;
Buggy code:
public class MarkersMenu extends EnhancedMenu { public MarkersMenu ( ) { } public void setPopupMenuVisible ( boolean b ) { if ( b ) { <START_BUG> final View view = EditAction . getView ( this ) ; <END_BUG> if ( ( getMenuComponentCount ( ) ) != 0 ) { for ( int i = ( getMenuComponentCount ( ) ) - 1 ; i >= 0 ; i -- ) { Component comp = getMenuComponent ( i ) ; if ( comp instanceof JSeparator ) break ; else remove ( comp ) ; } } Buffer buffer = view . getBuffer ( ) ; Vector markers = buffer . getMarkers ( ) ; if ( ( markers . size ( ) ) == 0 ) { JMenuItem mi = new JMenuItem ( jEdit . getProperty ( "no-markers.label" ) ) ; mi . setEnabled ( false ) ; add ( mi ) ; super . setPopupMenuVisible ( b ) ; return ; } JMenu current = this ; for ( int i = 0 ; i < ( markers . size ( ) ) ; i ++ ) { final Marker marker = ( ( Marker ) ( markers . elementAt ( i ) ) ) ; int lineNo = buffer . getLineOfOffset ( marker . getPosition ( ) ) ; if ( ( current . getItemCount ( ) ) >= 20 ) { JMenu newCurrent = new JMenu ( jEdit . getProperty ( "common.more" ) ) ; current . add ( newCurrent ) ; current = newCurrent ; } JMenuItem mi = new MarkersMenu . MarkersMenuItem ( buffer , lineNo , marker . getShortcut ( ) ) ; mi . addActionListener ( new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { view . getTextArea ( ) . setCaretPosition ( marker . getPosition ( ) ) ; } } ) ; current . add ( mi ) ; } } super . setPopupMenuVisible ( b ) ; } static class MarkersMenuItem extends JMenuItem { MarkersMenuItem ( Buffer buffer , int lineNo , char shortcut ) { } public Dimension getPreferredSize ( ) { } public void paint ( Graphics g ) { } private String shortcutProp ; private char shortcut ; private static Font acceleratorFont ; private static Color acceleratorForeground ; private static Color acceleratorSelectionForeground ; private String getShortcut ( ) { } } }

Fix:
final View view = GUIUtilities . getView ( this ) ;
Buggy code:
public class ObservableListView extends ListView implements Scrollable { private int mPrevFirstVisiblePosition ; private int mPrevFirstVisibleChildHeight = - 1 ; private int mPrevScrolledChildrenHeight ; private int mPrevScrollY ; private int mScrollY ; private SparseIntArray mChildrenHeights ; private ObservableScrollViewCallbacks mCallbacks ; private ScrollState mScrollState ; private boolean mFirstScroll ; private boolean mDragging ; private boolean mIntercepted ; private MotionEvent mPrevMoveEvent ; private ViewGroup mTouchInterceptionViewGroup ; private OnScrollListener mOriginalScrollListener ; private OnScrollListener mScrollListener = new OnScrollListener ( ) { @ Override public void onScrollStateChanged ( AbsListView view , int scrollState ) { } @ Override public void onScroll ( AbsListView view , int firstVisibleItem , int visibleItemCount , int totalItemCount ) { } } ; public ObservableListView ( Context context ) { } public ObservableListView ( Context context , AttributeSet attrs ) { } public ObservableListView ( Context context , AttributeSet attrs , int defStyle ) { } @ Override public void onRestoreInstanceState ( Parcelable state ) { } @ Override public Parcelable onSaveInstanceState ( ) { } @ Override public boolean onInterceptTouchEvent ( MotionEvent ev ) { } @ Override public boolean onTouchEvent ( MotionEvent ev ) { } @ Override public void setOnScrollListener ( OnScrollListener l ) { } @ Override public void setScrollViewCallbacks ( ObservableScrollViewCallbacks listener ) { } @ Override public void setTouchInterceptionViewGroup ( ViewGroup viewGroup ) { } @ Override public void scrollVerticallyTo ( int y ) { View firstVisibleChild = getChildAt ( 0 ) ; if ( firstVisibleChild != null ) { int baseHeight = firstVisibleChild . getHeight ( ) ; <START_BUG> int position = y // baseHeight ; <END_BUG> setSelection ( position ) ; } } @ Override public int getCurrentScrollY ( ) { } private void init ( ) { } private void onScrollChanged ( ) { } static class SavedState extends BaseSavedState { int prevFirstVisiblePosition ; int prevFirstVisibleChildHeight = - 1 ; int prevScrolledChildrenHeight ; int prevScrollY ; int scrollY ; SparseIntArray childrenHeights ; SavedState ( Parcelable superState ) { } private SavedState ( Parcel in ) { } @ Override public void writeToParcel ( Parcel out , int flags ) { } public static final Parcelable . Creator < ObservableListView . SavedState > CREATOR = new Parcelable . Creator < ObservableListView . SavedState > ( ) { @ Override public com . github . ksoichiro . android . observablescrollview . SavedState createFromParcel ( Parcel in ) { } @ Override public com . github . ksoichiro . android . observablescrollview . SavedState [ ] newArray ( int size ) { } } ; } }

Fix:
int position = ( baseHeight == 0 ) ? 0 : y // baseHeight ;
Buggy code:
public class MainActivity extends ActionBarActivity implements TabListener { public static final String TAG = MainActivity . class . getSimpleName ( ) ; public static final int TAKE_PHOTO_REQUEST = 0 ; public static final int TAKE_VIDEO_REQUEST = 1 ; public static final int CHOOSE_PICTURE_REQUEST = 2 ; public static final int CHOOSE_VIDEO_REQUEST = 3 ; public static final int MEDIA_TYPE_IMAGE = 4 ; public static final int MEDIA_TYPE_VIDEO = 5 ; public static final int FILE_SIZE_LIMIT = ( ( 1 * 1024 ) * 1024 ) * 10 ; protected Uri mMediaUri ; SectionsPagerAdapter mSectionsPagerAdapter ; ViewPager mViewPager ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void navigateToLogin ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { int itemId = item . getItemId ( ) ; switch ( itemId ) { <START_BUG> case id . loginButton : <END_BUG> ParseUser . logOut ( ) ; navigateToLogin ( ) ; break ; case id . action_edit_friends : Intent intent = new Intent ( this , EditFriendsActivity . class ) ; startActivity ( intent ) ; break ; case id . action_camera : AlertDialog . Builder builder = new AlertDialog . Builder ( this ) ; builder . setItems ( camera_choice , mDialogOnClickListener ) ; AlertDialog dialog = builder . create ( ) ; dialog . show ( ) ; break ; } return super . onOptionsItemSelected ( item ) ; } @ Override public void onTabSelected ( Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabUnselected ( Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override public void onTabReselected ( Tab tab , FragmentTransaction fragmentTransaction ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } protected OnClickListener mDialogOnClickListener = new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int which ) { } private boolean isExternalStorageAvailable ( ) { } private Uri getOutputMediaFileUri ( int mediaType ) { } } ; }

Fix:
case id . action_logout :
Buggy code:
public class StoreActivity extends SoupActivity { private static final String TAG = "StoreActivity" ; protected void onResolveIntent ( ) { Log . d ( StoreActivity . TAG , "onResolveIntent" ) ; final Intent intent = getIntent ( ) ; String uri = intent . getStringExtra ( "uri" ) ; if ( TextUtils . isEmpty ( uri ) ) { SharedPreferences settings = getSharedPreferences ( PREFS_NAME , MODE_PRIVATE ) ; <START_BUG> uri = settings . getString ( "dev_store" , "https:////apps-preview.allizom.org" ) ; <END_BUG> } if ( ! ( onCreateLayout ( ) ) ) { try { String currentUri = appView . getUrl ( ) ; if ( ( currentUri != null ) && ( new URI ( currentUri ) . getAuthority ( ) . equals ( new URI ( uri ) . getAuthority ( ) ) ) ) { return ; } } catch ( URISyntaxException e ) { } } super . loadUrl ( uri ) ; } }

Fix:
uri = settings . getString ( "dev_store" , "https:////apps-preview.mozilla.org" ) ;
Buggy code:
public class MainServlet extends HttpServlet { Parser parser = new Parser ( ) ; @ Override protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { PrintWriter out = resp . getWriter ( ) ; out . print ( "<h1>Hello<seq2seq4repair_space>World<//h1>" ) ; out . close ( ) ; try { <START_BUG> parser . goToResults ( req , resp ) ; <END_BUG> } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } @ Override protected void doPost ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } }

Fix:
parser . goToResults ( req ) ;
Buggy code:
public class Model extends AbstractModel { private Serializable object ; public Model ( ) { } public Model ( final Serializable object ) { } public static Model valueOf ( final Map map ) { } public static Model valueOf ( final List list ) { } public Object getNestedModel ( ) { } public Object getObject ( final Component component ) { } public void setObject ( final Component component , final Object object ) { } <START_BUG> public void setObject ( Serializable object ) { <END_BUG> this . object = object ; } }

Fix:
public void setObject ( final Serializable object ) {
Buggy code:
class BufferedDeletes { static final int BYTES_PER_DEL_TERM = ( ( 9 * ( RamUsageEstimator . NUM_BYTES_OBJECT_REF ) ) + ( 7 * ( RamUsageEstimator . NUM_BYTES_OBJECT_HEADER ) ) ) + ( 10 * ( RamUsageEstimator . NUM_BYTES_INT ) ) ; static final int BYTES_PER_DEL_DOCID = ( ( 2 * ( RamUsageEstimator . NUM_BYTES_OBJECT_REF ) ) + ( RamUsageEstimator . NUM_BYTES_OBJECT_HEADER ) ) + ( RamUsageEstimator . NUM_BYTES_INT ) ; static final int BYTES_PER_DEL_QUERY = ( ( ( 5 * ( RamUsageEstimator . NUM_BYTES_OBJECT_REF ) ) + ( 2 * ( RamUsageEstimator . NUM_BYTES_OBJECT_HEADER ) ) ) + ( 2 * ( RamUsageEstimator . NUM_BYTES_INT ) ) ) + 24 ; final AtomicInteger numTermDeletes = new AtomicInteger ( ) ; final Map < Term , Integer > terms = new HashMap < Term , Integer > ( ) ; final Map < Query , Integer > queries = new HashMap < Query , Integer > ( ) ; final List < Integer > docIDs = new ArrayList < Integer > ( ) ; public static final Integer MAX_INT = Integer . valueOf ( Integer . MAX_VALUE ) ; final AtomicLong bytesUsed ; private static final boolean VERBOSE_DELETES = false ; long gen ; public BufferedDeletes ( ) { } BufferedDeletes ( AtomicLong bytesUsed ) { } @ Override public String toString ( ) { if ( BufferedDeletes . VERBOSE_DELETES ) { return ( ( ( ( ( ( ( ( ( ( "gen=" + ( gen ) ) + "<seq2seq4repair_space>numTerms=" ) + ( numTermDeletes ) ) + ",<seq2seq4repair_space>terms=" ) + ( terms ) ) + ",<seq2seq4repair_space>queries=" ) + ( queries ) ) + ",<seq2seq4repair_space>docIDs=" ) + ( docIDs ) ) + ",<seq2seq4repair_space>bytesUsed=" ) + ( bytesUsed ) ; } else { String s = "gen=" + ( gen ) ; if ( ( numTermDeletes . get ( ) ) != 0 ) { <START_BUG> s += ( ( ( "<seq2seq4repair_space>" + ( numTermDeletes . get ( ) ) ) + "<seq2seq4repair_space>deleted<seq2seq4repair_space>terms<seq2seq4repair_space>(unique<seq2seq4repair_space>count=" ) + ( terms . size ( ) ) ) + ")" ; <END_BUG> } if ( ( queries . size ( ) ) != 0 ) { s += ( "<seq2seq4repair_space>" + ( queries . size ( ) ) ) + "<seq2seq4repair_space>deleted<seq2seq4repair_space>queries" ; } if ( ( docIDs . size ( ) ) != 0 ) { s += ( "<seq2seq4repair_space>" + ( docIDs . size ( ) ) ) + "<seq2seq4repair_space>deleted<seq2seq4repair_space>docIDs" ; } if ( ( bytesUsed . get ( ) ) != 0 ) { s += "<seq2seq4repair_space>bytesUsed=" + ( bytesUsed . get ( ) ) ; } return s ; } } public void addQuery ( Query query , int docIDUpto ) { } public void addDocID ( int docID ) { } public void addTerm ( Term term , int docIDUpto ) { } void clear ( ) { } void clearDocIDs ( ) { } boolean any ( ) { } }

Fix:
s += ( ( ( ( "<seq2seq4repair_space>" + ( numTermDeletes . get ( ) ) ) + "<seq2seq4repair_space>deleted<seq2seq4repair_space>terms<seq2seq4repair_space>(unique<seq2seq4repair_space>count=" ) + ( terms . size ( ) ) ) + ")<seq2seq4repair_space>terms=" ) + ( terms . keySet ( ) ) ;
Buggy code:
public class SharedPreferencesManager { public static final String KEY_AUTO_LOGOUT = "auto_logout" ; public static final String KEY_SILENCE = "silence<seq2seq4repair_space>mode" ; public static final String KEY_RELOG_INTERVAL = "relog_interval" ; public void setListener ( PreferenceChangedListener listener ) { } private void updatePreference ( PreferenceChangedListener . PreferenceKey key ) { } PreferenceChangedListener listener ; Context context ; public SharedPreferencesManager ( Context context ) { } public String getUsername ( ) { } public void setUsername ( String username ) { } public String getPassword ( ) { } public void setPassword ( String password ) { } public void setUID ( String uid ) { } public String getUID ( ) { } public boolean getIsAutoLogin ( ) { } public void setIsAutoLogin ( boolean value ) { } public boolean getIsAutoCheck ( ) { } public void setIsAutoCheck ( boolean value ) { } public long getAutoCheckTime ( ) { } public void setAutoCheckTime ( long value ) { } public ArrayList < String > getAllCustomSSID ( ) { } public void setAllCustomSSID ( ArrayList < String > arr ) { } public boolean addCustomSSID ( String ssid ) { } public void deleteSSID ( String SSID ) { } public boolean isAutoLogin ( String SSID ) { } public boolean getIsAutoLogout ( ) { } public void setIsAutoLogout ( boolean value ) { } public void setIsSilent ( boolean value ) { } public boolean getIsSilent ( ) { } public void setRelogInterval ( long interval ) { } public long getRelogInterval ( ) { SharedPreferences sp = context . getSharedPreferences ( SharedPreferencesManager . KEY_RELOG_INTERVAL , MODE_PRIVATE ) ; <START_BUG> return sp . getLong ( SharedPreferencesManager . KEY_RELOG_INTERVAL , 100000 ) ; <END_BUG> } }

Fix:
return sp . getLong ( SharedPreferencesManager . KEY_RELOG_INTERVAL , 10000 ) ;
Buggy code:
public class UserAuthenticationService extends AbstractMicroservice { private static final String ID = "com.sharegame.services.user.UserAuthenticationService" ; public UserAuthenticationService ( IQueueAdapter queueAdapter ) { } @ Override public void execute ( MicroserviceRequest request ) throws ServiceExecutionException { try { MicroserviceResponse response = new MicroserviceResponse ( ) ; response . setCorrelationID ( request . getCorrelationID ( ) ) ; Object data = request . getPayload ( ) ; if ( data instanceof User ) { User user = ( ( User ) ( data ) ) ; <START_BUG> if ( ( ( ( ( user . getUsername ( ) ) == null ) || ( user . getUsername ( ) . isEmpty ( ) ) ) || ( ( user . getPassword ( ) ) == null ) ) || ( user . getPassword ( ) . isEmpty ( ) ) ) { <END_BUG> DataAccessObject < User > dao = ( ( DataAccessObject < User > ) ( DAOFactory . getInstance ( ) . getDAO ( user ) ) ) ; List < User > users = dao . find ( user ) ; if ( ! ( users . isEmpty ( ) ) ) { response . setStatus ( SUCCESS ) ; } else { response . setStatus ( FAILURE ) ; response . setStatusMessage ( "Login<seq2seq4repair_space>failed" ) ; } } else { response . setStatus ( FAILURE ) ; response . setStatusMessage ( "Username<seq2seq4repair_space>or<seq2seq4repair_space>password<seq2seq4repair_space>not<seq2seq4repair_space>set" ) ; } } else { response . setStatus ( FAILURE ) ; response . setStatusMessage ( "Invalid<seq2seq4repair_space>arguments<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>creation<seq2seq4repair_space>service" ) ; } sendResponse ( response ) ; } catch ( QueueException e ) { throw new ServiceExecutionException ( e ) ; } } @ Override public String getID ( ) { } public static void main ( String [ ] args ) { } }

Fix:
if ( ( ( ( ( user . getUsername ( ) ) != null ) && ( ! ( user . getUsername ( ) . isEmpty ( ) ) ) ) && ( ( user . getPassword ( ) ) != null ) ) && ( ! ( user . getPassword ( ) . isEmpty ( ) ) ) ) {
Buggy code:
public class ContentStreamTest extends TestCase { public void testStringStream ( ) throws IOException { } public void testFileStream ( ) throws IOException { } public void testURLStream ( ) throws IOException { String content = null ; <START_BUG> URL url = new URL ( "http:////svn.apache.org//repos//asf//lucene//solr//trunk//" ) ; <END_BUG> InputStream in = url . openStream ( ) ; try { content = IOUtils . toString ( in ) ; } finally { IOUtils . closeQuietly ( in ) ; } assertTrue ( ( ( content . length ( ) ) > 10 ) ) ; ContentStreamBase stream = new ContentStreamBase . URLStream ( url ) ; assertEquals ( content . length ( ) , stream . getSize ( ) . intValue ( ) ) ; in = stream . getStream ( ) ; try { assertTrue ( IOUtils . contentEquals ( new ByteArrayInputStream ( content . getBytes ( ) ) , in ) ) ; } finally { IOUtils . closeQuietly ( in ) ; } stream = new ContentStreamBase . URLStream ( url ) ; assertTrue ( IOUtils . contentEquals ( new StringReader ( content ) , stream . getReader ( ) ) ) ; } }

Fix:
URL url = new URL ( "http:////svn.apache.org//repos//asf//lucene//dev//trunk//" ) ;
Buggy code:
public class SSTableUtils { public static String TABLENAME = "Keyspace1" ; public static String CFNAME = "Standard1" ; public static ColumnFamily createCF ( IClock mfda , int ldt , IColumn ... cols ) { } public static File tempSSTableFile ( String tablename , String cfname ) throws IOException { } public static SSTableReader writeSSTable ( Set < String > keys ) throws IOException { } public static SSTableReader writeSSTable ( Map < String , ColumnFamily > entries ) throws IOException { } public static SSTableReader writeRawSSTable ( String tablename , String cfname , Map < byte [ ] , byte [ ] > entries ) throws IOException { File datafile = SSTableUtils . tempSSTableFile ( tablename , cfname ) ; <START_BUG> SSTableWriter writer = new SSTableWriter ( datafile . getAbsolutePath ( ) , entries . size ( ) , StorageService . getPartitioner ( ) ) ; <END_BUG> SortedMap < DecoratedKey , byte [ ] > sortedEntries = new TreeMap < DecoratedKey , byte [ ] > ( ) ; for ( Map . Entry < byte [ ] , byte [ ] > entry : entries . entrySet ( ) ) sortedEntries . put ( writer . partitioner . decorateKey ( entry . getKey ( ) ) , entry . getValue ( ) ) ; for ( Map . Entry < DecoratedKey , byte [ ] > entry : sortedEntries . entrySet ( ) ) writer . append ( entry . getKey ( ) , entry . getValue ( ) ) ; new File ( writer . indexFilename ( ) ) . deleteOnExit ( ) ; new File ( writer . filterFilename ( ) ) . deleteOnExit ( ) ; return writer . closeAndOpenReader ( ) ; } }

Fix:
SSTableWriter writer = new SSTableWriter ( datafile . getAbsolutePath ( ) , entries . size ( ) ) ;
Buggy code:
public class War extends Jar { private File deploymentDescriptor ; private boolean descriptorAdded ; public War ( ) { } public void setWarfile ( File warFile ) { } public void setWebxml ( File descr ) { } public void addLib ( ZipFileSet fs ) { } public void addClasses ( ZipFileSet fs ) { } public void addWebinf ( ZipFileSet fs ) { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { <START_BUG> if ( ( deploymentDescriptor ) == null ) { <END_BUG> throw new BuildException ( "webxml<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , location ) ; } super . initZipOutputStream ( zOut ) ; } protected void zipFile ( File file , ZipOutputStream zOut , String vPath ) throws IOException { } protected void cleanUp ( ) { } }

Fix:
if ( ( ( deploymentDescriptor ) == null ) && ( ! ( isInUpdateMode ( ) ) ) ) {
Buggy code:
public class Database extends SQLiteOpenHelper { private static Database sInstance ; public static String DB_NAME = "UpdateForSefariaMobileDatabase" ; static int DB_VERSION = 1 ; private SQLiteDatabase myDataBase ; private final Context myContext ; public Database ( Context context ) { } public static String getDbPath ( ) { } private static boolean mkDirs ( String path ) { File folder = new File ( path ) ; <START_BUG> return ( ( folder . mkdirs ( ) ) || true ) || ( folder . isDirectory ( ) ) ; <END_BUG> } public static String getInternalFolder ( ) { } private static String getStorageDir ( boolean tryExternal ) { } public void createDatabase ( ) throws IOException { } public static void deleteDatabase ( ) { } public static Database getInstance ( ) { } public static boolean checkDataBase ( ) { } private void copyDatabase ( String path , String name ) throws IOException { } public static void createAPIdb ( ) { } public void unzipDatabase ( String oldPath , String newPath , boolean fromAssets ) throws IOException { } public static int getVersion ( ) { } public void openDataBase ( ) throws SQLException { } @ Override public synchronized void close ( ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } }

Fix:
return ( folder . mkdirs ( ) ) || ( folder . isDirectory ( ) ) ;
Buggy code:
public class EntityManagerFactoryImpl implements Closeable , OpenJPAEntityManagerFactory , OpenJPAEntityManagerFactorySPI { private static final Localizer _loc = Localizer . forPackage ( EntityManagerFactoryImpl . class ) ; private DelegatingBrokerFactory _factory = null ; private transient Constructor < FetchPlan > _plan = null ; private transient StoreCache _cache = null ; private transient QueryResultCache _queryCache = null ; public EntityManagerFactoryImpl ( ) { } public EntityManagerFactoryImpl ( BrokerFactory factory ) { } public BrokerFactory getBrokerFactory ( ) { } public void setBrokerFactory ( BrokerFactory factory ) { } public OpenJPAConfiguration getConfiguration ( ) { } public Properties getProperties ( ) { } public Object putUserObject ( Object key , Object val ) { } public Object getUserObject ( Object key ) { } public StoreCache getStoreCache ( ) { } public StoreCache getStoreCache ( String cacheName ) { <START_BUG> return new StoreCacheImpl ( this , _factory . getConfiguration ( ) . getDataCacheManagerInstance ( ) . getDataCache ( cacheName ) ) ; <END_BUG> } public QueryResultCache getQueryResultCache ( ) { } public OpenJPAEntityManagerSPI createEntityManager ( ) { } public OpenJPAEntityManagerSPI createEntityManager ( Map props ) { } protected EntityManagerImpl newEntityManagerImpl ( Broker broker ) { } public void addLifecycleListener ( Object listener , Class ... classes ) { } public void removeLifecycleListener ( Object listener ) { } public void addTransactionListener ( Object listener ) { } public void removeTransactionListener ( Object listener ) { } public void close ( ) { } public boolean isOpen ( ) { } public int hashCode ( ) { } public boolean equals ( Object other ) { } FetchPlan toFetchPlan ( Broker broker , FetchConfiguration fetch ) { } }

Fix:
return new StoreCacheImpl ( this , _factory . getConfiguration ( ) . getDataCacheManagerInstance ( ) . getDataCache ( cacheName , true ) ) ;
Buggy code:
public class Game { public Player first ; public Player last ; public int numPlayers ; public int maxPlayers ; public int gameId ; public Game next ; public int [ ] dice ; public int [ ] count ; public int pot ; public String lastCall ; public String currentCall ; public int lastId ; public boolean liar ; public Game ( int id , int mp ) { } public void add ( String username , int pid , int years , PrintStream ps ) { } public void remove ( int pid ) { } public Player search ( int pid ) { } public void sendAll ( String msg ) { } public String getDice ( int pos ) { } public String allDice ( ) { String diceStr = "" ; for ( int i = 0 ; i < ( dice . length ) ; i ++ ) { <START_BUG> diceStr += dice [ i ] ; <END_BUG> } return diceStr ; } public boolean checkCall ( String call ) { } public void newRound ( ) { } No newline ; at end ; of file ; }

Fix:
diceStr += ( dice [ i ] ) + "<seq2seq4repair_space>" ;
Buggy code:
public final class Texture { private static Map < String , Texture > _textureCache = new HashMap < > ( ) ; private static Map < String , Texture > _normalsCache = new HashMap < > ( ) ; public final ByteBuffer textureData ; private final List < ByteBuffer > _mipMappedData = new ArrayList < > ( ) ; public final int width ; public final int height ; public final int numPixelComponents ; public final boolean useSRGB ; private final int glTextureRef ; private Texture ( final ByteBuffer textureData , final int width , final int height , final int numPixelComponents , boolean useSRGB ) { } private int initOpenGL ( ) { } private int textureFormat ( ) { } private int internalFormat ( ) { } public void bindToTextureUnit ( TextureUnit textureUnit ) { } public static void unbindTexture ( TextureUnit textureUnit ) { } private static ByteBuffer loadImageWithName ( String directory , String fileName , IntBuffer widthBuffer , IntBuffer heightBuffer , IntBuffer numPixelComponentsBuffer ) { String resourcePath = Utilities . pathForResource ( directory , fileName , null ) ; try { byte [ ] encodedImageData = Files . readAllBytes ( new File ( resourcePath ) . toPath ( ) ) ; ByteBuffer encodedImageDataBuffer = BufferUtils . createByteBuffer ( encodedImageData . length ) ; encodedImageDataBuffer . put ( encodedImageData ) ; encodedImageDataBuffer . flip ( ) ; STBImage . stbi_set_flip_vertically_on_load ( 1 ) ; <START_BUG> ByteBuffer image = STBImage . stbi_load_from_memory ( encodedImageDataBuffer , widthBuffer , heightBuffer , numPixelComponentsBuffer , 0 ) ; <END_BUG> if ( image == null ) { throw new RuntimeException ( ( ( ( "Error<seq2seq4repair_space>loading<seq2seq4repair_space>image<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>" + fileName ) + ":<seq2seq4repair_space>" ) + ( STBImage . stbi_failure_reason ( ) ) ) ) ; } return image ; } catch ( IOException e ) { throw new RuntimeException ( ( ( ( "Error<seq2seq4repair_space>loading<seq2seq4repair_space>image<seq2seq4repair_space>with<seq2seq4repair_space>name<seq2seq4repair_space>" + fileName ) + ":<seq2seq4repair_space>" ) + e ) ) ; } } public static Texture loadHeightMapWithName ( String directory , String fileName ) { } public static Texture loadTextureWithName ( String directory , String fileName , boolean useSRGB ) { } }

Fix:
ByteBuffer image = STBImage . stbi_load_from_memory ( encodedImageDataBuffer , widthBuffer , heightBuffer , numPixelComponentsBuffer , 4 ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class ModuleAccessesBundleServiceTestCase extends AbstractXServiceTestCase { private static final String TARGET_BUNDLE_NAME = "example-xservice-mab-target-bundle" ; private static final String CLIENT_MODULE_NAME = "example-xservice-mab-client-module" ; @ Deployment public static JavaArchive createdeployment ( ) { } @ Inject public ServiceContainer serviceContainer ; @ ArquillianResource public Deployer deployer ; @ Inject public BundleContext context ; @ Test public void moduleInvokesBundleService ( ) throws Exception { } @ Deployment ( name = ModuleAccessesBundleServiceTestCase . CLIENT_MODULE_NAME , managed = false , testable = false ) public static JavaArchive getClientModuleArchive ( ) { final JavaArchive archive = ShrinkWrap . create ( JavaArchive . class , ModuleAccessesBundleServiceTestCase . CLIENT_MODULE_NAME ) ; archive . addClasses ( ClientModuleTwoActivator . class ) ; archive . addAsServiceProvider ( ServiceActivator . class , ClientModuleTwoActivator . class ) ; archive . setManifest ( new Asset ( ) { public InputStream openStream ( ) { ManifestBuilder builder = ManifestBuilder . newInstance ( ) ; <START_BUG> builder . addManifestHeader ( "Dependencies" , "org.osgi.core,org.jboss.modules,org.jboss.logging,org.jboss.osgi.framework,deployment.example-xservice-mab-target-bundle:0.0.0" ) ; <END_BUG> return builder . openStream ( ) ; } } ) ; return archive ; } @ Deployment ( name = ModuleAccessesBundleServiceTestCase . TARGET_BUNDLE_NAME , managed = false , testable = false ) public static JavaArchive getTargetBundleArchive ( ) { } }

Fix:
builder . addManifestHeader ( "Dependencies" , "org.osgi.core,org.jboss.modules,org.jboss.logging,org.jboss.osgi.framework,deployment.example-xservice-mab-target-bundle" ) ;
Buggy code:
public class AjaxPagingNavigationBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; private final IAjaxLink owner ; public AjaxPagingNavigationBehavior ( IAjaxLink owner , IPageable pageable , String event ) { } @ Override protected void onEvent ( AjaxRequestTarget target ) { owner . onClick ( target ) ; <START_BUG> AjaxPagingNavigator navigator = ( ( AjaxPagingNavigator ) ( ( ( Component < ? > ) ( owner ) ) . findParent ( AjaxPagingNavigator . class ) ) ) ; <END_BUG> if ( navigator == null ) { throw new org . apache . wicket . WicketRuntimeException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>AjaxPagingNavigator<seq2seq4repair_space>component<seq2seq4repair_space>in<seq2seq4repair_space>hierarchy<seq2seq4repair_space>starting<seq2seq4repair_space>from<seq2seq4repair_space>" + ( owner ) ) ) ; } navigator . onAjaxEvent ( target ) ; } @ Override protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } @ Override protected void onComponentTag ( ComponentTag tag ) { } }

Fix:
AjaxPagingNavigator navigator = ( ( AjaxPagingNavigator ) ( ( ( org . apache . wicket . Component ) ( owner ) ) . findParent ( AjaxPagingNavigator . class ) ) ) ;