nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Save implements Command { private static transient Logger log = Hierarchy . getDefaultHierarchy ( ) . getLoggerFor ( "jmeter.gui" ) ; public static final String SAVE_ALL = "save_all" ; public static final String SAVE = "save_as" ; public static final String SAVE_TO_PREVIOUS = "save" ; private String chosenFile ; private String testPlanFile ; private static Set commands = new HashSet ( ) ; public Save ( ) { } public Set getActionNames ( ) { } public void setTestPlanFile ( String f ) { } public void doAction ( ActionEvent e ) { HashTree subTree = null ; if ( e . getActionCommand ( ) . equals ( Save . SAVE ) ) { subTree = GuiPackage . getInstance ( ) . getCurrentSubTree ( ) ; } else if ( ( e . getActionCommand ( ) . equals ( Save . SAVE_ALL ) ) || ( e . getActionCommand ( ) . equals ( Save . SAVE_TO_PREVIOUS ) ) ) { subTree = GuiPackage . getInstance ( ) . getTreeModel ( ) . getTestPlan ( ) ; } if ( ( ! ( Save . SAVE_TO_PREVIOUS . equals ( e . getActionCommand ( ) ) ) ) || ( ( testPlanFile ) == null ) ) { JFileChooser chooser = FileDialoger . promptToSaveFile ( ( ( GuiPackage . getInstance ( ) . getTreeListener ( ) . getCurrentNode ( ) . getName ( ) ) + ".jmx" ) ) ; if ( chooser == null ) { return ; } if ( ( e . getActionCommand ( ) . equals ( Save . SAVE_ALL ) ) || ( e . getActionCommand ( ) . equals ( Save . SAVE_TO_PREVIOUS ) ) ) { testPlanFile = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ; chosenFile = testPlanFile ; } else { chosenFile = chooser . getSelectedFile ( ) . getAbsolutePath ( ) ; } } else { chosenFile = testPlanFile ; } <START_BUG> ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( subTree , e . getID ( ) , CheckDirty . SUB_TREE_SAVED ) ) ; <END_BUG> try { convertSubTree ( subTree ) ; } catch ( Exception err ) { } OutputStream writer = null ; try { writer = new FileOutputStream ( chosenFile ) ; SaveService . saveSubTree ( subTree , writer ) ; } catch ( Throwable ex ) { Save . log . error ( "" , ex ) ; } finally { closeWriter ( writer ) ; GuiPackage . getInstance ( ) . getMainFrame ( ) . repaint ( ) ; } } private void convertSubTree ( HashTree tree ) { } public static class Test extends TestCase { Save save ; public Test ( String name ) { } public void setUp ( ) { } public void testTreeConversion ( ) throws Exception { } } private void closeWriter ( OutputStream writer ) { } }

Fix:
ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( subTree . clone ( ) , e . getID ( ) , CheckDirty . SUB_TREE_SAVED ) ) ;
Buggy code:
public abstract class Request implements Comparable < Request > { protected int clock ; protected int acksReceived ; protected int numServers ; protected Server server ; protected ServerRecord sr ; public void ping ( ) { } public Request ( Server server , ServerRecord sr , int clock , int numServers ) { } @ Override public boolean equals ( Object other ) { } public boolean isMine ( ) { } public void setClock ( int clock ) { } public Server getServer ( ) { } public ServerRecord getServerRecord ( ) { } private int getId ( ) { } public String getMsg ( ) { } public abstract void fulfill ( ) { } public abstract void fulfillSilently ( Server server ) { } public int compareTo ( Request other ) { <START_BUG> if ( ( ( this . clock ) < ( other . clock ) ) || ( ( ( this . clock ) == ( other . clock ) ) && ( ( getId ( ) ) < ( getId ( ) ) ) ) ) { <END_BUG> return - 1 ; } return 1 ; } public void ackReceived ( ) { } public boolean isValid ( ) { } public int getClock ( ) { } public abstract String encode ( ) { } }

Fix:
if ( ( ( this . clock ) < ( other . clock ) ) || ( ( ( this . clock ) == ( other . clock ) ) && ( ( getId ( ) ) < ( other . getId ( ) ) ) ) ) {
Buggy code:
public class TestMultiMMap extends LuceneTestCase { @ Override public void setUp ( ) throws Exception { } public void testCloneSafety ( ) throws Exception { } public void testCloneClose ( ) throws Exception { } public void testCloneSliceSafety ( ) throws Exception { } public void testCloneSliceClose ( ) throws Exception { } public void testSeekZero ( ) throws Exception { } public void testSeekSliceZero ( ) throws Exception { } public void testSeekEnd ( ) throws Exception { } public void testSeekSliceEnd ( ) throws Exception { } public void testSeeking ( ) throws Exception { } public void testSlicedSeeking ( ) throws Exception { } public void testRandomChunkSizes ( ) throws Exception { } private void assertChunking ( Random random , int chunkSize ) throws Exception { File path = createTempDir ( ( "mmap" + chunkSize ) ) ; MMapDirectory mmapDir = new MMapDirectory ( path , null , chunkSize ) ; if ( MMapDirectory . UNMAP_SUPPORTED ) mmapDir . setUseUnmap ( true ) ; MockDirectoryWrapper dir = new MockDirectoryWrapper ( random , mmapDir ) ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( random ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; Document doc = new Document ( ) ; Field docid = newStringField ( "docid" , "0" , YES ) ; Field junk = newStringField ( "junk" , "" , YES ) ; doc . add ( docid ) ; doc . add ( junk ) ; int numDocs = 100 ; for ( int i = 0 ; i < numDocs ; i ++ ) { docid . setStringValue ( ( "" + i ) ) ; junk . setStringValue ( TestUtil . randomUnicodeString ( random ) ) ; writer . addDocument ( doc ) ; } IndexReader reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> int numAsserts = atLeast ( 100 ) ; for ( int i = 0 ; i < numAsserts ; i ++ ) { int docID = random . nextInt ( numDocs ) ; assertEquals ( ( "" + docID ) , reader . document ( docID ) . get ( "docid" ) ) ; } reader . close ( ) ; dir . close ( ) ; } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class UndertowConnector implements Connector { private final ListenerService < ? > listener ; public UndertowConnector ( ListenerService < ? > listener ) { } @ Override public boolean isReverse ( ) { } @ Override public Type getType ( ) { } @ Override public InetAddress getAddress ( ) { } @ Override public void setAddress ( InetAddress address ) { } @ Override public int getPort ( ) { <START_BUG> return this . listener . getBinding ( ) . getValue ( ) . getPort ( ) ; <END_BUG> } @ Override public boolean isAvailable ( ) { } @ Override public int getMaxThreads ( ) { } @ Override public int getBusyThreads ( ) { } @ Override public long getBytesSent ( ) { } @ Override public long getBytesReceived ( ) { } @ Override public long getRequestCount ( ) { } @ Override public String toString ( ) { } @ Override public boolean equals ( Object object ) { } @ Override public int hashCode ( ) { } }

Fix:
return this . listener . getBinding ( ) . getValue ( ) . getAbsolutePort ( ) ;
Buggy code:
public class GPSFindLocationFromStringOnMap extends GPSActivity { @ Override protected void onPause ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onCreate ( Bundle icicle ) { super . onCreate ( icicle ) ; setContentView ( gps_map ) ; Init ( ) ; ImageButton cancel = ( ( ImageButton ) ( findViewById ( ib_map_logout ) ) ) ; Bundle b = getIntent ( ) . getExtras ( ) ; byte [ ] d = ( ( byte [ ] ) ( b . getByteArray ( "meeting" ) ) ) ; Meeting s = ( ( Meeting ) ( SerializerHelper . deserializeObject ( d ) ) ) ; if ( s == null ) { Log . e ( "getting<seq2seq4repair_space>meeting<seq2seq4repair_space>from<seq2seq4repair_space>bundle" , "Desirialised<seq2seq4repair_space>to<seq2seq4repair_space>null" ) ; } Mymap . invalidate ( ) ; Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "Meeting<seq2seq4repair_space>name<seq2seq4repair_space>=<seq2seq4repair_space>" + ( s . getTitle ( ) ) ) ) ; <START_BUG> Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "Meeting<seq2seq4repair_space>owner" + ( s . getOwner ( ) . getName ( ) ) ) ) ; <END_BUG> Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "address=<seq2seq4repair_space>" + ( s . getAddress ( ) ) ) ) ; Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "location<seq2seq4repair_space>lat<seq2seq4repair_space>=<seq2seq4repair_space>" + ( s . getCoordinates ( ) . getILatitude ( ) ) ) ) ; Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "<seq2seq4repair_space>loc<seq2seq4repair_space>lon<seq2seq4repair_space>=<seq2seq4repair_space>" + ( s . getCoordinates ( ) . getILongitude ( ) ) ) ) ; DrawAtMap ( s . getCoordinates ( ) , s . getAddress ( ) , s . getOwner ( ) . getName ( ) , bluedot ) ; mapcon . animateTo ( new com . google . android . maps . GeoPoint ( s . getCoordinates ( ) . getILatitude ( ) , s . getCoordinates ( ) . getILongitude ( ) ) ) ; mapcon . setZoom ( 10 ) ; cancel . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View v ) { try { finish ( ) ; } catch ( Throwable e ) { e . printStackTrace ( ) ; } } } ) ; } }

Fix:
Log . i ( "cheking<seq2seq4repair_space>bundle<seq2seq4repair_space>throughput<seq2seq4repair_space>" , ( "Meeting<seq2seq4repair_space>owner<seq2seq4repair_space>=<seq2seq4repair_space>" + ( s . getOwner ( ) . getName ( ) ) ) ) ;
Buggy code:
public class NullLiteral extends Literal { public NullLiteral ( int pos ) { } @ Override public TypedValue getLiteralValue ( ) { <START_BUG> return TypedValue . NULL_TYPED_VALUE ; <END_BUG> } @ Override public String toString ( ) { } }

Fix:
return TypedValue . NULL ;
Buggy code:
public class IsNullExpression extends UnaryExpressionPredicate { public IsNullExpression ( Expression op ) { } @ Override public String asExpression ( AliasContext ctx ) { <START_BUG> return ( ( ( ( Visitable ) ( _e ) ) . asExpression ( ctx ) ) + "<seq2seq4repair_space>" ) + ( _op ) ; <END_BUG> } }

Fix:
return ( ( ( ( Visitable ) ( _e ) ) . asExpression ( ctx ) ) + ( SPACE ) ) + ( _op ) ;
Buggy code:
@ Interface ( modid = "ThermalExpansion" , iface = "cofh.api.energy.IEnergyReceiver" , striprefs = true ) public class TileEntityRFCharger extends NetworkedTileEntity implements IEnergyReceiver { private EnergyStorage storage = new EnergyStorage ( 80000 ) ; public static String publicName = "rfCharger" ; private String name = "tileEntityrfCharger" ; public TileEntityRFCharger ( ) { } public String getName ( ) { } @ Override public void readFromNBT ( NBTTagCompound nbttagcompound ) { } @ Override public void writeToNBT ( NBTTagCompound nbttagcompound ) { } @ Override public void updateEntity ( ) { } private int addFuel ( ITurtleAccess turtle , int rate ) { if ( ( turtle . getFuelLimit ( ) ) > ( turtle . getFuelLevel ( ) ) ) { <START_BUG> turtle . addFuel ( rate ) ; <END_BUG> return rate ; } return 0 ; } @ Override public int receiveEnergy ( ForgeDirection from , int maxReceive , boolean simulate ) { } @ Override public int getEnergyStored ( ForgeDirection from ) { } @ Override public int getMaxEnergyStored ( ForgeDirection from ) { } @ Override public boolean canConnectEnergy ( ForgeDirection from ) { } }

Fix:
turtle . setFuelLevel ( ( rate + ( turtle . getFuelLevel ( ) ) ) ) ;
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 = ( baseHeight == 0 ) ? 0 : 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 ) ? y : y // baseHeight ;
Buggy code:
public class Menu extends Widget { int x ; int y ; boolean hasLocation ; MenuItem cascade ; MenuItem selectedItem ; Decorations parent ; int imItem ; int imSeparator ; int imHandle ; ImageList imageList ; public Menu ( Control parent ) { } public Menu ( Decorations parent , int style ) { } public Menu ( Menu parentMenu ) { } public Menu ( MenuItem parentItem ) { } static Control checkNull ( Control control ) { } static Menu checkNull ( Menu menu ) { } static MenuItem checkNull ( MenuItem item ) { } static int checkStyle ( int style ) { } public void _setVisible ( boolean visible ) { } void addAccelerators ( int accelGroup ) { } public void addMenuListener ( MenuListener listener ) { } public void addHelpListener ( HelpListener listener ) { } void createHandle ( int index ) { } void createIMMenu ( int imHandle ) { } void createWidget ( int index ) { } void fixMenus ( Decorations newParent ) { } Rectangle getBounds ( ) { } public MenuItem getDefaultItem ( ) { } public boolean getEnabled ( ) { } public MenuItem getItem ( int index ) { } public int getItemCount ( ) { } public MenuItem [ ] getItems ( ) { } String getNameText ( ) { } public Decorations getParent ( ) { } public MenuItem getParentItem ( ) { } public Menu getParentMenu ( ) { } public Shell getShell ( ) { } public boolean getVisible ( ) { } int gtk_hide ( int widget ) { } int gtk_show ( int widget ) { } int gtk_show_help ( int widget , int helpType ) { } void hookEvents ( ) { } public int indexOf ( MenuItem item ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } int menuPositionProc ( int menu , int x , int y , int push_in , int user_data ) { } void releaseChildren ( boolean destroy ) { MenuItem [ ] items = getItems ( ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { MenuItem item = items [ i ] ; if ( ( item != null ) && ( ! ( item . isDisposed ( ) ) ) ) { <START_BUG> item . releaseChildren ( false ) ; <END_BUG> } } super . releaseChildren ( destroy ) ; } void releaseParent ( ) { } void releaseWidget ( ) { } public void removeMenuListener ( MenuListener listener ) { } void removeAccelerators ( int accelGroup ) { } public void removeHelpListener ( HelpListener listener ) { } boolean sendHelpEvent ( int helpType ) { } public void setDefaultItem ( MenuItem item ) { } public void setEnabled ( boolean enabled ) { } public void setLocation ( int x , int y ) { } public void setLocation ( Point location ) { } void setOrientation ( ) { } public void setVisible ( boolean visible ) { } }

Fix:
item . release ( false ) ;
Buggy code:
public class Mkdir extends Task { private File dir ; public void setDir ( File dir ) { } public void execute ( ) throws TaskException { if ( ( dir ) == null ) { throw new TaskException ( "dir<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; } if ( dir . isFile ( ) ) { throw new TaskException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>file<seq2seq4repair_space>already<seq2seq4repair_space>exists<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } if ( ! ( dir . exists ( ) ) ) { boolean result = dir . mkdirs ( ) ; if ( result == false ) { String msg = ( ( "Directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "successful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new TaskException ( msg ) ; } <START_BUG> log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; <END_BUG> } } }

Fix:
getLogger ( ) . info ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ;
Buggy code:
public class QuestionPresenter extends PresenterWidget < QuestionPresenter . MyView > implements QuestionUiHandlers { public interface MyView extends HasUiHandlers < QuestionUiHandlers > , View { void setQuizFinished ( ) { } void setQuestion ( int questionNumber ) { } } private int currentQuestion = 0 ; @ Inject QuestionPresenter ( EventBus eventBus , QuestionPresenter . MyView view ) { } @ Override public void onNextQuestion ( ) { } @ Override public void resetQuiz ( ) { } @ Override public void share ( ) { } @ Override protected void onBind ( ) { <START_BUG> getView ( ) . setQuestion ( 1 ) ; <END_BUG> } }

Fix:
onNextQuestion ( ) ;
Buggy code:
public class Unarmed { public static void unarmedBonus ( Player attacker , EntityDamageByEntityEvent event ) { } public static void disarmProcCheck ( Player attacker , Player defender ) { int skillLevel = Users . getProfile ( attacker ) . getSkillLevel ( UNARMED ) ; <START_BUG> if ( ( attacker . getItemInHand ( ) ) != null ) { <END_BUG> if ( skillLevel >= 1000 ) { if ( ( ( Math . random ( ) ) * 3000 ) <= 1000 ) { ItemStack item = defender . getItemInHand ( ) ; defender . sendMessage ( mcLocale . getString ( "Skills.Disarmed" ) ) ; m . mcDropItem ( defender . getLocation ( ) , item ) ; defender . setItemInHand ( null ) ; } } else { if ( ( ( Math . random ( ) ) * 3000 ) <= skillLevel ) { ItemStack item = defender . getItemInHand ( ) ; defender . sendMessage ( mcLocale . getString ( "Skills.Disarmed" ) ) ; m . mcDropItem ( defender . getLocation ( ) , item ) ; defender . setItemInHand ( null ) ; } } } } }

Fix:
if ( ( defender . getItemInHand ( ) ) != null ) {
Buggy code:
public final class ProxyWeavingHook implements WeavingHook { private static final Logger LOGGER = LoggerFactory . getLogger ( ProxyWeavingHook . class ) ; private static final String IMPORT_A = "org.apache.aries.proxy.weaving" ; private static final String IMPORT_B = "org.apache.aries.proxy" ; public final void weave ( WovenClass wovenClass ) { Bundle b = wovenClass . getBundleWiring ( ) . getBundle ( ) ; if ( ( ( ( b . getBundleId ( ) ) == 0 ) || ( b . getSymbolicName ( ) . startsWith ( "org.apache.aries.proxy" ) ) ) || ( b . getSymbolicName ( ) . startsWith ( "org.apache.aries.util" ) ) ) { return ; } if ( ( ( wovenClass . getClassName ( ) . startsWith ( "org.objectweb.asm" ) ) || ( wovenClass . getClassName ( ) . startsWith ( "org.slf4j" ) ) ) || ( wovenClass . getClassName ( ) . startsWith ( "org.apache.log4j" ) ) ) return ; byte [ ] bytes = null ; try { bytes = WovenProxyGenerator . getWovenProxy ( wovenClass . getBytes ( ) , wovenClass . getClassName ( ) , wovenClass . getBundleWiring ( ) . getClassLoader ( ) ) ; } catch ( Exception e ) { if ( ( e instanceof RuntimeException ) && ( ( e . getCause ( ) ) instanceof UnableToProxyException ) ) { <START_BUG> ProxyWeavingHook . LOGGER . info ( MESSAGES . getMessage ( "cannot.weave" , wovenClass . getClassName ( ) ) , e ) ; <END_BUG> } else { String failureMessage = MESSAGES . getMessage ( "fatal.weaving.failure" , wovenClass . getClassName ( ) ) ; ProxyWeavingHook . LOGGER . error ( failureMessage , e ) ; throw new WeavingException ( failureMessage , e ) ; } } if ( ( bytes != null ) && ( ( bytes . length ) != 0 ) ) { wovenClass . setBytes ( bytes ) ; List < String > imports = wovenClass . getDynamicImports ( ) ; imports . add ( ProxyWeavingHook . IMPORT_A ) ; imports . add ( ProxyWeavingHook . IMPORT_B ) ; } } }

Fix:
ProxyWeavingHook . LOGGER . trace ( MESSAGES . getMessage ( "cannot.weave" , wovenClass . getClassName ( ) ) , e ) ;
Buggy code:
@ ExportedBean public class CvsTagAction extends AbstractScmTagAction implements Describable < CvsTagAction > { private final List < String > tagNames = new ArrayList < String > ( ) ; private final CVSSCM parent ; public CvsTagAction ( final AbstractBuild < ? , ? > build , final CVSSCM parent ) { } @ Override public String getIconFileName ( ) { } @ Override public String getDisplayName ( ) { } @ Override public boolean isTagged ( ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Descriptor < CvsTagAction > getDescriptor ( ) { } @ Exported public String [ ] getTagNames ( ) { } public CVSSCM getParent ( ) { } public synchronized void doSubmit ( final StaplerRequest request , final StaplerResponse response ) throws IOException , ServletException { } public void perform ( final String tagName ) throws IOException { if ( getBuild ( ) . hasPermission ( UPDATE ) ) { getBuild ( ) . keepLog ( true ) ; } CvsRevisionState state = getBuild ( ) . getAction ( CvsRevisionState . class ) ; if ( state == null ) { return ; } <START_BUG> new CvsTagActionWorker ( state , tagName , getBuild ( ) , this ) . run ( ) ; <END_BUG> synchronized ( this ) { tagNames . add ( tagName ) ; } } public FormValidation doCheckTag ( @ QueryParameter final String value ) { } public boolean checkTagName ( final String tagName ) { } No newline ; at end ; of file ; }

Fix:
new CvsTagActionWorker ( state , tagName , getBuild ( ) , this ) . start ( ) ;
Buggy code:
public class GPSCoordinateDataAdapter { private static final String TABLE_NAME = "gps_coordinates" ; private static final String KEY_ID = "_id" ; private static final String KEY_TRIP_ID = "trip_id" ; private static final String KEY_LONGITUDE = "longitude" ; private static final String KEY_LATITUDE = "latitude" ; public static final String CREATE_STATEMENT ; public static final String DROP_STATEMENT = "DROP<seq2seq4repair_space>TABLE<seq2seq4repair_space>IF<seq2seq4repair_space>EXISTS<seq2seq4repair_space>" + ( GPSCoordinateDataAdapter . TABLE_NAME ) ; private SQLiteDatabase mDb ; private DBHelper mOpenHelper ; public GPSCoordinateDataAdapter ( Context context ) { } public void open ( ) { } public void close ( ) { } private ContentValues getContentValues ( GPSCoordinate coordinate ) { } private GPSCoordinate getGPSCoordinateFromCursor ( Cursor cursor ) { } public ArrayList < GPSCoordinate > getAllCoordinates ( ArrayList < GPSCoordinate > coordinates , long tripID ) { coordinates . clear ( ) ; String [ ] projection = new String [ ] { GPSCoordinateDataAdapter . KEY_ID , GPSCoordinateDataAdapter . KEY_LATITUDE , GPSCoordinateDataAdapter . KEY_LONGITUDE , GPSCoordinateDataAdapter . KEY_TRIP_ID } ; <START_BUG> String selection = ( ( GPSCoordinateDataAdapter . KEY_TRIP_ID ) + "<seq2seq4repair_space>+<seq2seq4repair_space>" ) + tripID ; <END_BUG> Cursor cursor = mDb . query ( GPSCoordinateDataAdapter . TABLE_NAME , projection , selection , null , null , null , null , null ) ; if ( ! ( cursor . moveToFirst ( ) ) ) { return coordinates ; } do { GPSCoordinate toAdd = getGPSCoordinateFromCursor ( cursor ) ; coordinates . add ( toAdd ) ; } while ( cursor . moveToNext ( ) ) ; Collections . sort ( coordinates ) ; return coordinates ; } public void addGPSCoordinates ( ArrayList < GPSCoordinate > coordinates , long tripID ) { } public void deleteGPSCoordinates ( long tripID ) { } }

Fix:
String selection = ( ( GPSCoordinateDataAdapter . KEY_TRIP_ID ) + "<seq2seq4repair_space>=<seq2seq4repair_space>" ) + tripID ;
Buggy code:
public class BdfWriter implements SdfWriter { @ Override public String write ( String path , SoftwareDefinitionFileBuilder builder ) throws Exception { File fileOnDisk = new File ( ( path + ( builder . getBinaryFileName ( ) ) ) ) ; BdfFile file = new BdfFile ( fileOnDisk ) ; write ( file , builder ) ; <START_BUG> return fileOnDisk . getCanonicalPath ( ) ; <END_BUG> } public void write ( BdfFile file , SoftwareDefinitionFileBuilder builder ) throws IOException { } }

Fix:
return fileOnDisk . getAbsolutePath ( ) ;
Buggy code:
public class ControlChange { public int channel ; public int number ; public int value ; public long timestamp ; public String bus_name ; public ControlChange ( int channel , int number , int value ) { } public ControlChange ( int channel , int number , int value , long timestamp , String bus_name ) { } public void setChannel ( int channel ) { } public int channel ( ) { } public void setNumber ( int number ) { } public int number ( ) { } public void setValue ( int value ) { } public int value ( ) { } public String toString ( ) { <START_BUG> String result = ( ( ( ( "[c:" + ( channel ) ) + ",<seq2seq4repair_space>v:" ) + ( number ) ) + ",<seq2seq4repair_space>n:" ) + ( value ) ; <END_BUG> if ( ( timestamp ) != ( - 1 ) ) result += ",<seq2seq4repair_space>ts:" + ( timestamp ) ; if ( ( bus_name ) != null ) result += ",<seq2seq4repair_space>b:" + ( bus_name ) ; result += "]" ; return result ; } public boolean equals ( Object obj ) { } }

Fix:
String result = ( ( ( ( "[c:" + ( channel ) ) + ",<seq2seq4repair_space>n:" ) + ( number ) ) + ",<seq2seq4repair_space>v:" ) + ( value ) ;
Buggy code:
public class DefaultRequestTargetResolverStrategy implements IRequestTargetResolverStrategy { public DefaultRequestTargetResolverStrategy ( ) { } public final IRequestTarget resolve ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveSharedResource ( final RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveRenderedPage ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveListenerInterfaceTarget ( RequestCycle requestCycle , final Page page , final String componentPath , final String interfaceName ) { } protected IRequestTarget resolveBookmarkablePage ( RequestCycle requestCycle , RequestParameters requestParameters ) { } protected IRequestTarget resolveHomePageTarget ( RequestCycle requestCycle , RequestParameters requestParameters ) { Session session = requestCycle . getSession ( ) ; Application application = session . getApplication ( ) ; try { <START_BUG> Class homePageClass = application . getRequiredPageSettings ( ) . getHomePage ( ) ; <END_BUG> BookmarkablePageRequestTarget pokeTarget = new BookmarkablePageRequestTarget ( homePageClass ) ; IRequestCodingStrategy requestCodingStrategy = requestCycle . getProcessor ( ) . getRequestCodingStrategy ( ) ; String path = requestCodingStrategy . pathForTarget ( pokeTarget ) ; if ( path != null ) { requestCycle . setRedirect ( true ) ; return pokeTarget ; } PageParameters parameters = new PageParameters ( requestParameters . getParameters ( ) ) ; Page newPage = session . getPageFactory ( ) . newPage ( homePageClass , parameters ) ; IRequestTarget requestTarget = requestCycle . getRequestTarget ( ) ; if ( ! ( ( requestTarget instanceof IPageRequestTarget ) || ( requestTarget instanceof IBookmarkablePageRequestTarget ) ) ) { requestTarget = new wicket . request . target . PageRequestTarget ( newPage ) ; } return requestTarget ; } catch ( WicketRuntimeException e ) { throw new WicketRuntimeException ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>home<seq2seq4repair_space>page" , e ) ; } } protected IRequestTarget resolveExternalResource ( RequestCycle requestCycle ) { } }

Fix:
Class homePageClass = application . getHomePage ( ) ;
Buggy code:
public class ManagedReferenceInjector < T > implements Injector < T > { private final Injector < ManagedReferenceFactory > injectable ; public ManagedReferenceInjector ( Injector < ManagedReferenceFactory > injectable ) { } @ Override public void inject ( T value ) throws InjectionException { <START_BUG> injectable . inject ( new ValueManagedObject ( new org . jboss . msc . value . ImmediateValue < Object > ( value ) ) ) ; <END_BUG> } @ Override public void uninject ( ) { } }

Fix:
injectable . inject ( new ValueManagedReferenceFactory ( new org . jboss . msc . value . ImmediateValue < Object > ( value ) ) ) ;
Buggy code:
public class ServerShutdownHandler implements OperationStepHandler , DescriptionProvider { public static final String OPERATION_NAME = "shutdown" ; public static final ServerShutdownHandler INSTANCE = new ServerShutdownHandler ( ) ; private ServerShutdownHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final Thread thread = new Thread ( new Runnable ( ) { public void run ( ) { System . exit ( 0 ) ; } } ) ; thread . setName ( "Management<seq2seq4repair_space>Triggered<seq2seq4repair_space>Shutdown" ) ; <START_BUG> thread . run ( ) ; <END_BUG> context . completeStep ( ) ; } } , RUNTIME ) ; context . completeStep ( ) ; } public ModelNode getModelDescription ( final Locale locale ) { } }

Fix:
thread . start ( ) ;
Buggy code:
public class ConverterLocator implements IConverterLocator { private class DefaultConverter implements IConverter { private static final long serialVersionUID = 1L ; private final WeakReference < Class < ? > > type ; private DefaultConverter ( Class < ? > type ) { } public Object convertToObject ( String value , Locale locale ) { } public String convertToString ( Object value , Locale locale ) { if ( ( value == null ) || ( "" . equals ( value ) ) ) { return "" ; } try { return ( ( String ) ( Objects . convertValue ( value , String . class ) ) ) ; } catch ( Exception e ) { <START_BUG> throw new ConversionException ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>convert<seq2seq4repair_space>object<seq2seq4repair_space>of<seq2seq4repair_space>type:<seq2seq4repair_space>" + ( value . getClass ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>string.<seq2seq4repair_space>Possible<seq2seq4repair_space>its<seq2seq4repair_space>#toString()<seq2seq4repair_space>returned<seq2seq4repair_space>null.<seq2seq4repair_space>" ) + "Either<seq2seq4repair_space>install<seq2seq4repair_space>a<seq2seq4repair_space>custom<seq2seq4repair_space>converter<seq2seq4repair_space>(see<seq2seq4repair_space>IConverterLocator)<seq2seq4repair_space>or<seq2seq4repair_space>" ) + "override<seq2seq4repair_space>#toString()<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>a<seq2seq4repair_space>non-null<seq2seq4repair_space>value." ) ) . setSourceValue ( value ) . setConverter ( this ) ; <END_BUG> } } } private static final long serialVersionUID = 1L ; private final Map < String , IConverter > classToConverter = new HashMap < String , IConverter > ( ) ; public ConverterLocator ( ) { } public final IConverter get ( Class < ? > c ) { } public final IConverter getConverter ( Class < ? > type ) { } public final IConverter remove ( Class < ? > c ) { } @ SuppressWarnings ( "unchecked" ) public final IConverter set ( final Class c , final IConverter converter ) { } }

Fix:
throw new ConversionException ( ( ( ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>convert<seq2seq4repair_space>object<seq2seq4repair_space>of<seq2seq4repair_space>type:<seq2seq4repair_space>" + ( value . getClass ( ) ) ) + "<seq2seq4repair_space>to<seq2seq4repair_space>string.<seq2seq4repair_space>Possible<seq2seq4repair_space>its<seq2seq4repair_space>#toString()<seq2seq4repair_space>returned<seq2seq4repair_space>null.<seq2seq4repair_space>" ) + "Either<seq2seq4repair_space>install<seq2seq4repair_space>a<seq2seq4repair_space>custom<seq2seq4repair_space>converter<seq2seq4repair_space>(see<seq2seq4repair_space>IConverterLocator)<seq2seq4repair_space>or<seq2seq4repair_space>" ) + "override<seq2seq4repair_space>#toString()<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>a<seq2seq4repair_space>non-null<seq2seq4repair_space>value." ) , e ) . setSourceValue ( value ) . setConverter ( this ) ;
Buggy code:
public class TarUtils { private static final int BYTE_MASK = 255 ; private TarUtils ( ) { } public static long parseOctal ( final byte [ ] buffer , final int offset , final int length ) { } public static long parseOctalOrBinary ( final byte [ ] buffer , final int offset , final int length ) { } private static long parseBinaryLong ( final byte [ ] buffer , final int offset , final int length , final boolean negative ) { } private static long parseBinaryBigInteger ( final byte [ ] buffer , final int offset , final int length , final boolean negative ) { } public static boolean parseBoolean ( final byte [ ] buffer , final int offset ) { } private static String exceptionMessage ( byte [ ] buffer , final int offset , final int length , int current , final byte currentByte ) { } public static String parseName ( byte [ ] buffer , final int offset , final int length ) { } public static int formatNameBytes ( String name , byte [ ] buf , final int offset , final int length ) { } public static void formatUnsignedOctalString ( final long value , byte [ ] buffer , final int offset , final int length ) { } public static int formatOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static int formatLongOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static int formatLongOctalOrBinaryBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } private static void formatLongBinary ( final long value , byte [ ] buf , final int offset , final int length , final boolean negative ) { final int bits = ( length - 1 ) * 8 ; <START_BUG> final long max = ( ( long ) ( Math . pow ( 2 , bits ) ) ) ; <END_BUG> long val = Math . abs ( value ) ; if ( val >= max ) { throw new IllegalArgumentException ( ( ( ( ( "Value<seq2seq4repair_space>" + value ) + "<seq2seq4repair_space>is<seq2seq4repair_space>too<seq2seq4repair_space>large<seq2seq4repair_space>for<seq2seq4repair_space>" ) + length ) + "<seq2seq4repair_space>byte<seq2seq4repair_space>field." ) ) ; } if ( negative ) { val ^= max - 1 ; val |= 255 << bits ; val ++ ; } for ( int i = ( offset + length ) - 1 ; i >= offset ; i -- ) { buf [ i ] = ( ( byte ) ( val ) ) ; val >>= 8 ; } } private static void formatBigIntegerBinary ( final long value , byte [ ] buf , final int offset , final int length , final boolean negative ) { } public static int formatCheckSumOctalBytes ( final long value , byte [ ] buf , final int offset , final int length ) { } public static long computeCheckSum ( final byte [ ] buf ) { } }

Fix:
final long max = 1L << bits ;
Buggy code:
public class Test_WeatherMap { public static void main ( String [ ] args ) { Util . print ( "Calculating<seq2seq4repair_space>weather<seq2seq4repair_space>map..." ) ; ModuleFractal gen = new ModuleFractal ( ) ; gen . setAllSourceBasisTypes ( SIMPLEX ) ; gen . setAllSourceInterpolationTypes ( CUBIC ) ; gen . setNumOctaves ( 8 ) ; gen . setFrequency ( 35.0 ) ; <START_BUG> gen . setType ( BILLOW ) ; <END_BUG> gen . setSeed ( rand . nextInt ( ) ) ; ModuleAutoCorrect ac = new ModuleAutoCorrect ( ) ; ac . setSource ( gen ) ; ac . setRange ( 0.0F , 1.0F ) ; ac . setSamples ( 10000 ) ; ac . calculate ( ) ; try { ImageIO . write ( Canvas . getImage ( 600 , 600 , ac ) , "png" , new File ( "weathermap.png" ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } Util . print ( "Weather<seq2seq4repair_space>map<seq2seq4repair_space>calculated!" ) ; } }

Fix:
gen . setType ( RIDGEMULTI ) ;
Buggy code:
public class FiberSwitchPositionDeviceAdapter extends SerialDeviceAdapterAdapter implements SerialTextDeviceAdapter { public FiberSwitchPositionDeviceAdapter ( final OptoJenaFiberSwitchDevice pOptoJenaFiberSwitchDevice ) { } @ Override public byte [ ] getSetValueCommandMessage ( double pOldValue , double pNewValue ) { <START_BUG> String lMessage = String . format ( "ch%d\r\n" , ( ( ( int ) ( pNewValue ) ) - 1 ) ) ; <END_BUG> return lMessage . getBytes ( ) ; } @ Override public long getSetValueReturnWaitTimeInMilliseconds ( ) { } @ Override public boolean hasResponseForSet ( ) { } @ Override public Character getSetValueReturnMessageTerminationCharacter ( ) { } @ Override public Character getGetValueReturnMessageTerminationCharacter ( ) { } }

Fix:
String lMessage = String . format ( "ch%d\r\n" , ( ( ( int ) ( pNewValue ) ) + 1 ) ) ;
Buggy code:
public class WicketParamTest extends TestCase { private static Log log = LogFactory . getLog ( WicketParamTest . class ) ; private MockWebApplication application ; public WicketParamTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void executeTest ( final Class pageClass , final String filename ) throws Exception { System . out . println ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getPages ( ) . setHomePage ( pageClass ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , filename ) ) ; } }

Fix:
application . getRequiredPageSettings ( ) . setHomePage ( pageClass ) ;
Buggy code:
public class InitialContextFactoryBuilder implements javax . naming . spi . InitialContextFactoryBuilder { private static final InitialContextFactory DEFAULT_FACTORY = new InitialContextFactory ( ) ; public InitialContextFactory createInitialContextFactory ( Hashtable < ? , ? > environment ) throws NamingException { final String factoryClassName = ( ( String ) ( environment . get ( Context . INITIAL_CONTEXT_FACTORY ) ) ) ; if ( ( factoryClassName == null ) || ( InitialContextFactory . class . getName ( ) . equals ( factoryClassName ) ) ) { return InitialContextFactoryBuilder . DEFAULT_FACTORY ; } final ClassLoader classLoader = getContextClassLoader ( ) ; try { <START_BUG> final Class < ? > factoryClass = classLoader . loadClass ( factoryClassName ) ; <END_BUG> return ( ( InitialContextFactory ) ( factoryClass . newInstance ( ) ) ) ; } catch ( Exception e ) { throw new NamingException ( ( ( ( "Failed<seq2seq4repair_space>instantiate<seq2seq4repair_space>InitialContextFactory<seq2seq4repair_space>" + factoryClassName ) + "<seq2seq4repair_space>from<seq2seq4repair_space>classloader<seq2seq4repair_space>" ) + classLoader ) ) ; } } private ClassLoader getContextClassLoader ( ) { } }

Fix:
final Class < ? > factoryClass = Class . forName ( factoryClassName , true , classLoader ) ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "4.5-SNAPSHOT-20071207-1023" ; <END_BUG> } public static void main ( String [ ] args ) { } }

Fix:
return "4.5-SNAPSHOT-20080110-0022" ;
Buggy code:
@ RunWith ( Arquillian . class ) public class RarTestCase { private static final String JNDI_NAME = "java://eis//HelloWorld" ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ Test public void helloWorld ( ) throws Exception { } @ Test public void helloWorld2 ( ) throws Exception { } private HelloWorldConnection getConnection ( ) throws Exception { InitialContext context = new InitialContext ( ) ; JndiLookupTask task = new JndiLookupTask ( context , RarTestCase . JNDI_NAME ) ; <START_BUG> PollingUtils . retryWithTimeout ( 3000 , task ) ; <END_BUG> HelloWorldConnectionFactory factory = task . getResult ( HelloWorldConnectionFactory . class ) ; HelloWorldConnection conn = factory . getConnection ( ) ; if ( conn == null ) { throw new RuntimeException ( "No<seq2seq4repair_space>connection" ) ; } return conn ; } }

Fix:
PollingUtils . retryWithTimeout ( 10000 , task ) ;
Buggy code:
public class EditGroupDialog extends JDialog implements ActionListener , KeyListener { private AddressbookDNDListView list ; private JButton addButton ; private JButton removeButton ; private JLabel nameLabel ; private JLabel descriptionLabel ; private JTextField nameTextField ; private JTextField descriptionTextField ; private DefaultAddressComboBox addComboBox ; private AddressbookListModel members ; private AddressbookListRenderer renderer ; private boolean result ; private ButtonWithMnemonic okButton ; private ButtonWithMnemonic cancelButton ; private Group group ; private AbstractFolder parentFolder ; public EditGroupDialog ( JFrame frame , Group group , AbstractFolder parentFolder ) { } private JPanel createGroupNamePanel ( ) { } private JPanel createGroupPanel ( ) { } private void layoutComponents ( ) { } private void initComponents ( ) { nameLabel = new JLabel ( AddressbookResourceLoader . getString ( "dialog" , "editgroupdialog" , "name" ) ) ; nameTextField = new JTextField ( ) ; descriptionLabel = new JLabel ( AddressbookResourceLoader . getString ( "dialog" , "editgroupdialog" , "description_2" ) ) ; descriptionTextField = new JTextField ( ) ; <START_BUG> addComboBox = new DefaultAddressComboBox ( ) ; <END_BUG> ( ( JTextComponent ) ( addComboBox . getEditor ( ) . getEditorComponent ( ) ) ) . addKeyListener ( this ) ; members = new AddressbookListModel ( ) ; list = new AddressbookDNDListView ( members ) ; list . setMinimumSize ( new Dimension ( 200 , 300 ) ) ; addButton = new JButton ( "Add" ) ; addButton . addActionListener ( this ) ; addButton . setActionCommand ( "ADD" ) ; removeButton = new JButton ( "Remove" ) ; removeButton . addActionListener ( this ) ; removeButton . setActionCommand ( "REMOVE" ) ; okButton = new ButtonWithMnemonic ( AddressbookResourceLoader . getString ( "global" , "ok" ) ) ; okButton . setActionCommand ( "OK" ) ; okButton . addActionListener ( this ) ; cancelButton = new ButtonWithMnemonic ( AddressbookResourceLoader . getString ( "global" , "cancel" ) ) ; cancelButton . setActionCommand ( "CANCEL" ) ; cancelButton . addActionListener ( this ) ; getRootPane ( ) . setDefaultButton ( okButton ) ; getRootPane ( ) . registerKeyboardAction ( this , "CANCEL" , KeyStroke . getKeyStroke ( KeyEvent . VK_ESCAPE , 0 ) , JComponent . WHEN_IN_FOCUSED_WINDOW ) ; } public boolean getResult ( ) { } public void updateComponents ( boolean b ) { } private void addHeaderItem ( ) { } public void actionPerformed ( ActionEvent e ) { } public void keyTyped ( KeyEvent e ) { } public void keyPressed ( KeyEvent e ) { } public void keyReleased ( KeyEvent e ) { } }

Fix:
addComboBox = new DefaultAddressComboBox ( false ) ;
Buggy code:
class PureTLSSupport implements SSLSupport { private SSLSocket ssl ; PureTLSSupport ( SSLSocket sock ) { } public String getCipherSuite ( ) throws IOException { } <START_BUG> public Certificate [ ] getPeerCertificateChain ( ) throws IOException { <END_BUG> Vector v = ssl . getCertificateChain ( ) ; if ( v == null ) return null ; X509Certificate [ ] chain = new X509Certificate [ v . size ( ) ] ; try { for ( int i = 1 ; i <= ( v . size ( ) ) ; i ++ ) { byte [ ] buffer = ( ( X509Cert ) ( v . elementAt ( ( ( v . size ( ) ) - i ) ) ) ) . getDER ( ) ; CertificateFactory cf = CertificateFactory . getInstance ( "X.509" ) ; ByteArrayInputStream stream = new ByteArrayInputStream ( buffer ) ; chain [ i ] = ( ( X509Certificate ) ( cf . generateCertificate ( stream ) ) ) ; } } catch ( CertificateException e ) { throw new IOException ( "JDK's<seq2seq4repair_space>broken<seq2seq4repair_space>cert<seq2seq4repair_space>handling<seq2seq4repair_space>can't<seq2seq4repair_space>parse<seq2seq4repair_space>this<seq2seq4repair_space>certificate<seq2seq4repair_space>(which<seq2seq4repair_space>PureTLS<seq2seq4repair_space>likes" ) ; } return chain ; } }

Fix:
public Object [ ] getPeerCertificateChain ( ) throws IOException {
Buggy code:
public class ScrollBar extends Widget { Scrollable parent ; int adjustmentHandle ; ScrollBar ( ) { } ScrollBar ( Scrollable parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void deregister ( ) { } public boolean getEnabled ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public Scrollable getParent ( ) { } public int getSelection ( ) { } public Point getSize ( ) { } public int getThumb ( ) { checkWidget ( ) ; GtkAdjustment adjustment = new GtkAdjustment ( ) ; <START_BUG> OS . memmove ( adjustment , handle ) ; <END_BUG> return ( ( int ) ( adjustment . page_size ) ) ; } public boolean getVisible ( ) { } int gtk_value_changed ( int adjustment ) { } void hookEvents ( ) { } public boolean isEnabled ( ) { } public boolean isVisible ( ) { } void register ( ) { } void releaseChild ( ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setEnabled ( boolean enabled ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } public void setThumb ( int value ) { } public void setValues ( int selection , int minimum , int maximum , int thumb , int increment , int pageIncrement ) { } public void setVisible ( boolean visible ) { } }

Fix:
OS . memmove ( adjustment , adjustmentHandle ) ;