nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Room { private int m_id ; private List < FlyingObject > m_objects ; private int m_max_player_count ; private Timer m_tmr ; private ActionListener m_alistner ; private HashMap < Integer , Integer > m_events ; private String m_name ; public Room ( int max_players , String name ) { } public int getID ( ) { } public void setID ( int id ) { } public List < FlyingObject > getPlayerList ( ) { } public List < Bullet > getBullets ( ) { } public List < Plane > getPlanes ( ) { } public String getName ( ) { } public int getMaxPlayerCount ( ) { } public boolean AddPlayer ( Player p ) { <START_BUG> if ( ! ( ( m_objects . size ( ) ) == ( m_max_player_count ) ) ) { <END_BUG> Plane plane = new Plane ( 0 , 0 , new Vector ( 0 , 0 ) , p , this ) ; p . setPlane ( plane ) ; m_objects . add ( p . getPlane ( ) ) ; return true ; } else return false ; } public void StartRoom ( ) { } public void StopRoom ( ) { } public void SendEvents ( int pid , int event ) { } private void GameTick ( ) throws Exception { } public void DisconnectPlayer ( int id ) { } public void AddBullet ( Bullet b ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ! ( ( getPlanes ( ) . size ( ) ) == ( m_max_player_count ) ) ) {
Buggy code:
public class MailFileFolder extends Folder { private static final String FILENAME_FORMAT = "%d.msg" ; private static final String FILENAME_REGEX = "\\d+\\.msg" ; private boolean isOpen ; private final File folderPath ; private final boolean isFile ; private static final FilenameFilter FILENAME_FILTER = new FilenameFilter ( ) { public boolean accept ( File dir , String name ) { } } ; public MailFileFolder ( Store store , String path ) { } public MailFileFolder ( Store store , URLName path ) { } @ Override public void appendMessages ( Message [ ] messages ) throws MessagingException { } @ Override public void close ( boolean expunge ) throws MessagingException { } @ Override public boolean create ( int type ) throws MessagingException { } @ Override public boolean delete ( boolean recurse ) throws MessagingException { } @ Override public boolean exists ( ) throws MessagingException { } @ Override public Message [ ] expunge ( ) throws MessagingException { <START_BUG> return null ; <END_BUG> } @ Override public Folder getFolder ( String name ) throws MessagingException { } @ Override public String getFullName ( ) { } @ Override public Message getMessage ( int index ) throws MessagingException { } @ Override public int getMessageCount ( ) throws MessagingException { } @ Override public String getName ( ) { } @ Override public Folder getParent ( ) throws MessagingException { } @ Override public Flags getPermanentFlags ( ) { } @ Override public char getSeparator ( ) throws MessagingException { } @ Override public int getType ( ) throws MessagingException { } @ Override public boolean hasNewMessages ( ) throws MessagingException { } @ Override public boolean isOpen ( ) { } @ Override public Folder [ ] list ( String pattern ) throws MessagingException { } @ Override public void open ( int mode ) throws MessagingException { } @ Override public boolean renameTo ( Folder newName ) throws MessagingException { } }

Fix:
return new Message [ 0 ] ;
Buggy code:
public class VColumn { private final String name ; private final Class < ? > type ; private final Object data ; public VColumn ( String name , Class < ? > type , Object data ) { } public String getName ( ) { } public Class < ? > getType ( ) { } public Object getData ( ) { } public static VColumn from ( VTable table , int index ) { } public static VColumn from ( VTable table , String column ) { } public static Map < String , VColumn > columnMap ( VTable table ) { } public static Object combineData ( Class < ? > type , int size , ListInt offsets , List < VColumn > columns ) { } private static Object combineStringData ( final int size , final ListInt offsets , final List < VColumn > columns ) { } private static Object combineDoubleData ( final int size , final ListInt offsets , final List < VColumn > columns ) { return new ListDouble ( ) { @ Override public double getDouble ( int index ) { int tableIndex = ListNumbers . binarySearchValueOrLower ( offsets , index ) ; if ( ( columns . get ( tableIndex ) ) == null ) { return Double . NaN ; } int rowIndex = index - ( offsets . getInt ( tableIndex ) ) ; <START_BUG> if ( ListNumber . class . isInstance ( columns . get ( tableIndex ) . getData ( ) ) ) { <END_BUG> return Double . NaN ; } @ SuppressWarnings ( "unchecked" ) ListNumber values = ( ( ListNumber ) ( columns . get ( tableIndex ) . getData ( ) ) ) ; if ( rowIndex < ( values . size ( ) ) ) { return values . getDouble ( rowIndex ) ; } else { return Double . NaN ; } } @ Override public int size ( ) { return size ; } } ; } }

Fix:
if ( ! ( ListNumber . class . isInstance ( columns . get ( tableIndex ) . getData ( ) ) ) ) {
Buggy code:
public class OnlineGoGameScreen extends GoGameScreen { private OnlineGame onlineGame ; private OnlineGoGameScreen . PlayerTimer timer ; public OnlineGoGameScreen ( OnlineGame game ) { } @ Override protected void setupGoban ( Goban goban ) { } @ Override protected void setupHud ( ) { } @ Override protected String getMapToLoad ( ) { <START_BUG> return "Goban_19_summer" ; <END_BUG> } private void startTimer ( Player player ) { } private class OnlineTimerOut implements TurnListener { private final TurnListener listener ; public OnlineTimerOut ( TurnListener listener ) { } @ Override public void newTurn ( GameBoard board , Player player ) { } @ Override public void endOfTurn ( GameBoard board , Player player , Player nextPlayer ) { } @ Override public void startOfTurn ( GameBoard board , Player player , Player previousPlayer ) { } } private class PlayerTimer extends Thread { private final Player player ; private int time = 90 ; private boolean shouldRun = true ; public PlayerTimer ( Player player ) { } public void stopTimer ( ) { } @ Override public void run ( ) { } } }

Fix:
return "goban_19_summer" ;
Buggy code:
public class ClientJMeterEngine implements Runnable , JMeterEngine { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; RemoteJMeterEngine remote ; HashTree test ; SearchByClass testListeners ; ConvertListeners sampleListeners ; private String host ; private static RemoteJMeterEngine getEngine ( String h ) throws MalformedURLException , NotBoundException , RemoteException { } public ClientJMeterEngine ( String host ) throws MalformedURLException , NotBoundException , RemoteException { } public ClientJMeterEngine ( RemoteJMeterEngine remote ) { } protected HashTree getTestTree ( ) { } public void configure ( HashTree testTree ) { } public void setHost ( String host ) { } public void runTest ( ) { } public void stopTest ( ) { } public void reset ( ) { } public void run ( ) { ClientJMeterEngine . log . info ( "running<seq2seq4repair_space>clientengine<seq2seq4repair_space>run<seq2seq4repair_space>method" ) ; testListeners = new SearchByClass ( TestListener . class ) ; sampleListeners = new ConvertListeners ( ) ; HashTree testTree = getTestTree ( ) ; <START_BUG> PreCompiler compiler = new PreCompiler ( ) ; <END_BUG> synchronized ( testTree ) { testTree . traverse ( compiler ) ; testTree . traverse ( new TurnElementsOn ( ) ) ; testTree . traverse ( testListeners ) ; testTree . traverse ( sampleListeners ) ; } try { JMeterContextService . startTest ( ) ; remote . setHost ( host ) ; ClientJMeterEngine . log . info ( ( "sent<seq2seq4repair_space>host<seq2seq4repair_space>=" + ( host ) ) ) ; remote . configure ( test ) ; ClientJMeterEngine . log . info ( "sent<seq2seq4repair_space>test" ) ; remote . runTest ( ) ; ClientJMeterEngine . log . info ( "sent<seq2seq4repair_space>run<seq2seq4repair_space>command" ) ; } catch ( Exception ex ) { ClientJMeterEngine . log . error ( "" , ex ) ; } } public void exit ( ) { } public void setProperties ( Properties p ) { } }

Fix:
PreCompiler compiler = new PreCompiler ( true ) ;
Buggy code:
public class XwikiBridgeInterfaceRestResource extends RestResource implements BridgeInterface { public XwikiBridgeInterfaceRestResource ( ) { } public XwikiBridgeInterfaceRestResource ( String coreFacadeHostname , int coreFacadeHostPort ) { } public void updateConfiguration ( String coreFacadeHostname , int coreFacadeHostPort ) { } @ Override public String putValidateCollaborativeContent ( CollaborativeContentAnalysis contentFile ) throws LpRestException { } @ Override public AnnotatedCollaborativeContentAnalyses getCollaborativeContentVerifications ( String contentID ) throws LpRestException { } @ Override public String getStatusCollaborativeContentVerifications ( String contentID ) throws LpRestException { } @ Override public String putValidateStaticContent ( StaticContentAnalysis contentFile ) throws LpRestException { } @ Override <START_BUG> public Collection < AnnotatedStaticContentAnalysis > getStaticContentVerifications ( String contentID ) throws LpRestException { <END_BUG> return null ; } @ Override public String getStatusStaticContentVerifications ( String contentID ) throws LpRestException { } }

Fix:
public AnnotatedStaticContentAnalyses getStaticContentVerifications ( String contentID ) throws LpRestException {
Buggy code:
public class UnionNode extends SetOperatorNode { private boolean addNewNodesCalled ; boolean tableConstructor ; boolean topTableConstructor ; public void init ( Object leftResult , Object rightResult , Object all , Object tableConstructor , Object tableProperties ) throws StandardException { } public void markTopTableConstructor ( ) { } boolean tableConstructor ( ) { } public void rejectParameters ( ) throws StandardException { } void setTableConstructorTypes ( ResultColumnList typeColumns ) throws StandardException { } public CostEstimate optimizeIt ( Optimizer optimizer , OptimizablePredicateList predList , CostEstimate outerCost , RowOrdering rowOrdering ) throws StandardException { } public void pushExpressions ( PredicateList predicateList ) throws StandardException { } public Optimizable modifyAccessPath ( JBitSet outerTables ) throws StandardException { } public ResultSetNode modifyAccessPaths ( ) throws StandardException { } private ResultSetNode addNewNodes ( ) throws StandardException { ResultSetNode treeTop = this ; if ( addNewNodesCalled ) { return this ; } addNewNodesCalled = true ; if ( ! ( all ) ) { if ( ! ( columnTypesAndLengthsMatch ( ) ) ) { <START_BUG> treeTop = genNormalizeResultSetNode ( this , false ) ; <END_BUG> } treeTop = ( ( ResultSetNode ) ( getNodeFactory ( ) . getNode ( DISTINCT_NODE , treeTop . genProjectRestrict ( ) , Boolean . FALSE , tableProperties , getContextManager ( ) ) ) ) ; ( ( FromTable ) ( treeTop ) ) . setTableNumber ( tableNumber ) ; treeTop . setReferencedTableMap ( ( ( JBitSet ) ( referencedTableMap . clone ( ) ) ) ) ; all = true ; } if ( ( orderByList ) != null ) { treeTop = ( ( ResultSetNode ) ( getNodeFactory ( ) . getNode ( ORDER_BY_NODE , treeTop , orderByList , tableProperties , getContextManager ( ) ) ) ) ; } return treeTop ; } public String toString ( ) { } public void bindExpressions ( FromList fromListParam ) throws StandardException { } public void generate ( ActivationClassBuilder acb , MethodBuilder mb ) throws StandardException { } public CostEstimate getFinalCostEstimate ( ) throws StandardException { } String getOperatorName ( ) { } }

Fix:
treeTop = genNormalizeResultSetNode ( false ) ;
Buggy code:
@ ThreadSafe @ CleanupObligation public final class PipedOutputStream extends OutputStream { private byte [ ] buffer ; private final Object sync = new Object ( ) ; private int startIdx ; private int endIdx ; private int readerPerceivedEndIdx ; private boolean writerClosed ; private int nrReadStreams ; private final SizedRecyclingSupplier < byte [ ] > bufferProvider ; public PipedOutputStream ( ) { } public PipedOutputStream ( final int bufferSize ) { } public PipedOutputStream ( final int bufferSize , final SizedRecyclingSupplier < byte [ ] > bufferProvider ) { } @ Override public void write ( final byte [ ] b , final int off , final int len ) throws IOException { } @ Override public void write ( final int b ) throws IOException { long deadline = DEADLINE . get ( ) ; synchronized ( sync ) { while ( ( ( ! ( writerClosed ) ) && ( ( nrReadStreams ) > 0 ) ) && ( ( availableToWrite ( ) ) < 1 ) ) { try { long timeToWait = deadline - ( System . currentTimeMillis ( ) ) ; if ( timeToWait <= 0 ) { <START_BUG> throw new IOException ( ( "Write<seq2seq4repair_space>timed<seq2seq4repair_space>out,<seq2seq4repair_space>deadline<seq2seq4repair_space>was:<seq2seq4repair_space>" + deadline ) ) ; <END_BUG> } sync . wait ( timeToWait ) ; } catch ( InterruptedException ex ) { throw new IOException ( ( "Interrupted<seq2seq4repair_space>while<seq2seq4repair_space>writing<seq2seq4repair_space>" + b ) , ex ) ; } } if ( writerClosed ) { throw new IOException ( ( "Cannot<seq2seq4repair_space>write<seq2seq4repair_space>stream<seq2seq4repair_space>closed<seq2seq4repair_space>" + ( this ) ) ) ; } else if ( ( nrReadStreams ) <= 0 ) { throw new IOException ( ( "Broken<seq2seq4repair_space>pipe<seq2seq4repair_space>" + ( this ) ) ) ; } buffer [ ( ( endIdx ) ++ ) ] = ( ( byte ) ( b ) ) ; if ( ( endIdx ) >= ( buffer . length ) ) { endIdx = 0 ; } if ( ( availableToWrite ( ) ) < 1 ) { flush ( ) ; } } } private int availableToWrite ( ) { } private int availableToRead ( ) { } private int contentInBuffer ( ) { } @ Override public void flush ( ) { } @ Override @ WillClose public void close ( ) { } public InputStream getInputStream ( ) { } public synchronized byte [ ] getUnreadBytesFromBuffer ( ) { } @ Override public String toString ( ) { } }

Fix:
throw new IOException ( ( "Read<seq2seq4repair_space>timed<seq2seq4repair_space>out,<seq2seq4repair_space>deadline<seq2seq4repair_space>was:<seq2seq4repair_space>" + deadline ) ) ;
Buggy code:
public class AnnotationIndexProcessor implements DeploymentUnitProcessor { public static final AttachmentKey < Index > ATTACHMENT_KEY = new AttachmentKey < Index > ( Index . class ) ; public static final long PRIORITY = PARSE_DESCRIPTORS . plus ( 200L ) ; public void processDeployment ( DeploymentUnitContext context ) throws DeploymentUnitProcessingException { if ( ( context . getAttachment ( AnnotationIndexProcessor . ATTACHMENT_KEY ) ) != null ) return ; final VirtualFile virtualFile = getVirtualFileAttachment ( context ) ; final Indexer indexer = new Indexer ( ) ; try { final List < VirtualFile > classChildren = virtualFile . getChildren ( new org . jboss . vfs . util . SuffixMatchFilter ( ".class" , VisitorAttributes . RECURSE_LEAVES_ONLY ) ) ; for ( VirtualFile classFile : classChildren ) { InputStream inputStream = null ; try { inputStream = classFile . openStream ( ) ; indexer . index ( inputStream ) ; } catch ( Throwable t ) { VFSUtils . safeClose ( inputStream ) ; throw t ; } } final Index index = indexer . complete ( ) ; context . putAttachment ( AnnotationIndexProcessor . ATTACHMENT_KEY , index ) ; } catch ( Throwable t ) { <START_BUG> throw new DeploymentUnitProcessingException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>deployment<seq2seq4repair_space>root<seq2seq4repair_space>for<seq2seq4repair_space>annotations" , t , null ) ; <END_BUG> } } }

Fix:
throw new DeploymentUnitProcessingException ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>index<seq2seq4repair_space>deployment<seq2seq4repair_space>root<seq2seq4repair_space>for<seq2seq4repair_space>annotations" , t ) ;
Buggy code:
class StencilTab extends OpenGLTab { private abstract class Shape { private String name ; Shape ( String name ) { } abstract void draw ( ) { } String getName ( ) { } } private StencilTab . Shape [ ] shapes = new StencilTab . Shape [ 5 ] ; private StencilTab . Shape currentShape ; private float xPos = 0 ; private float yPos = 0 ; private float size = 0.45F ; private int texture ; private int quadratic ; private static final String IMAGE = "images//splash.bmp" ; private static final int SLEEP_LENGTH = 50 ; void createControls ( Composite composite ) { } void dispose ( ) { } int getSleepLength ( ) { } String getTabText ( ) { } void init ( ) { if ( ! ( hasStencilSupport ( ) ) ) return ; GL . glClearColor ( 1.0F , 1.0F , 1.0F , 1.0F ) ; GL . glClearDepth ( 1.0F ) ; int [ ] textureOut = new int [ 1 ] ; GL . glGenTextures ( 1 , textureOut ) ; <START_BUG> loadTexture ( getContext ( ) , StencilTab . IMAGE , 0 , textureOut ) ; <END_BUG> this . texture = textureOut [ 0 ] ; quadratic = GLU . gluNewQuadric ( ) ; GLU . gluQuadricNormals ( quadratic , GLU_SMOOTH ) ; GL . glDepthFunc ( GL_LEQUAL ) ; GL . glEnable ( GL_STENCIL_TEST ) ; GL . glEnable ( GL_TEXTURE_2D ) ; GL . glEnable ( GL_DEPTH_TEST ) ; shapes [ 0 ] = new StencilTab . Shape ( "Triangle" ) { public void draw ( ) { GL . glBegin ( GL_TRIANGLES ) ; GL . glVertex3f ( 0.0F , size , 0.0F ) ; GL . glVertex3f ( ( - ( size ) ) , ( - ( size ) ) , 0.0F ) ; GL . glVertex3f ( size , ( - ( size ) ) , 0.0F ) ; GL . glEnd ( ) ; } } ; shapes [ 1 ] = new StencilTab . Shape ( "Disk" ) { public void draw ( ) { GLU . gluDisk ( quadratic , 0.0F , size , 32 , 32 ) ; } } ; shapes [ 2 ] = new StencilTab . Shape ( "Square" ) { public void draw ( ) { GL . glRectf ( ( - ( size ) ) , ( - ( size ) ) , size , size ) ; } } ; shapes [ 3 ] = new StencilTab . Shape ( "Hour<seq2seq4repair_space>Glass" ) { public void draw ( ) { GL . glBegin ( GL_TRIANGLES ) ; GL . glVertex3f ( 0.0F , size , 0.0F ) ; GL . glVertex3f ( ( - ( size ) ) , ( - ( size ) ) , 0.0F ) ; GL . glVertex3f ( size , ( - ( size ) ) , 0.0F ) ; GL . glVertex3f ( 0.0F , ( - ( size ) ) , 0.0F ) ; GL . glVertex3f ( size , size , 0.0F ) ; GL . glVertex3f ( ( - ( size ) ) , size , 0.0F ) ; GL . glEnd ( ) ; } } ; shapes [ 4 ] = new StencilTab . Shape ( "Star" ) { public void draw ( ) { GL . glBegin ( GL_TRIANGLES ) ; GL . glVertex3f ( ( - 0.3F ) , 0 , 0.0F ) ; GL . glVertex3f ( ( ( 2 * ( size ) ) - 0.3F ) , 0 , 0.0F ) ; GL . glVertex3f ( ( ( size ) - 0.3F ) , ( ( 2 * ( size ) ) * 0.85F ) , 0.0F ) ; GL . glVertex3f ( ( ( 2 * ( size ) ) - 0.3F ) , size , 0.0F ) ; GL . glVertex3f ( ( 0 - 0.3F ) , size , 0.0F ) ; GL . glVertex3f ( ( ( size ) - 0.3F ) , ( ( - ( size ) ) * 0.85F ) , 0.0F ) ; GL . glEnd ( ) ; } } ; currentShape = shapes [ 0 ] ; } boolean isStencilSupportNeeded ( ) { } void renderScene ( ) { } }

Fix:
loadTexture ( getGlCanvas ( ) , StencilTab . IMAGE , 0 , textureOut ) ;
Buggy code:
public class NiceUrlTest extends WicketWebTestCase { public NiceUrlTest ( String name ) { } public void setUp ( ) throws Exception { } public void testHelloWorld ( ) throws Exception { beginAt ( "//niceurl" ) ; this . dumpResponse ( System . out ) ; assertTitleEquals ( "Wicket<seq2seq4repair_space>Examples<seq2seq4repair_space>-<seq2seq4repair_space>niceurl" ) ; <START_BUG> assertTextInElement ( "message" , "Hello<seq2seq4repair_space>World!" ) ; <END_BUG> } public static Test suite ( ) { } }

Fix:
assertTextPresent ( "This<seq2seq4repair_space>example<seq2seq4repair_space>displays<seq2seq4repair_space>how<seq2seq4repair_space>you<seq2seq4repair_space>can<seq2seq4repair_space>work<seq2seq4repair_space>with<seq2seq4repair_space>'nice'<seq2seq4repair_space>urls<seq2seq4repair_space>for<seq2seq4repair_space>bookmarkable<seq2seq4repair_space>pages." ) ;
Buggy code:
public class TransactionalSpoutCoordinator implements IRichSpout { public static final BigInteger INIT_TXID = new BigInteger ( "1" ) ; public static final String TRANSACTION_BATCH_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//batch" ; public static final String TRANSACTION_COMMIT_STREAM_ID = ( TransactionalSpoutCoordinator . class . getName ( ) ) + "//commit" ; private static final String CURRENT_TX = "currtx" ; private static final String META_DIR = "meta" ; private ITransactionalSpout _spout ; private Coordinator _coordinator ; private TransactionalState _state ; private RotatingTransactionalState _coordinatorState ; Map < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > _activeTx = new HashMap < BigInteger , TransactionalSpoutCoordinator . TransactionStatus > ( ) ; private SpoutOutputCollector _collector ; BigInteger _currTransaction ; int _maxTransactionActive ; public TransactionalSpoutCoordinator ( ITransactionalSpout spout ) { } @ Override public void open ( Map conf , TopologyContext context , SpoutOutputCollector collector ) { } @ Override public void close ( ) { } @ Override public void nextTuple ( ) { } @ Override public void ack ( Object msgId ) { } @ Override public void fail ( Object msgId ) { } @ Override public void declareOutputFields ( OutputFieldsDeclarer declarer ) { } private void sync ( ) { } @ Override public Map < String , Object > getComponentConfiguration ( ) { } private static enum AttemptStatus { PROCESSING , PROCESSED , COMMITTING ; } private static class TransactionStatus { TransactionAttempt attempt ; TransactionalSpoutCoordinator . AttemptStatus status ; public TransactionStatus ( TransactionAttempt attempt ) { } @ Override public String toString ( ) { } } private static final BigInteger ONE = new BigInteger ( "1" ) ; private BigInteger nextTransactionId ( BigInteger id ) { } private BigInteger getStoredCurrTransaction ( TransactionalState state ) { } private class StateInitializer implements RotatingTransactionalState . StateInitializer { @ Override public Object init ( BigInteger txid , Object lastState ) { <START_BUG> return _coordinator . initialize ( txid , lastState ) ; <END_BUG> } } }

Fix:
return _coordinator . initializeTransaction ( txid , lastState ) ;
Buggy code:
public class ChatActivity extends MyActivity implements OnClickListener { private Button mBtnSend ; private Button mBtnBack ; private Button mBtnSendPic ; private EditText mEditTextContent ; private TextView mFriendName ; private ListView mListView ; private ChatMsgViewAdapter mAdapter ; private List < ChatMsgEntity > mDataArrays = new ArrayList < ChatMsgEntity > ( ) ; private User user ; private MessageDB messageDB ; private MyApplication application ; private boolean alreadycreate ; private Client client ; private Bitmap bitmap_zoom = null ; public void onCreate ( Bundle savedInstanceState ) { } @ Override public void getPicUpdate ( HandleMsg hm ) { } @ Override protected void onResume ( ) { } public void initView ( ) { } public void refreshData ( ) { ChatMsgEntity cme = null ; String datestr = "" ; if ( ( mDataArrays . size ( ) ) > 0 ) { cme = mDataArrays . get ( ( ( mDataArrays . size ( ) ) - 1 ) ) ; datestr = cme . getDate ( ) ; datestr = ( "<seq2seq4repair_space>date<seq2seq4repair_space>>'" + datestr ) + "'<seq2seq4repair_space>" ; } List < ChatMsgEntity > list = messageDB . getMsg ( user . getId ( ) , datestr , 20 ) ; List < ChatMsgEntity > mDataArrays_tmp = new ArrayList < ChatMsgEntity > ( ) ; System . out . println ( ( "reflesh<seq2seq4repair_space>date<seq2seq4repair_space>" + ( list . size ( ) ) ) ) ; if ( ( list . size ( ) ) > 0 ) { for ( ChatMsgEntity entity : list ) { <START_BUG> if ( entity . getName ( ) . equals ( "" ) ) { <END_BUG> entity . setName ( user . getName ( ) ) ; } if ( ( entity . getImg ( ) ) < 0 ) { entity . setImg ( user . getImg ( ) ) ; } mDataArrays_tmp . add ( entity ) ; } Collections . reverse ( mDataArrays_tmp ) ; mDataArrays . addAll ( mDataArrays_tmp ) ; mListView . setSelection ( ( ( mAdapter . getCount ( ) ) - 1 ) ) ; mAdapter . notifyDataSetChanged ( ) ; mListView . post ( new Runnable ( ) { @ Override public void run ( ) { mListView . setSelection ( ( ( mAdapter . getCount ( ) ) - 1 ) ) ; } } ) ; } } public void initData ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onClick ( View v ) { } public void msgsendok ( String key , String id ) { } private void send ( String contString , int is_pic , String pic_path_local ) { } @ Override public void receiveMsg ( TranObject msg ) { } private void Receive_message ( TranObject msg , int msgtype , String path_pic ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( entity . getName ( ) ) != null ) && ( entity . getName ( ) . equals ( "" ) ) ) {
Buggy code:
public class ProblemFieldBinding extends FieldBinding { private int problemId ; public FieldBinding closestMatch ; public ProblemFieldBinding ( ReferenceBinding declaringClass , char [ ] name , int problemId ) { } public ProblemFieldBinding ( FieldBinding closestMatch , ReferenceBinding declaringClass , char [ ] name , int problemId ) { } public final int problemId ( ) { <START_BUG> return problemId ; <END_BUG> } }

Fix:
return this . problemId ;
Buggy code:
public class ResultScreen extends ActionBarActivity implements View . OnClickListener { public static final String EXTRA_MESSAGE = "com.paniuta.trackmywords.MESSAGE" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onClick ( View v ) { Intent intent = new Intent ( this , LyricsScreen . class ) ; String message = "" ; TextView textSongSelected ; switch ( v . getId ( ) ) { case id . tv1 : textSongSelected = ( ( TextView ) ( findViewById ( tv1 ) ) ) ; message = textSongSelected . getText ( ) . toString ( ) ; break ; case id . tv2 : <START_BUG> textSongSelected = ( ( TextView ) ( findViewById ( tv1 ) ) ) ; <END_BUG> message = textSongSelected . getText ( ) . toString ( ) ; break ; case id . tv3 : textSongSelected = ( ( TextView ) ( findViewById ( tv3 ) ) ) ; message = textSongSelected . getText ( ) . toString ( ) ; break ; } intent . putExtra ( ResultScreen . EXTRA_MESSAGE , message ) ; startActivity ( intent ) ; } }

Fix:
textSongSelected = ( ( TextView ) ( findViewById ( tv2 ) ) ) ;
Buggy code:
@ Service public class MailService { private final JavaMailSender javaMailSender ; @ Value ( "${mail.from}" ) private String from ; @ Value ( "${mail.to}" ) private String to ; @ Autowired public MailService ( JavaMailSender javaMailSender ) { } public void sendEmailNotification ( Study study , String status ) { String studyTitle = study . getTitle ( ) ; String pubmedLink = "http:////europepmc.org//abstract//MED//" + ( study . getPubmedId ( ) ) ; String currentCurator = study . getHousekeeping ( ) . getCurator ( ) . getLastName ( ) ; String studyTrait = null ; if ( ( ( study . getDiseaseTrait ( ) ) != null ) && ( ! ( study . getDiseaseTrait ( ) . getTrait ( ) . isEmpty ( ) ) ) ) { studyTrait = study . getDiseaseTrait ( ) . getTrait ( ) ; } String notes = null ; if ( ( ( study . getHousekeeping ( ) . getNotes ( ) ) != null ) && ( ! ( study . getHousekeeping ( ) . getNotes ( ) . isEmpty ( ) ) ) ) { notes = study . getHousekeeping ( ) . getNotes ( ) ; } Date studyDate = study . getStudyDate ( ) ; SimpleDateFormat dateFormat = new SimpleDateFormat ( "dd-MMM-yyyy" ) ; String bodyStudyDate = dateFormat . format ( studyDate ) ; <START_BUG> String editStudyLink = "http:////orange.ebi.ac.uk:55000//studies//" + ( study . getId ( ) ) ; <END_BUG> SimpleMailMessage mailMessage = new SimpleMailMessage ( ) ; mailMessage . setTo ( getTo ( ) ) ; mailMessage . setFrom ( getFrom ( ) ) ; mailMessage . setSubject ( ( ( ( study . getAuthor ( ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + status ) ) ; mailMessage . setText ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "The<seq2seq4repair_space>GWAS<seq2seq4repair_space>paper<seq2seq4repair_space>by<seq2seq4repair_space>" + ( study . getAuthor ( ) ) ) + "<seq2seq4repair_space>with<seq2seq4repair_space>study<seq2seq4repair_space>date<seq2seq4repair_space>" ) + bodyStudyDate ) + "<seq2seq4repair_space>now<seq2seq4repair_space>has<seq2seq4repair_space>status<seq2seq4repair_space>" ) + status ) + "\n" ) + "Title:<seq2seq4repair_space>" ) + studyTitle ) + "\n" ) + "Trait:<seq2seq4repair_space>" ) + studyTrait ) + "\n" ) + "Pubmed<seq2seq4repair_space>link:<seq2seq4repair_space>" ) + pubmedLink ) + "\n" ) + "Edit<seq2seq4repair_space>link:<seq2seq4repair_space>" ) + editStudyLink ) + "\n" ) + "Current<seq2seq4repair_space>curator:<seq2seq4repair_space>" ) + currentCurator ) + "\n" ) + "Notes:<seq2seq4repair_space>" ) + notes ) ) ; javaMailSender . send ( mailMessage ) ; } public String getFrom ( ) { } public void setFrom ( String from ) { } public String getTo ( ) { } public void setTo ( String to ) { } No newline ; at end ; of file ; }

Fix:
String editStudyLink = "http:////garfield.ebi.ac.uk:8080//gwas//curation//studies//" + ( study . getId ( ) ) ;
Buggy code:
public class ProblemListView3 extends ResizeComposite implements SessionObserver , Subscriber { private CloudCoderPage page ; private Session session ; private DataGrid < ProblemAndSubmissionReceipt > cellTable ; public ProblemListView3 ( CloudCoderPage page ) { } private static class TestNameColumn extends TextColumn < ProblemAndSubmissionReceipt > { @ Override public String getValue ( ProblemAndSubmissionReceipt object ) { } } private static class WhenDueColumn extends TextColumn < ProblemAndSubmissionReceipt > { @ Override public String getValue ( ProblemAndSubmissionReceipt object ) { } } private static class SubmissionStatusColumn extends Column < ProblemAndSubmissionReceipt , ProblemAndSubmissionReceipt > { public SubmissionStatusColumn ( ) { } @ Override public ProblemAndSubmissionReceipt getValue ( ProblemAndSubmissionReceipt object ) { } } public void activate ( final Session session , final SubscriptionRegistrar subscriptionRegistrar ) { } @ Override public void eventOccurred ( Object key , Publisher publisher , Object hint ) { } public void loadProblemsForCourse ( final CourseSelection courseSelection ) { GWT . log ( ( "Loading<seq2seq4repair_space>problems<seq2seq4repair_space>and<seq2seq4repair_space>submission<seq2seq4repair_space>receipts<seq2seq4repair_space>for<seq2seq4repair_space>course<seq2seq4repair_space>" + ( courseSelection . getCourse ( ) . getNameAndTitle ( ) ) ) ) ; <START_BUG> SessionUtil . loadProblemAndSubmissionReceiptsInCourse ( page , courseSelection . getCourse ( ) , session ) ; <END_BUG> } private void displayLoadedProblems ( ProblemAndSubmissionReceipt [ ] problemList ) { } private void onProblemSelected ( Problem selectedProblem ) { } }

Fix:
SessionUtil . loadProblemAndSubmissionReceiptsInCourse ( page , courseSelection , session ) ;
Buggy code:
public class TestMatchAllDocsQuery extends LuceneTestCase { private Analyzer analyzer ; @ Override public void setUp ( ) throws Exception { } public void testQuery ( ) throws Exception { Directory dir = newDirectory ( ) ; IndexWriter iw = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , analyzer ) . setMaxBufferedDocs ( 2 ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; addDoc ( "one" , iw , 1.0F ) ; addDoc ( "two" , iw , 20.0F ) ; addDoc ( "three<seq2seq4repair_space>four" , iw , 300.0F ) ; IndexReader ir = DirectoryReader . open ( iw , true ) ; IndexSearcher is = newSearcher ( ir ) ; ScoreDoc [ ] hits ; hits = is . search ( new MatchAllDocsQuery ( ) , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; assertEquals ( "one" , is . doc ( hits [ 0 ] . doc ) . get ( "key" ) ) ; assertEquals ( "two" , is . doc ( hits [ 1 ] . doc ) . get ( "key" ) ) ; assertEquals ( "three<seq2seq4repair_space>four" , is . doc ( hits [ 2 ] . doc ) . get ( "key" ) ) ; BooleanQuery bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; hits = is . search ( bq , null , 1000 ) . scoreDocs ; assertEquals ( 3 , hits . length ) ; bq = new BooleanQuery ( ) ; bq . add ( new MatchAllDocsQuery ( ) , MUST ) ; bq . add ( new TermQuery ( new Term ( "key" , "three" ) ) , MUST ) ; hits = is . search ( bq , null , 1000 ) . scoreDocs ; assertEquals ( 1 , hits . length ) ; iw . deleteDocuments ( new Term ( "key" , "one" ) ) ; ir . close ( ) ; ir = DirectoryReader . open ( iw , true ) ; is = newSearcher ( ir ) ; hits = is . search ( new MatchAllDocsQuery ( ) , null , 1000 ) . scoreDocs ; assertEquals ( 2 , hits . length ) ; <START_BUG> iw . close ( ) ; <END_BUG> ir . close ( ) ; dir . close ( ) ; } public void testEquals ( ) { } private void addDoc ( String text , IndexWriter iw , float boost ) throws IOException { } }

Fix:
iw . shutdown ( ) ;
Buggy code:
@ Stateless public class MyEjbBean implements MyEjb { protected MyObject lookup ( ) { try { Properties env = new Properties ( ) ; String address = System . getProperty ( "node0" , "localhost" ) ; address = NetworkUtils . formatPossibleIpv6Address ( address ) ; <START_BUG> env . put ( Context . PROVIDER_URL , ( ( "http-remoting:////" + address ) + ":8080" ) ) ; <END_BUG> env . put ( Context . INITIAL_CONTEXT_FACTORY , "org.jboss.naming.remote.client.InitialContextFactory" ) ; Context ctx = new InitialContext ( env ) ; try { return ( ( MyObject ) ( ctx . lookup ( "loc//stub" ) ) ) ; } finally { ctx . close ( ) ; } } catch ( NamingException e ) { throw new RuntimeException ( e ) ; } } public String doIt ( ) { } }

Fix:
env . put ( Context . PROVIDER_URL , ( ( "remote:////" + address ) + ":4447" ) ) ;
Buggy code:
public class SuperFieldAccess extends Expression { public static final ChildPropertyDescriptor QUALIFIER_PROPERTY = new ChildPropertyDescriptor ( SuperFieldAccess . class , "qualifier" , Name . class , ASTNode . OPTIONAL , ASTNode . NO_CYCLE_RISK ) ; public static final ChildPropertyDescriptor NAME_PROPERTY = new ChildPropertyDescriptor ( SuperFieldAccess . class , "name" , SimpleName . class , ASTNode . MANDATORY , ASTNode . NO_CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Name optionalQualifier = null ; private SimpleName fieldName = null ; SuperFieldAccess ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { SuperFieldAccess result = new SuperFieldAccess ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . setName ( ( ( SimpleName ) ( ASTNode . copySubtree ( target , getName ( ) ) ) ) ) ; result . setQualifier ( ( ( Name ) ( ASTNode . copySubtree ( target , getQualifier ( ) ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Name getQualifier ( ) { } public void setQualifier ( Name name ) { } public SimpleName getName ( ) { } public IVariableBinding resolveFieldBinding ( ) { } public void setName ( SimpleName fieldName ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
class BinaryMethod extends BinaryMember implements IMethod { class DecodeParametersNames extends SourceElementRequestorAdapter { String [ ] parametersNames ; public void enterMethod ( ISourceElementRequestor . MethodInfo methodInfo ) { } public void enterConstructor ( ISourceElementRequestor . MethodInfo methodInfo ) { } public String [ ] getParametersNames ( ) { } } protected String [ ] parameterTypes ; protected String [ ] parameterNames ; protected static final String [ ] NO_TYPES = new String [ ] { } ; protected String [ ] exceptionTypes ; protected String returnType ; protected BinaryMethod ( JavaElement parent , String name , String [ ] paramTypes ) { } public boolean equals ( Object o ) { } public String [ ] getExceptionTypes ( ) throws JavaModelException { } public int getElementType ( ) { } public int getFlags ( ) throws JavaModelException { } protected void getHandleMemento ( StringBuffer buff ) { } protected char getHandleMementoDelimiter ( ) { } public String getKey ( boolean forceOpen ) throws JavaModelException { <START_BUG> return getKey ( this , Binding . USE_ACCESS_FLAGS_IN_BINDING_KEY , forceOpen ) ; <END_BUG> } public int getNumberOfParameters ( ) { } public String [ ] getParameterNames ( ) throws JavaModelException { } public String [ ] getParameterTypes ( ) { } public ITypeParameter getTypeParameter ( String typeParameterName ) { } public ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] getTypeParameterSignatures ( ) throws JavaModelException { } public String getReturnType ( ) throws JavaModelException { } private String getReturnType ( IBinaryMethod info ) { } public String getSignature ( ) throws JavaModelException { } public int hashCode ( ) { } public boolean isConstructor ( ) throws JavaModelException { } public boolean isMainMethod ( ) throws JavaModelException { } public boolean isResolved ( ) { } public boolean isSimilar ( IMethod method ) { } public String readableName ( ) { } public JavaElement resolved ( Binding binding ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { } protected void toStringName ( StringBuffer buffer ) { } protected void toStringName ( StringBuffer buffer , int flags ) { } }

Fix:
return getKey ( this , true , forceOpen ) ;
Buggy code:
public class WorldImageLayer extends GeoToolsLayer { public static final String RASTER_FILE = "rasterExtents_ARCS_Export" ; public WorldImageLayer ( final String layerName , final String fileName ) { } protected Layer loadLayer ( final File openFile ) { } private static final long serialVersionUID = 1L ; public static class RasterExtentHelper { public static Layer loadRasters ( final String fileName , final Layers parent ) { } protected static void loadExtentsFor ( final MWC . GUI . Layer extents , final String fileName , final Layers parent ) { FileDataStore store ; try { final File openFile = new File ( fileName ) ; store = FileDataStoreFinder . getDataStore ( openFile ) ; final SimpleFeatureSource featureSource = store . getFeatureSource ( ) ; final String parentPath = openFile . getParent ( ) ; final SimpleFeatureCollection fs = featureSource . getFeatures ( ) ; final SimpleFeatureIterator fiter = fs . features ( ) ; while ( fiter . hasNext ( ) ) { WorldArea area = null ; String name = null ; final SimpleFeatureImpl thisF = ( ( SimpleFeatureImpl ) ( fiter . next ( ) ) ) ; final Collection < ? extends Property > values = thisF . getValue ( ) ; final Iterator < ? extends Property > iter = values . iterator ( ) ; while ( iter . hasNext ( ) ) { final Property thisProp = iter . next ( ) ; final String propName = thisProp . getName ( ) . toString ( ) ; if ( propName . equals ( "the_geom" ) ) { area = WorldImageLayer . RasterExtentHelper . getGeometry ( thisProp . getValue ( ) ) ; } else if ( propName . equals ( "Name" ) ) { name = thisProp . getValue ( ) . toString ( ) ; } } if ( ( area != null ) && ( name != null ) ) { final String path = ( ( parentPath + ( File . separator ) ) + name ) + ".tif" ; final ChartBoundsWrapper cw = new ChartBoundsWrapper ( name , area . getTopLeft ( ) , area . getBottomRight ( ) , Color . red , path ) ; cw . setLayers ( parent ) ; cw . setLabelLocation ( CENTRE ) ; cw . setLabelVisible ( false ) ; extents . add ( cw ) ; } } <START_BUG> ProjSidecarGenerator . addPrj ( parentPath , "EPSG:3395" ) ; <END_BUG> } catch ( final IOException e ) { e . printStackTrace ( ) ; } catch ( final FactoryException e ) { e . printStackTrace ( ) ; } } private static WorldArea getGeometry ( final Object value ) { } } }

Fix:
ProjSidecarGenerator . addPrj ( parentPath , "EPSG:4326" ) ;
Buggy code:
public class TestDocSet extends LuceneTestCase { Random rand ; float loadfactor ; @ Override public void setUp ( ) throws Exception { } public OpenBitSet getRandomSet ( int sz , int bitsToSet ) { } public DocSet getHashDocSet ( OpenBitSet bs ) { } public DocSet getIntDocSet ( OpenBitSet bs ) { } public DocSet getBitDocSet ( OpenBitSet bs ) { } public DocSet getDocSlice ( OpenBitSet bs ) { } public DocSet getDocSet ( OpenBitSet bs ) { } public void checkEqual ( OpenBitSet bs , DocSet set ) { } public void iter ( DocSet d1 , DocSet d2 ) { } protected void doSingle ( int maxSize ) { } public void doMany ( int maxSz , int iter ) { } public void testRandomDocSets ( ) { } public DocSet getRandomDocSet ( int n , int maxDoc ) { } public DocSet [ ] getRandomSets ( int nSets , int minSetSize , int maxSetSize , int maxDoc ) { } public static int smallSetType = 0 ; public static int smallSetCuttoff = 3000 ; public AtomicReader dummyIndexReader ( final int maxDoc ) { return new AtomicReader ( ) { @ Override public int maxDoc ( ) { return maxDoc ; } @ Override public int numDocs ( ) { return maxDoc ; } @ Override public boolean hasDeletions ( ) { return false ; } @ Override public FieldInfos getFieldInfos ( ) { return new FieldInfos ( new FieldInfo [ 0 ] ) ; } @ Override public Bits getLiveDocs ( ) { return null ; } @ Override public Fields fields ( ) { return null ; } @ Override public Fields getTermVectors ( int doc ) { return null ; } @ Override public NumericDocValues getNumericDocValues ( String field ) { return null ; } @ Override public BinaryDocValues getBinaryDocValues ( String field ) { return null ; } @ Override public SortedDocValues getSortedDocValues ( String field ) { return null ; } @ Override <START_BUG> public NumericDocValues simpleNormValues ( String field ) { <END_BUG> return null ; } @ Override protected void doClose ( ) { } @ Override public void document ( int doc , StoredFieldVisitor visitor ) { } } ; } public IndexReader dummyMultiReader ( int nSeg , int maxDoc ) throws IOException { } public void doTestIteratorEqual ( DocIdSet a , DocIdSet b ) throws IOException { } public void doFilterTest ( IndexReader reader ) throws IOException { } public void testFilter ( ) throws IOException { } }

Fix:
public NumericDocValues getNormValues ( String field ) {
Buggy code:
public class MockLMSimilarity extends Similarity { private static final float mu = 2000.0F ; @ Override public float computeNorm ( FieldInvertState state ) { } private static final float [ ] NORM_TABLE = new float [ 256 ] ; @ Override public float decodeNormValue ( byte b ) { } @ Override public byte encodeNormValue ( float f ) { } @ Override public float sloppyFreq ( int distance ) { } @ Override public IDFExplanation computeWeight ( IndexSearcher searcher , String fieldName , PerReaderTermState ... termStats ) throws IOException { float value = 0.0F ; final StringBuilder exp = new StringBuilder ( ) ; final long sumOfTotalTermFreq = MultiFields . getTerms ( searcher . getIndexReader ( ) , fieldName ) . getSumTotalTermFreq ( ) ; for ( final PerReaderTermState stat : termStats ) { final long totalTermFrequency = stat . totalTermFreq ( ) ; <START_BUG> value += 1 // ( ( MockLMSimilarity . mu ) * ( totalTermFrequency + ( 1L // ( ( double ) ( sumOfTotalTermFreq + 1L ) ) ) ) ) ; <END_BUG> exp . append ( "<seq2seq4repair_space>" ) ; exp . append ( totalTermFrequency ) ; } final float idfValue = value ; return new IDFExplanation ( ) { @ Override public float getIdf ( ) { return idfValue ; } @ Override public String explain ( ) { return exp . toString ( ) ; } } ; } @ Override public ExactDocScorer exactDocScorer ( Weight weight , String fieldName , AtomicReaderContext context ) throws IOException { } @ Override public SloppyDocScorer sloppyDocScorer ( Weight weight , String fieldName , AtomicReaderContext context ) throws IOException { } private class ExactMockLMDocScorer extends ExactDocScorer { private final float weightValue ; private final byte [ ] norms ; private static final int SCORE_CACHE_SIZE = 32 ; private float [ ] scoreCache = new float [ MockLMSimilarity . ExactMockLMDocScorer . SCORE_CACHE_SIZE ] ; ExactMockLMDocScorer ( float weightValue , byte [ ] norms ) { } @ Override public float score ( int doc , int freq ) { } } private class RawExactMockLMDocScorer extends ExactDocScorer { private final float weightValue ; private static final int SCORE_CACHE_SIZE = 32 ; private float [ ] scoreCache = new float [ MockLMSimilarity . RawExactMockLMDocScorer . SCORE_CACHE_SIZE ] ; RawExactMockLMDocScorer ( float weightValue ) { } @ Override public float score ( int doc , int freq ) { } } private class SloppyMockLMDocScorer extends SloppyDocScorer { private final float weightValue ; private final byte [ ] norms ; SloppyMockLMDocScorer ( float weightValue , byte [ ] norms ) { } @ Override public float score ( int doc , float freq ) { } } }

Fix:
value += 1 // ( ( MockLMSimilarity . mu ) * ( ( totalTermFrequency + 1L ) // ( ( double ) ( sumOfTotalTermFreq + 1L ) ) ) ) ;
Buggy code:
public class AjaxEditableLabel extends Panel { private static final long serialVersionUID = 1L ; private FormComponent editor ; private Component label ; protected class EditorAjaxBehavior extends AbstractDefaultAjaxBehavior { private static final long serialVersionUID = 1L ; public EditorAjaxBehavior ( ) { } protected void onComponentTag ( ComponentTag tag ) { } protected void respond ( AjaxRequestTarget target ) { } } protected class LabelAjaxBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; public LabelAjaxBehavior ( String event ) { } protected void onEvent ( AjaxRequestTarget target ) { } } public AjaxEditableLabel ( String id ) { } public AjaxEditableLabel ( String id , IModel model ) { } public final AjaxEditableLabel add ( IValidator validator ) { } public final AjaxEditableLabel setLabel ( final IModel labelModel ) { } public final Component setModel ( IModel model ) { } public final AjaxEditableLabel setRequired ( final boolean required ) { } public final AjaxEditableLabel setType ( Class type ) { } protected FormComponent newEditor ( MarkupContainer parent , String componentId , IModel model ) { } protected Component newLabel ( MarkupContainer parent , String componentId , IModel model ) { <START_BUG> Label label = new Label ( "label" , model ) { <END_BUG> private static final long serialVersionUID = 1L ; protected void onComponentTagBody ( MarkupStream markupStream , ComponentTag openTag ) { if ( ( getModelObject ( ) ) == null ) { replaceComponentTagBody ( markupStream , openTag , defaultNullLabel ( ) ) ; } else { super . onComponentTagBody ( markupStream , openTag ) ; } } } ; label . setOutputMarkupId ( true ) ; label . add ( new AjaxEditableLabel . LabelAjaxBehavior ( "onclick" ) ) ; return label ; } protected final FormComponent getEditor ( ) { } protected final Component getLabel ( ) { } protected void onBeforeRender ( ) { } protected void onCancel ( AjaxRequestTarget target ) { } protected void onEdit ( AjaxRequestTarget target ) { } protected void onError ( AjaxRequestTarget target ) { } protected void onSubmit ( AjaxRequestTarget target ) { } private void initLabelAndEditor ( IModel model ) { } private IModel getParentModel ( ) { } protected String defaultNullLabel ( ) { } }

Fix:
Label label = new Label ( componentId , model ) {
Buggy code:
public class Model { private static Model instance = null ; public static Model getInstance ( ) { } List < Product > products ; ProductTableGateway gateway ; private Model ( ) { } public boolean addProduct ( Product p ) { } public boolean removeProduct ( Product p ) { } public List < Product > getProducts ( ) { } Product findProductById ( int id ) { } boolean updateProduct ( Product p ) { boolean updated = false ; try { <START_BUG> updated = this . gateway . updateProduct ( p . getId ( ) ) ; <END_BUG> if ( updated ) { updated = this . products . remove ( p ) ; } } catch ( SQLException ex ) { Logger . getLogger ( Model . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } return updated ; } }

Fix:
updated = this . gateway . updateProduct ( p ) ;