nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SerialParser { private HttpUtils utils ; protected SerialParser ( ) { } protected void close ( ) { } protected String parse ( String [ ] urls , int urlIndex , List < NameValuePair > params , List < ExtendedLandmark > landmarks , GMSAsyncTask < ? , ? , ? > task , boolean close , String socialService , boolean removeIfExists ) { String errorMessage = null ; LandmarkManager landmarkManager = ConfigurationManager . getInstance ( ) . getLandmarkManager ( ) ; try { URI uri = new URI ( urls [ urlIndex ] ) ; if ( ! ( task . isCancelled ( ) ) ) { List < ExtendedLandmark > received = utils . loadLandmarkList ( uri , params , true , "deflate" ) ; if ( ! ( received . isEmpty ( ) ) ) { if ( landmarks . isEmpty ( ) ) { if ( landmarkManager != null ) { landmarkManager . addLandmarkListToDynamicLayer ( received ) ; } landmarks . addAll ( received ) ; } else { synchronized ( landmarks ) { Collection < ExtendedLandmark > filtered = Collections2 . filter ( received , new SerialParser . ExistsPredicate ( landmarks , removeIfExists , landmarkManager ) ) ; if ( landmarkManager != null ) { landmarkManager . addLandmarkListToDynamicLayer ( filtered ) ; } landmarks . addAll ( filtered ) ; } } } } } catch ( Exception ex ) { LoggerUtils . error ( "SerialParser.parse()<seq2seq4repair_space>exception:<seq2seq4repair_space>" , ex ) ; } finally { int responseCode = utils . getResponseCode ( ) ; if ( ( responseCode == ( HttpStatus . SC_UNAUTHORIZED ) ) && ( socialService != null ) ) { ISocialUtils service = OAuthServiceFactory . getSocialUtils ( socialService ) ; if ( service != null ) { service . logout ( ) ; } } else <START_BUG> if ( ( responseCode >= 500 ) && ( ( urlIndex + 1 ) < ( urls . length ) ) ) { <END_BUG> return parse ( urls , ( urlIndex + 1 ) , params , landmarks , task , close , socialService , removeIfExists ) ; } errorMessage = utils . getResponseCodeErrorMessage ( ) ; if ( close ) { close ( ) ; } } return errorMessage ; } private class ExistsPredicate implements Predicate < ExtendedLandmark > { private List < ExtendedLandmark > source ; private boolean removeIfExists = false ; private LandmarkManager landmarkManager ; public ExistsPredicate ( List < ExtendedLandmark > source , boolean removeIfExists , LandmarkManager landmarkManager ) { } public boolean apply ( ExtendedLandmark landmark ) { } } No newline ; at end ; of file ; }

Fix:
if ( ( responseCode >= 400 ) && ( ( urlIndex + 1 ) < ( urls . length ) ) ) {
Buggy code:
public class DateTime { private DateTime ( ) { } private static final int dateRepresentationLength = 10 ; private static final int timeRepresentationLength = 8 ; private static final int timestampRepresentationLength = DRDAConstants . DRDA_TIMESTAMP_LENGTH ; public static final Date dateBytesToDate ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } public static final Time timeBytesToTime ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } public static final Timestamp timestampBytesToTimestamp ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding , boolean supportsTimestampNanoseconds ) throws UnsupportedEncodingException { } private static int parseTimestampString ( String timestamp , Calendar cal , boolean supportsTimestampNanoseconds ) { } public static final int dateToDateBytes ( byte [ ] buffer , int offset , DateTimeValue date ) throws UnsupportedEncodingException , SqlException { } public static final int timeToTimeBytes ( byte [ ] buffer , int offset , DateTimeValue time ) throws UnsupportedEncodingException { } public static final int timestampToTimestampBytes ( byte [ ] buffer , int offset , DateTimeValue timestamp , boolean supportsTimestampNanoseconds ) throws UnsupportedEncodingException , SqlException { } public static final Timestamp dateBytesToTimestamp ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } public static final Timestamp timeBytesToTimestamp ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } public static final Date timestampBytesToDate ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } public static final Time timestampBytesToTime ( byte [ ] buffer , int offset , Calendar recyclableCal , String encoding ) throws UnsupportedEncodingException { } private static Calendar getCleanCalendar ( Calendar recyclableCal ) { } public static final int timestampToDateBytes ( byte [ ] buffer , int offset , Timestamp timestamp ) throws UnsupportedEncodingException , SqlException { } public static final int timestampToTimeBytes ( byte [ ] buffer , int offset , Timestamp timestamp ) throws UnsupportedEncodingException { } public static int getTimestampLength ( boolean supportsTimestampNanoseconds ) { <START_BUG> return supportsTimestampNanoseconds ? DRDAConstants . JDBC_TIMESTAMP_LENGTH : DRDAConstants . DRDA_TIMESTAMP_LENGTH ; <END_BUG> } }

Fix:
return supportsTimestampNanoseconds ? DRDAConstants . JDBC_TIMESTAMP_LENGTH : DRDAConstants . DRDA_OLD_TIMESTAMP_LENGTH ;
Buggy code:
public class WorldLayout extends Canvas implements Runnable { private static final long serialVersionUID = 1L ; public Background background ; int x = 0 ; public static double xOffset = 0 ; public static double yOffset = 0 ; InputHandler input = new InputHandler ( ) ; Player player = new Player ( ) ; BufferedImage bufferedImage = new BufferedImage ( WorldLayout . WIDTH , WorldLayout . HEIGHT , BufferedImage . TYPE_INT_RGB ) ; double xValue ; double yValue ; public static boolean space = false ; JFrame frame ; public static Boolean running = false ; public static String Tittle = "Top<seq2seq4repair_space>Down<seq2seq4repair_space>Scrolling" ; public static final int WIDTH = 800 ; public static final int HEIGHT = 600 ; public static final Dimension dimension = new Dimension ( WorldLayout . WIDTH , WorldLayout . HEIGHT ) ; long lastTime ; long timer = 1000 // 60 ; double fps ; int backgroundX = 0 ; int backgroundY = 0 ; Texture image ; Texture inventory ; Shooter shoot ; private Controller c ; ArrayList < Shooter > bullets = new ArrayList < Shooter > ( ) ; ArrayList < Level > levels = new ArrayList < Level > ( ) ; Level level = new Level ( 1 ) ; Level currentLevel = level ; int currentLevelID = 1 ; int levelCount = 2 ; public static boolean left ; public static boolean right ; public static boolean up ; public static boolean down ; public static boolean enter ; public static boolean remove ; public static double rotation ; static ArrayList < String > horizontalTransitionInfo = new ArrayList < String > ( ) ; static ArrayList < String > verticalTransitionInfo = new ArrayList < String > ( ) ; @ Override public void run ( ) { } public WorldLayout ( ) { } private void init ( ) { for ( int i = 1 ; i <= ( levelCount ) ; i ++ ) { levels . add ( new Level ( i ) ) ; } backgroundX = Integer . parseInt ( currentLevel . getWallData ( 0 ) ) ; backgroundY = Integer . parseInt ( currentLevel . getWallData ( 1 ) ) ; <START_BUG> background = new Background ( 0 , 0 , this , Level . getImageData ( 0 ) ) ; <END_BUG> inventory = new Texture ( "Assets//Pictures//Textures//Inventory_l1.png" ) ; c = new Controller ( this ) ; } private void tick ( ) { } private void moveScreen ( ) { } private void render ( ) throws IOException { } synchronized void start ( ) { } synchronized void stop ( ) { } }

Fix:
background = new Background ( 0 , 0 , this , currentLevel . getImageData ( 0 ) ) ;
Buggy code:
public class LongID extends BaseID { Long value = null ; public static class Creator implements IDInstantiator { public ID makeInstance ( Namespace ns , Class [ ] argTypes , Object [ ] args ) throws IDInstantiationException { <START_BUG> return new StringID ( ns , ( ( String ) ( args [ 0 ] ) ) ) ; <END_BUG> } } public static final String LONGID_INSTANTIATOR_CLASS = LongID . Creator . class . getName ( ) ; public static final String LONGID_NAME = LongID . class . getName ( ) ; protected LongID ( Namespace n , Long v ) { } protected LongID ( Namespace n , long v ) { } protected int namespaceCompareTo ( BaseID o ) { } protected boolean namespaceEquals ( BaseID o ) { } protected String namespaceGetName ( ) { } protected int namespaceHashCode ( ) { } protected URI namespaceToURI ( ) throws URISyntaxException { } public long longValue ( ) { } }

Fix:
return new LongID ( ns , ( ( Long ) ( args [ 0 ] ) ) ) ;
Buggy code:
public class DataBaseDAL implements DAL { @ Override public UserModel createUserModel ( UserModel userModel ) { } @ Override public UserModel retrieveUserModel ( long userModelId ) { } @ Override public UserModel retrieveUserModel ( String username , String password ) { StringBuilder query = SqlCommandsManager . selectWhere ( "users" ) ; <START_BUG> query . append ( "<seq2seq4repair_space>display_name<seq2seq4repair_space>=<seq2seq4repair_space>" ) . append ( username ) . append ( ";" ) ; <END_BUG> DBConnectionManager . runQuery ( query . toString ( ) ) ; return ( ( UserModel ) ( DBConnectionManager . deserialize ( UserModel . class ) ) ) ; } @ Override public UserModel updateUserModel ( UserModel userModel ) { } @ Override public void deleteUserModel ( long userModelId ) { } @ Override public List < UserModel > getAllUsers ( ) { } @ Override public GameModel createGameModel ( GameModel gameModel ) { } @ Override public GameModel retrieveGameModel ( long gameModelId ) { } @ Override public GameModel updateGameModel ( GameModel gameModel ) { } @ Override public void deleteGameModel ( long gameModelId ) { } @ Override public List < GameModel > getAllGames ( ) { } @ Override public AchievementModel createAchievementModel ( AchievementModel achievementModel ) { } @ Override public AchievementModel retrieveAchievementModel ( long gameModelId , long achievementModelId ) { } @ Override public AchievementModel updateAchievementModel ( AchievementModel achievementModel ) { } @ Override public void deleteAchievement ( long gameModelId , long achievementModelId ) { } @ Override public void unlockAchievement ( long userModelID , long achievementModelId ) { } @ Override public List < AchievementModel > getAllAchievements ( ) { } @ Override public GameScoreModel createGameScoreModel ( GameScoreModel gameScoreModel ) { } @ Override public GameScoreModel retrieveGameScoreModel ( long gameModelId , long gameScoreModelId ) { } @ Override public GameScoreModel updateGameScoreModel ( GameScoreModel gameScoreModel ) { } @ Override public void deleteGameScore ( long gameModelId , long gameScoreModelId ) { } @ Override public List < GameScoreModel > getAllGamesScores ( ) { } @ Override public RoomModel createRoomModel ( RoomModel roomModel ) { } @ Override public RoomModel retrieveRoomModel ( long roomModelId ) { } @ Override public RoomModel updateRoomModel ( RoomModel roomModel ) { } @ Override public void deleteRoomModel ( long roomModelId ) { } @ Override public List < RoomModel > getAllRoomModels ( ) { } @ Override public String getRandomSWFURL ( ) { } @ Override public void removeSWFURL ( String toRemove ) { } }

Fix:
query . append ( "<seq2seq4repair_space>display_name<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( username ) . append ( "'<seq2seq4repair_space>and<seq2seq4repair_space>password<seq2seq4repair_space>=<seq2seq4repair_space>'" ) . append ( password ) . append ( "';" ) ;
Buggy code:
public final class Strings { private static final Pattern htmlNumber = Pattern . compile ( "\\&\\#\\d+\\;" ) ; public static String afterFirst ( final String s , final char c ) { } public static String afterFirstPathComponent ( final String path , final char separator ) { } public static String afterLast ( final String s , final char c ) { } public static String beforeFirst ( final String s , final char c ) { } public static String beforeLast ( final String s , final char c ) { } public static String beforeLastPathComponent ( final String path , final char separator ) { } public static String capitalize ( final String s ) { } public static String escapeMarkup ( final String s ) { } public static String escapeMarkup ( final String s , final boolean escapeSpaces ) { } public static String escapeMarkup ( final String s , final boolean escapeSpaces , final boolean convertToHtmlUnicodeEscapes ) { } public static String replaceHtmlEscapeNumber ( String str ) { } public static String firstPathComponent ( final String path , final char separator ) { } public static boolean isEmpty ( final String string ) { } public static boolean isTrue ( final String s ) throws StringValueConversionException { } public static String lastPathComponent ( final String path , final char separator ) { } public static String replaceAll ( final String s , final String searchFor , String replaceWith ) { } public static String [ ] split ( final String s , final char c ) { } public static String stripEnding ( final String s , final String ending ) { } public static Boolean toBoolean ( final String s ) throws StringValueConversionException { } public static char toChar ( final String s ) throws StringValueConversionException { } public static String toMultilineMarkup ( final String s ) { } public static String toString ( final Object object ) { } public static String toString ( final Throwable throwable ) { } private static void outputThrowable ( Throwable cause , AppendingStringBuffer sb , boolean stopAtWicketServlet ) { sb . append ( cause ) ; sb . append ( "\n" ) ; StackTraceElement [ ] trace = cause . getStackTrace ( ) ; for ( int i = 0 ; i < ( trace . length ) ; i ++ ) { String traceString = trace [ i ] . toString ( ) ; <START_BUG> if ( ( ! ( traceString . startsWith ( "sun.reflect." ) ) ) && ( i > 1 ) ) { <END_BUG> sb . append ( "<seq2seq4repair_space>at<seq2seq4repair_space>" ) ; sb . append ( traceString ) ; sb . append ( "\n" ) ; if ( stopAtWicketServlet && ( traceString . startsWith ( "wicket.protocol.http.WicketServlet" ) ) ) return ; } } } private Strings ( ) { } }

Fix:
if ( ! ( ( traceString . startsWith ( "sun.reflect." ) ) && ( i > 1 ) ) ) {
Buggy code:
public class SmallTemporaryClobTest extends InternalClobTest { private static final long CLOBLENGTH = 1027 ; private static final long BYTES_PER_CHAR = 3 ; public SmallTemporaryClobTest ( String name ) { } public void setUp ( ) throws Exception { super . initialCharLength = SmallTemporaryClobTest . CLOBLENGTH ; super . initialByteLength = ( SmallTemporaryClobTest . CLOBLENGTH ) * 3 ; super . bytesPerChar = SmallTemporaryClobTest . BYTES_PER_CHAR ; EmbedStatement embStmt = ( ( EmbedStatement ) ( createStatement ( ) ) ) ; EmbedConnection embCon = ( ( EmbedConnection ) ( getConnection ( ) ) ) ; <START_BUG> iClob = new TemporaryClob ( embCon . getDBName ( ) , embStmt ) ; <END_BUG> transferData ( new org . apache . derbyTesting . functionTests . util . streams . LoopingAlphabetReader ( SmallTemporaryClobTest . CLOBLENGTH , CharAlphabet . tamil ( ) ) , iClob . getWriter ( 1L ) , SmallTemporaryClobTest . CLOBLENGTH ) ; assertEquals ( SmallTemporaryClobTest . CLOBLENGTH , iClob . getCharLength ( ) ) ; } public void tearDown ( ) throws Exception { } public static Test suite ( ) throws Exception { } }

Fix:
iClob = new TemporaryClob ( embStmt ) ;
Buggy code:
public class NotLogging { static int runLength ; static final int INITIAL_HASH_SIZE = 101 ; static String SHORT_MSG = "Hello<seq2seq4repair_space>World" ; static Category SHORT_CAT = Category . getInstance ( "A0123456789" ) ; static Category MEDIUM_CAT = Category . getInstance ( "A0123456789.B0123456789" ) ; static Category LONG_CAT = Category . getInstance ( "A0123456789.B0123456789.C0123456789" ) ; static Category INEXISTENT_SHORT_CAT = Category . getInstance ( "I0123456789" ) ; static Category INEXISTENT_MEDIUM_CAT = Category . getInstance ( "I0123456789.B0123456789" ) ; static Category INEXISTENT_LONG_CAT = Category . getInstance ( "I0123456789.B0123456789.C0123456789" ) ; static Category [ ] CAT_ARRAY = new Category [ ] { NotLogging . SHORT_CAT , NotLogging . MEDIUM_CAT , NotLogging . LONG_CAT , NotLogging . INEXISTENT_SHORT_CAT , NotLogging . INEXISTENT_MEDIUM_CAT , NotLogging . INEXISTENT_LONG_CAT } ; static void Usage ( ) { } public static void main ( String [ ] argv ) { } static void ProgramInit ( String [ ] args ) { try { NotLogging . runLength = Integer . parseInt ( args [ 1 ] ) ; } catch ( NumberFormatException e ) { System . err . println ( e ) ; NotLogging . Usage ( ) ; } ConsoleAppender appender = new ConsoleAppender ( new SimpleLayout ( ) ) ; if ( "false" . equals ( args [ 0 ] ) ) { } else if ( "true" . equals ( args [ 0 ] ) ) { System . out . println ( "Flagging<seq2seq4repair_space>as<seq2seq4repair_space>shipped<seq2seq4repair_space>code." ) ; <START_BUG> Category . getDefaultHierarchy ( ) . disableInfo ( ) ; <END_BUG> } else NotLogging . Usage ( ) ; NotLogging . SHORT_CAT . setLevel ( Level . INFO ) ; Category . getRoot ( ) . setLevel ( Level . INFO ) ; } static double SimpleMessage ( Category category , String msg , long runLength ) { } static double FullyOptimizedComplexMessage ( Category category , long runLength ) { } static double ComplexMessage ( Category category , long runLength ) { } }

Fix:
Category . getDefaultHierarchy ( ) . enable ( Level . WARN ) ;
Buggy code:
public class JDialogX extends JDialog { private TitleBarX titleLabel ; private final JPanel contentPane ; private int mouseX ; private int mouseY ; public JDialogX ( Frame owner , String title , boolean modal ) { } @ SuppressWarnings ( "unchecked" ) private void createUI ( String title ) { titleLabel = new TitleBarX ( ) ; setUndecorated ( true ) ; <START_BUG> rootPane . setBackground ( Color . black ) ; <END_BUG> rootPane . setBorder ( new EmptyBorder ( 2 , 2 , 2 , 2 ) ) ; rootPane . setLayout ( new BorderLayout ( ) ) ; contentPane . setBackground ( BG_COLOR ) ; titleLabel . setText ( title ) ; titleLabel . setHorizontalAlignment ( JLabel . CENTER ) ; titleLabel . setFont ( titleLabel . getFont ( ) . deriveFont ( Font . BOLD ) . deriveFont ( 18.0F ) ) ; titleLabel . addMouseMotionListener ( new MouseMotionAdapter ( ) { @ Override public void mouseDragged ( MouseEvent e ) { headerMouseDragged ( e ) ; } } ) ; titleLabel . addMouseListener ( new MouseAdapter ( ) { @ Override public void mousePressed ( MouseEvent e ) { headerMousePressed ( e ) ; } } ) ; rootPane . add ( titleLabel , BorderLayout . NORTH ) ; rootPane . add ( contentPane , BorderLayout . CENTER ) ; } @ Override public Container getContentPane ( ) { } @ Override public void setTitle ( String title ) { } @ Override public String getTitle ( ) { } private void headerMouseDragged ( MouseEvent e ) { } private void headerMousePressed ( MouseEvent e ) { } }

Fix:
rootPane . setBackground ( BORDER_COLOR ) ;
Buggy code:
public class MetadataTransfer { public static final String metadataTransferParamName = "metadata.transfer" ; public static final String trackPathParamName = "metadata.track.path" ; public static final String trackDepthParamName = "metadata.track.depth" ; public static final String urlPathKeyName = "url.path" ; public static final String depthKeyName = "depth" ; private List < String > mdToKeep = new ArrayList < String > ( ) ; private boolean trackPath = true ; private boolean trackDepth = true ; public MetadataTransfer ( Map < String , Object > conf ) { } public Metadata getMetaForOutlink ( String sourceURL , Metadata parentMD ) { Metadata md = filter ( parentMD ) ; if ( trackPath ) { md . addValue ( MetadataTransfer . urlPathKeyName , sourceURL ) ; } if ( trackDepth ) { String existingDepth = md . getFirstValue ( MetadataTransfer . depthKeyName ) ; int depth = 0 ; try { depth = Integer . parseInt ( existingDepth ) ; } catch ( Exception e ) { depth = 0 ; } <START_BUG> md . setValue ( MetadataTransfer . depthKeyName , Integer . toString ( ( depth ++ ) ) ) ; <END_BUG> } return md ; } public Metadata filter ( Metadata parentMD ) { } }

Fix:
md . setValue ( MetadataTransfer . depthKeyName , Integer . toString ( ( ++ depth ) ) ) ;
Buggy code:
public class SystemMenuPinEditor extends Action implements ISelfUpdatingAction { private EditorPane editorPane ; public SystemMenuPinEditor ( EditorPane pane ) { } public void dispose ( ) { } public void setPane ( EditorPane pane ) { } public void run ( ) { } public void update ( ) { } public boolean shouldBeVisible ( ) { if ( ( editorPane ) == null ) { return false ; } IPreferenceStore store = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; <START_BUG> boolean reuseEditor = ( store . getBoolean ( REUSE_EDITORS_BOOLEAN ) ) | ( ( ( org . eclipse . ui . internal . tweaklets . TabBehaviour ) ( org . eclipse . ui . internal . tweaklets . Tweaklets . get ( org . eclipse . ui . internal . tweaklets . TabBehaviour . class ) ) ) . alwaysShowPinAction ( ) ) ; <END_BUG> return reuseEditor ; } }

Fix:
boolean reuseEditor = ( store . getBoolean ( REUSE_EDITORS_BOOLEAN ) ) | ( ( ( org . eclipse . ui . internal . tweaklets . TabBehaviour ) ( org . eclipse . ui . internal . tweaklets . Tweaklets . get ( TabBehaviour . KEY ) ) ) . alwaysShowPinAction ( ) ) ;
Buggy code:
public class Filter extends DefaultItem { public Filter ( XmlElement root ) { } public FilterActionList getFilterActionList ( ) { } public FilterRule getFilterRule ( ) { } public boolean getEnabled ( ) { <START_BUG> return getBoolean ( "enabled" ) ; <END_BUG> } public void setEnabled ( boolean bool ) { } public void setName ( String s ) { } public String getName ( ) { } public CompoundCommand getCommand ( Folder srcFolder , Object [ ] uids ) throws Exception { } public Object clone ( ) { } public String toString ( ) { } }

Fix:
return getBoolean ( "enabled" , true ) ;
Buggy code:
public class DynamicPartitionConnections { public static final Logger LOG = LoggerFactory . getLogger ( DynamicPartitionConnections . class ) ; static class ConnectionInfo { SimpleConsumer consumer ; Set < Integer > partitions = new HashSet ( ) ; public ConnectionInfo ( SimpleConsumer consumer ) { } } Map < HostPort , DynamicPartitionConnections . ConnectionInfo > _connections = new HashMap ( ) ; KafkaConfig _config ; IBrokerReader _reader ; public DynamicPartitionConnections ( KafkaConfig config , IBrokerReader brokerReader ) { } public SimpleConsumer register ( GlobalPartitionId id ) { } public SimpleConsumer register ( HostPort host , int partition ) { if ( ! ( _connections . containsKey ( host ) ) ) { <START_BUG> _connections . put ( host , new DynamicPartitionConnections . ConnectionInfo ( new SimpleConsumer ( host . host , host . port , _config . socketTimeoutMs , _config . bufferSizeBytes , OffsetRequest . DefaultClientId ( ) ) ) ) ; <END_BUG> } DynamicPartitionConnections . ConnectionInfo info = _connections . get ( host ) ; info . partitions . add ( partition ) ; return info . consumer ; } public SimpleConsumer getConnection ( GlobalPartitionId id ) { } public void unregister ( HostPort port , int partition ) { } public void unregister ( GlobalPartitionId id ) { } public void clear ( ) { } }

Fix:
_connections . put ( host , new DynamicPartitionConnections . ConnectionInfo ( new SimpleConsumer ( host . host , host . port , _config . socketTimeoutMs , _config . bufferSizeBytes , _config . clientId ) ) ) ;
Buggy code:
public class GOSwingEventConverter extends AbstractEventConverter implements ComponentListener , HierarchyListener , KeyListener , MouseListener , MouseMotionListener , MouseWheelListener { private static final int MOUSE_MOVE_TRESHOLD = 10 ; private static final double MOUSE_TIME_TRSHOLD = 5 ; private boolean panWithButton3 ; private int scaleFactor = 1 ; public GOSwingEventConverter ( Component component , GOEventHandlerProvider provider ) { } private UIPoint convertToLocal ( MouseEvent e ) { } private void updateScaleFactor ( Component component ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseMoved ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseDragged ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } private String getKeyName ( KeyEvent e ) { String text = KeyEvent . getKeyText ( e . getKeyCode ( ) ) ; if ( ( text == null ) || ( ( text . length ( ) ) != 1 ) ) { switch ( e . getKeyCode ( ) ) { case KeyEvent . VK_LEFT : text = "LEFT" ; break ; case KeyEvent . VK_RIGHT : text = "RIGHT" ; break ; case KeyEvent . VK_DOWN : text = "DOWN" ; break ; case KeyEvent . VK_UP : text = "UP" ; break ; case KeyEvent . VK_PAUSE : text = "PAUSE" ; break ; case KeyEvent . VK_F1 : text = "F1" ; break ; case KeyEvent . VK_F2 : text = "F2" ; break ; case KeyEvent . VK_F3 : text = "F3" ; break ; case KeyEvent . VK_F4 : text = "F4" ; break ; case KeyEvent . VK_F5 : text = "F5" ; break ; case KeyEvent . VK_F6 : text = "F6" ; break ; case KeyEvent . VK_F7 : text = "F7" ; break ; case KeyEvent . VK_F8 : text = "F8" ; break ; case KeyEvent . VK_F9 : text = "F9" ; break ; case KeyEvent . VK_F10 : text = "F10" ; break ; case KeyEvent . VK_F11 : text = "F11" ; break ; case KeyEvent . VK_F12 : text = "F12" ; break ; case KeyEvent . VK_PLUS : text = "+" ; break ; case KeyEvent . VK_MINUS : text = "-" ; break ; case KeyEvent . VK_DELETE : text = "DELETE" ; break ; case KeyEvent . VK_SPACE : text = "<seq2seq4repair_space>" ; break ; case KeyEvent . VK_ESCAPE : text = "ESCAPE" ; break ; case KeyEvent . VK_BACK_SPACE : text = "BACK_SPACE" ; break ; default : <START_BUG> text = "" ; <END_BUG> } } return text ; } @ Override public void keyReleased ( KeyEvent e ) { } @ Override public void keyTyped ( KeyEvent e ) { } @ Override public void mouseWheelMoved ( MouseWheelEvent e ) { } @ Override public void componentResized ( ComponentEvent e ) { } @ Override public void componentMoved ( ComponentEvent componentEvent ) { } @ Override public void componentShown ( ComponentEvent componentEvent ) { } @ Override public void componentHidden ( ComponentEvent e ) { } @ Override public void hierarchyChanged ( HierarchyEvent hierarchyEvent ) { } void privateRegisterComponentListenerToParentWindowOf ( Component component , Component childComponent ) { } }

Fix:
text = "" + ( e . getKeyChar ( ) ) ;
Buggy code:
public class IntroduceIdentityTask extends OwnMessageTask { public static final transient long PROCESSING_INTERVAL = ( ( ( 1 * 24 ) * 60 ) * 60 ) * 1000 ; public static final transient long PROCESSING_INTERVAL_SHORT = ( 10 * 60 ) * 1000 ; protected int mPuzzlesToSolve ; protected boolean mWasHidden ; public IntroduceIdentityTask ( WoTOwnIdentity myOwner ) { } public void databaseIntegrityTest ( ) throws Exception { } public synchronized WebPage display ( WebInterface myWebInterface ) { } public synchronized void process ( ) { WoTIdentityManager identityManager = ( ( WoTIdentityManager ) ( mFreetalk . getIdentityManager ( ) ) ) ; long now = CurrentTimeUTC . getInMillis ( ) ; if ( ( mWasHidden ) && ( now < ( mNextProcessingTime ) ) ) return ; mWasHidden = false ; try { MessageManager messageManager = mFreetalk . getMessageManager ( ) ; if ( ( ( messageManager . getOwnMessagesBy ( mOwner ) . size ( ) ) > 0 ) || ( ( messageManager . getMessagesBy ( mOwner ) . size ( ) ) > 0 ) ) { int minimumTrusterCount = mFreetalk . getConfig ( ) . getInt ( MINIMUM_TRUSTER_COUNT ) ; if ( ( identityManager . getReceivedTrustsCount ( mOwner ) ) < minimumTrusterCount ) { mPuzzlesToSolve = minimumTrusterCount * 2 ; mNextDisplayTime = now ; <START_BUG> mNextProcessingTime = Long . MAX_VALUE ; <END_BUG> storeAndCommit ( ) ; return ; } } mNextProcessingTime = now + ( IntroduceIdentityTask . PROCESSING_INTERVAL ) ; storeAndCommit ( ) ; return ; } catch ( Exception e ) { mNextProcessingTime = now + ( IntroduceIdentityTask . PROCESSING_INTERVAL_SHORT ) ; Logger . error ( this , "Error<seq2seq4repair_space>while<seq2seq4repair_space>processing<seq2seq4repair_space>an<seq2seq4repair_space>IntroduceIdentityTask" , e ) ; } } public synchronized void onHideForSomeTime ( ) { } public synchronized void onPuzzleSolved ( ) { } public synchronized int getNumberOfPuzzlesToSolve ( ) { } }

Fix:
mNextProcessingTime = now + ( IntroduceIdentityTask . PROCESSING_INTERVAL ) ;
Buggy code:
public class LoadingBar extends Container < Image > { float prefHeight ; public LoadingBar ( Skin skin , float prefHeight ) { } public LoadingBar ( LoadingBar . LoadingBarStyle style , float prefHeight ) { } @ Override public void layout ( ) { } @ Override public float getPrefHeight ( ) { } public void setCompletion ( float completion ) { Image image = getActor ( ) ; if ( ( image . getActions ( ) . size ) > 0 ) { image . clearActions ( ) ; <START_BUG> image . setX ( 0.0F ) ; <END_BUG> } image . setWidth ( ( ( getWidth ( ) ) * ( MathUtils . clamp ( completion , 0.0F , 1.0F ) ) ) ) ; } public static class LoadingBarStyle { public Drawable background ; public Drawable knobBefore ; public LoadingBarStyle ( ) { } public LoadingBarStyle ( Drawable background , Drawable knobBefore ) { } } No newline ; at end ; of file ; }

Fix:
image . setBounds ( 0.0F , 0.0F , 0.0F , getHeight ( ) ) ;
Buggy code:
public class UserRegisterActivity extends Activity { private Context context ; @ InjectView ( id . titleText ) TextView tvTitle ; @ InjectView ( id . tv_btn_back ) TextView tvBackBtn ; @ InjectView ( id . tv_tips ) TextView tvInputTips ; @ InjectView ( id . btRegist ) Button btRegist ; @ InjectView ( id . phoneNum ) EditText etPhoneNum ; @ InjectView ( id . regist_phone_num_clear_btn ) ImageView ivClearPhoneNumBtn ; @ InjectView ( id . password ) EditText etPassword ; @ InjectView ( id . regist_password_clear_btn ) ImageView ivClearPasswordBtn ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ OnClick ( id . tv_btn_back ) public void onBtnBackClick ( View view ) { } @ Override public void onBackPressed ( ) { } private void initNavigationBar ( ) { } @ OnClick ( id . btRegist ) public void onRegisterBtnClick ( ) { } @ OnTextChanged ( id . phoneNum ) public void onPhoneNumTextChanged ( CharSequence s , int start , int before , int count ) { } @ OnTextChanged ( id . password ) public void onPasswordTextChanged ( CharSequence s , int start , int before , int count ) { } @ OnClick ( id . regist_phone_num_clear_btn ) public void onClearPhoneNumBtnClick ( View v ) { } <START_BUG> @ OnClick ( id . regist_phone_num_clear_btn ) <END_BUG> public void regist_password_clear_btn ( View v ) { etPassword . setText ( "" ) ; } private void checkRegisterParams ( ) { } private boolean checkPhoneNum ( String s ) { } private boolean checkPassword ( String s ) { } private void doBack ( ) { } private void hideKeyboard ( ) { } }

Fix:
@ OnClick ( id . regist_password_clear_btn )
Buggy code:
public class SingleUseSlaveBuildOption extends BuildWrapper { @ DataBoundConstructor public SingleUseSlaveBuildOption ( ) { } @ Override public Environment setUp ( AbstractBuild build , Launcher launcher , BuildListener listener ) throws IOException , InterruptedException { } @ Extension public static class DescriptorImpl extends BuildWrapperDescriptor { @ Override public boolean isApplicable ( AbstractProject < ? , ? > item ) { } @ Override public String getDisplayName ( ) { <START_BUG> return "ElasticBox<seq2seq4repair_space>Single-Use<seq2seq4repair_space>Slave" ; <END_BUG> } } }

Fix:
return "Delete<seq2seq4repair_space>ElasticBox<seq2seq4repair_space>slave<seq2seq4repair_space>after<seq2seq4repair_space>single<seq2seq4repair_space>use" ;
Buggy code:
public class TestBitrepository { public static void main ( String [ ] args ) { File configDir = new File ( "//home//svc//bitmag-releasetest-conf" ) ; File bitmagKeyfile = new File ( configDir , "client-certificate.pem" ) ; <START_BUG> Bitrepository bitrep = new Bitrepository ( configDir , bitmagKeyfile , 1 ) ; <END_BUG> bitrep . shutdown ( ) ; } }

Fix:
Bitrepository bitrep = new Bitrepository ( configDir , bitmagKeyfile , 1 , "kbpillar-test-linux" ) ;
Buggy code:
public interface UserService extends UserDetailsService { <START_BUG> public boolean registerUser ( User user , String roleName ) ; <END_BUG> public boolean isUserExist ( String username ) { } public User update ( User user ) { } public User saveOrupdate ( User user ) { } public boolean updatePassword ( ChangePasswordDTO changePasswordDTO , User user ) throws ChangePasswordException { } public PageSupport < User > findUsers ( int pageNo , int pageSize , String type ) { } public boolean saveUser ( User user ) { } public User findUserById ( Integer id ) { } public void deleteUserById ( Integer id ) { } public PageSupport < User > searchUsers ( int pageNo , int pageSize , String search ) { } public PageSupport < User > searchPTTeacher ( int pageNo , int pageSize , String type ) { } public PageSupport < User > searchUserByRole ( int pageNo , int pageSize , String roleCode ) { } }

Fix:
public boolean registerUser ( User user , Integer id ) ;
Buggy code:
public class TsvRecordStream extends AbstractRecordStream { private static int FILTER_COMMENTS = 256 ; private static int NO_HEADER = 512 ; private static int REMOVING_OPTIONAL_QUOTES = 1024 ; private static int COMMA_DELIMITED = 2048 ; private int flags = 0 ; private final BufferedReader reader ; private final RecordMetaData rmd ; private String delimiter = "\t" ; public static TsvRecordStream . Builder open ( Reader _reader ) { } public static TsvRecordStream . Builder open ( InputStream _is ) { } public static TsvRecordStream . Builder open ( File _file ) throws FileNotFoundException { } public static class Builder { private final Reader reader ; private String delimiter = "\t" ; private int flags ; private String [ ] header = null ; Builder ( Reader _reader ) { } Builder ( File f ) throws FileNotFoundException { } Builder ( InputStream is ) { } public TsvRecordStream . Builder tabSeparated ( ) { } public TsvRecordStream . Builder commaSeparated ( ) { } public TsvRecordStream . Builder customSeparator ( String regex ) { } public TsvRecordStream . Builder removeOptionalQuotes ( ) { } public TsvRecordStream . Builder firstLineIsHeader ( ) { } public TsvRecordStream . Builder setHeader ( String [ ] header ) { } public TsvRecordStream . Builder setHeader ( List < String > header ) { } public TsvRecordStream . Builder filterComments ( ) { } public TsvRecordStream get ( ) throws StreamException { } } private String [ ] splitLine ( String line ) { String [ ] result ; <START_BUG> if ( ( ( ( flags ) & ( TsvRecordStream . REMOVING_OPTIONAL_QUOTES ) ) > 0 ) && ( ( ( flags ) & ( TsvRecordStream . COMMA_DELIMITED ) ) > 0 ) ) { <END_BUG> result = StringUtils . quotedCommaSplit ( line ) . toArray ( new String [ ] { } ) ; } else { result = line . split ( delimiter , ( - 1 ) ) ; if ( ( ( flags ) & ( TsvRecordStream . REMOVING_OPTIONAL_QUOTES ) ) > 0 ) { for ( int i = 0 ; i < ( result . length ) ; ++ i ) { result [ i ] = removeOptionalQuotes ( result [ i ] ) ; } } } return result ; } public TsvRecordStream ( Reader _reader , String _delimiter , String [ ] _header , int flags ) throws StreamException { } @ Deprecated public TsvRecordStream ( Reader _reader , String [ ] _header ) throws StreamException { } public TsvRecordStream ( Reader _reader , String [ ] _header , int flags ) throws StreamException { } @ Deprecated public TsvRecordStream ( Reader _reader ) throws StreamException { } private String removeOptionalQuotes ( String in ) { } @ Deprecated public TsvRecordStream ( Reader _reader , int flags ) throws StreamException { } public TsvRecordStream ( Reader _reader , String _delimiter , int flags ) throws StreamException { } @ Override public Record getNext ( ) throws StreamException { } private String getNextNonCommentLine ( ) throws IOException { } @ Override public RecordMetaData getMetaData ( ) { } }

Fix:
if ( ( ( ( flags ) & ( TsvRecordStream . REMOVING_OPTIONAL_QUOTES ) ) > 0 ) && ( "," . equals ( delimiter ) ) ) {
Buggy code:
public class DecisionTreeClassifier { public static void main ( String [ ] args ) { } private static void classifyDataSet ( List < CaseForClassification > testingData , DecisionTree classificationTree , String positiveClassification ) { } private static List < CaseForClassification > parseDataFile ( String fileToRead ) throws FileNotFoundException { Scanner reader = new Scanner ( new FileReader ( fileToRead ) ) ; List < CaseForClassification > toReturn = new ArrayList < CaseForClassification > ( ) ; List < String > identifiers ; String currentLine ; while ( reader . hasNextLine ( ) ) { <START_BUG> currentLine = reader . nextLine ( ) ; <END_BUG> if ( currentLine . contains ( "," ) ) { identifiers = Arrays . asList ( currentLine . split ( "," ) ) ; } else { identifiers = Arrays . asList ( currentLine . split ( "<seq2seq4repair_space>" ) ) ; } toReturn . add ( new CaseForClassification ( identifiers . get ( 0 ) , identifiers . subList ( 1 , identifiers . size ( ) ) ) ) ; } if ( toReturn . isEmpty ( ) ) { System . out . println ( "Error:<seq2seq4repair_space>data<seq2seq4repair_space>file<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; return null ; } return toReturn ; } }

Fix:
currentLine = reader . nextLine ( ) . trim ( ) ;
Buggy code:
public class MovementControl extends Network { @ Override protected void define ( ) throws Exception { component ( "Receiver" , MosquittoSubscribe . class ) ; component ( "Movement<seq2seq4repair_space>Calculate" , ClassifyComponent . class ) ; component ( "Message" , MessageBoxComponent . class ) ; component ( "Parser" , JsonParser . class ) ; component ( "Kinect<seq2seq4repair_space>App" , KinectComponent . class ) ; component ( "JSONConvert" , Jsonify . class ) ; component ( "Publisher" , WebsocketComponent . class ) ; component ( "TimeJSON" , Jsonify . class ) ; component ( "TimeWS" , WebsocketComponent . class ) ; initialize ( "//le//Motion//Pir" , component ( "Receiver" ) , port ( "TOPIC" ) ) ; initialize ( "bv" , component ( "Parser" ) , port ( "KEY" ) ) ; initialize ( "jointName;x;y;z" , component ( "JSONConvert" ) , port ( "KEY" ) ) ; <START_BUG> initialize ( "Type:idle" , component ( "TimeJSON" ) , port ( "KEY" ) ) ; <END_BUG> initialize ( "8118" , component ( "Publisher" ) , port ( "PORT" ) ) ; initialize ( "7220" , component ( "TimeWS" ) , port ( "PORT" ) ) ; connect ( component ( "Receiver" ) , port ( "MESSAGE" ) , component ( "Parser" ) , port ( "JSON" ) ) ; connect ( component ( "Parser" ) , port ( "VALUE[0]" ) , component ( "Movement<seq2seq4repair_space>Calculate" ) , port ( "DATA" ) ) ; connect ( component ( "Movement<seq2seq4repair_space>Calculate" ) , port ( "MESSAGE" ) , component ( "Message" ) , port ( "MESSAGE" ) ) ; connect ( component ( "Message" ) , port ( "YES" ) , component ( "Kinect<seq2seq4repair_space>App" ) , port ( "MESSAGE" ) ) ; connect ( component ( "Kinect<seq2seq4repair_space>App" ) , port ( "VALUE" ) , component ( "JSONConvert" ) , port ( "VALUE" ) ) ; connect ( component ( "JSONConvert" ) , port ( "MESSAGE" ) , component ( "Publisher" ) , port ( "MESSAGE" ) ) ; connect ( component ( "Movement<seq2seq4repair_space>Calculate" ) , port ( "TIME" ) , component ( "TimeJSON" ) , port ( "VALUE" ) ) ; connect ( component ( "TimeJSON" ) , port ( "MESSAGE" ) , component ( "TimeWS" ) , port ( "MESSAGE" ) ) ; } public static void main ( String [ ] argv ) throws Exception { } }

Fix:
initialize ( "type:idle" , component ( "TimeJSON" ) , port ( "KEY" ) ) ;
Buggy code:
public class OsxDocListViewImpl extends DocListViewImpl { private Window window ; private JTabbedPane jtp ; @ PostConstruct public void init ( ) { jtp = super . createTabbedPane ( ) ; final DocumentTabbedPaneUI ui = new DocumentTabbedPaneUI ( ) ; jtp . setUI ( ui ) ; jtp . setBorder ( BorderFactory . createEmptyBorder ( ) ) ; <START_BUG> window . topic ( FocusListener . class ) . subscribe ( ASYNC_EVENT , new FocusListener ( ) { <END_BUG> public void focusGained ( Window window ) { ui . setFocused ( true ) ; jtp . repaint ( ) ; } public void focusLost ( Window window ) { ui . setFocused ( false ) ; jtp . repaint ( ) ; } } ) ; } @ Autowired public void setWindow ( Window window ) { } @ Override protected JTabbedPane createTabbedPane ( ) { } }

Fix:
window . topic ( FocusListener . class ) . subscribe ( EVENT_ASYNC , new FocusListener ( ) {
Buggy code:
public class ItemConduitRenderer extends DefaultConduitRenderer { @ Override public boolean isRendererForConduit ( IConduit conduit ) { } @ Override public void renderEntity ( ConduitBundleRenderer conduitBundleRenderer , IConduitBundle te , IConduit conduit , double x , double y , double z , float partialTick , float worldLight , RenderBlocks rb ) { super . renderEntity ( conduitBundleRenderer , te , conduit , x , y , z , partialTick , worldLight , rb ) ; IItemConduit pc = ( ( IItemConduit ) ( conduit ) ) ; for ( ForgeDirection dir : conduit . getExternalConnections ( ) ) { DyeColor inChannel = null ; DyeColor outChannel = null ; IIcon inTex = null ; IIcon outTex = null ; boolean render = true ; if ( ( conduit . getConnectionMode ( dir ) ) == ( ConnectionMode . INPUT ) ) { inTex = pc . getTextureForInputMode ( ) ; inChannel = pc . getInputColor ( dir ) ; } else if ( ( conduit . getConnectionMode ( dir ) ) == ( ConnectionMode . OUTPUT ) ) { outTex = pc . getTextureForOutputMode ( ) ; outChannel = pc . getOutputColor ( dir ) ; } else if ( ( conduit . getConnectionMode ( dir ) ) == ( ConnectionMode . IN_OUT ) ) { inTex = pc . getTextureForInOutMode ( true ) ; outTex = pc . getTextureForInOutMode ( false ) ; inChannel = pc . getInputColor ( dir ) ; outChannel = pc . getOutputColor ( dir ) ; } else { render = false ; } <START_BUG> if ( render ) { <END_BUG> Offset offset = te . getOffset ( IItemConduit . class , dir ) ; ConnectionModeGeometry . renderModeConnector ( dir , offset , pc . getTextureForInOutBackground ( ) , true ) ; if ( inChannel != null ) { instance . setColorOpaque_I ( inChannel . getColor ( ) ) ; ConnectionModeGeometry . renderModeConnector ( dir , offset , inTex , false ) ; } if ( outChannel != null ) { instance . setColorOpaque_I ( outChannel . getColor ( ) ) ; ConnectionModeGeometry . renderModeConnector ( dir , offset , outTex , false ) ; } instance . setColorOpaque_F ( 1.0F , 1.0F , 1.0F ) ; } } } }

Fix:
if ( render && ( ! ( rb . hasOverrideBlockTexture ( ) ) ) ) {
Buggy code:
public class moveFinished extends ActionBarActivity { private GameLogic gl ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void continueGame ( View view ) { Intent intent = null ; gl . nextGroup ( ) ; <START_BUG> if ( ( gl . getActiveGroup ( ) . getId ( ) ) == 0 ) { <END_BUG> intent = new Intent ( this , roundFinished . class ) ; } else { intent = new Intent ( this , groupReady . class ) ; } startActivity ( intent ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
if ( ( gl . getActiveGroup ( ) . getId ( ) ) == 1 ) {
Buggy code:
public class ScheFragment extends BaseFragment { private static final String TAG = makeLogTag ( "ScheFragment" ) ; public static final String KEY_TITLE = "title" ; public static final String KEY_MYSESSION = "mysession" ; public static final int SELECT_SESSION = 100 ; private ViewPager mPager ; private Spinner mToolbarSpinner ; private RelativeLayout mEmptyLayout ; private CharSequence mTitle ; private boolean mIsMySession = false ; private ArrayList < Integer > mStoredSessionIDs ; private SchePagerFragmentAdapter mAdapter ; public static ScheFragment newInstance ( CharSequence title , boolean mIsMySession ) { } public ScheFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onStop ( ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } private void setMySessionView ( View rootView ) { } private void initFragmentPager ( View rootView ) { } private void initToolbar ( View rootView ) { } private void initToolbarSpinner ( View rootView ) { } @ Override public void onCreateOptionsMenu ( Menu menu , MenuInflater inflater ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onResume ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { super . onActivityResult ( requestCode , resultCode , data ) ; if ( resultCode == ( ScheFragment . SELECT_SESSION ) ) { FavoritePreferenceHelper prefHelper = new FavoritePreferenceHelper ( getActivity ( ) ) ; if ( prefHelper . getFavorSessionState ( PREF_FAVOR_STATE ) ) { ArrayList < Integer > storedSessionIDs = prefHelper . getFavorSessionValue ( PREF_FAVOR_VALUE ) ; <START_BUG> mAdapter = new SchePagerFragmentAdapter ( getChildFragmentManager ( ) , days . get ( 0 ) , true , storedSessionIDs ) ; <END_BUG> mAdapter . notifyDataSetChanged ( ) ; mPager . setAdapter ( mAdapter ) ; } } } }

Fix:
mAdapter = new SchePagerFragmentAdapter ( getChildFragmentManager ( ) , days . get ( 0 ) , DeviewSchedApplication . sFavorSessionState , storedSessionIDs ) ;
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 314 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 315 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
final class ChannelEndpointMultiplexer implements ChannelEndpoint , ChannelEndpointManager { ChannelEndpointImpl primary ; private final HashMap policies = new HashMap ( 0 ) ; private ServiceRegistration reg ; private final Map mappings = new HashMap ( ) ; ChannelEndpointMultiplexer ( final ChannelEndpointImpl primary ) { } public void dispose ( ) { } public Dictionary getPresentationProperties ( final String service ) { } public Dictionary getProperties ( final String service ) { } public URI getRemoteAddress ( ) { } public Object invokeMethod ( final String serviceURI , final String methodSignature , final Object [ ] args ) throws Throwable { } public void receivedMessage ( final RemoteOSGiMessage msg ) { } public void trackRegistration ( final String service , final ServiceRegistration sreg ) { } public void untrackRegistration ( final String service ) { } public boolean isConnected ( ) { <START_BUG> return true ; <END_BUG> } private class Mapping { private final Random random = new Random ( System . currentTimeMillis ( ) ) ; private final List redundant = new ArrayList ( 0 ) ; private final Map uriMapping = new HashMap ( 0 ) ; Mapping ( final String serviceURI ) { } void addRedundant ( final String redundantServiceURI , final ChannelEndpoint endpoint ) { } void removeRedundant ( final ChannelEndpoint endpoint ) { } String getMapped ( final ChannelEndpoint endpoint ) { } ChannelEndpointImpl getNext ( ) { } boolean isEmpty ( ) { } ChannelEndpoint getAny ( ) { } } public void addRedundantEndpoint ( final URI service , final URI redundantService ) { } public URI getLocalAddress ( ) { } public void removeRedundantEndpoint ( final URI service , final URI redundantService ) { } public void setEndpointPolicy ( final URI service , final int policy ) { } public Timestamp transformTimestamp ( final Timestamp timestamp ) throws RemoteOSGiException { } }

Fix:
return primary . isConnected ( ) ;