nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SuppressWarnings ( "unchecked" ) public class UncachedKeyRing { final PGPKeyRing mRing ; final boolean mIsSecret ; UncachedKeyRing ( PGPKeyRing ring ) { } public long getMasterKeyId ( ) { } public UncachedPublicKey getPublicKey ( ) { } public UncachedPublicKey getPublicKey ( long keyId ) { } public Iterator < UncachedPublicKey > getPublicKeys ( ) { } public boolean isSecret ( ) { } public byte [ ] getEncoded ( ) throws IOException { } public void encode ( OutputStream out ) throws IOException { } public byte [ ] getFingerprint ( ) { } public int getVersion ( ) { } public static UncachedKeyRing decodeFromData ( byte [ ] data ) throws IOException , PgpGeneralException { } public static UncachedKeyRing . IteratorWithIOThrow < UncachedKeyRing > fromStream ( final InputStream stream ) { } public boolean containsSubkey ( String expectedFingerprint ) { Iterator < PGPPublicKey > it = mRing . getPublicKeys ( ) ; while ( it . hasNext ( ) ) { <START_BUG> if ( KeyFormattingUtils . convertFingerprintToHex ( it . next ( ) . getFingerprint ( ) ) . equals ( expectedFingerprint ) ) { <END_BUG> return true ; } } return false ; } public interface IteratorWithIOThrow < E > { public boolean hasNext ( ) throws IOException { } public E next ( ) throws IOException { } } public void encodeArmored ( OutputStream out , String version ) throws IOException { } static final int [ ] KNOWN_ALGORITHMS = new int [ ] { PublicKeyAlgorithmTags . RSA_GENERAL , PublicKeyAlgorithmTags . RSA_ENCRYPT , PublicKeyAlgorithmTags . RSA_SIGN , PublicKeyAlgorithmTags . ELGAMAL_ENCRYPT , PublicKeyAlgorithmTags . DSA , PublicKeyAlgorithmTags . ECDH , PublicKeyAlgorithmTags . ECDSA , PublicKeyAlgorithmTags . ELGAMAL_GENERAL } ; @ SuppressWarnings ( "ConstantConditions" ) public CanonicalizedKeyRing canonicalize ( OperationLog log , int indent ) { } @ SuppressWarnings ( "ConstantConditions" ) public CanonicalizedKeyRing canonicalize ( OperationLog log , int indent , boolean forExport ) { } public UncachedKeyRing merge ( UncachedKeyRing other , OperationLog log , int indent ) { } public UncachedKeyRing extractPublicKeyRing ( ) throws IOException { } private static PGPKeyRing replacePublicKey ( PGPKeyRing ring , PGPPublicKey key ) { } private static PGPKeyRing removeSubKey ( PGPKeyRing ring , PGPPublicKey key ) { } static boolean isSigningAlgo ( int algorithm ) { } static boolean isEncryptionAlgo ( int algorithm ) { } }

Fix:
if ( KeyFormattingUtils . convertFingerprintToHex ( it . next ( ) . getFingerprint ( ) ) . equalsIgnoreCase ( expectedFingerprint ) ) {
Buggy code:
public class PlayingGameState extends CommonGameState { public static final int PLAYING_STATE_ID = 0 ; private Player player ; private Camera camera ; private Tile destinationTile ; public Player getPlayer ( ) { } @ Override public int getID ( ) { } @ Override public void init ( final GameContainer gc , final StateBasedGame arg1 ) throws SlickException { } @ Override public void update ( final GameContainer gc , final StateBasedGame arg1 , final int delta ) throws SlickException { super . update ( gc , arg1 , delta ) ; final Input input = gc . getInput ( ) ; if ( ( input . isMousePressed ( MOUSE_LEFT_BUTTON ) ) && ( inputEnabled ) ) { Vector2f mousePos = new Vector2f ( input . getMouseX ( ) , input . getMouseY ( ) ) ; mousePos = new Vector2f ( ( ( mousePos . getX ( ) ) + ( camera . cameraX ) ) , ( ( mousePos . getY ( ) ) + ( camera . cameraY ) ) ) ; destinationTile = Tile . createFromPixelsCoordinates ( mousePos ) ; <START_BUG> if ( ! ( World . getWorld ( ) . getLayerMap ( ) . isBlocked ( destinationTile . toVector ( ) ) ) ) { <END_BUG> player . moveTo ( destinationTile ) ; } else { destinationTile = null ; } } player . update ( gc , delta ) ; } @ Override public void render ( final GameContainer gc , final StateBasedGame arg1 , final Graphics g ) throws SlickException { } }

Fix:
if ( ! ( World . getWorld ( ) . getLayerMap ( ) . isBlocked ( destinationTile ) ) ) {
Buggy code:
public final class IntId extends OpenJPAId { private final int key ; public IntId ( Class cls , Integer key ) { } public IntId ( Class cls , String key ) { } public IntId ( Class cls , int key ) { } public IntId ( Class cls , int key , boolean subs ) { } public int getId ( ) { } public Object getIdObject ( ) { <START_BUG> return Numbers . valueOf ( key ) ; <END_BUG> } public String toString ( ) { } protected int idHash ( ) { } protected boolean idEquals ( OpenJPAId o ) { } }

Fix:
return key ;
Buggy code:
public final class ExceptionTransformer < I , O > implements Serializable , Transformer < I , O > { private static final long serialVersionUID = 7179106032121985545L ; public static final Transformer < Object , Object > INSTANCE = new ExceptionTransformer < Object , Object > ( ) ; @ SuppressWarnings ( "unchecked" ) public static < I , O > Transformer < I , O > exceptionTransformer ( ) { } private ExceptionTransformer ( ) { } <START_BUG> public O transform ( I input ) { <END_BUG> throw new FunctorException ( "ExceptionTransformer<seq2seq4repair_space>invoked" ) ; } private Object readResolve ( ) { } }

Fix:
public O transform ( final I input ) {
Buggy code:
public class Node { private int value ; private Node left ; private Node right ; private Node parent ; private int lvl ; public int getValue ( ) { } public void setValue ( int value ) { } public Node getLeft ( ) { } public void setLeft ( Node left ) { } public Node getRight ( ) { } public void setRight ( Node right ) { } public Node getParent ( ) { } public void setParent ( Node parent ) { } public int getLvl ( ) { } public void setLvl ( int lvl ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( value ) + "[" ) + ( lvl ) ) + "]" ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
return ( value ) + "" ;
Buggy code:
public final class ValidationErrorMessage extends FeedbackMessage { public static final ValidationErrorMessage NO_MESSAGE = null ; public ValidationErrorMessage ( final Component reporter , final String message ) { } public String getInput ( ) { final Component reporter = getReporter ( ) ; if ( reporter instanceof FormComponent ) { <START_BUG> return ( ( FormComponent ) ( getReporter ( ) ) ) . getStringValue ( ) ; <END_BUG> } return null ; } }

Fix:
return ( ( FormComponent ) ( getReporter ( ) ) ) . getRequestString ( ) ;
Buggy code:
public class PlayerDataRecorder extends DataRecorder { protected String playerName ; protected long timeStamp = 0L ; protected String pathGPM ; protected String pathLog ; public PlayerDataRecorder ( String playerName , LevelScene levelScene , RandomLevel level , boolean [ ] keys ) { } @ Override public void fillGamePlayMetrics ( RandomLevel dummyLevel ) { } public void stampTime ( ) { timeStamp = ( System . currentTimeMillis ( ) ) // 1000L ; <START_BUG> String pathFolder = ( ( ( System . getProperty ( "user.dir" ) ) + "//..//players//" ) + ( playerName ) ) + "//" ; <END_BUG> pathGPM = ( pathFolder + ( timeStamp ) ) + ".gpm" ; pathLog = ( pathFolder + ( timeStamp ) ) + ".log" ; } public int getTotalCoins ( ) { } public int getTotalEnemies ( ) { } public int getTotalEmptyBlocks ( ) { } public int getTotalCoinBlocks ( ) { } public int getTotalPowerBlocks ( ) { } public int getDeathsByRedTurtle ( ) { } public int getDeathsByGreenTurtle ( ) { } public int getDeathsByGoomba ( ) { } public int getDeathsByArmoredTurtle ( ) { } public int getDeathsByJumpFlower ( ) { } public int getDeathsByCannonBall ( ) { } public int getDeathsByChompFlower ( ) { } public int getRedTurtlesKilled ( ) { } public int getGreenTurtlesKilled ( ) { } public int getGoombasKilled ( ) { } public int getArmoredTurtlesKilled ( ) { } public int getJumpFlowersKilled ( ) { } public int getCannonballKilled ( ) { } public int getChompFlowersKilled ( ) { } public String getPlayerName ( ) { } public long getTimeStamp ( ) { } }

Fix:
String pathFolder = ( ( ( System . getProperty ( "user.dir" ) ) + "//players//" ) + ( playerName ) ) + "//" ;
Buggy code:
public class LegacyEventV2Transformer extends BaseLegacyResourceTransformer < Event , EventV2 > { private final LegacyTopicTransformer legacyTopicTransformer ; private final LegacyPersonTransformer legacyPersonTransformer ; private final LegacyOrganisationTransformer legacyOrganisationTransformer ; private final OrganisationStore organisationStore ; public LegacyEventV2Transformer ( OrganisationStore organisationStore ) { } @ Nullable @ Override public EventV2 apply ( Event input ) { } private void addEvent ( Event input , EventV2 . EventBuilder builder ) { } private OrganisationRef generateOrganisationRef ( Organisation organisation ) { Organisation writtenOrganisation = writeOrganisation ( organisation ) ; <START_BUG> return new OrganisationRef ( writtenOrganisation . getId ( ) , organisation . getSource ( ) ) ; <END_BUG> } private Organisation writeOrganisation ( Organisation organisation ) { } }

Fix:
return new OrganisationRef ( writtenOrganisation . getId ( ) , writtenOrganisation . getSource ( ) ) ;
Buggy code:
public class AjaxSelfUpdatingTimerBehavior extends AbstractAjaxTimerBehavior { private static final long serialVersionUID = 1L ; public AjaxSelfUpdatingTimerBehavior ( final Duration updateInterval ) { } @ Override protected final void onTimer ( final AjaxRequestTarget target ) { <START_BUG> target . addComponent ( getComponent ( ) ) ; <END_BUG> onPostProcessTarget ( target ) ; } protected void onPostProcessTarget ( final AjaxRequestTarget target ) { } }

Fix:
target . add ( getComponent ( ) ) ;
Buggy code:
public class TitleMenu extends GuiMenu { public static final int START_GAME_ID = 1000 ; public static final int HOST_GAME_ID = 1002 ; public static final int JOIN_GAME_ID = 1003 ; public static final int EXIT_GAME_ID = 1001 ; public static final int CANCEL_JOIN_ID = 1004 ; public static final int PERFORM_JOIN_ID = 1005 ; public static final int RETURN_TO_TITLESCREEN = 1006 ; public static final int SELECT_LEVEL_ID = 1007 ; public static final int SELECT_HOST_LEVEL_ID = 1008 ; public static final int SELECT_DIFFICULTY_ID = 1009 ; public static final int HOW_TO_PLAY = 1010 ; public static final int UPDATE_LEVELS = 1011 ; public static final int RETURN_ID = 1012 ; public static final int SELECT_DIFFICULTY_HOSTING_ID = 1013 ; public static final int BACK_ID = 1014 ; public static final int IGNORE_ID = 1015 ; public static final int OPTIONS_ID = 1016 ; public static final int LEVELS_NEXT_PAGE_ID = 1017 ; public static final int LEVELS_PREVIOUS_PAGE_ID = 1018 ; public static final int FULLSCREEN_ID = 2000 ; public static final int FPS_ID = 2001 ; public static final int VOLUME = 2002 ; public static final int MUSIC = 2003 ; public static final int CREATIVE_ID = 2004 ; public static final int KEY_BINDINGS_ID = 3000 ; public static final int KEY_UP_ID = 3001 ; public static final int KEY_DOWN_ID = 3002 ; public static final int KEY_LEFT_ID = 3003 ; public static final int KEY_RIGHT_ID = 3004 ; public static final int KEY_SPRINT_ID = 3005 ; public static final int KEY_FIRE_ID = 3006 ; public static final int KEY_USE_ID = 3007 ; public static final int KEY_BUILD_ID = 3008 ; public static final int KEY_UPGRADE_ID = 3009 ; public static LevelInformation level = null ; public static GameMode defaultGameMode = new GameModeVanilla ( ) ; public static DifficultyInformation difficulty = null ; public static String ip = "" ; private int selectedItem = 0 ; private final int gameWidth ; public TitleMenu ( int gameWidth , int gameHeight ) { } @ Override public void render ( Screen screen ) { } @ Override public void keyPressed ( KeyEvent e ) { if ( ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_UP ) ) || ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_W ) ) ) { ( selectedItem ) -- ; if ( ( selectedItem ) < 0 ) { selectedItem = ( buttons . size ( ) ) - 1 ; } } else if ( ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_DOWN ) ) || ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_S ) ) ) { ( selectedItem ) ++ ; if ( ( selectedItem ) > ( ( buttons . size ( ) ) - 1 ) ) { selectedItem = 0 ; } } else if ( ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_ENTER ) ) || ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_E ) ) ) { e . consume ( ) ; buttons . get ( selectedItem ) . postClick ( ) ; } else if ( ( e . getKeyCode ( ) ) == ( KeyEvent . VK_F11 ) ) { <START_BUG> MojamComponent . setFullscreen ( ( ! ( MojamComponent . isFulscreen ( ) ) ) ) ; <END_BUG> } } @ Override public void keyReleased ( KeyEvent arg0 ) { } @ Override public void keyTyped ( KeyEvent ke ) { } @ Override public void buttonPressed ( ClickableComponent button ) { } }

Fix:
MojamComponent . toggleFullscreen ( ) ;
Buggy code:
public class OrthodoxWidgetProvider extends AppWidgetProvider { public static final String TOAST_ACTION = "com.medo.pravoslavenkalendar.TOAST_ACTION" ; public static final String EXTRA_ITEM = "com.medo.pravoslavenkalendar.EXTRA_ITEM" ; private static HandlerThread sWorkerThread ; private static Handler sWorkerQueue ; public OrthodoxWidgetProvider ( ) { } @ Override public void onReceive ( Context context , Intent intent ) { } @ TargetApi ( VERSION_CODES . ICE_CREAM_SANDWICH ) public void onUpdate ( Context context , final AppWidgetManager appWidgetManager , final int [ ] appWidgetIds ) { if ( ! ( SystemUtils . versionAtLeast ( ICE_CREAM_SANDWICH ) ) ) { return ; } for ( final int appWidgetId : appWidgetIds ) { Intent intent = new Intent ( context , OrthodoxWidgetService . class ) ; intent . putExtra ( EXTRA_APPWIDGET_ID , appWidgetId ) ; intent . setData ( Uri . parse ( intent . toUri ( URI_INTENT_SCHEME ) ) ) ; final RemoteViews rv = new RemoteViews ( context . getPackageName ( ) , layout . widget_layout ) ; rv . setRemoteAdapter ( appWidgetId , list_view , intent ) ; rv . setEmptyView ( list_view , empty_view ) ; Intent toastIntent = new Intent ( context , OrthodoxWidgetProvider . class ) ; toastIntent . setAction ( OrthodoxWidgetProvider . TOAST_ACTION ) ; toastIntent . putExtra ( EXTRA_APPWIDGET_ID , appWidgetId ) ; intent . setData ( Uri . parse ( intent . toUri ( URI_INTENT_SCHEME ) ) ) ; PendingIntent toastPendingIntent = PendingIntent . getBroadcast ( context , 0 , toastIntent , FLAG_UPDATE_CURRENT ) ; rv . setPendingIntentTemplate ( list_view , toastPendingIntent ) ; OrthodoxWidgetProvider . sWorkerQueue . postDelayed ( new Runnable ( ) { @ Override public void run ( ) { rv . setScrollPosition ( list_view , ( ( Calendar . getInstance ( ) . get ( Calendar . DAY_OF_YEAR ) ) - 1 ) ) ; appWidgetManager . partiallyUpdateAppWidget ( appWidgetId , rv ) ; } <START_BUG> } , 1000 ) ; <END_BUG> appWidgetManager . updateAppWidget ( appWidgetId , rv ) ; } } }

Fix:
} , 3000 ) ;
Buggy code:
class AncestorImpl implements Ancestor { private final List < AncestorImpl > owner ; private final int listIndex ; private final Object object ; private final String [ ] tokens ; private final int index ; private final String contextPath ; private final boolean endsWithSlash ; AncestorImpl ( RequestImpl req , Object object ) { } public Object getObject ( ) { } public String getUrl ( ) { } public String getRestOfUrl ( ) { <START_BUG> StringBuilder buf = new StringBuilder ( contextPath ) ; <END_BUG> for ( int i = index ; i < ( tokens . length ) ; i ++ ) { if ( ( buf . length ( ) ) > 0 ) buf . append ( '//' ) ; buf . append ( tokens [ i ] ) ; } return buf . toString ( ) ; } public String getFullUrl ( ) { } public String getRelativePath ( ) { } public String getNextToken ( int n ) { } public Ancestor getPrev ( ) { } public Ancestor getNext ( ) { } @ Override public String toString ( ) { } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class BanHammerConfiguration extends AbstractConfiguration { private final Map < String , Long > limits = new LinkedHashMap < String , Long > ( ) ; public BanHammerConfiguration ( Plugin plugin ) throws IOException { } public boolean isDebugging ( ) { } public void setDefaults ( ) throws IOException { } public void setBanLimits ( ) { limits . clear ( ) ; logger . debug ( String . format ( "Registering<seq2seq4repair_space>ban<seq2seq4repair_space>limits" ) ) ; final ConfigurationSection section = configuration . getConfigurationSection ( "ban-limits" ) ; for ( String key : section . getKeys ( false ) ) { try { final String name = key ; final Long length = Time . parseTime ( section . getString ( key ) ) ; limits . put ( name , length ) ; <START_BUG> logger . debug ( String . format ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>ban<seq2seq4repair_space>limit<seq2seq4repair_space>%s<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>maximum<seq2seq4repair_space>time<seq2seq4repair_space>of<seq2seq4repair_space>%s." , name , section . getString ( key ) ) ) ; <END_BUG> } catch ( NumberFormatException e ) { logger . warning ( String . format ( "Ban<seq2seq4repair_space>limit<seq2seq4repair_space>'%s'<seq2seq4repair_space>specifies<seq2seq4repair_space>an<seq2seq4repair_space>invalid<seq2seq4repair_space>number<seq2seq4repair_space>format" , key ) ) ; } } } public Map < String , Long > getBanLimits ( ) { } }

Fix:
logger . debug ( String . format ( "Creating<seq2seq4repair_space>new<seq2seq4repair_space>ban<seq2seq4repair_space>limit<seq2seq4repair_space>%s<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>maximum<seq2seq4repair_space>time<seq2seq4repair_space>of<seq2seq4repair_space>%s<seq2seq4repair_space>(%d)." , name , section . getString ( key ) , length ) ) ;
Buggy code:
public class MaintainTeacher { private Vector < Teacher > teacher_vet = new Vector < Teacher > ( ) ; private static MaintainTeacher instance ; private MaintainTeacher ( ) { } public static MaintainTeacher getInstance ( ) { } public Vector < Teacher > getTeachersByName ( String teacherName ) throws ClientException , SQLException { } public Vector < Teacher > getTeachersByCpf ( String teacherCpf ) throws ClientException , SQLException { } public Vector < Teacher > getTeachersByRegistration ( String teacherRegistration ) throws ClientException , SQLException { } public Vector < Teacher > getTeachersByEmail ( String teacherEmail ) throws ClientException , SQLException { } public Vector < Teacher > getTeachersByTelephone ( String teacherTelephone ) throws ClientException , SQLException { } public Vector < Teacher > getTeachers ( ) throws ClientException , SQLException { } public void insertNewTeacher ( String name , String cpf , String registration , String telephone , String email ) throws ClientException , SQLException { } public void changeTeacher ( String name , String cpf , String registration , String telephone , String email , Teacher teacher ) throws ClientException , SQLException { Teacher old_teacher = new Teacher ( teacher . getName ( ) , teacher . getCpf ( ) , teacher . getRegistration ( ) , teacher . getFone ( ) , teacher . getEmail ( ) ) ; teacher . setNome ( name ) ; teacher . setCpf ( cpf ) ; <START_BUG> teacher . setMatricula ( registration ) ; <END_BUG> teacher . setTelefone ( telephone ) ; teacher . setEmail ( email ) ; TeacherDAO . getInstance ( ) . modifyATeacher ( old_teacher , teacher ) ; } public void excludeTeacher ( Teacher teacher ) throws ClientException , SQLException { } }

Fix:
teacher . setRegistration ( registration ) ;
Buggy code:
public class MailExtension implements Extension { public static final String SUBSYSTEM_NAME = "mail" ; private final MailSubsystemParser parser = new MailSubsystemParser ( ) ; private static final String RESOURCE_NAME = ( MailExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static PathElement SUBSYSTEM_PATH = PathElement . pathElement ( SUBSYSTEM , MailExtension . SUBSYSTEM_NAME ) ; static PathElement MAIL_SESSION_PATH = PathElement . pathElement ( MAIL_SESSION ) ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... keyPrefix ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 2 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; @ Override public void initialize ( ExtensionContext context ) { final SubsystemRegistration subsystem = context . registerSubsystem ( MailExtension . SUBSYSTEM_NAME , MailExtension . MANAGEMENT_API_MAJOR_VERSION , MailExtension . MANAGEMENT_API_MINOR_VERSION , MailExtension . MANAGEMENT_API_MICRO_VERSION ) ; final ManagementResourceRegistration subsystemRegistration = subsystem . registerSubsystemModel ( INSTANCE ) ; <START_BUG> subsystemRegistration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; <END_BUG> ManagementResourceRegistration session = subsystemRegistration . registerSubModel ( MailSessionDefinition . INSTANCE ) ; session . registerSubModel ( INSTANCE_IMAP ) ; session . registerSubModel ( INSTANCE_POP3 ) ; session . registerSubModel ( INSTANCE_SMTP ) ; subsystem . registerXMLElementWriter ( parser ) ; TransformersSubRegistration serverTransformers = subsystem . registerModelTransformers ( ModelVersion . create ( 1 , 1 , 0 ) , new AbstractSubsystemTransformer ( MailExtension . SUBSYSTEM_NAME ) { @ Override protected ModelNode transformModel ( TransformationContext context , ModelNode model ) { for ( Property p : model . get ( MailExtension . MAIL_SESSION_PATH . getKey ( ) ) . asPropertyList ( ) ) { for ( Property server : p . getValue ( ) . get ( SERVER_TYPE ) . asPropertyList ( ) ) { ModelNode serverModel = server . getValue ( ) ; if ( serverModel . has ( MailSubsystemModel . TLS ) ) { serverModel . remove ( MailSubsystemModel . TLS ) ; } model . get ( MAIL_SESSION , p . getName ( ) , SERVER_TYPE , server . getName ( ) ) . set ( serverModel ) ; } } return model ; } } ) . registerSubResource ( MailExtension . MAIL_SESSION_PATH ) . registerSubResource ( MailSubsystemModel . SMTP_SERVER_PATH ) ; serverTransformers . registerOperationTransformer ( ADD , new AbstractOperationTransformer ( ) { @ Override protected ModelNode transform ( TransformationContext context , PathAddress address , ModelNode operation ) { if ( operation . has ( MailSubsystemModel . TLS ) ) { operation . remove ( MailSubsystemModel . TLS ) ; } return operation ; } } ) ; } }

Fix:
subsystemRegistration . registerOperationHandler ( DEFINITION , GenericSubsystemDescribeHandler . INSTANCE ) ;
Buggy code:
public class StructureModelUtil { public static Map getLinesToAspectMap ( String sourceFilePath ) { } public static Set getAspectsAffectingPackage ( IProgramElement packageNode ) { } public static List getPackagesInModel ( ) { List packages = new ArrayList ( ) ; <START_BUG> StructureModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getStructureModel ( ) ; <END_BUG> if ( model . equals ( NO_STRUCTURE ) ) { return null ; } else { return StructureModelUtil . getPackagesHelper ( ( ( IProgramElement ) ( model . getRoot ( ) ) ) , PACKAGE , null , packages ) ; } } private static List getPackagesHelper ( IProgramElement node , IProgramElement . Kind kind , String prename , List matches ) { } private List sortElements ( List oldElements ) { } private static List sortArray ( List oldElements ) { } private class SortingComparator implements Comparator { public int compare ( Object o1 , Object o2 ) { } } private static class SortArrayComparator implements Comparator { public int compare ( Object o1 , Object o2 ) { } } public static List getFilesInPackage ( IProgramElement packageNode ) { } }

Fix:
StructureModel model = Ajde . getDefault ( ) . getStructureModelManager ( ) . getModel ( ) ;
Buggy code:
public class TextLabel extends DocumentElement { private static final long serialVersionUID = - 7388262736446472023L ; private String text = "Double-click<seq2seq4repair_space>to<seq2seq4repair_space>edit" ; private FontMetrics metrics ; private int alignmentInParent = JTextField . LEFT ; private Container suspendedParent ; private JTextArea replacement ; public TextLabel ( Point p ) { } public void paintComponent ( Graphics d ) { } public int getAlignmentInParent ( ) { } public void setAlignmentInParent ( int alignmentInParent ) { } public void setText ( String text ) { } public String getText ( ) { } public void setFont ( Font f ) { } @ Override public void setZoomFactor ( double zoom ) { } private void resizeToText ( ) { } public void enableEdit ( ) { } public void exitEdit ( ) { JTextArea a = replacement ; suspendedParent . remove ( a ) ; <START_BUG> if ( ( a . getText ( ) ) == null ) { <END_BUG> this . setVisible ( false ) ; return ; } this . setText ( a . getText ( ) ) ; suspendedParent . add ( this ) ; this . getParent ( ) . repaint ( ) ; } private class LabelListener extends DiagramListener implements Serializable { private TextLabel diagram ; public LabelListener ( TextLabel l ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } } }

Fix:
if ( ( a . getText ( ) . length ( ) ) < 1 ) {
Buggy code:
@ EActivity public class AccountSelectorActivity extends ListActivity implements OnAccountsUpdateListener { @ SystemService AccountManager accountManager ; @ Bean AccountsService accountsService ; ActionMode activeActionMode ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private boolean deeplink ( String url ) { int ofs = ( url == null ) ? - 1 : url . indexOf ( "//browse//" ) ; if ( ofs > 0 ) { ListAdapter adapter = getListAdapter ( ) ; String issue = url . substring ( ( ofs + 8 ) ) ; ofs = issue . indexOf ( "#" ) ; if ( ofs > 0 ) <START_BUG> issue = issue . substring ( 0 , ( ofs - 1 ) ) ; <END_BUG> for ( int i = 0 ; i < ( adapter . getCount ( ) ) ; i ++ ) { LoginInfo loginInfo = ( ( LoginInfo ) ( adapter . getItem ( i ) ) ) ; if ( url . contains ( loginInfo . getBaseURL ( ) ) ) { IssueActivity_ . intent ( this ) . issueKey ( issue ) . loginInfo ( loginInfo ) . start ( ) ; return true ; } } new AlertDialog . Builder ( this ) . setTitle ( "Account<seq2seq4repair_space>not<seq2seq4repair_space>found" ) . setMessage ( ( "Please<seq2seq4repair_space>create<seq2seq4repair_space>an<seq2seq4repair_space>account<seq2seq4repair_space>for<seq2seq4repair_space>" + ( url . substring ( 0 , url . indexOf ( "//browse" ) ) ) ) ) . create ( ) . show ( ) ; } return false ; } @ Override protected void onStart ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void reloadAccounts ( ) { } @ ItemLongClick ( id . list ) void onAccountLongClick ( final int position ) { } private void removeAccount ( LoginInfo loginInfo ) { } @ ItemClick ( id . list ) void onAccountClick ( int position ) { } @ Override public void onAccountsUpdated ( Account [ ] accounts ) { } private void openAddNewAccountScreen ( ) { } }

Fix:
issue = issue . substring ( 0 , ofs ) ;
Buggy code:
public class ServerModelDeploymentAddUpdate extends AbstractServerModelUpdate < ServerDeploymentActionResult > { private static final long serialVersionUID = - 5804608026829597800L ; private final String deploymentUniqueName ; private final String deploymentRuntimeName ; private final byte [ ] deploymentHash ; private final ServerDeploymentStartStopHandler startStopHandler ; public ServerModelDeploymentAddUpdate ( final String deploymentUniqueName , final String deploymentRuntimeName , final byte [ ] deploymentHash , boolean deploy ) { } @ Override public ServerModelDeploymentRemoveUpdate getCompensatingUpdate ( ServerModel original ) { } @ Override public void applyUpdate ( ServerModel serverModel ) throws UpdateFailedException { } @ Override public < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super ServerDeploymentActionResult , P > resultHandler , P param ) { if ( ( startStopHandler ) != null ) { <START_BUG> startStopHandler . deploy ( deploymentUniqueName , deploymentRuntimeName , deploymentHash , updateContext , resultHandler , param ) ; <END_BUG> } } }

Fix:
startStopHandler . deploy ( deploymentUniqueName , deploymentRuntimeName , deploymentHash , updateContext . getBatchBuilder ( ) , updateContext . getServiceContainer ( ) , resultHandler , param ) ;
Buggy code:
public class Form extends Node implements CanContainConditionals { private static final List < Class < ? extends Node > > parentsAllowed = new ArrayList < Class < ? extends Node > > ( Arrays . asList ( Questionnaire . class ) ) ; private String identifier ; private IfStatement ifStatement ; private List < ElseIfStatement > elseIfStatements = new ArrayList < > ( ) ; private ElseStatement elseStatement ; public Form ( int lineNumber , String id ) { } @ Override public void printDebug ( int i ) { } @ Override public Optional < ? extends Pane > visualize ( Pane parent ) { } public Optional < String > getIdentifier ( ) { } @ Override public void typeCheck ( ) throws TypeCheckingException { } @ Override public void addReference ( ReferenceMap referenceMap ) throws TypeCheckingException { if ( getIdentifier ( ) . isPresent ( ) ) { <START_BUG> if ( referenceMap . containsKey ( getIdentifier ( ) . get ( ) ) ) { <END_BUG> throw new TypeCheckingException . AlreadyDefinedTypeCheckingException ( this , getIdentifier ( ) . get ( ) ) ; } else { referenceMap . put ( getIdentifier ( ) . get ( ) , this ) ; } } else { throw new TypeCheckingException . NoIdentifierDefinedTypeCheckingException ( getLineNumber ( ) ) ; } } @ Override public Optional < IfStatement > getIfsStatement ( ) { } public void setIfStatement ( IfStatement ifStatement ) { } @ Override public Optional < List < ElseIfStatement > > getElseIfStatement ( ) { } @ Override public void setElseIfStatement ( ElseIfStatement eifs ) { } @ Override public Optional < ElseStatement > getElseStatement ( ) { } @ Override public void setElseStatement ( ElseStatement es ) { } }

Fix:
if ( ( referenceMap . get ( getIdentifier ( ) . get ( ) ) ) != null ) {
Buggy code:
public class Subtraction { private String yesOrNo ; private Scanner userInput = new Scanner ( System . in ) ; Decide userDecision = new Decide ( ) ; public void decide ( ) { } private void one ( ) { } private void two ( ) { } private void three ( ) { } private int recursiveLoop ( int firstInt , int secondInt , int answer ) { } private void repeat ( ) { System . out . println ( "Do<seq2seq4repair_space>you<seq2seq4repair_space>want<seq2seq4repair_space>to<seq2seq4repair_space>keep<seq2seq4repair_space>going?" ) ; System . out . println ( "Yes<seq2seq4repair_space>to<seq2seq4repair_space>continue.<seq2seq4repair_space>No<seq2seq4repair_space>to<seq2seq4repair_space>quit.\n" ) ; System . out . println ( "Type<seq2seq4repair_space>\'menu\'<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>menu<seq2seq4repair_space>\nor<seq2seq4repair_space>\'home\'<seq2seq4repair_space>to<seq2seq4repair_space>go<seq2seq4repair_space>back<seq2seq4repair_space>and<seq2seq4repair_space>choose<seq2seq4repair_space>a<seq2seq4repair_space>different<seq2seq4repair_space>problem" ) ; yesOrNo = userInput . nextLine ( ) ; if ( yesOrNo . equalsIgnoreCase ( "yes" ) ) <START_BUG> one ( ) ; <END_BUG> if ( yesOrNo . equalsIgnoreCase ( "no" ) ) return ; if ( yesOrNo . equalsIgnoreCase ( "menu" ) ) decide ( ) ; if ( yesOrNo . equalsIgnoreCase ( "home" ) ) userDecision . startUp ( ) ; } No newline ; at end ; of file ; }

Fix:
decide ( ) ;
Buggy code:
public class PlayerAndFloorCollisionHandler implements ICollisionHandler { public PlayerAndFloorCollisionHandler ( ) { } @ Override public int getCollider1Type ( ) { } @ Override public int getCollider2Type ( ) { } @ Override public void performCollision ( ICollidableObject collidable1 , ICollidableObject collidable2 ) { if ( ! ( collidable1 . isCollidingWith ( collidable2 ) ) ) return ; Player player = null ; ICollidableObject object = null ; if ( collidable1 instanceof Player ) { player = ( ( Player ) ( collidable1 ) ) ; object = collidable2 ; } else { player = ( ( Player ) ( collidable2 ) ) ; object = collidable1 ; } Vector2f direction = player . getDirection ( ) . copy ( ) ; do { Vector2f pos = player . getPosition ( ) ; player . setPosition ( new Vector2f ( ( ( pos . x ) + ( direction . x ) ) , ( ( pos . y ) - ( direction . y ) ) ) ) ; } while ( player . isCollidingWith ( object ) ) ; <START_BUG> player . setSpeed ( 0 ) ; <END_BUG> } }

Fix:
player . setVelocity ( new Vector2f ( player . getVelocity ( ) . x , 0.0F ) ) ;
Buggy code:
public class HandlerDisable implements OperationStepHandler { static final HandlerDisable INSTANCE = new HandlerDisable ( ) ; public void execute ( OperationContext context , ModelNode operation ) { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; if ( ( context . getType ( ) ) == ( Type . SERVER ) ) { context . addStep ( new OperationStepHandler ( ) { public void execute ( final OperationContext context , ModelNode operation ) { <START_BUG> final ServiceRegistry serviceRegistry = context . getServiceRegistry ( false ) ; <END_BUG> final ServiceController < ? > controller = serviceRegistry . getService ( LogServices . handlerName ( name ) ) ; if ( controller != null ) { controller . addListener ( new org . jboss . msc . service . AbstractServiceListener < Object > ( ) { public void listenerAdded ( ServiceController < ? > serviceController ) { serviceController . setMode ( NEVER ) ; } public void serviceStopped ( ServiceController < ? > serviceController ) { context . completeStep ( ) ; } } ) ; } else { context . completeStep ( ) ; } } } , RUNTIME ) ; } context . completeStep ( ) ; } }

Fix:
final ServiceRegistry serviceRegistry = context . getServiceRegistry ( true ) ;
Buggy code:
public class CmpEntityBeanRemoveInterceptorFactory implements InterceptorFactory { private final Logger log = Logger . getLogger ( EntityBeanAssociatingInterceptorFactory . class ) ; private final Method ejbRemove ; public CmpEntityBeanRemoveInterceptorFactory ( final Method ejbRemove ) { } public Interceptor create ( final InterceptorFactoryContext context ) { return new AbstractEJBInterceptor ( ) { public Object processInvocation ( final InterceptorContext context ) throws Exception { final CmpEntityBeanComponent component = getComponent ( context , CmpEntityBeanComponent . class ) ; final Object primaryKey = context . getPrivateData ( PRIMARY_KEY_CONTEXT_KEY ) ; if ( primaryKey == null ) { throw new NoSuchEJBException ( "Invocation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>associated<seq2seq4repair_space>with<seq2seq4repair_space>an<seq2seq4repair_space>instance,<seq2seq4repair_space>primary<seq2seq4repair_space>key<seq2seq4repair_space>was<seq2seq4repair_space>null,<seq2seq4repair_space>instance<seq2seq4repair_space>may<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>removed" ) ; } <START_BUG> final CmpEntityBeanComponentInstance instance = ( ( CmpEntityBeanComponentInstance ) ( component . getCache ( ) . get ( primaryKey ) ) ) ; <END_BUG> Method oldMethod = context . getMethod ( ) ; try { context . putPrivateData ( ComponentInstance . class , instance ) ; context . setMethod ( ejbRemove ) ; context . setTarget ( instance . getInstance ( ) ) ; instance . getInterceptor ( ejbRemove ) . processInvocation ( context ) ; } finally { context . setMethod ( oldMethod ) ; context . setTarget ( null ) ; context . putPrivateData ( ComponentInstance . class , null ) ; } component . getStoreManager ( ) . removeEntity ( instance . getEjbContext ( ) ) ; instance . setRemoved ( true ) ; instance . removeAllTimers ( ) ; return null ; } } ; } }

Fix:
final CmpEntityBeanComponentInstance instance = ( ( CmpEntityBeanComponentInstance ) ( context . getPrivateData ( ComponentInstance . class ) ) ) ;
Buggy code:
public abstract class AbstractProperty implements JMeterProperty { protected static final Logger log = LoggingManager . getLoggerForClass ( ) ; private String name ; private boolean runningVersion = false ; public AbstractProperty ( String name ) { } public AbstractProperty ( ) { } protected boolean isEqualType ( JMeterProperty prop ) { } public boolean isRunningVersion ( ) { } public String getName ( ) { } public void setName ( String name ) { } public void setRunningVersion ( boolean runningVersion ) { } protected PropertyIterator getIterator ( Collection values ) { } public Object clone ( ) { } public int getIntValue ( ) { } public long getLongValue ( ) { } public double getDoubleValue ( ) { } public float getFloatValue ( ) { } public boolean getBooleanValue ( ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } public int compareTo ( Object arg0 ) { } protected Class getPropertyType ( ) { } protected JMeterProperty getBlankProperty ( ) { } protected Collection normalizeList ( Collection coll ) { } protected Map normalizeMap ( Map coll ) { } protected JMeterProperty convertObject ( Object item ) { } public String toString ( ) { <START_BUG> return getStringValue ( ) ; <END_BUG> } public void mergeIn ( JMeterProperty prop ) { } }

Fix:
return ( ( name ) + "=" ) + ( getStringValue ( ) ) ;
Buggy code:
public abstract class AbstractMetadataAssemblerTests extends AbstractJmxAssemblerTests { protected static final String QUEUE_SIZE_METRIC = "QueueSize" ; protected static final String CACHE_ENTRIES_METRIC = "CacheEntries" ; @ Test public void testDescription ( ) throws Exception { } @ Test public void testAttributeDescriptionOnSetter ( ) throws Exception { } @ Test public void testAttributeDescriptionOnGetter ( ) throws Exception { } @ Test public void testReadOnlyAttribute ( ) throws Exception { } @ Test public void testReadWriteAttribute ( ) throws Exception { } @ Test public void testWithOnlySetter ( ) throws Exception { } @ Test public void testWithOnlyGetter ( ) throws Exception { } @ Test public void testManagedResourceDescriptor ( ) throws Exception { } @ Test public void testAttributeDescriptor ( ) throws Exception { } @ Test public void testOperationDescriptor ( ) throws Exception { } @ Test public void testOperationParameterMetadata ( ) throws Exception { } @ Test public void testWithCglibProxy ( ) throws Exception { IJmxTestBean tb = createJmxTestBean ( ) ; ProxyFactory pf = new ProxyFactory ( ) ; pf . setTarget ( tb ) ; pf . addAdvice ( new NopInterceptor ( ) ) ; Object proxy = pf . getProxy ( ) ; MetadataMBeanInfoAssembler assembler = ( ( MetadataMBeanInfoAssembler ) ( getAssembler ( ) ) ) ; MBeanExporter exporter = new MBeanExporter ( ) ; exporter . setBeanFactory ( getContext ( ) ) ; exporter . setAssembler ( assembler ) ; String objectName = "spring:bean=test,proxy=true" ; Map < String , Object > beans = new HashMap < String , Object > ( ) ; beans . put ( objectName , proxy ) ; exporter . setBeans ( beans ) ; <START_BUG> exporter . afterPropertiesSet ( ) ; <END_BUG> MBeanInfo inf = getServer ( ) . getMBeanInfo ( ObjectNameManager . getInstance ( objectName ) ) ; assertEquals ( "Incorrect<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>operations" , getExpectedOperationCount ( ) , inf . getOperations ( ) . length ) ; assertEquals ( "Incorrect<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>attributes" , getExpectedAttributeCount ( ) , inf . getAttributes ( ) . length ) ; assertTrue ( "Not<seq2seq4repair_space>included<seq2seq4repair_space>in<seq2seq4repair_space>autodetection" , assembler . includeBean ( proxy . getClass ( ) , "some<seq2seq4repair_space>bean<seq2seq4repair_space>name" ) ) ; } @ Test public void testMetricDescription ( ) throws Exception { } @ Test public void testMetricDescriptor ( ) throws Exception { } @ Test public void testMetricDescriptorDefaults ( ) throws Exception { } @ Override protected abstract String getObjectName ( ) { } @ Override protected int getExpectedAttributeCount ( ) { } @ Override protected int getExpectedOperationCount ( ) { } protected IJmxTestBean createJmxTestBean ( ) { } @ Override protected MBeanInfoAssembler getAssembler ( ) { } protected abstract JmxAttributeSource getAttributeSource ( ) { } }

Fix:
start ( exporter ) ;
Buggy code:
@ Test ( groups = "integration" ) public class PullImageCmdImplTest extends AbstractDockerClientTest { private static final Exec NOP_EXEC = new PullImageCmd . Exec ( ) { @ Override public InputStream exec ( PullImageCmd command ) { } } ; @ BeforeTest public void beforeTest ( ) throws DockerException { } @ AfterTest public void afterTest ( ) { } @ BeforeMethod public void beforeMethod ( Method method ) { } @ AfterMethod public void afterMethod ( ITestResult result ) { } @ Test public void nullAuthConfig ( ) throws Exception { <START_BUG> PullImageCmdImpl pullImageCmd = new PullImageCmdImpl ( PullImageCmdImplTest . NOP_EXEC , "" ) ; <END_BUG> try { pullImageCmd . withAuthConfig ( null ) ; fail ( ) ; } catch ( Exception e ) { assertEquals ( e . getMessage ( ) , "authConfig<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>specified" ) ; } } @ Test public void testPullImage ( ) throws DockerException , IOException { } @ Test public void testPullNonExistingImage ( ) throws DockerException , IOException { } }

Fix:
PullImageCmdImpl pullImageCmd = new PullImageCmdImpl ( PullImageCmdImplTest . NOP_EXEC , null , "" ) ;
Buggy code:
public class Controller { private static final String PATH = "" ; private View view ; private Engine engine ; public Controller ( View view , Engine engine ) { } public void play ( ) { } private void startGame ( ) { } private void playTurn ( Player player ) { <START_BUG> if ( engine . isPlayerInParking ( player ) ) <END_BUG> movePlayer ( player ) ; else engine . exitPlayerFromParking ( player ) ; } private void movePlayer ( Player player ) { } private void createPlayers ( ) { } }

Fix:
if ( ! ( engine . isPlayerInParking ( player ) ) )
Buggy code:
public abstract class AbstractProgramArgsManager { private final Class < ? > m_programClass ; protected final String [ ] m_args ; public AbstractProgramArgsManager ( Class < ? > programClass , String [ ] args ) { } protected void checkProgramArgsKey ( ProgramArgsKey key ) { <START_BUG> if ( key . isForProgramClass ( m_programClass ) ) { <END_BUG> throw new IllegalArgumentException ( ( "Key<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>suitable<seq2seq4repair_space>for<seq2seq4repair_space>" + ( m_programClass . getName ( ) ) ) ) ; } if ( ( key . getIndex ( ) ) >= ( m_args . length ) ) { throw new IllegalArgumentException ( ( "Index<seq2seq4repair_space>is<seq2seq4repair_space>out<seq2seq4repair_space>of<seq2seq4repair_space>range:<seq2seq4repair_space>" + ( key . getIndex ( ) ) ) ) ; } } }

Fix:
if ( ! ( key . isForProgramClass ( m_programClass ) ) ) {
Buggy code:
public class AndRule extends AbstractRule { private final Rule firstRule ; private final Rule secondRule ; private AndRule ( Rule firstRule , Rule secondRule ) { } public static Rule getRule ( Stack stack ) { if ( ( stack . size ( ) ) < 2 ) { <START_BUG> throw new IllegalArgumentException ( ( "Invalid<seq2seq4repair_space>AND<seq2seq4repair_space>rule<seq2seq4repair_space>-<seq2seq4repair_space>expected<seq2seq4repair_space>two<seq2seq4repair_space>rules<seq2seq4repair_space>but<seq2seq4repair_space>provided<seq2seq4repair_space>" + ( stack . size ( ) ) ) ) ; <END_BUG> } Object o2 = stack . pop ( ) ; Object o1 = stack . pop ( ) ; if ( ( o2 instanceof Rule ) && ( o1 instanceof Rule ) ) { Rule p2 = ( ( Rule ) ( o2 ) ) ; Rule p1 = ( ( Rule ) ( o1 ) ) ; return new AndRule ( p1 , p2 ) ; } else { throw new IllegalArgumentException ( ( ( ( "Invalid<seq2seq4repair_space>AND<seq2seq4repair_space>rule:<seq2seq4repair_space>" + o2 ) + "..." ) + o1 ) ) ; } } public static Rule getRule ( Rule firstParam , Rule secondParam ) { } public boolean evaluate ( LoggingEvent event ) { } }

Fix:
throw new IllegalArgumentException ( ( "Invalid<seq2seq4repair_space>AND<seq2seq4repair_space>rule<seq2seq4repair_space>-<seq2seq4repair_space>expected<seq2seq4repair_space>two<seq2seq4repair_space>rules<seq2seq4repair_space>but<seq2seq4repair_space>received<seq2seq4repair_space>" + ( stack . size ( ) ) ) ) ;
Buggy code:
public class Level { private ImageIcon levelImage ; private ImageIcon backgroundImage ; private BufferedImage levelBuffered ; private byte [ ] levelImageData ; private static Level level ; public static void setInstance ( LevelData levelData ) { } public static Level getInstance ( ) { } public void drawCircle ( int x , int y , int radius ) { } public boolean isGroundAt ( int x , int y ) { <START_BUG> if ( ( ( ( x < 0 ) || ( y < 0 ) ) || ( x > ( Main . GAME_WIDTH ) ) ) || ( y > ( Main . GAME_HEIGHT ) ) ) <END_BUG> return false ; return ( levelImageData [ ( ( ( Main . GAME_WIDTH ) * y ) + x ) ] ) != ( - 1 ) ; } public byte [ ] getLevelData ( ) { } public Image getBackgroundImage ( ) { } public Image getLevelImage ( ) { } private Level ( ) { } }

Fix:
if ( ( ( ( x < 0 ) || ( y < 0 ) ) || ( x >= ( Main . GAME_WIDTH ) ) ) || ( y >= ( Main . GAME_HEIGHT ) ) )
Buggy code:
public final class CombinatoricsUtils { static final long [ ] FACTORIALS = new long [ ] { 1L , 1L , 2L , 6L , 24L , 120L , 720L , 5040L , 40320L , 362880L , 3628800L , 39916800L , 479001600L , 6227020800L , 87178291200L , 1307674368000L , 20922789888000L , 355687428096000L , 6402373705728000L , 121645100408832000L , 2432902008176640000L } ; static final AtomicReference < long [ ] [ ] > STIRLING_S2 = new AtomicReference < long [ ] [ ] > ( null ) ; private CombinatoricsUtils ( ) { } public static long binomialCoefficient ( final int n , final int k ) throws MathArithmeticException , NotPositiveException , NumberIsTooLargeException { } public static double binomialCoefficientDouble ( final int n , final int k ) throws MathArithmeticException , NotPositiveException , NumberIsTooLargeException { } public static double binomialCoefficientLog ( final int n , final int k ) throws MathArithmeticException , NotPositiveException , NumberIsTooLargeException { } public static long factorial ( final int n ) throws MathArithmeticException , NotPositiveException { } public static double factorialDouble ( final int n ) throws NotPositiveException { } public static double factorialLog ( final int n ) throws NotPositiveException { } public static long stirlingS2 ( final int n , final int k ) throws MathArithmeticException , NotPositiveException , NumberIsTooLargeException { } public static Iterator < int [ ] > combinationsIterator ( int n , int k ) { <START_BUG> return new Combinations ( n , k , Combinations . IterationOrder . LEXICOGRAPHIC ) . iterator ( ) ; <END_BUG> } public static void checkBinomial ( final int n , final int k ) throws NotPositiveException , NumberIsTooLargeException { } }

Fix:
return new Combinations ( n , k ) . iterator ( ) ;
Buggy code:
public abstract class AbstractKVCommand extends AbstractCommand { public static final Pattern CSTRING_PATTERN = Pattern . compile ( "\"([\\x20\\x21\\x23-\\x5b\\x5d-\\x7e]|\\\\([\\\\bftrn\"]|x[\\p{XDigit}]{2}))*\"" ) ; public static final Pattern HEXBYTES_PATTERN = Pattern . compile ( "([\\p{XDigit}]{2}){1,}" ) ; protected AbstractKVCommand ( String spec ) { } @ Override protected Parser < ? > getParser ( String typeName ) { } public static String toCString ( byte [ ] data ) { Preconditions . checkArgument ( ( data != null ) , "null<seq2seq4repair_space>data" ) ; StringBuilder buf = new StringBuilder ( ( ( data . length ) + 4 ) ) ; buf . append ( '"' ) ; for ( int i = 0 ; i < ( data . length ) ; i ++ ) { final int ch = ( data [ i ] ) & 255 ; switch ( ch ) { case '\\' : case '"' : buf . append ( '\\' ) . append ( ( ( char ) ( ch ) ) ) ; continue ; case '\b' : buf . append ( '\\' ) . append ( 'b' ) ; continue ; case '\f' : buf . append ( '\\' ) . append ( 'f' ) ; continue ; case '\t' : buf . append ( '\\' ) . append ( 't' ) ; continue ; case '\n' : buf . append ( '\\' ) . append ( 'n' ) ; continue ; case '\r' : buf . append ( '\\' ) . append ( 'r' ) ; continue ; default : break ; } if ( ( ch >= 32 ) && ( ch <= 126 ) ) { <START_BUG> buf . append ( ch ) ; <END_BUG> continue ; } buf . append ( '\\' ) ; buf . append ( 'x' ) ; buf . append ( Character . forDigit ( ( ch > > 4 ) , 16 ) ) ; buf . append ( Character . forDigit ( ( ch & 15 ) , 16 ) ) ; } buf . append ( '"' ) ; return buf . toString ( ) ; } public static byte [ ] fromCString ( String string ) { } private class BytesParser implements Parser < byte [ ] > { @ Override public byte [ ] parse ( ParseSession session , ParseContext ctx , boolean complete ) { } } }

Fix:
buf . append ( ( ( char ) ( ch ) ) ) ;