nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CameraPreview extends SurfaceView implements SurfaceHolder . Callback { private static final String TAG = SurfaceView . class . getSimpleName ( ) ; private SurfaceHolder mHolder ; private Camera mCamera ; private Context mContext ; public List < Camera . Size > mSupportedPreviewSizes ; private Size mPreviewSize ; private Parameters mParameters ; private int mRotate ; private int displayOrientation = 90 ; public CameraPreview ( Context context , Camera camera ) { } @ Override public void surfaceCreated ( SurfaceHolder surfaceHolder ) { } @ Override public void surfaceChanged ( SurfaceHolder surfaceHolder , int format , int w , int h ) { Log . d ( CameraPreview . TAG , "surfaceChanged" ) ; if ( ( mHolder . getSurface ( ) ) == null ) { return ; } try { mCamera . stopPreview ( ) ; } catch ( Exception e ) { } try { try { Camera . Parameters params = mCamera . getParameters ( ) ; if ( ( params . getSupportedPreviewSizes ( ) ) != null ) { List < Camera . Size > sizePictures = params . getSupportedPictureSizes ( ) ; for ( Camera . Size s : sizePictures ) { Log . d ( CameraPreview . TAG , ( ( ( s . width ) + "x" ) + ( s . height ) ) ) ; } int positionOfSize = 4 ; if ( ( sizePictures . size ( ) ) > positionOfSize ) { params . setPictureSize ( sizePictures . get ( positionOfSize ) . width , sizePictures . get ( positionOfSize ) . height ) ; } } mRotate = getRotationDegrees ( ) ; params . setFlashMode ( FLASH_MODE_AUTO ) ; params . setSceneMode ( SCENE_MODE_AUTO ) ; params . setWhiteBalance ( WHITE_BALANCE_AUTO ) ; <START_BUG> params . setFocusMode ( FOCUS_MODE_CONTINUOUS_PICTURE ) ; <END_BUG> params . setJpegQuality ( 100 ) ; params . setPreviewSize ( mPreviewSize . width , mPreviewSize . height ) ; params . setRotation ( mRotate ) ; mCamera . setParameters ( params ) ; mCamera . setDisplayOrientation ( displayOrientation ) ; mCamera . setPreviewDisplay ( mHolder ) ; mCamera . startPreview ( ) ; } catch ( IOException e ) { Log . d ( CameraPreview . TAG , ( "Error<seq2seq4repair_space>setting<seq2seq4repair_space>camera<seq2seq4repair_space>preview:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } } catch ( Exception e ) { Log . d ( CameraPreview . TAG , ( "Error<seq2seq4repair_space>starting<seq2seq4repair_space>camera<seq2seq4repair_space>preview:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ; } } @ Override public void surfaceDestroyed ( SurfaceHolder holder ) { } @ Override protected void onMeasure ( int widthMeasureSpec , int heightMeasureSpec ) { } public Size getOptimalPreviewSize ( List < Camera . Size > sizes , int w , int h ) { } public int getRotationDegrees ( ) { } }

Fix:
params . setFocusMode ( FOCUS_MODE_AUTO ) ;
Buggy code:
public class TarArchiveInputStream extends ArchiveInputStream { private static final int SMALL_BUFFER_SIZE = 256 ; private static final int BUFFER_SIZE = 8 * 1024 ; private boolean hasHitEOF ; private long entrySize ; private long entryOffset ; private byte [ ] readBuf ; protected final TarBuffer buffer ; private TarArchiveEntry currEntry ; public TarArchiveInputStream ( InputStream is ) { } public TarArchiveInputStream ( InputStream is , int blockSize ) { } public TarArchiveInputStream ( InputStream is , int blockSize , int recordSize ) { } @ Override public void close ( ) throws IOException { } public int getRecordSize ( ) { } @ Override public int available ( ) throws IOException { } @ Override public long skip ( long numToSkip ) throws IOException { } @ Override public synchronized void reset ( ) { } public TarArchiveEntry getNextTarEntry ( ) throws IOException { } private byte [ ] getRecord ( ) throws IOException { } private void paxHeaders ( ) throws IOException { } Map < String , String > parsePaxHeaders ( Reader br ) throws IOException { } private void applyPaxHeadersToCurrentEntry ( Map < String , String > headers ) { for ( Map . Entry < String , String > ent : headers . entrySet ( ) ) { String key = ent . getKey ( ) ; String val = ent . getValue ( ) ; if ( "path" . equals ( key ) ) { currEntry . setName ( val ) ; } else if ( "linkpath" . equals ( key ) ) { currEntry . setLinkName ( val ) ; } else if ( "gid" . equals ( key ) ) { currEntry . setGroupId ( Integer . parseInt ( val ) ) ; } else if ( "gname" . equals ( key ) ) { currEntry . setGroupName ( val ) ; } else if ( "uid" . equals ( key ) ) { currEntry . setUserId ( Integer . parseInt ( val ) ) ; } else if ( "uname" . equals ( key ) ) { currEntry . setUserName ( val ) ; } else if ( "size" . equals ( key ) ) { <START_BUG> currEntry . adjustSize ( Long . parseLong ( val ) ) ; <END_BUG> } } } private void readGNUSparse ( ) throws IOException { } @ Override public ArchiveEntry getNextEntry ( ) throws IOException { } @ Override public int read ( byte [ ] buf , int offset , int numToRead ) throws IOException { } @ Override public boolean canReadEntryData ( ArchiveEntry ae ) { } protected final TarArchiveEntry getCurrentEntry ( ) { } protected final void setCurrentEntry ( TarArchiveEntry e ) { } protected final boolean isAtEOF ( ) { } protected final void setAtEOF ( boolean b ) { } public static boolean matches ( byte [ ] signature , int length ) { } }

Fix:
currEntry . setSize ( Long . parseLong ( val ) ) ;
Buggy code:
public class CollectionDAO { private static final MongoClient client = MongoDBClientSingleton . getInstance ( ) . getClient ( ) ; private static final Logger logger = LoggerFactory . getLogger ( CollectionDAO . class ) ; private static final BasicDBObject PROPS_QUERY = new BasicDBObject ( "_id" , "_properties" ) ; private static final BasicDBObject DOCUMENTS_QUERY = new BasicDBObject ( "_id" , new BasicDBObject ( "$ne" , "_properties" ) ) ; private static final BasicDBObject fieldsToReturn ; private static final BasicDBObject fieldsToReturnIndexes ; public static boolean doesCollectionExist ( String dbName , String collName ) { } public static DBCollection getCollection ( String dbName , String collName ) { } public static boolean isCollectionEmpty ( DBCollection coll ) { } public static long getCollectionSize ( DBCollection coll , Deque < String > filters ) { <START_BUG> final BasicDBObject query = CollectionDAO . DOCUMENTS_QUERY ; <END_BUG> if ( filters != null ) { try { filters . stream ( ) . forEach ( ( f ) -> { query . putAll ( ( ( BSONObject ) ( JSON . parse ( f ) ) ) ) ; } ) ; } catch ( JSONParseException jpe ) { CollectionDAO . logger . warn ( "******<seq2seq4repair_space>error<seq2seq4repair_space>parsing<seq2seq4repair_space>filter<seq2seq4repair_space>expression<seq2seq4repair_space>{}" , filters , jpe ) ; } } return coll . count ( query ) ; } public static ArrayList < DBObject > getCollectionData ( DBCollection coll , int page , int pagesize , Deque < String > sortBy , Deque < String > filters ) throws JSONParseException { } public static DBObject getCollectionProps ( String dbName , String collName ) { } public static int upsertCollection ( String dbName , String collName , DBObject content , ObjectId etag , boolean updating , boolean patching ) { } public static int deleteCollection ( String dbName , String collName , ObjectId etag ) { } private static ArrayList < DBObject > getDataFromCursor ( DBCursor cursor ) { } private static void initDefaultIndexes ( DBCollection coll ) { } private static void replaceObjectIds ( BSONObject source ) { } }

Fix:
final BasicDBObject query = new BasicDBObject ( CollectionDAO . DOCUMENTS_QUERY ) ;
Buggy code:
public class Cluster { private Map < String , SupervisorDetails > supervisors ; private Map < String , SchedulerAssignmentImpl > assignments ; private Map < String , List < String > > hostToId ; public Cluster ( Map < String , SupervisorDetails > supervisors , Map < String , SchedulerAssignmentImpl > assignments ) { } public List < TopologyDetails > needsSchedulingTopologies ( Topologies topologies ) { } public boolean needsScheduling ( TopologyDetails topology ) { <START_BUG> int desiredNumWorkers = ( ( Number ) ( topology . getConf ( ) . get ( TOPOLOGY_WORKERS ) ) ) . intValue ( ) ; <END_BUG> int assignedNumWorkers = this . getAssignedNumWorkers ( topology ) ; if ( desiredNumWorkers > assignedNumWorkers ) { return true ; } return ( this . getUnassignedExecutors ( topology ) . size ( ) ) > 0 ; } public Map < ExecutorDetails , String > getNeedsSchedulingExecutorToComponents ( TopologyDetails topology ) { } public Map < String , List < ExecutorDetails > > getNeedsSchedulingComponentToExecutors ( TopologyDetails topology ) { } public List < Integer > getUsedPorts ( SupervisorDetails supervisor ) { } public List < Integer > getAvailablePorts ( SupervisorDetails supervisor ) { } public List < WorkerSlot > getAvailableSlots ( SupervisorDetails supervisor ) { } public List < ExecutorDetails > getUnassignedExecutors ( TopologyDetails topology ) { } public int getAssignedNumWorkers ( TopologyDetails topology ) { } public void assign ( WorkerSlot slot , String topologyId , Collection < ExecutorDetails > executors ) { } public List < WorkerSlot > getAvailableSlots ( ) { } public void freeSlot ( WorkerSlot slot ) { } public void freeSlots ( Collection < WorkerSlot > slots ) { } public boolean isSlotOccupied ( WorkerSlot slot ) { } public SchedulerAssignment getAssignmentById ( String topologyId ) { } public SupervisorDetails getSupervisorById ( String nodeId ) { } public List < SupervisorDetails > getSupervisorsByHost ( String host ) { } public Map < String , SchedulerAssignment > getAssignments ( ) { } public Map < String , SupervisorDetails > getSupervisors ( ) { } private boolean isExecutorAssigned ( ExecutorDetails executor ) { } }

Fix:
int desiredNumWorkers = topology . getNumWorkers ( ) ;
Buggy code:
public class Main { public static final int MAJOR_VERSION = 1 ; public static final int MINOR_VERSION = 1 ; public static void usage ( ) { } public static void main ( String [ ] args ) throws IOException { String filepath = null ; boolean expr_opt = false ; boolean stmt_opt = false ; boolean print_code_translate = false ; boolean print_func_translate = false ; for ( int i = 0 ; i < ( args . length ) ; i ++ ) { switch ( args [ i ] ) { case "-pc" : print_code_translate = true ; break ; case "-pf" : print_func_translate = true ; break ; case "-eo" : expr_opt = true ; break ; case "-so" : stmt_opt = true ; break ; case "-h" : case "--help" : Main . usage ( ) ; return ; case "-v" : System . out . println ( ( ( ( ( "Version:<seq2seq4repair_space>xxxscript<seq2seq4repair_space>" + ( Main . MAJOR_VERSION ) ) + "." ) + ( Main . MINOR_VERSION ) ) + "\n" ) ) ; return ; default : <START_BUG> if ( ( args [ i ] . charAt ( i ) ) == '-' ) { <END_BUG> System . err . println ( ( ( "Unknown<seq2seq4repair_space>option<seq2seq4repair_space>`" + ( args [ i ] ) ) + "'<seq2seq4repair_space>found." ) ) ; return ; } if ( filepath != null ) { System . err . println ( "Multiple<seq2seq4repair_space>file-names<seq2seq4repair_space>found." ) ; return ; } filepath = args [ i ] ; break ; } } Lexer lex = new Lexer ( ) ; if ( filepath == null ) { System . err . println ( "Source<seq2seq4repair_space>file<seq2seq4repair_space>name<seq2seq4repair_space>wanted." ) ; return ; } try { lex . open ( filepath ) ; } catch ( Exception e ) { System . err . println ( ( ( "File<seq2seq4repair_space>`" + filepath ) + "'<seq2seq4repair_space>open<seq2seq4repair_space>failed<seq2seq4repair_space>." ) ) ; return ; } Parser parser = new Parser ( lex , expr_opt , stmt_opt ) ; if ( print_func_translate ) parser . enablePrintFuncTranslate ( ) ; Stmt s ; try { s = parser . program ( ) ; } catch ( RuntimeException e ) { System . err . println ( "Compile<seq2seq4repair_space>Error:" ) ; System . err . println ( e . getMessage ( ) ) ; return ; } catch ( IOException e ) { System . err . println ( "Compile<seq2seq4repair_space>Error(IO):" ) ; System . err . println ( e . getMessage ( ) ) ; return ; } try { if ( print_code_translate ) { System . out . print ( s . toString ( ) ) ; return ; } else if ( ! print_func_translate ) { s . run ( ) ; } else { return ; } } catch ( RuntimeException e ) { e . printStackTrace ( ) ; System . err . println ( "Runtime<seq2seq4repair_space>Error:" ) ; System . err . println ( e . getMessage ( ) ) ; return ; } System . exit ( 0 ) ; } No newline ; at end ; of file ; }

Fix:
if ( ( args [ i ] . charAt ( 0 ) ) == '-' ) {
Buggy code:
@ WebServlet ( "//start" ) public class StartBatchServlet extends AbstractBatchServlet { protected static final int DEFAULT_TIMEOUT = 60000 ; protected static final String TIMEOUT_PARAM = "timeout" ; public static final String WAIT_FOR_COMPLETION = "wait" ; @ EJB private BatchExecutionService service ; @ Override protected void doGet ( final HttpServletRequest req , final HttpServletResponse resp ) throws IOException , ServletException { final String jobXml = req . getParameter ( JOB_XML_PARAMETER ) ; final String timeoutString = req . getParameter ( StartBatchServlet . TIMEOUT_PARAM ) ; final String wait = req . getParameter ( StartBatchServlet . WAIT_FOR_COMPLETION ) ; if ( jobXml == null ) { throw new IllegalStateException ( String . format ( "%s<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>required<seq2seq4repair_space>parameter" , JOB_XML_PARAMETER ) ) ; } final Properties params = parseParams ( req , Arrays . asList ( StartBatchServlet . TIMEOUT_PARAM , StartBatchServlet . WAIT_FOR_COMPLETION ) ) ; final JobExecution jobExecution = service . start ( jobXml , params ) ; long timeout = TimeoutUtil . adjust ( ( timeoutString == null ? StartBatchServlet . DEFAULT_TIMEOUT : Integer . parseInt ( timeoutString ) ) ) ; long sleep = 100L ; final boolean waitForCompletion = ( wait == null ) || ( Boolean . parseBoolean ( wait ) ) ; boolean b = waitForCompletion ; while ( b ) { switch ( jobExecution . getBatchStatus ( ) ) { case STARTED : case STARTING : case STOPPING : try { TimeUnit . MILLISECONDS . sleep ( sleep ) ; } catch ( InterruptedException e ) { throw new RuntimeException ( e ) ; } timeout -= sleep ; sleep = Math . max ( ( sleep // 2 ) , 100L ) ; break ; default : b = false ; break ; } if ( timeout <= 0 ) { <START_BUG> throw new IllegalStateException ( String . format ( "Batch<seq2seq4repair_space>job<seq2seq4repair_space>'%s'<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>complete<seq2seq4repair_space>withing<seq2seq4repair_space>allotted<seq2seq4repair_space>time." , jobXml ) ) ; <END_BUG> } } if ( waitForCompletion ) write ( resp , jobExecution ) ; } }

Fix:
throw new IllegalStateException ( String . format ( "Batch<seq2seq4repair_space>job<seq2seq4repair_space>'%s'<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>complete<seq2seq4repair_space>within<seq2seq4repair_space>allotted<seq2seq4repair_space>time." , jobXml ) ) ;
Buggy code:
public class Main { public static void main ( String [ ] args ) throws UnirestException { HttpResponse < String > response = Unirest . get ( "http:////www.fontanka.ru//cgi-bin//search.scgi" ) . queryString ( "stpos" , "0" ) . queryString ( "o" , "R" ) . queryString ( "s" , "1" ) . queryString ( "query" , "%CF%F0%E5%E7%E8%E4%E5%ED%F2" ) . asString ( ) ; <START_BUG> System . out . println ( response . getHeaders ( ) ) ; <END_BUG> } No newline ; at end ; of file ; }

Fix:
System . out . println ( response . getBody ( ) ) ;
Buggy code:
public class ecoDrop { private Material item ; private byte data ; private int maxAmount ; private int minAmount ; private Double percentage ; private Boolean isFixedDrops ; private Set < ecoDrop . ecoEnchantment > enchantments ; private Random random = new Random ( ) ; public ecoDrop ( ) { } class ecoEnchantment { private Enchantment enchantment ; private int level ; public Enchantment getEnchantment ( ) { } public void setEnchantment ( Enchantment enchantment ) { } public int getLevel ( ) { } public void setLevel ( int level ) { } } public Material getItem ( ) { } public void setItem ( Material item ) { } public int getData ( ) { } public void setData ( byte data ) { } public int getMaxAmount ( ) { } public void setMaxAmount ( int maxAmount ) { } public int getMinAmount ( ) { } public void setMinAmount ( int minAmount ) { } public Double getPercentage ( ) { } public void setPercentage ( Double percentage ) { } public Boolean getIsFixedDrops ( ) { } public void setIsFixedDrops ( Boolean isFixedDrops ) { } public void addEnchantment ( Enchantment enchantment , int level ) { } public ItemStack computeItemStack ( ) { <START_BUG> if ( ( Math . round ( ( ( Math . random ( ) ) * 100.0 ) ) ) < ( percentage ) ) { <END_BUG> int dropAmount = ( isFixedDrops ) ? maxAmount : ( minAmount ) + ( random . nextInt ( Math . abs ( ( ( ( maxAmount ) - ( minAmount ) ) + 1 ) ) ) ) ; if ( dropAmount > 0 ) { ItemStack itemStack ; if ( ( data ) == 0 ) { itemStack = new ItemStack ( item , dropAmount ) ; } else { MaterialData materialData = new MaterialData ( item , data ) ; itemStack = materialData . toItemStack ( dropAmount ) ; } for ( ecoDrop . ecoEnchantment e : enchantments ) { itemStack . addEnchantment ( e . getEnchantment ( ) , e . getLevel ( ) ) ; } if ( ( itemStack . getAmount ( ) ) > 0 ) { return itemStack ; } } } return null ; } @ Override public String toString ( ) { } }

Fix:
if ( ( ( Math . random ( ) ) * 100.0 ) < ( percentage ) ) {
Buggy code:
public class PageMain extends Widget { ModelBiped model ; GuiDeveloper dev ; public PageMain ( GuiDeveloper gd ) { } @ Override public void onAdded ( ) { } @ Override public void draw ( double mx , double my , boolean mouseHovering ) { } private void drawUserInfo ( ) { GuiDeveloper . drawText ( "CP." , 148 , 153 , 6 ) ; GuiDeveloper . drawText ( "PRG." , 148 , 167.5 , 6 ) ; AbilityData data = AbilityDataMain . getData ( dev . user ) ; ResourceLocation logo = null ; if ( data . hasAbility ( ) ) { Category cat = data . getCategory ( ) ; logo = cat . getLogo ( ) ; GuiDeveloper . drawText ( cat . getDisplayName ( ) , 167.5 , 130 , 7.5 ) ; GuiDeveloper . drawText ( data . getLevel ( ) . getDisplayName ( ) , 167.5 , 140 , 5.5 ) ; RenderUtils . loadTexture ( TEX_GUI_AD_MAIN ) ; GL11 . glColor4f ( 1 , 1 , 1 , 1 ) ; double prog = ( data . getCurrentCP ( ) ) // ( data . getMaxCP ( ) ) ; HudUtils . drawRect ( 163 , 155.0F , 3 , 372 , ( prog * 58.5 ) , 5.5 , ( prog * 117 ) , 11 ) ; Level curLv = data . getLevel ( ) ; if ( ( data . getLevelID ( ) ) < ( ( data . getLevelCount ( ) ) - 1 ) ) { <START_BUG> prog = ( ( data . getCurrentCP ( ) ) - ( curLv . getInitialCP ( ) ) ) // ( ( curLv . getMaxCP ( ) ) - ( curLv . getInitialCP ( ) ) ) ; <END_BUG> } else { prog = 1.0 ; } HudUtils . drawRect ( 163 , 168.5F , 3 , 387 , ( prog * 58.5 ) , 5.5 , ( prog * 117 ) , 11 ) ; } else { logo = ACClientProps . TEX_QUESTION_MARK ; GuiDeveloper . drawText ( ACLangs . notLearned ( ) , 167.5 , 130 , 7 ) ; } RenderUtils . loadTexture ( logo ) ; HudUtils . drawRect ( 148.5 , 130.5 , 15.5 , 15.5 ) ; } private void drawPlayer ( ) { } No newline ; at end ; of file ; }

Fix:
prog = ( ( data . getMaxCP ( ) ) - ( curLv . getInitialCP ( ) ) ) // ( ( curLv . getMaxCP ( ) ) - ( curLv . getInitialCP ( ) ) ) ;
Buggy code:
public class Player extends Person { private double money ; public Player ( double money , String name ) { } public boolean checkForBlackJack ( Hand h ) { Value v1 = h . cards . get ( 0 ) . value ; Value v2 = h . cards . get ( 1 ) . value ; if ( ( ( ( v1 . compareTo ( Ace ) ) == 0 ) || ( ( v2 . compareTo ( Ace ) ) == 0 ) ) && ( ( ( ( ( ( ( ( ( v1 . compareTo ( Ten ) ) == 0 ) || ( ( v1 . compareTo ( Jack ) ) == 0 ) ) || ( ( v1 . compareTo ( Queen ) ) == 0 ) ) || ( ( v1 . compareTo ( King ) ) == 0 ) ) || ( ( v2 . compareTo ( Ten ) ) == 0 ) ) || ( ( v2 . compareTo ( Jack ) ) == 0 ) ) || ( ( v2 . compareTo ( Queen ) ) == 0 ) ) || ( ( v2 . compareTo ( King ) ) == 0 ) ) ) { <START_BUG> System . out . println ( ( ( ( ( "Player<seq2seq4repair_space>got<seq2seq4repair_space>BlackJack<seq2seq4repair_space>with<seq2seq4repair_space>cards:<seq2seq4repair_space>" + ( h . cards . get ( 0 ) . value . toString ( ) ) ) + "<seq2seq4repair_space>and<seq2seq4repair_space>" ) + ( h . cards . get ( 0 ) . value . toString ( ) ) ) + "!" ) ) ; <END_BUG> return true ; } return false ; } }

Fix:
System . out . println ( ( ( ( ( "Player<seq2seq4repair_space>got<seq2seq4repair_space>BlackJack<seq2seq4repair_space>with<seq2seq4repair_space>cards:<seq2seq4repair_space>" + ( h . cards . get ( 0 ) . value . toString ( ) ) ) + "<seq2seq4repair_space>and<seq2seq4repair_space>" ) + ( h . cards . get ( 1 ) . value . toString ( ) ) ) + "!" ) ) ;
Buggy code:
public class TeleportQueue { private List < TeleportQueue . TeleportEntry > queue = new ArrayList < TeleportQueue . TeleportEntry > ( ) ; public TeleportQueue ( ) { } public class TeleportEntry { private String player ; private int dim ; private int x ; private int y ; private int z ; public TeleportEntry ( String player , int dim , int x , int y , int z ) { } public String getPlayer ( ) { } public int getDim ( ) { } public int getX ( ) { } public int getY ( ) { } public int getZ ( ) { } } public boolean addToQueue ( String player , int dim , int x , int y , int z ) { <START_BUG> return this . queue . add ( new TeleportQueue . TeleportEntry ( player , dim , x , y , z ) ) ; <END_BUG> } public boolean process ( String player ) { } public void remove ( String player ) { } public boolean isQueued ( String player ) { } public List < String > getQueue ( ) { } }

Fix:
return this . queue . add ( new TeleportQueue . TeleportEntry ( player . toLowerCase ( ) , dim , x , y , z ) ) ;
Buggy code:
public class GamePlayFragment extends Fragment implements GameBoardView . OnUndoToastCreate , GameControl . GameStateListener { private static int VERSUS_TYPE ; private static int MATCH_TYPE ; private static int AI_DIFFICULTY ; private GameBoardView gameBoardView ; private int layoutHeight ; private RelativeLayout relativeLayout ; private TextView scoreTextView ; private GamePlayFragment . OnGamePlayInteractionListener mListener ; private TextView screenTextView ; private TextView subtitleTextView ; private LinearLayout holderLayout ; private int winId ; private Button undoButton ; private LinearLayout screenLayout ; private TextView titleTextView ; private LinearLayout [ ] userLayouts ; private int height ; private int width ; public GamePlayFragment ( ) { } public static GamePlayFragment newInstance ( String param1 , String param2 ) { } public static int getVERSUS_TYPE ( ) { } public static int getMATCH_TYPE ( ) { } public static int getAiDifficulty ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } private void setupUserBar ( int player ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onDetach ( ) { } @ Override public void p1Win ( Point winPoint ) { } @ Override public void p2Win ( Point winPoint ) { } @ Override public void deadlock ( Point winPoint ) { } @ Override public void gameLimitReached ( int player ) { Log . d ( "INTERFACE" , "gameLimitReached<seq2seq4repair_space>called" ) ; <START_BUG> if ( player == ( GameControl . PLAYER_ONE ) ) <END_BUG> screenTextView . setText ( "P1<seq2seq4repair_space>>=<seq2seq4repair_space>MATCH_LENGTH" ) ; else screenTextView . setText ( "P2<seq2seq4repair_space>>=<seq2seq4repair_space>MATCH_LENGTH" ) ; subtitleTextView . setText ( "Tap<seq2seq4repair_space>to<seq2seq4repair_space>return<seq2seq4repair_space>to<seq2seq4repair_space>Main<seq2seq4repair_space>Menu" ) ; screenLayout . addView ( holderLayout ) ; screenLayout . setOnClickListener ( null ) ; screenLayout . setOnClickListener ( new View . OnClickListener ( ) { public void onClick ( View view ) { mListener . done ( ) ; } } ) ; relativeLayout . addView ( screenLayout ) ; final Animation in = new AlphaAnimation ( 0.0F , 1.0F ) ; in . setDuration ( 100 ) ; screenTextView . setAnimation ( in ) ; } @ Override public void onUndoToastCreate ( ) { } public interface OnGamePlayInteractionListener { public void done ( ) { } } }

Fix:
if ( player == ( GameControl . PLAYER_TWO ) )
Buggy code:
public class CompareDatesTest extends BaseDateTests { @ Autowired private CompareDates action ; private Map < String , String > parameters ; @ Before public void init ( ) throws IOException { } @ Test public void testAdapt ( ) throws Exception { } @ Test public void testCategory ( ) throws Exception { } @ Test public void should_accept_column ( ) { } @ Test public void should_not_accept_column ( ) { } @ Test public void simple_greater_result_with_constant ( ) throws Exception { } @ Test public void simple_equals_result_with_constant ( ) throws Exception { } @ Test public void simple_not_greater_result_with_constant ( ) throws Exception { } @ Test public void simple_greater_result_with_column ( ) throws Exception { } @ Test public void simple_equals_result_with_column ( ) throws Exception { } @ Test public void simple_not_greater_result_with_column ( ) throws Exception { } @ Test public void simple_greater_result_with_constant_with_invalid_dates_row ( ) throws Exception { final Map < String , String > firstRowvalues = new HashMap < > ( ) ; firstRowvalues . put ( "0000" , "02//01//2012" ) ; RowMetadata rowMetadata = new RowMetadata ( ) ; rowMetadata . addColumn ( createMetadata ( "0000" , "last<seq2seq4repair_space>update" , DATE , "statistics_MM_dd_yyyy.json" ) ) ; parameters . put ( CONSTANT_VALUE , "02//21//2008" ) ; parameters . put ( MODE_PARAMETER , CONSTANT_MODE ) ; parameters . put ( COMPARE_MODE , GT ) ; final Map < String , String > secondRowvalues = new HashMap < > ( ) ; secondRowvalues . put ( "0000" , "Beer" ) ; final Map < String , String > thirdRowvalues = new HashMap < > ( ) ; thirdRowvalues . put ( "0000" , "02//01//2001" ) ; List < DataSetRow > rows = Arrays . asList ( new DataSetRow ( rowMetadata , firstRowvalues ) , new DataSetRow ( rowMetadata , secondRowvalues ) , new DataSetRow ( rowMetadata , thirdRowvalues ) ) ; ActionTestWorkbench . test ( rows , action . create ( parameters ) . getRowAction ( ) ) ; Assertions . assertThat ( rows . get ( 0 ) . values ( ) ) . hasSize ( 2 ) . containsExactly ( MapEntry . entry ( "0000" , "02//01//2012" ) , MapEntry . entry ( "0001" , "true" ) ) ; <START_BUG> Assertions . assertThat ( rows . get ( 1 ) . values ( ) ) . hasSize ( 2 ) . containsExactly ( MapEntry . entry ( "0000" , "Beer" ) , MapEntry . entry ( "0001" , "false" ) ) ; <END_BUG> Assertions . assertThat ( rows . get ( 2 ) . values ( ) ) . hasSize ( 2 ) . containsExactly ( MapEntry . entry ( "0000" , "02//01//2001" ) , MapEntry . entry ( "0001" , "false" ) ) ; } }

Fix:
Assertions . assertThat ( rows . get ( 1 ) . values ( ) ) . hasSize ( 2 ) . containsExactly ( MapEntry . entry ( "0000" , "Beer" ) , MapEntry . entry ( "0001" , "N//A" ) ) ;
Buggy code:
public class ManagementUtil { static boolean isSecurityRealmReloadRequired ( final OperationContext context , final ModelNode operation ) { } static boolean isSecurityRealmReloadRequired ( final OperationContext context , final ServiceController < ? > controller ) { } static ServiceController < ? > getSecurityRealmService ( final OperationContext context , final ModelNode operation , final boolean forUpdate ) { } static String getSecurityRealmName ( final ModelNode operation ) { String realmName = null ; PathAddress pa = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; <START_BUG> for ( int i = ( pa . size ( ) ) - 1 ; i > 0 ; i ++ ) { <END_BUG> PathElement pe = pa . getElement ( i ) ; if ( SECURITY_REALM . equals ( pe . getKey ( ) ) ) { realmName = pe . getValue ( ) ; break ; } } assert realmName != null : "operation<seq2seq4repair_space>did<seq2seq4repair_space>not<seq2seq4repair_space>have<seq2seq4repair_space>an<seq2seq4repair_space>address<seq2seq4repair_space>that<seq2seq4repair_space>included<seq2seq4repair_space>a<seq2seq4repair_space>" + ( SECURITY_REALM ) ; return realmName ; } static void updateUserDomainCallbackHandler ( final OperationContext context , final ModelNode operation , final boolean forRollback ) { } private static PathAddress getXmlAuthenticationAddress ( ModelNode operation ) { } private static UserDomainCallbackHandler getUserDomainCallbackHandler ( final OperationContext context , final ModelNode operation ) { } private ManagementUtil ( ) { } }

Fix:
for ( int i = ( pa . size ( ) ) - 1 ; i > 0 ; i -- ) {
Buggy code:
public class CriteriaExpressionBuilder { public QueryExpressions getQueryExpressions ( ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalAccessPaths ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalOrdering ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalGrouping ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalDistinct ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalFilter ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected void evalProjections ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } private void getProjections ( QueryExpressions exps , List < Selection < ? > > selections , List < Value > projections , List < String > aliases , ExpressionFactory factory , CriteriaQueryImpl < ? > q , MetamodelImpl model ) { for ( Selection < ? > s : selections ) { if ( s instanceof NewInstanceSelection < ? > ) { exps . resultClass = s . getJavaType ( ) ; <START_BUG> getProjections ( exps , ( ( NewInstanceSelection ) ( s ) ) . getConstructorArguments ( ) , projections , aliases , factory , q , model ) ; <END_BUG> } else { projections . add ( ( ( ExpressionImpl < ? > ) ( s ) ) . toValue ( factory , model , q ) ) ; aliases . add ( q . getAlias ( s ) ) ; } } } protected boolean isDefaultProjection ( List < Selection < ? > > selections , CriteriaQueryImpl < ? > q ) { } protected void evalFetchJoin ( QueryExpressions exps , ExpressionFactory factory , CriteriaQueryImpl < ? > q ) { } protected static Expression and ( ExpressionFactory factory , org . apache . openjpa . kernel . exps . Expression e1 , org . apache . openjpa . kernel . exps . Expression e2 ) { } }

Fix:
getProjections ( exps , ( ( NewInstanceSelection < ? > ) ( s ) ) . getSelectionItems ( ) , projections , aliases , factory , q , model ) ;
Buggy code:
public class SizeBasedTriggeringPolicy implements TriggeringPolicy { long maxFileSize = ( 10 * 1024 ) * 1024 ; public boolean isTriggeringEvent ( File file ) { System . out . print ( ( "Size:<seq2seq4repair_space>" + ( file . length ( ) ) ) ) ; <START_BUG> return ( file . length ( ) ) > ( maxFileSize ) ; <END_BUG> } public long getMaxFileSize ( ) { } public void setMaxFileSize ( long l ) { } public void activateOptions ( ) { } }

Fix:
return ( file . length ( ) ) >= ( maxFileSize ) ;
Buggy code:
public class MethodData extends ItemData { Method method ; public MethodData ( Method method , String str ) { } public static String [ ] getAllFlags ( ) { <START_BUG> return new String [ ] { "no_gen" , "address" , "const" , "dynamic" , "cpp" , "new" , "delete" } ; <END_BUG> } public Method getMethod ( ) { } public String getAccessor ( ) { } public String getExclude ( ) { } public void setAccessor ( String str ) { } public void setExclude ( String str ) { } }

Fix:
return new String [ ] { "no_gen" , "address" , "const" , "dynamic" , "jni" , "cpp" , "new" , "delete" } ;
Buggy code:
public class ItemAttribute extends Entity { private String value ; private AttributeName attributeName ; private Item parentItem ; public ItemAttribute ( Connection pConn , int pintNodeObject_attribute_id , boolean pblnIsLoadRecursive ) { } public ItemAttribute ( Item parent , AttributeName attributeName , String value ) { } public int getItem_id ( ) { } public int getAttributeNameID ( ) { } public AttributeName getAttributeName ( ) { } public String getValue ( ) { } public Item getParentItem ( ) { } @ Override public void load ( Connection pConn , int pintEntityID , boolean pblnIsLoadRecursive ) { <START_BUG> try ( PreparedStatement statement = pConn . prepareStatement ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>Item_Attribute<seq2seq4repair_space>WHERE<seq2seq4repair_space>attribute_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) { <END_BUG> statement . setInt ( 1 , pintEntityID ) ; statement . execute ( ) ; ResultSet newResult = statement . getResultSet ( ) ; if ( newResult . first ( ) ) { this . value = newResult . getString ( "attribute_value" ) ; if ( pblnIsLoadRecursive ) { loadReferences ( pConn , newResult . getInt ( "item_id" ) , newResult . getInt ( "attribute_name_fk" ) ) ; } } } catch ( SQLException e ) { Logger . error ( ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occured<seq2seq4repair_space>while<seq2seq4repair_space>loading<seq2seq4repair_space>an<seq2seq4repair_space>ItemAttribute<seq2seq4repair_space>with<seq2seq4repair_space>id=" + pintEntityID ) , e ) ; } } protected void loadReferences ( Connection pConn , int pintItem_id , int pintAttributeName_id ) { } @ Override public int saveReferences ( Connection pConn ) { } @ Override protected int update ( Connection pConn ) { } @ Override protected int insert ( Connection conn ) { } @ Override protected int delete ( Connection pConn ) { } @ Override public String toString ( ) { } }

Fix:
try ( PreparedStatement statement = pConn . prepareStatement ( "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>item_attribute<seq2seq4repair_space>WHERE<seq2seq4repair_space>attribute_id<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) {
Buggy code:
public class WordCountDriver { public int run ( String [ ] args ) throws Exception { Job job = Job . getInstance ( ConfigurationFactory . getConfigurationOfPseudoDistributed ( ) ) ; job . setJarByClass ( WordCountDriver . class ) ; job . setMapperClass ( WordCountDriver . WordCountMapper . class ) ; job . setReducerClass ( WordCountDriver . WordCountReducer . class ) ; job . setCombinerClass ( WordCountDriver . WordCountCombiner . class ) ; job . setMapOutputKeyClass ( Text . class ) ; job . setMapOutputValueClass ( LongWritable . class ) ; job . setOutputKeyClass ( Text . class ) ; job . setOutputValueClass ( LongWritable . class ) ; FileInputFormat . setInputPaths ( job , new Path ( args [ 0 ] ) ) ; FileOutputFormat . setOutputPath ( job , new Path ( args [ 1 ] ) ) ; <START_BUG> return job . waitForCompletion ( true ) ? 1 : 0 ; <END_BUG> } public static void main ( String [ ] args ) throws Exception { } public static class WordCountMapper extends Mapper < LongWritable , Text , Text , LongWritable > { @ Override protected void map ( LongWritable key , Text value , Context context ) throws IOException , InterruptedException { } } public static class WordCountCombiner extends Reducer < Text , LongWritable , Text , LongWritable > { @ Override protected void reduce ( Text key , Iterable < LongWritable > values , Context context ) throws IOException , InterruptedException { } } public static class WordCountReducer extends Reducer < Text , LongWritable , Text , LongWritable > { @ Override protected void reduce ( Text key , Iterable < LongWritable > values , Context context ) throws IOException , InterruptedException { } } No newline ; at end ; of file ; }

Fix:
return job . waitForCompletion ( true ) ? 0 : 1 ;
Buggy code:
public class Pile { private ArrayList < Card > p ; public Pile ( ) { } public void add ( Card c ) { } public ArrayList < Card > seeThree ( ) { if ( ( p . size ( ) ) <= 3 ) { return p ; } else { ArrayList < Card > cArr = new ArrayList < Card > ( ) ; <START_BUG> cArr . addAll ( p . subList ( ( ( p . size ( ) ) - 4 ) , ( ( p . size ( ) ) - 1 ) ) ) ; <END_BUG> return cArr ; } } public void clear ( ) { } public ArrayList < Card > pickup ( ) { } public Card checkTop ( ) { } public boolean fourKind ( ) { } public boolean validMove ( Card c ) { } boolean isEmpty ( ) { } public String toString ( ) { } }

Fix:
cArr . addAll ( p . subList ( ( ( p . size ( ) ) - 3 ) , p . size ( ) ) ) ;
Buggy code:
public class StatelessChecker implements IComponentOnBeforeRenderListener { private static boolean mustCheck ( final Component component ) { } public void onBeforeRender ( final Component component ) { if ( StatelessChecker . mustCheck ( component ) ) { final IVisitor < Component > visitor = new Component . IVisitor < Component > ( ) { public Object component ( final Component comp ) { if ( ( component instanceof Page ) && ( StatelessChecker . mustCheck ( comp ) ) ) { return IVisitor . CONTINUE_TRAVERSAL_BUT_DONT_GO_DEEPER ; } else if ( ! ( comp . isStateless ( ) ) ) { return comp ; } else { return IVisitor . CONTINUE_TRAVERSAL ; } } } ; final String msg = ( "'" + component ) + "'<seq2seq4repair_space>claims<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>stateless<seq2seq4repair_space>but<seq2seq4repair_space>isn't." ; if ( ! ( component . isStateless ( ) ) ) { throw new IllegalArgumentException ( ( msg + "<seq2seq4repair_space>Possible<seq2seq4repair_space>reasons:<seq2seq4repair_space>no<seq2seq4repair_space>stateless<seq2seq4repair_space>hint,<seq2seq4repair_space>statefull<seq2seq4repair_space>behaviors" ) ) ; } if ( component instanceof MarkupContainer ) { final Object o = ( ( MarkupContainer ) ( component ) ) . visitChildren ( visitor ) ; <START_BUG> if ( o == null ) { <END_BUG> throw new IllegalArgumentException ( ( ( msg + "<seq2seq4repair_space>Offending<seq2seq4repair_space>component:<seq2seq4repair_space>" ) + o ) ) ; } } if ( component instanceof Page ) { final Page p = ( ( Page ) ( component ) ) ; if ( ! ( p . isBookmarkable ( ) ) ) { throw new IllegalArgumentException ( ( msg + "<seq2seq4repair_space>Only<seq2seq4repair_space>bookmarkable<seq2seq4repair_space>pages<seq2seq4repair_space>can<seq2seq4repair_space>be<seq2seq4repair_space>stateless" ) ) ; } if ( ! ( p . isPageStateless ( ) ) ) { throw new IllegalArgumentException ( ( msg + "<seq2seq4repair_space>for<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ) ) ; } } } } }

Fix:
if ( o != null ) {
Buggy code:
public interface SolrSearchFullText { <START_BUG> public void createBookIndex ( Book book ) ; <END_BUG> public void createBookIndex ( List < Book > bookList ) { } public SearchResult queryBookIndex ( String keyword , Integer start , Integer rows ) { } }

Fix:
public void createBookIndex ( Book Book ) ;
Buggy code:
public class Target extends BuildElement { private List dependencies = new ArrayList ( ) ; private List tasks = new ArrayList ( ) ; private String name ; public Target ( Location location , String name ) { } public String getName ( ) { } <START_BUG> public void addTask ( Task task ) { <END_BUG> tasks . add ( task ) ; } public void addDependency ( String dependency ) { } public Iterator getDependencies ( ) { } public Iterator getTasks ( ) { } }

Fix:
public void addTask ( TaskElement task ) {
Buggy code:
public class EggTypeClassLoader extends ClassLoader { private static final Map < String , Class < ? extends EggType < ? > > > classes = new HashMap < String , Class < ? extends EggType < ? > > > ( ) ; private static final Map < String , Class < ? extends EggType < ? > > > classesSimpleName = new HashMap < String , Class < ? extends EggType < ? > > > ( ) ; private static final Pattern regex = Pattern . compile ( "\\w.+Egg" ) ; @ SuppressWarnings ( "unchecked" ) public static synchronized void addPackage ( Plugin plugin , String packageName ) { PermissionLinker linker = PermissionLinker . getPermissionLinker ( plugin . getDescription ( ) . getName ( ) ) ; PermParent parent = new PermParent ( "admincmd.egg.*" ) ; linker . addPermParent ( parent ) ; linker . setMajorPerm ( new PermParent ( "admincmd.*" ) ) ; for ( Class < ? > clazz : EggTypeClassLoader . getClassesInPackage ( packageName , plugin . getClass ( ) . getClassLoader ( ) ) ) if ( EggType . class . isAssignableFrom ( clazz ) ) { if ( clazz . isAnnotationPresent ( EggPermission . class ) ) { EggPermission annotation = clazz . getAnnotation ( EggPermission . class ) ; if ( ! ( annotation . permission ( ) . isEmpty ( ) ) ) parent . addChild ( annotation . permission ( ) ) ; } else { String simpleName = clazz . getSimpleName ( ) ; <START_BUG> parent . addChild ( ( "admincmd.egg." + ( simpleName . substring ( 0 , ( ( simpleName . length ( ) ) - 4 ) ) . toLowerCase ( ) ) ) ) ; <END_BUG> } EggTypeClassLoader . classes . put ( clazz . getName ( ) , ( ( Class < ? extends EggType < ? > > ) ( clazz ) ) ) ; EggTypeClassLoader . classesSimpleName . put ( clazz . getSimpleName ( ) , ( ( Class < ? extends EggType < ? > > ) ( clazz ) ) ) ; } linker . registerAllPermParent ( ) ; } public static SortedSet < String > getClassSimpleNameList ( ) { } private Class < ? extends EggType < ? > > matchClassName ( String search ) throws ClassNotFoundException { } @ Override protected Class < ? extends EggType < ? > > findClass ( String name ) throws ClassNotFoundException { } private static List < Class < ? > > getClassesInPackage ( String packageName , ClassLoader classLoader ) { } private static SortedSet < String > findClasses ( String path , String packageName ) throws Exception { } }

Fix:
parent . addChild ( ( "admincmd.egg." + ( simpleName . substring ( 0 , ( ( simpleName . length ( ) ) - 3 ) ) . toLowerCase ( ) ) ) ) ;
Buggy code:
public class RegistrationController { public static Result registration ( ) { } public static Result register ( ) { Form < RegistrationData > form = Form . form ( RegistrationData . class ) . bindFromRequest ( ) ; if ( form . hasErrors ( ) ) { return Controller . badRequest ( registration . render ( form ) ) ; } else { String hash = BCrypt . hashpw ( form . get ( ) . password1 , BCrypt . gensalt ( ) ) ; User c = new User ( ) ; c . setEmail ( form . get ( ) . email . toLowerCase ( ) ) ; c . setFirstName ( form . get ( ) . firstname ) ; c . setLastName ( form . get ( ) . lastname ) ; c . setPasswordHashedSalted ( hash ) ; c . save ( ) ; ConsumerService . logIn ( c . getEmail ( ) ) ; <START_BUG> return Controller . redirect ( Application . index ( ) ) ; <END_BUG> } } }

Fix:
return Controller . redirect ( ApplicationController . index ( ) ) ;
Buggy code:
public class NewSarExtension implements NewExtension { public static final String NAMESPACE = "urn:jboss:domain:sar:1.0" ; public static final String SUBSYSTEM_NAME = "sar" ; static final NewSarExtension . SarSubsystemParser parser = new NewSarExtension . SarSubsystemParser ( ) ; public void initialize ( NewExtensionContext context ) { } public void initializeParsers ( ExtensionParsingContext context ) { } static class SarSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < ModelNode > { public void writeContent ( XMLExtendedStreamWriter writer , ModelNode node ) throws XMLStreamException { } public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { ParseUtils . requireNoContent ( reader ) ; final ModelNode subsystem = new ModelNode ( ) ; subsystem . get ( OP ) . set ( ADD ) ; <START_BUG> subsystem . get ( OP_ADDR ) . set ( SUBSYSTEM , NewSarExtension . SUBSYSTEM_NAME ) ; <END_BUG> list . add ( subsystem ) ; } } }

Fix:
subsystem . get ( OP_ADDR ) . add ( SUBSYSTEM , NewSarExtension . SUBSYSTEM_NAME ) ;
Buggy code:
public class TreeController implements TreeWillExpandListener { private TreeView folderTree ; private boolean b = false ; private TreePath treePath ; private FolderInfoPanel messageFolderInfoPanel ; public JScrollPane scrollPane ; private FolderTreeNode oldSelection ; private FolderTreeMouseListener mouseListener ; private FolderTreeNode selectedFolder ; private TreeModel model ; private TreeView view ; private AbstractMailFrameController mailFrameController ; protected TreeMenu menu ; public TreeController ( AbstractMailFrameController mailFrameController , TreeModel model ) { } public TreeModel getModel ( ) { } public TreeView getView ( ) { } public void setSelected ( Folder folder ) { } public void createPopupMenu ( ) { } public JPopupMenu getPopupMenu ( ) { } public FolderTreeNode getSelected ( ) { } public AbstractMailFrameController getMailFrameController ( ) { } public void treeWillExpand ( TreeExpansionEvent e ) throws ExpandVetoException { <START_BUG> log . debug ( ( "treeWillExpand=" + ( e . getPath ( ) . toString ( ) ) ) ) ; <END_BUG> FolderTreeNode treeNode = ( ( FolderTreeNode ) ( e . getPath ( ) . getLastPathComponent ( ) ) ) ; if ( treeNode == null ) { return ; } saveExpandedState ( treeNode , e . getPath ( ) ) ; } public void treeWillCollapse ( TreeExpansionEvent e ) { } private void saveExpandedState ( FolderTreeNode folder , TreePath path ) { } }

Fix:
log . info ( ( "treeWillExpand=" + ( e . getPath ( ) . toString ( ) ) ) ) ;
Buggy code:
public class UrlResourceStream extends AbstractResourceStream implements IFixedLocationResourceStream { private static final long serialVersionUID = 1L ; private static final Logger log = LoggerFactory . getLogger ( UrlResourceStream . class ) ; private transient InputStream inputStream ; private final URL url ; private File file ; private int contentLength ; private String contentType ; private long lastModified ; public UrlResourceStream ( final URL url ) { } public void close ( ) throws IOException { } public String getContentType ( ) { } private void testContentType ( ) { } public InputStream getInputStream ( ) throws ResourceStreamNotFoundException { } public URL getURL ( ) { } public Time lastModifiedTime ( ) { if ( ( file ) != null ) { long lastModified = file . lastModified ( ) ; if ( lastModified != ( this . lastModified ) ) { this . lastModified = lastModified ; contentLength = ( ( int ) ( file . length ( ) ) ) ; } } else { URLConnection urlConnection = null ; boolean close = false ; try { urlConnection = url . openConnection ( ) ; long lastModified = this . lastModified ; if ( urlConnection instanceof JarURLConnection ) { JarURLConnection jarUrlConnection = ( ( JarURLConnection ) ( urlConnection ) ) ; URL jarFileUrl = jarUrlConnection . getJarFileURL ( ) ; URLConnection jarFileConnection = jarFileUrl . openConnection ( ) ; try { lastModified = jarFileConnection . getLastModified ( ) ; } finally { jarFileConnection . getInputStream ( ) . close ( ) ; } } else { close = true ; lastModified = urlConnection . getLastModified ( ) ; } if ( lastModified != ( this . lastModified ) ) { this . lastModified = lastModified ; close = true ; contentLength = urlConnection . getContentLength ( ) ; } } catch ( IOException e ) { <START_BUG> if ( url . toString ( ) . contains ( ".jar!" ) ) { <END_BUG> if ( UrlResourceStream . log . isDebugEnabled ( ) ) { UrlResourceStream . log . debug ( ( ( ( "getLastModified<seq2seq4repair_space>for<seq2seq4repair_space>" + ( url ) ) + "<seq2seq4repair_space>failed:<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; } } else { UrlResourceStream . log . error ( ( ( ( "getLastModified<seq2seq4repair_space>for<seq2seq4repair_space>" + ( url ) ) + "<seq2seq4repair_space>failed:<seq2seq4repair_space>" ) + ( e . getMessage ( ) ) ) ) ; } } finally { if ( urlConnection != null ) { if ( urlConnection instanceof HttpURLConnection ) { ( ( HttpURLConnection ) ( urlConnection ) ) . disconnect ( ) ; } else if ( close ) { try { urlConnection . getInputStream ( ) . close ( ) ; } catch ( Exception ex ) { } } } } } return Time . milliseconds ( lastModified ) ; } public String toString ( ) { } public long length ( ) { } public String locationAsString ( ) { } }

Fix:
if ( ( url . toString ( ) . indexOf ( ".jar!" ) ) >= 0 ) {