nus-yam/ex-repair huggingface dataset:
Buggy code:
public class JamDisplay extends Display { OscP5 p5 ; String serverIP = "" ; NetAddress myRemoteLocation ; PImage bgImage ; PImage intruderOverlay ; PImage jammingOverlay ; int STATE_SCAN = 0 ; int STATE_PLAYING = 1 ; int STATE_FAIL = 2 ; int STATE_OK = 3 ; int [ ] [ ] graphData = new int [ 2 ] [ 10 ] ; int [ ] [ ] targetData = new int [ 2 ] [ 10 ] ; int [ ] [ ] prevData = new int [ 2 ] [ 10 ] ; int [ ] target = new int [ 2 ] ; int gameState = STATE_SCAN ; int scanStart = - 5000 ; int playStart = - 5000 ; int failStart = - 2000 ; int lastChangeTime = 0 ; int newValueTime = 0 ; int attempts = 3 ; int nextChangeTime = 4500 ; int dialA = 1 ; int dialB = 1 ; boolean jamAttempt = false ; boolean jamSuccess = false ; int jamTimer = 0 ; boolean jamMessageDone = false ; public JamDisplay ( PlayerConsole parent ) { } @ Override public void draw ( ) { } public void jamAttempt ( ) { } public void keyPressed ( ) { } public void keyReleased ( ) { } public void newValues ( ) { } @ Override public void oscMessage ( OscMessage theOscMessage ) { } public void resetPuzzle ( ) { } @ Override public void serialEvent ( HardwareEvent evt ) { if ( evt . event . equals ( "JAMDIAL" ) ) { if ( ( evt . id ) == 0 ) { dialA = ( ( int ) ( Math . floor ( PApplet . map ( evt . value , 50 , 1000 , 0 , 9 ) ) ) ) ; dialA = PApplet . constrain ( dialA , 0 , 9 ) ; if ( ( ( dialA ) == ( target [ 0 ] ) ) && ( ( dialB ) == ( target [ 1 ] ) ) ) { lastChangeTime += 800 ; } } else if ( ( evt . id ) == 1 ) { dialB = ( ( int ) ( Math . floor ( PApplet . map ( evt . value , 50 , 1000 , 0 , 9 ) ) ) ) ; <START_BUG> dialB = PApplet . constrain ( dialA , 0 , 9 ) ; <END_BUG> if ( ( ( dialA ) == ( target [ 0 ] ) ) && ( ( dialB ) == ( target [ 1 ] ) ) ) { lastChangeTime += 800 ; } } } else if ( evt . event . equals ( "KEY" ) ) { if ( ( evt . value ) == ( KeyEvent . VK_SEMICOLON ) ) { jamAttempt ( ) ; } } else if ( evt . event . equals ( "NEWSWITCH" ) ) { if ( ( ( evt . id ) == 11 ) && ( ( evt . value ) == 1 ) ) jamAttempt ( ) ; } } @ Override public void start ( ) { } @ Override public void stop ( ) { } }

Fix:
dialB = PApplet . constrain ( dialB , 0 , 9 ) ;
Buggy code:
public class ItemCrowbarMagic extends ItemCrowbar implements IRepairable { private static final String ITEM_TAG = "railcraft.tool.crowbar.magic" ; public static final String RESEARCH_TAG = "RC_Crowbar" ; private static Item item ; public static void registerItem ( ) { } public static void registerResearch ( ) { try { IArcaneRecipe recipe = ThaumcraftApi . addArcaneCraftingRecipe ( ItemCrowbarMagic . RESEARCH_TAG , new ItemStack ( ItemCrowbarMagic . item ) , new AspectList ( ) . add ( ORDER , 8 ) , "<seq2seq4repair_space>RI" , "RIR" , "IR<seq2seq4repair_space>" , 'I' , ThaumcraftPlugin . getItem ( "itemResource" , 2 ) , 'R' , "dyeRed" ) ; AspectList aspects = new AspectList ( ) ; aspects . add ( TOOL , 1 ) . add ( MECHANISM , 2 ) . add ( TRAVEL , 1 ) ; ResearchItem thaumiumCrowbar = new ResearchItemRC ( ItemCrowbarMagic . RESEARCH_TAG , ThaumcraftPlugin . RESEARCH_CATEGORY , aspects , 0 , 0 , 3 , new ItemStack ( ItemCrowbarMagic . item ) ) ; <START_BUG> thaumiumCrowbar . setPages ( new ResearchPage [ ] { ThaumcraftPlugin . getCrowbarResearchPage ( ) , new ResearchPage ( recipe ) } ) . setParentsHidden ( "THAUMIUM" ) . registerResearchItem ( ) ; <END_BUG> } catch ( Throwable error ) { Game . logErrorAPI ( "Thaumcraft" , error , ResearchItem . class ) ; } } public static ItemStack getItem ( ) { } public ItemCrowbarMagic ( ) { } }

Fix:
thaumiumCrowbar . setPages ( new ResearchPage [ ] { ThaumcraftPlugin . getResearchPage ( ItemCrowbarMagic . RESEARCH_TAG ) , new ResearchPage ( recipe ) } ) . setParentsHidden ( "THAUMIUM" ) . registerResearchItem ( ) ;
Buggy code:
public class Calculator { private InputProcessor processor ; public Calculator ( ) { } public void setInputProcessor ( InputProcessor stripper ) { } public String calculateName ( String first , String last ) throws InputIsEmptyException { if ( ( first == "" ) || ( last == "" ) ) { throw new InputIsEmptyException ( ) ; } else { <START_BUG> return ( ( first + "<seq2seq4repair_space>" ) + last ) + "bug" ; <END_BUG> } } public int calculateNumberOfChars ( String fullName ) { } }

Fix:
return ( first + "<seq2seq4repair_space>" ) + last ;
Buggy code:
public class ModeDragScroll extends Mode implements ActionListener { private static final int AUTOSCROLL_DELAY = 200 ; private static final int MIN_AUTOSCROLL_DELAY = 50 ; private static final int AUTOSCROLL_FACTOR = 10 ; public ModeDragScroll ( Editor par ) { } public ModeDragScroll ( ) { } public boolean canExit ( ) { } public String instructions ( ) { } private boolean autoscroll = false ; private Rectangle currentView ; private Rectangle newView = new Rectangle ( ) ; private Point scrollOrigin = new Point ( ) ; private int xcorrection = 0 ; private int ycorrection = 0 ; private JComponent component = null ; private JViewport view = null ; private Cursor oldCursor = null ; private Dimension componentSize = null ; private Timer autoTimer ; private boolean dragScrolling = false ; private int recentX ; private int recentY ; public void mousePressed ( MouseEvent me ) { <START_BUG> dragScrolling = ( me . getModifiers ( ) ) == ( InputEvent . BUTTON2_MASK ) ; <END_BUG> component = ( ( JComponent ) ( _editor . getAwtComponent ( ) ) ) ; if ( ( component ) == null ) return ; if ( ( ( component ) != null ) && ( ( component . getParent ( ) ) instanceof JViewport ) ) view = ( ( JViewport ) ( component . getParent ( ) ) ) ; componentSize = component . getSize ( ) ; int x = me . getX ( ) ; int y = me . getY ( ) ; currentView = view . getViewRect ( ) ; newView . width = currentView . width ; newView . height = currentView . height ; newView . x = currentView . x ; newView . y = currentView . y ; scrollOrigin . x = x ; scrollOrigin . y = y ; xcorrection = 0 ; ycorrection = 0 ; if ( dragScrolling ) { oldCursor = component . getCursor ( ) ; component . setCursor ( Cursor . getPredefinedCursor ( Cursor . HAND_CURSOR ) ) ; } autoTimer . stop ( ) ; autoscroll = false ; if ( dragScrolling ) me . consume ( ) ; } public void mouseDragged ( MouseEvent me ) { } private boolean doScroll ( ) { } public void mouseReleased ( MouseEvent me ) { } public void mouseEntered ( MouseEvent me ) { } public void actionPerformed ( ActionEvent e ) { } }

Fix:
dragScrolling = me . isAltDown ( ) ;
Buggy code:
public abstract class PortletApplication extends Application implements ISessionFactory { private String applicationKey ; private IRequestCycleProcessor requestCycleProcessor ; private IRequestCycleProcessor actionRequestCycleProcessor ; private String sessionAttributePrefix ; private ISessionFactory sessionFactory = this ; private RequestLogger requestLogger ; WicketPortlet portlet ; public void setWicketPortlet ( WicketPortlet portlet ) { } public WicketPortletSession getSession ( final WicketPortletRequest request ) { ISessionStore sessionStore = getSessionStore ( ) ; Session session = sessionStore . lookup ( request ) ; if ( session == null ) { <START_BUG> session = getSessionFactory ( ) . newSession ( ) ; <END_BUG> session . setLocale ( request . getLocale ( ) ) ; sessionStore . bind ( request , session ) ; } WicketPortletSession webSession ; if ( session instanceof WicketPortletSession ) { webSession = ( ( WicketPortletSession ) ( session ) ) ; } else { throw new WicketRuntimeException ( ( "Session<seq2seq4repair_space>created<seq2seq4repair_space>by<seq2seq4repair_space>a<seq2seq4repair_space>PortletApplication<seq2seq4repair_space>session<seq2seq4repair_space>factory<seq2seq4repair_space>" + "must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>subclass<seq2seq4repair_space>of<seq2seq4repair_space>PortletSession" ) ) ; } session . setApplication ( this ) ; webSession . initForRequest ( ) ; return webSession ; } public WicketPortletResponse newPortletResponse ( final PortletResponse res ) { } public WicketPortletRequest newPortletRequest ( PortletRequest req ) { } public String getApplicationKey ( ) { } protected ISessionFactory getSessionFactory ( ) { } protected ISessionStore newSessionStore ( ) { } public Session newSession ( ) { } public void initPortlet ( ) { } protected void internalInit ( ) { } public void destroyPortlet ( ) { } protected IRequestCycleFactory getDefaultRequestCycleFactory ( ) { } protected IRequestCycleProcessor newRenderRequestCycleProcessor ( ) { } protected IRequestCycleProcessor newActionRequestCycleProcessor ( ) { } public IRequestCycleProcessor getActionRequestCycleProcessor ( ) { } protected final IRequestCycleProcessor getRenderRequestCycleProcessor ( ) { } public final RequestLogger getRequestLogger ( ) { } public final void setRequestLogger ( RequestLogger logger ) { } void sessionDestroyed ( String sessionId ) { } public final String getSessionAttributePrefix ( final WicketPortletRequest request ) { } }

Fix:
session = getSessionFactory ( ) . newSession ( request ) ;
Buggy code:
public class UriAliasUtil { public static String generateUriAlias ( String oldUriAlias , String uriPrefix , String ... keywords ) { String uriAlias = uriPrefix ; for ( String keyword : keywords ) if ( keyword != null ) uriAlias += ( keyword . trim ( ) . toLowerCase ( ) . replaceAll ( "[^a-z0-9]+" , "-" ) ) + "-" ; uriAlias = uriAlias . replaceAll ( "[-]+" , "-" ) ; if ( ( uriAlias . length ( ) ) > ( ( uriPrefix . length ( ) ) + 1 ) ) { if ( ( uriAlias . charAt ( uriPrefix . length ( ) ) ) == '-' ) uriAlias = uriPrefix + ( uriAlias . substring ( ( ( uriPrefix . length ( ) ) + 1 ) , ( ( uriAlias . length ( ) ) - 1 ) ) ) ; else uriAlias = uriAlias . substring ( 0 , ( ( uriAlias . length ( ) ) - 1 ) ) ; } else { return null ; } DataAccessor dataAccessor = DataAccessorFactory . getDataAccessor ( ) ; for ( int i = 0 ; ; i ++ ) { String aUriAlias = ( i == 0 ) ? uriAlias : ( uriAlias + "-" ) + i ; if ( ( oldUriAlias != null ) && ( oldUriAlias . equals ( aUriAlias ) ) ) return aUriAlias ; Page page = dataAccessor . getPage ( aUriAlias ) ; <START_BUG> if ( ( page == null ) || ( ( page . getType ( ) ) == null ) ) <END_BUG> return aUriAlias ; } } }

Fix:
if ( page == null )
Buggy code:
public class CreateManualActivityTest extends APITest { @ Test public void testCreateManualActivity_accessTokenDoesNotHaveWriteAccess ( ) throws Exception { } @ Test public void testCreateManualActivity_invalidType ( ) throws Exception { RateLimitedTestRunner . run ( ( ) -> { if ( new Issue49 ( ) . isIssue ( ) ) { return ; } final StravaActivity activity = TestUtils . createDefaultActivity ( "CreateManualActivityTest.testCreateManualActivity_invalidType" ) ; StravaActivity stravaResponse = null ; activity . setType ( StravaActivityType . UNKNOWN ) ; try { stravaResponse = apiWithWriteAccess ( ) . createManualActivity ( activity ) ; } catch ( final e1 ) { return ; } forceDeleteActivity ( stravaResponse ) ; <START_BUG> fail ( "Created<seq2seq4repair_space>an<seq2seq4repair_space>activity<seq2seq4repair_space>with<seq2seq4repair_space>invalid<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>error" ) ; <END_BUG> } ) ; } @ Test public void testCreateManualActivity_noElapsedTime ( ) throws Exception { } @ Test public void testCreateManualActivity_noName ( ) throws Exception { } @ Test public void testCreateManualActivity_noStartDate ( ) throws Exception { } @ Test public void testCreateManualActivity_noType ( ) throws Exception { } @ Test public void testCreateManualActivity_validActivity ( ) throws Exception { } }

Fix:
fail ( ( ( ( ( "Created<seq2seq4repair_space>an<seq2seq4repair_space>activity<seq2seq4repair_space>with<seq2seq4repair_space>invalid<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>error<seq2seq4repair_space>(was<seq2seq4repair_space>" + StravaActivityType . UNKNOWN ) + ",<seq2seq4repair_space>is<seq2seq4repair_space>" ) + ( stravaResponse . getType ( ) ) ) + ")" ) ) ;
Buggy code:
public class Link extends Control { String text ; TextLayout layout ; Color linkColor ; Color disabledColor ; Point [ ] offsets ; Point selection ; String [ ] ids ; int [ ] mnemonics ; int focusIndex ; static final RGB LINK_FOREGROUND = new RGB ( 0 , 51 , 153 ) ; static final RGB LINK_DISABLED_FOREGROUND = new RGB ( 172 , 168 , 153 ) ; public Link ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callFocusEventHandler ( int nextHandler , int theEvent ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void createWidget ( ) { } void drawBackground ( int control , int context ) { <START_BUG> drawBackground ( control , context , background ) ; <END_BUG> if ( ( ( ! ( hasFocus ( ) ) ) || ( ! ( drawFocusRing ( ) ) ) ) || ( ( focusIndex ) == ( - 1 ) ) ) return ; int [ ] outMetric = new int [ 1 ] ; OS . GetThemeMetric ( kThemeMetricFocusRectOutset , outMetric ) ; ( outMetric [ 0 ] ) -- ; Rect r = new Rect ( ) ; Rect bounds = new Rect ( ) ; if ( ! ( OS . HIVIEW ) ) OS . GetControlBounds ( control , bounds ) ; Rectangle [ ] rects = getRectangles ( focusIndex ) ; for ( int i = 0 ; i < ( rects . length ) ; i ++ ) { Rectangle rect = rects [ i ] ; r . left = ( ( short ) ( ( ( bounds . left ) + ( rect . x ) ) + ( outMetric [ 0 ] ) ) ) ; r . top = ( ( short ) ( ( ( bounds . top ) + ( rect . y ) ) + ( outMetric [ 0 ] ) ) ) ; r . right = ( ( short ) ( ( ( r . left ) + ( rect . width ) ) - ( ( outMetric [ 0 ] ) * 2 ) ) ) ; r . bottom = ( ( short ) ( ( ( r . top ) + ( rect . height ) ) - ( ( outMetric [ 0 ] ) * 2 ) ) ) ; OS . DrawThemeFocusRect ( r , true ) ; } } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } void enableWidget ( boolean enabled ) { } String getNameText ( ) { } Rectangle [ ] getRectangles ( int linkIndex ) { } public String getText ( ) { } int kEventControlGetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventControlSetFocusPart ( int nextHandler , int theEvent , int userData ) { } int kEventMouseDown ( int nextHandler , int theEvent , int userData ) { } int kEventMouseMoved ( int nextHandler , int theEvent , int userData ) { } int kEventMouseUp ( int nextHandler , int theEvent , int userData ) { } int kEventUnicodeKeyPressed ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } String parse ( String string ) { } int parseMnemonics ( char [ ] buffer , int start , int end , StringBuffer result ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setFontStyle ( Font font ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
fillBackground ( control , context , null ) ;
Buggy code:
public class Document { private int [ ] wordArray ; private int [ ] topicArray ; private Vocabulary vocabulary ; public Document ( Vocabulary vocabulary ) { } public void readDocument ( List < String > words ) { } public int [ ] getWordArray ( ) { } public String [ ] getRawWords ( ) { String [ ] result = new String [ wordArray . length ] ; for ( int wordIndex = 0 ; wordIndex < ( wordArray . length ) ; wordIndex ++ ) { <START_BUG> result [ wordIndex ] = vocabulary . getWordFromIndex ( wordIndex ) ; <END_BUG> } return result ; } public int [ ] getTopicArray ( ) { } public void setTopicForWord ( int wordIndex , int topicIndex ) { } }

Fix:
result [ wordIndex ] = vocabulary . getWordFromIndex ( wordArray [ wordIndex ] ) ;
Buggy code:
public class Requests { public String createGroup ( String groupName , String groupDescription , String creatorUsername ) { } public String updateGroup ( int groupID , String groupName , String groupDescription , ArrayList < Person > participants ) { } public String deleteGroup ( int groupID ) { <START_BUG> return String . format ( "G,U,%s" , ( "" + groupID ) ) ; <END_BUG> } public String createAppointment ( String appointmentName , String appointmentDescription , LocalTime startTime , LocalTime endTime , LocalDate date , String creatorUsername ) { } public String updateAppointment ( int appointmentID , String appointmentName , String appointmentDescription , LocalTime startTime , LocalTime endTime , LocalDate date , String creatorUsername ) { } public String deleteAppointment ( int appointmentID ) { } public String login ( String username , String password ) { } public String registerUser ( String username , String password , String fName , String lName ) { } public String update ( String username ) { } private String getParticipantsString ( ArrayList < Person > participants ) { } public static void main ( String [ ] args ) { } }

Fix:
return String . format ( "G,D,%s" , ( "" + groupID ) ) ;
Buggy code:
public class MailSessionAdd extends AbstractAddStepHandler { static final MailSessionAdd INSTANCE = new MailSessionAdd ( ) ; public static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "mail-session" ) ; protected MailSessionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > controllers ) throws OperationFailedException { } public static String getJndiName ( final ModelNode modelNode ) { } private void addOutboundSocketDependency ( MailSessionService service , ServiceBuilder < ? > mailSessionBuilder , MailSessionServer server ) { } static MailSessionConfig from ( final OperationContext operationContext , final ModelNode model ) throws OperationFailedException { } private static MailSessionServer readServerConfig ( final OperationContext operationContext , final ModelNode model ) throws OperationFailedException { } private static Credentials readCredentials ( final OperationContext operationContext , final ModelNode model ) throws OperationFailedException { <START_BUG> if ( model . has ( USER_NAME ) ) { <END_BUG> String un = model . get ( USER_NAME ) . asString ( ) ; String pw = operationContext . resolveExpressions ( model . get ( PASSWORD ) ) . asString ( ) ; return new Credentials ( un , pw ) ; } return null ; } }

Fix:
if ( model . get ( USER_NAME ) . isDefined ( ) ) {
Buggy code:
public class CliCommandExecutor { private String remoteHost ; private String remoteUser ; private String remotePwd ; private int remoteTimeoutSeconds = 3600 ; public CliCommandExecutor ( ) { } public void setRunAtRemote ( String host , String user , String pwd ) { } public void setRunAtLocal ( ) { } public void copyFile ( String localFile , String destDir ) throws IOException { } private void copyNative ( String localFile , String destDir ) throws IOException { } private void copyRemote ( String localFile , String destDir ) throws IOException { } public Pair < Integer , String > execute ( String command ) throws IOException { } public Pair < Integer , String > execute ( String command , Logger logAppender ) throws IOException { } private Pair < Integer , String > runRemoteCommand ( String command , Logger logAppender ) throws IOException { } private Pair < Integer , String > runNativeCommand ( String command , Logger logAppender ) throws IOException { String [ ] cmd = new String [ 3 ] ; String osName = System . getProperty ( "os.name" ) ; if ( osName . startsWith ( "Windows" ) ) { cmd [ 0 ] = "cmd.exe" ; cmd [ 1 ] = "//C" ; } else { cmd [ 0 ] = "//bin//bash" ; cmd [ 1 ] = "-c" ; } cmd [ 2 ] = command ; ProcessBuilder builder = new ProcessBuilder ( cmd ) ; builder . redirectErrorStream ( true ) ; Process proc = builder . start ( ) ; BufferedReader reader = new BufferedReader ( new InputStreamReader ( proc . getInputStream ( ) ) ) ; String line ; StringBuilder result = new StringBuilder ( ) ; while ( ( line = reader . readLine ( ) ) != null ) { <START_BUG> result . append ( "line" ) . append ( '\n' ) ; <END_BUG> if ( logAppender != null ) { logAppender . log ( line ) ; } } try { int exitCode = proc . waitFor ( ) ; return new Pair < Integer , String > ( exitCode , result . toString ( ) ) ; } catch ( InterruptedException e ) { throw new IOException ( e ) ; } } }

Fix:
result . append ( line ) . append ( '\n' ) ;
Buggy code:
public final class ClassConstants extends BaseFilterReader implements ChainableReader { private String queuedData = null ; private static final String JAVA_CLASS_HELPER = "org.apache.tools.ant.filters.util.JavaClassHelper" ; public ClassConstants ( ) { } public ClassConstants ( final Reader in ) { } public int read ( ) throws IOException { int ch = - 1 ; if ( ( ( queuedData ) != null ) && ( ( queuedData . length ( ) ) == 0 ) ) { queuedData = null ; } if ( ( queuedData ) != null ) { ch = queuedData . charAt ( 0 ) ; queuedData = queuedData . substring ( 1 ) ; if ( ( queuedData . length ( ) ) == 0 ) { queuedData = null ; } } else { final String clazz = readFully ( ) ; <START_BUG> if ( clazz == null ) { <END_BUG> ch = - 1 ; } else { final byte [ ] bytes = clazz . getBytes ( "ISO-8859-1" ) ; try { final Class javaClassHelper = Class . forName ( ClassConstants . JAVA_CLASS_HELPER ) ; if ( javaClassHelper != null ) { final Class [ ] params = new Class [ ] { byte [ ] . class } ; final Method getConstants = javaClassHelper . getMethod ( "getConstants" , params ) ; final Object [ ] args = new Object [ ] { bytes } ; final StringBuffer sb = ( ( StringBuffer ) ( getConstants . invoke ( null , args ) ) ) ; if ( ( sb . length ( ) ) > 0 ) { queuedData = sb . toString ( ) ; return read ( ) ; } } } catch ( NoClassDefFoundError ex ) { throw ex ; } catch ( RuntimeException ex ) { throw ex ; } catch ( InvocationTargetException ex ) { Throwable t = ex . getTargetException ( ) ; if ( t instanceof NoClassDefFoundError ) { throw ( ( NoClassDefFoundError ) ( t ) ) ; } if ( t instanceof RuntimeException ) { throw ( ( RuntimeException ) ( t ) ) ; } throw new BuildException ( t ) ; } catch ( Exception ex ) { throw new BuildException ( ex ) ; } } } return ch ; } public Reader chain ( final Reader rdr ) { } }

Fix:
if ( ( clazz == null ) && ( ( clazz . length ( ) ) != 0 ) ) {
Buggy code:
public class UnderFileSystemHdfs extends UnderFileSystem { private static final int MAX_TRY = 5 ; private final Logger LOG = Logger . getLogger ( LOGGER_TYPE ) ; private FileSystem mFs = null ; private String mUfsPrefix = null ; private static final FsPermission PERMISSION = new FsPermission ( ( ( short ) ( 511 ) ) ) . applyUMask ( FsPermission . createImmutable ( ( ( short ) ( 0 ) ) ) ) ; public static UnderFileSystemHdfs getClient ( String path ) { } public static UnderFileSystemHdfs getClient ( String path , Object conf ) { } private UnderFileSystemHdfs ( String fsDefaultName , Object conf ) { } @ Override public void close ( ) throws IOException { } @ Override public FSDataOutputStream create ( String path ) throws IOException { } @ Override public FSDataOutputStream create ( String path , int blockSizeByte ) throws IOException { } @ Override public FSDataOutputStream create ( String path , short replication , int blockSizeByte ) throws IOException { } @ Override public boolean delete ( String path , boolean recursive ) throws IOException { } @ Override public boolean exists ( String path ) throws IOException { } @ Override public long getBlockSizeByte ( String path ) throws IOException { } @ Override public Object getConf ( ) { } @ Override public List < String > getFileLocations ( String path ) throws IOException { } @ Override public List < String > getFileLocations ( String path , long offset ) throws IOException { } @ Override public long getFileSize ( String path ) throws IOException { } @ Override public long getModificationTimeMs ( String path ) throws IOException { } @ Override public long getSpace ( String path , SpaceType type ) throws IOException { } @ Override public boolean isFile ( String path ) throws IOException { } @ Override public String [ ] list ( String path ) throws IOException { FileStatus [ ] files = mFs . listStatus ( new Path ( path ) ) ; if ( files != null ) { String [ ] rtn = new String [ files . length ] ; int i = 0 ; for ( FileStatus status : files ) { <START_BUG> rtn [ ( i ++ ) ] = status . getPath ( ) . toString ( ) . substring ( path . length ( ) ) ; <END_BUG> } return rtn ; } else { return null ; } } @ Override public boolean mkdirs ( String path , boolean createParent ) throws IOException { } @ Override public FSDataInputStream open ( String path ) throws IOException { } @ Override public boolean rename ( String src , String dst ) throws IOException { } @ Override public void setConf ( Object conf ) { } @ Override public void setPermission ( String path , String posixPerm ) throws IOException { } }

Fix:
rtn [ ( i ++ ) ] = status . getPath ( ) . toUri ( ) . toString ( ) . substring ( path . length ( ) ) ;
Buggy code:
public class GalleryAdapter extends ArrayAdapter < Attachment > { public GalleryAdapter ( Context context , List < Attachment > items ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { LayoutInflater theInflater = LayoutInflater . from ( getContext ( ) ) ; View theCell = theInflater . inflate ( photogallery_gridcellview_layout , parent , false ) ; Attachment attachment = getItem ( position ) ; <START_BUG> ImageView icon = ( ( ImageView ) ( theCell . findViewById ( image ) ) ) ; <END_BUG> new com . cinesnacks . connections . http . DownloadImage ( icon , new DownloadImageListener ( ) { @ Override public void gotImage ( Bitmap bitmap ) { } @ Override public void gotError ( ) { } } ) . execute ( attachment . getImages ( ) . getThumbnail ( ) . getUrl ( ) ) ; return theCell ; } }

Fix:
ImageView icon = ( ( ImageView ) ( theCell . findViewById ( galleryCellImage ) ) ) ;
Buggy code:
public class NetworkManager { public NetworkManager ( String address , int port ) { } public NetworkManager ( Socket socket ) { } public void setNetworkListener ( NetworkListener listener ) { } public void connect ( ) { } private void listen ( ) { } public boolean sendData ( byte [ ] buffer ) { Output . net ( ( "Buffer<seq2seq4repair_space>length:<seq2seq4repair_space>" + ( buffer . length ) ) ) ; Output . net ( "Sending<seq2seq4repair_space>buffer...\t\t\t" ) ; if ( ! ( connected ) ) { Output . netfail ( ) ; Output . netln ( "Not<seq2seq4repair_space>connected<seq2seq4repair_space>to<seq2seq4repair_space>host." ) ; return false ; } try { <START_BUG> out . write ( buffer . length ) ; <END_BUG> out . write ( buffer ) ; out . flush ( ) ; Output . netok ( ) ; } catch ( IOException e ) { Output . netfail ( ) ; Output . netln ( "Broken<seq2seq4repair_space>Connection" ) ; e . printStackTrace ( ) ; connected = false ; return false ; } return true ; } public void messageNotUsed ( byte [ ] message ) { } public synchronized byte [ ] blockForFlags ( byte [ ] flags ) { } public synchronized byte [ ] blockForMessage ( ) { } private NetworkListener listener ; private Socket socket ; private DataOutputStream out ; private DataInputStream in ; private String address ; private int port ; private Thread listenThread ; private boolean connected ; private CountDownLatch latch ; private boolean blocking ; private byte [ ] blockData ; }

Fix:
out . writeInt ( buffer . length ) ;
Buggy code:
public class LinkHandler { public void handleLink ( Context context , LinkProperty link ) { if ( ( link instanceof DestinationLinkProperty ) && ( TextUtils . isEmpty ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ) ) { return ; } if ( ( link instanceof InternalLinkProperty ) || ( link instanceof NativeLinkProperty ) ) { if ( ( isYoutubeVideo ( Uri . parse ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ) ) || ( isVideo ( Uri . parse ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ) ) ) { VideoPageDescriptor page = new VideoPageDescriptor ( ) ; page . setSrc ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ; page . setType ( "content" ) ; Intent toLoad = UiSettings . getInstance ( ) . getIntentFactory ( ) . getIntentForPageDescriptor ( context , page ) ; if ( toLoad != null ) { context . startActivity ( toLoad ) ; } } else { <START_BUG> Intent toLoad = UiSettings . getInstance ( ) . getIntentFactory ( ) . geIntentForPageUri ( context , Uri . parse ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ) ; <END_BUG> if ( toLoad != null ) { context . startActivity ( toLoad ) ; } } } else if ( link instanceof UriLinkProperty ) { String destination = ( ( UriLinkProperty ) ( link ) ) . getDestination ( ) ; if ( destination . startsWith ( "tel:////" ) ) { destination = destination . replace ( "////" , "" ) ; } Intent uriIntent = new Intent ( Intent . ACTION_VIEW ) ; uriIntent . setData ( Uri . parse ( destination ) ) ; context . startActivity ( uriIntent ) ; } else if ( link instanceof ExternalLinkProperty ) { if ( ( isYoutubeVideo ( Uri . parse ( ( ( ExternalLinkProperty ) ( link ) ) . getDestination ( ) ) ) ) || ( isVideo ( Uri . parse ( ( ( ExternalLinkProperty ) ( link ) ) . getDestination ( ) ) ) ) ) { VideoPageDescriptor page = new VideoPageDescriptor ( ) ; page . setSrc ( ( ( ExternalLinkProperty ) ( link ) ) . getDestination ( ) ) ; page . setType ( "content" ) ; Intent toLoad = UiSettings . getInstance ( ) . getIntentFactory ( ) . getIntentForPageDescriptor ( context , page ) ; if ( toLoad != null ) { context . startActivity ( toLoad ) ; } } else { WebPageDescriptor page = new WebPageDescriptor ( ) ; page . setSrc ( ( ( ExternalLinkProperty ) ( link ) ) . getDestination ( ) ) ; page . setType ( "content" ) ; Intent toLoad = UiSettings . getInstance ( ) . getIntentFactory ( ) . getIntentForPageDescriptor ( context , page ) ; if ( toLoad != null ) { context . startActivity ( toLoad ) ; } } } } public boolean isYoutubeVideo ( @ Nullable Uri uri ) { } public boolean isVideo ( @ Nullable Uri uri ) { } }

Fix:
Intent toLoad = UiSettings . getInstance ( ) . getIntentFactory ( ) . getIntentForPageUri ( context , Uri . parse ( ( ( DestinationLinkProperty ) ( link ) ) . getDestination ( ) ) ) ;
Buggy code:
public class MappedFileDataInput extends AbstractDataInput implements FileDataInput { private final MappedByteBuffer buffer ; private final String filename ; private int position ; public MappedFileDataInput ( FileInputStream stream , String filename , int position ) throws IOException { } public MappedFileDataInput ( MappedByteBuffer buffer , String filename , int position ) { } protected void seekInternal ( int pos ) { } @ Override protected int getPosition ( ) { } @ Override public boolean markSupported ( ) { } public void reset ( FileMark mark ) throws IOException { } public FileMark mark ( ) { } <START_BUG> public int bytesPastMark ( FileMark mark ) { <END_BUG> assert mark instanceof MappedFileDataInput . MappedFileDataInputMark ; assert ( position ) >= ( ( ( MappedFileDataInput . MappedFileDataInputMark ) ( mark ) ) . position ) ; return ( position ) - ( ( ( MappedFileDataInput . MappedFileDataInputMark ) ( mark ) ) . position ) ; } public boolean isEOF ( ) throws IOException { } public long bytesRemaining ( ) throws IOException { } public String getPath ( ) { } public int read ( ) throws IOException { } public synchronized ByteBuffer readBytes ( int length ) throws IOException { } @ Override public final void readFully ( byte [ ] buffer ) throws IOException { } @ Override public final void readFully ( byte [ ] buffer , int offset , int count ) throws IOException { } public int skipBytes ( int n ) throws IOException { } private static class MappedFileDataInputMark implements FileMark { int position ; MappedFileDataInputMark ( int position ) { } } @ Override public String toString ( ) { } }

Fix:
public long bytesPastMark ( FileMark mark ) {
Buggy code:
public abstract class AbstractApplicationEventMulticaster implements BeanFactoryAware , ApplicationEventMulticaster { private final AbstractApplicationEventMulticaster . ListenerRetriever defaultRetriever = new AbstractApplicationEventMulticaster . ListenerRetriever ( false ) ; private final Map < AbstractApplicationEventMulticaster . ListenerCacheKey , AbstractApplicationEventMulticaster . ListenerRetriever > retrieverCache = new ConcurrentHashMap < AbstractApplicationEventMulticaster . ListenerCacheKey , AbstractApplicationEventMulticaster . ListenerRetriever > ( ) ; private BeanFactory beanFactory ; public void addApplicationListener ( ApplicationListener listener ) { } public void addApplicationListenerBean ( String listenerBeanName ) { } public void removeApplicationListener ( ApplicationListener listener ) { } public void removeApplicationListenerBean ( String listenerBeanName ) { } public void removeAllListeners ( ) { } public final void setBeanFactory ( BeanFactory beanFactory ) { } private BeanFactory getBeanFactory ( ) { } protected Collection < ApplicationListener > getApplicationListeners ( ) { return this . defaultRetriever . getApplicationListeners ( ) ; } protected Collection < ApplicationListener > getApplicationListeners ( ApplicationEvent event ) { } protected boolean supportsEvent ( ApplicationListener listener , Class < ? extends ApplicationEvent > eventType , Class sourceType ) { } private static class ListenerCacheKey { private final Class eventType ; private final Class sourceType ; public ListenerCacheKey ( Class eventType , Class sourceType ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } } private class ListenerRetriever { public final Set < ApplicationListener > applicationListeners ; public final Set < String > applicationListenerBeans ; private final boolean preFiltered ; public ListenerRetriever ( boolean preFiltered ) { } public Collection < ApplicationListener > getApplicationListeners ( ) { LinkedList < ApplicationListener > allListeners = new LinkedList < ApplicationListener > ( ) ; for ( ApplicationListener listener : this . applicationListeners ) { allListeners . add ( listener ) ; } if ( ! ( this . applicationListenerBeans . isEmpty ( ) ) ) { BeanFactory beanFactory = getBeanFactory ( ) ; for ( String listenerBeanName : this . applicationListenerBeans ) { ApplicationListener listener = beanFactory . getBean ( listenerBeanName , ApplicationListener . class ) ; <START_BUG> if ( ( ! ( this . preFiltered ) ) && ( ! ( allListeners . contains ( listener ) ) ) ) { <END_BUG> allListeners . add ( listener ) ; } } } OrderComparator . sort ( allListeners ) ; return allListeners ; } } }

Fix:
if ( ( this . preFiltered ) || ( ! ( allListeners . contains ( listener ) ) ) ) {
Buggy code:
public class SMSDetailsFragment extends Fragment implements OnClickListener { private static final int REQUEST_CONTACT_NUMBER = 123456789 ; private SMS sms ; List < Location > listOfLocations ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onClick ( View v ) { } public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } public void reactToBackPress ( ) { } private void setSpinnerItems ( View v ) { } private void addListenersToButtons ( View v ) { } private void fillSMSDetails ( SMS sms , View v ) { } private void setSpinnerSelectedLocation ( Spinner spinner , SMS sms ) { } private void showCancelConfirmationDialog ( ) { } private boolean parseAndCheckSMSDataValidity ( ) { } private void saveSMS ( ) { } private void fillSMSBeforeSaving ( ) { if ( ( sms ) == null ) <START_BUG> sms = new SMS ( "" , 0 , "" , null ) ; <END_BUG> sms . setReceiverNumber ( Integer . valueOf ( ( ( android . widget . EditText ) ( getView ( ) . findViewById ( R . id . sms_receiver_number ) ) ) . getText ( ) . toString ( ) ) ) ; sms . setLocationToSend ( ( ( Location ) ( ( ( Spinner ) ( getView ( ) . findViewById ( R . id . sms_location_chooser ) ) ) . getSelectedItem ( ) ) ) ) ; sms . setMessageText ( ( ( android . widget . EditText ) ( getView ( ) . findViewById ( R . id . sms_message_text ) ) ) . getText ( ) . toString ( ) ) ; } private void saveOrUpdateSMS ( ) { } }

Fix:
sms = new SMS ( "" , 0 , "" , null , true ) ;
Buggy code:
public class MapTests extends JUnitTests { @ Test ( timeout = 300000 ) public void mapPos0Test ( ) { } @ Test ( timeout = 300000 ) public void mapPos1Test ( ) { } @ Test ( timeout = 300000 ) public void concreteMapPos0Test ( ) { } @ Test ( timeout = 300000 ) public void concreteLinkedMapPos0Test ( ) { } @ Test ( timeout = 300000 ) public void concreteMapPos1Test ( ) { } <START_BUG> @ Test <END_BUG> public void concreteMapTest2 ( ) { Infoflow infoflow = initInfoflow ( ) ; List < String > epoints = new ArrayList < String > ( ) ; epoints . add ( "<soot.jimple.infoflow.test.MapTestCode:<seq2seq4repair_space>void<seq2seq4repair_space>concreteWriteRead2Test()>" ) ; infoflow . computeInfoflow ( appPath , libPath , epoints , sources , sinks ) ; negativeCheckInfoflow ( infoflow ) ; } @ Test ( timeout = 300000 ) public void mapIteratorTest ( ) { } @ Test ( timeout = 300000 ) public void mapEntryTest ( ) { } @ Test ( timeout = 300000 ) public void concreteTableTest ( ) { } @ Test ( timeout = 300000 ) @ Ignore public void concreteNegativeTest ( ) { } @ Test ( timeout = 300000 ) public void loopCallTest ( ) { } }

Fix:
@ Test ( timeout = 300000 )
Buggy code:
public final class Bytes extends LongValue { private static final Pattern valuePattern = Pattern . compile ( "([0-9]+([\\.,][0-9]+)?)\\s*(|K|M|G|T)B?" , Pattern . CASE_INSENSITIVE ) ; public static Bytes MAX = Bytes . bytes ( Long . MAX_VALUE ) ; private Bytes ( final long bytes ) { } public static Bytes bytes ( final long bytes ) { } public static Bytes kilobytes ( final long kilobytes ) { } public static Bytes megabytes ( final long megabytes ) { } public static Bytes gigabytes ( final long gigabytes ) { } public static Bytes terabytes ( final long terabytes ) { } public static Bytes bytes ( final double bytes ) { } public static Bytes kilobytes ( final double kilobytes ) { } public static Bytes megabytes ( final double megabytes ) { } public static Bytes gigabytes ( final double gigabytes ) { } public static Bytes terabytes ( final double terabytes ) { } public final long bytes ( ) { } public final double kilobytes ( ) { } public final double megabytes ( ) { } public final double gigabytes ( ) { } public final double terabytes ( ) { } public static Bytes valueOf ( final String string , final Locale locale ) throws StringValueConversionException { } public static Bytes valueOf ( final String string ) throws StringValueConversionException { } public String toString ( ) { } public String toString ( final Locale locale ) { if ( ( value ) >= 0 ) { if ( ( terabytes ( ) ) >= 1.0 ) { <START_BUG> return unitString ( gigabytes ( ) , "T" , locale ) ; <END_BUG> } if ( ( gigabytes ( ) ) >= 1.0 ) { return unitString ( gigabytes ( ) , "G" , locale ) ; } if ( ( megabytes ( ) ) >= 1.0 ) { return unitString ( megabytes ( ) , "M" , locale ) ; } if ( ( kilobytes ( ) ) >= 1.0 ) { return unitString ( kilobytes ( ) , "K" , locale ) ; } return ( Long . toString ( value ) ) + "<seq2seq4repair_space>bytes" ; } else { return "N//A" ; } } private String unitString ( final double value , final String units , final Locale locale ) { } }

Fix:
return unitString ( terabytes ( ) , "T" , locale ) ;
Buggy code:
public class Printer { protected final OutputFormat _format ; protected Writer _writer ; protected StringWriter _dtdWriter ; protected Writer _docWriter ; protected IOException _exception ; private static final int BufferSize = 4096 ; private final char [ ] _buffer = new char [ Printer . BufferSize ] ; private int _pos = 0 ; public Printer ( Writer writer , OutputFormat format ) { } public IOException getException ( ) { } public void enterDTD ( ) throws IOException { } public String leaveDTD ( ) throws IOException { if ( ( _writer ) == ( _dtdWriter ) ) { flushLine ( false ) ; _writer = _docWriter ; return _dtdWriter . toString ( ) ; <START_BUG> } else <END_BUG> return null ; } public void printText ( String text ) throws IOException { } public void printText ( StringBuffer text ) throws IOException { } public void printText ( char [ ] chars , int start , int length ) throws IOException { } public void printText ( char ch ) throws IOException { } public void printSpace ( ) throws IOException { } public void breakLine ( ) throws IOException { } public void breakLine ( boolean preserveSpace ) throws IOException { } public void flushLine ( boolean preserveSpace ) throws IOException { } public void flush ( ) throws IOException { } public void indent ( ) { } public void unindent ( ) { } public int getNextIndent ( ) { } public void setNextIndent ( int indent ) { } public void setThisIndent ( int indent ) { } }

Fix:
}
Buggy code:
class Roster { Roster ( ) { } void addRemove ( String plugin ) { } void addInstall ( String url , String installDirectory , int size ) { } public Roster . Operation getOperation ( int i ) { } int getOperationCount ( ) { } boolean isEmpty ( ) { } boolean performOperations ( final PluginManagerProgress progress ) { for ( int i = 0 ; i < ( operations . size ( ) ) ; i ++ ) { Roster . Operation op = ( ( Roster . Operation ) ( operations . get ( i ) ) ) ; if ( op . runInWorkThread ( progress ) ) progress . done ( true ) ; else { progress . done ( false ) ; return false ; } if ( Thread . interrupted ( ) ) return false ; } try { SwingUtilities . invokeAndWait ( new Runnable ( ) { public void run ( ) { for ( int i = 0 ; i < ( operations . size ( ) ) ; i ++ ) { Roster . Operation op = ( ( Roster . Operation ) ( operations . get ( i ) ) ) ; if ( op . runInAWTThread ( progress ) ) progress . done ( true ) ; else { progress . done ( false ) ; return ; } } finishOperations ( ) ; } } ) ; <START_BUG> } catch ( InterruptedException e ) { <END_BUG> Log . log ( ERROR , this , e ) ; } return true ; } private static File downloadDir ; private List operations ; private List toLoad ; private void addOperation ( Roster . Operation op ) { } private static String getDownloadDir ( ) { } private void finishOperations ( ) { } abstract static class Operation { public boolean runInWorkThread ( PluginManagerProgress progress ) { } public boolean runInAWTThread ( PluginManagerProgress progress ) { } public abstract int getMaximum ( ) { } } class Remove extends Roster . Operation { Remove ( String plugin ) { } public int getMaximum ( ) { } public boolean runInAWTThread ( PluginManagerProgress progress ) { } private void unloadPluginJAR ( PluginJAR jar ) { } public boolean equals ( Object o ) { } private String plugin ; private boolean deleteRecursively ( File file ) { } } class Install extends Roster . Operation { int size ; Install ( String url , String installDirectory , int size ) { } public int getMaximum ( ) { } public boolean runInWorkThread ( PluginManagerProgress progress ) { } public boolean runInAWTThread ( PluginManagerProgress progress ) { } public boolean equals ( Object o ) { } private String url ; private String installDirectory ; private String path ; private String download ( PluginManagerProgress progress , String fileName , String url ) { } private boolean copy ( PluginManagerProgress progress , InputStream in , OutputStream out , boolean canStop , boolean doProgress ) throws Exception { } } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class UploadTextField extends TextField { private final String fileFieldName ; private final boolean uploadRequired ; public UploadTextField ( String name , String fileFieldName , UploadModel model , boolean uploadRequired ) { } protected void updateModel ( ) { } public final FileItem getFile ( ) { } public final class UploadFieldValidator extends AbstractValidator { public void onValidate ( ) { final FileItem item = getFile ( ) ; <START_BUG> final String name = getStringValue ( ) ; <END_BUG> if ( ( item == null ) || ( ( item . getSize ( ) ) == 0 ) ) { if ( uploadRequired ) { error ( ( ( super . resourceKey ( ) ) + ".file.required" ) , messageModel ( ) ) ; } else { return ; } } else { if ( ( name == null ) || ( name . trim ( ) . equals ( "" ) ) ) { error ( ( ( super . resourceKey ( ) ) + ".name.required" ) , messageModel ( ) ) ; } } } protected Map messageModel ( ) { } } }

Fix:
final String name = getInput ( ) ;
Buggy code:
public class SchemaVersionDAO { private static final Log LOG = LogFactory . getLog ( SchemaVersionDAO . class ) ; private static final String COUNTS_TABLE_NAME_SUFFIX = "_counts" ; private Session session ; private Keyspace keyspace ; private String tableName ; private CachePrepareStatement cachePs ; public SchemaVersionDAO ( Session session , Keyspace keyspace , String tableName ) { } public Keyspace getKeyspace ( ) { } public void createTablesIfNotExist ( ) { } public boolean tablesExist ( ) { } public void addAppliedMigration ( AppliedMigration appliedMigration ) { } public List < AppliedMigration > findAppliedMigrations ( ) { if ( ! ( tablesExist ( ) ) ) { return new ArrayList < > ( ) ; } Select select = QueryBuilder . select ( ) . column ( "version_rank" ) . column ( "installed_rank" ) . column ( "version" ) . column ( "description" ) . column ( "type" ) . column ( "script" ) . column ( "checksum" ) . column ( "installed_on" ) . column ( "installed_by" ) . column ( "execution_time" ) . column ( "success" ) . from ( keyspace . getName ( ) , tableName ) ; select . setConsistencyLevel ( ALL ) ; ResultSet results = session . execute ( select ) ; List < AppliedMigration > resultsList = new ArrayList < > ( ) ; for ( Row row : results ) { <START_BUG> resultsList . add ( new AppliedMigration ( row . getInt ( "version_rank" ) , row . getInt ( "installed_rank" ) , MigrationVersion . fromVersion ( row . getString ( "version" ) ) , row . getString ( "description" ) , MigrationType . valueOf ( row . getString ( "type" ) ) , row . getString ( "script" ) , row . getInt ( "checksum" ) , row . getDate ( "installed_on" ) , row . getString ( "installed_by" ) , row . getInt ( "execution_time" ) , row . getBool ( "success" ) ) ) ; <END_BUG> } return resultsList ; } private int calculateInstalledRank ( ) { } class MigrationMetaHolder { private int versionRank ; public MigrationMetaHolder ( int versionRank ) { } public int getVersionRank ( ) { } } private int calculateVersionRank ( MigrationVersion version ) { } }

Fix:
resultsList . add ( new AppliedMigration ( row . getInt ( "version_rank" ) , row . getInt ( "installed_rank" ) , MigrationVersion . fromVersion ( row . getString ( "version" ) ) , row . getString ( "description" ) , MigrationType . valueOf ( row . getString ( "type" ) ) , row . getString ( "script" ) , ( row . isNull ( "checksum" ) ? null : row . getInt ( "checksum" ) ) , row . getDate ( "installed_on" ) , row . getString ( "installed_by" ) , row . getInt ( "execution_time" ) , row . getBool ( "success" ) ) ) ;