nus-yam/ex-repair huggingface dataset:
Buggy code:
class GameMenuView { private final String MENU = "\n" + ( ( ( ( ( ( ( "\n========================================" + "\n|<seq2seq4repair_space>Game<seq2seq4repair_space>Menu<seq2seq4repair_space>|" ) + "\n========================================" ) + "\nM<seq2seq4repair_space>-<seq2seq4repair_space>Go<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>Map" ) + "\nP<seq2seq4repair_space>-<seq2seq4repair_space>View<seq2seq4repair_space>Progress<seq2seq4repair_space>Meter" ) + "\nH<seq2seq4repair_space>-<seq2seq4repair_space>Help<seq2seq4repair_space>Menu" ) + "\nQ<seq2seq4repair_space>-<seq2seq4repair_space>Return<seq2seq4repair_space>to<seq2seq4repair_space>Main<seq2seq4repair_space>Menu" ) + "\n========================================" ) ; public void displayGameMenu ( ) { char selection = '<seq2seq4repair_space>' ; do { System . out . println ( MENU ) ; String input = this . getGameMenuInput ( ) ; selection = input . charAt ( 0 ) ; this . doActionGameMenu ( selection ) ; <START_BUG> } while ( selection != 'E' ) ; <END_BUG> } private String getGameMenuInput ( ) { } public void doActionGameMenu ( char choice ) { } private void displayMapMenu ( ) { } private void viewProgressMeter ( ) { } private void returnToMainMenu ( ) { } private void displayHelpMenu ( ) { } }

Fix:
} while ( selection != 'Q' ) ;
Buggy code:
public interface IComponentAssignedModel extends IModel { <START_BUG> IModelWrapper wrapOnAssignment ( Component component ) ; <END_BUG> }

Fix:
INestedModelContainer wrapOnAssignment ( Component component ) ;
Buggy code:
public class FindNthLargest { public Integer find ( Integer [ ] a , int n ) { Integer [ ] temp = new Integer [ n + 1 ] ; for ( int i = 0 ; i <= n ; i ++ ) { temp [ i ] = a [ i ] ; } int i = n ; <START_BUG> while ( ( a [ i ] ) != null ) { <END_BUG> temp [ n ] = a [ i ] ; int j = n ; for ( j = n ; j > 0 ; j -- ) { if ( ( temp [ j ] ) > ( temp [ ( j - 1 ) ] ) ) { Integer temp1 = temp [ ( j - 1 ) ] ; temp [ ( j - 1 ) ] = temp [ j ] ; temp [ j ] = temp1 ; } } i ++ ; } return temp [ ( n - 1 ) ] ; } public static void main ( String [ ] args ) { } }

Fix:
while ( i < ( a . length ) ) {
Buggy code:
public class ShapePoint extends Shape { public ShapePoint ( Referee ref , GameApplet gApp , float x , float y , ControlScheme cScheme ) { } public ShapePoint ( double x , double y ) { } public Point toPoint ( ) { } public Vector toVector ( ) { } public void translate ( Vector vec ) { } public double toIntervalPoint ( Vector vec ) { } @ Override public String toString ( ) { } public void render ( GameApplet gApp ) { <START_BUG> float renderRadius = 2 ; <END_BUG> gApp . stroke ( 1 , 255 , 1 ) ; gApp . pushMatrix ( ) ; gApp . translate ( this . position . x , this . position . y ) ; gApp . beginShape ( ) ; gApp . ellipse ( 0 , 0 , renderRadius , renderRadius ) ; gApp . popMatrix ( ) ; } @ Override protected Line projectOntoVector ( Vector toProjectOnto ) { } @ Override protected List < Vector > getCollisionAxis ( Shape other ) { } @ Override protected Point getCentroid ( ) { } @ Override public void rotate ( double theta ) { } @ Override public List < Point > getPointsOfCollison ( Shape other , Vector MTV ) { } @ Override protected double getInertia ( ) { } @ Override protected Point getPointOnShapeClosestToPoint ( Point otherPoint ) { } }

Fix:
double renderRadius = 0.1 ;
Buggy code:
public class ServiceTrackerTest extends AbstractServiceTrackerTest { protected String getClientContainerName ( ) { <START_BUG> return Generic . CLIENT_CONTAINER_NAME ; <END_BUG> } protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testServiceTracker ( ) throws Exception { } }

Fix:
return Generic . CONSUMER_CONTAINER_TYPE ;
Buggy code:
public class GossipDigestAck2VerbHandler implements IVerbHandler { private static Logger logger_ = LoggerFactory . getLogger ( GossipDigestAck2VerbHandler . class ) ; public void doVerb ( Message message ) { InetAddress from = message . getFrom ( ) ; if ( GossipDigestAck2VerbHandler . logger_ . isTraceEnabled ( ) ) GossipDigestAck2VerbHandler . logger_ . trace ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>GossipDigestAck2Message<seq2seq4repair_space>from<seq2seq4repair_space>{}" , from ) ; byte [ ] bytes = message . getMessageBody ( ) ; DataInputStream dis = new DataInputStream ( new ByteArrayInputStream ( bytes ) ) ; GossipDigestAck2Message gDigestAck2Message ; try { <START_BUG> gDigestAck2Message = GossipDigestAck2Message . serializer ( ) . deserialize ( dis ) ; <END_BUG> } catch ( IOException e ) { throw new RuntimeException ( e ) ; } Map < InetAddress , EndpointState > remoteEpStateMap = gDigestAck2Message . getEndpointStateMap ( ) ; instance . notifyFailureDetector ( remoteEpStateMap ) ; instance . applyStateLocally ( remoteEpStateMap ) ; } }

Fix:
gDigestAck2Message = GossipDigestAck2Message . serializer ( ) . deserialize ( dis , message . getVersion ( ) ) ;
Buggy code:
public class App { public static void main ( String [ ] args ) throws IOException { ApplicationContext context ; context = new ClassPathXmlApplicationContext ( "spring.xml" ) ; ConvertToEvernote cte = ( ( ConvertToEvernote ) ( context . getBean ( "convertToEvernote" ) ) ) ; YahooWeatherData data = ( ( YahooWeatherData ) ( context . getBean ( "yahooData" ) ) ) ; ImportTumblrPostData importTumblr = ( ( ImportTumblrPostData ) ( context . getBean ( "importTumblrPostData" ) ) ) ; DateUtil date = ( ( DateUtil ) ( context . getBean ( "dateUtil" ) ) ) ; Blog blog = new Blog ( ) ; blog . setAuthor ( "Hao<seq2seq4repair_space>Liu" ) ; blog . setSubject ( ( ( ( ( ( date . getTextDate ( ) ) + "<seq2seq4repair_space>" ) + ( data . getWeather ( ) ) ) + "<seq2seq4repair_space>" ) + ( data . getLocation ( ) ) ) ) ; blog . setContent ( "What<seq2seq4repair_space>a<seq2seq4repair_space>wondful<seq2seq4repair_space>day.<seq2seq4repair_space>美好的一天。" ) ; blog . setCreate ( date . getEvernoteDate ( ) ) ; blog . setUpdate ( date . getEvernoteDate ( ) ) ; blog . setTags ( "@2015<seq2seq4repair_space>Diary" ) ; String tumblrUrl = "http:////liuhao2012.tumblr.com//page//" ; <START_BUG> for ( int i = 1 ; i < 2 ; i ++ ) { <END_BUG> System . out . println ( i ) ; cte . updateEnex ( importTumblr . getXmlDocument ( ( tumblrUrl + ( String . valueOf ( i ) ) ) ) , "TumblrPostExport.enex" ) ; } } }

Fix:
for ( int i = 1 ; i < 76 ; i ++ ) {
Buggy code:
@ Controller @ RequestMapping ( "//bet" ) public class BetController { @ Autowired private BettingService bettingService ; @ Autowired private SecurityBean securityBean ; @ RequestMapping public ModelAndView list ( ) { <START_BUG> List < Bet > allBets = bettingService . findAll ( ) ; <END_BUG> return new ModelAndView ( "bet//list" , "allBets" , allBets ) ; } @ RequestMapping ( "//open" ) public ModelAndView listStillOpen ( RedirectAttributes redirect ) { } @ RequestMapping ( value = "//createOrUpdate//{matchId}" , method = RequestMethod . GET ) public ModelAndView createOrUpdate ( @ PathVariable ( "matchId" ) String matchId ) { } @ RequestMapping ( method = RequestMethod . POST ) public ModelAndView createOrUpdate ( @ Valid BetCommand betCommand , BindingResult result , RedirectAttributes redirect ) { } }

Fix:
List < Bet > allBets = bettingService . findAllByUsername ( securityBean . getCurrentUserName ( ) ) ;
Buggy code:
public class HypothesisController { private ArrayList < BayesianController > childControllers ; public HypothesisController ( HypothesisView view , HypothesisModel model ) { } public void setup ( HypothesisView view , HypothesisModel model ) { HashMap < String , BayesianModel > dataMap = model . getDataMap ( ) ; int offX = ( ( int ) ( view . getX ( ) ) ) ; int offY = ( ( int ) ( view . getY ( ) ) ) ; int maxWidth = ( ( int ) ( view . getWidth ( ) ) ) ; int maxHeight = ( ( int ) ( view . getHeight ( ) ) ) ; Color [ ] c = Utilities . colors ; BayesianModel prh = dataMap . get ( "prh" ) ; BayesianView prhV = new BayesianView ( offX , offY , ( ( int ) ( maxWidth * ( prh . getValue ( ) ) ) ) , maxHeight , c [ 0 ] , ScaleDirection . LEFT_RIGHT ) ; view . add ( prhV ) ; childControllers . add ( new BayesianController ( prhV , prh ) ) ; <START_BUG> BayesianModel prnh = dataMap . get ( "prh" ) ; <END_BUG> BayesianView prnhV = new BayesianView ( ( ( int ) ( offX + ( prhV . getWidth ( ) ) ) ) , offY , ( ( int ) ( maxWidth * ( prnh . getValue ( ) ) ) ) , maxHeight , c [ 1 ] , ScaleDirection . RIGHT_LEFT ) ; view . add ( prnhV ) ; childControllers . add ( new BayesianController ( prnhV , prnh ) ) ; BayesianModel preh = dataMap . get ( "preh" ) ; BayesianView prehV = new BayesianView ( offX , ( ( int ) ( offY + ( maxHeight * ( preh . getValue ( ) ) ) ) ) , ( ( int ) ( prhV . getWidth ( ) ) ) , ( ( int ) ( ( offY + maxHeight ) - ( offY + ( maxHeight * ( preh . getValue ( ) ) ) ) ) ) , c [ 2 ] , ScaleDirection . BOTTOM_TOP ) ; view . add ( prehV ) ; childControllers . add ( new BayesianController ( prehV , preh ) ) ; BayesianModel prneh = dataMap . get ( "prneh" ) ; BayesianView prnehV = new BayesianView ( ( ( int ) ( prehV . getX ( ) ) ) , offY , ( ( int ) ( prhV . getWidth ( ) ) ) , ( ( int ) ( maxHeight * ( prneh . getValue ( ) ) ) ) , c [ 3 ] , ScaleDirection . TOP_BOTTOM ) ; view . add ( prnehV ) ; childControllers . add ( new BayesianController ( prnehV , prneh ) ) ; BayesianModel prenh = dataMap . get ( "prenh" ) ; BayesianView prenhV = new BayesianView ( ( ( int ) ( offX + ( prhV . getWidth ( ) ) ) ) , ( ( int ) ( offY + ( maxHeight * ( prenh . getValue ( ) ) ) ) ) , ( ( int ) ( prnhV . getWidth ( ) ) ) , ( ( int ) ( ( offY + maxHeight ) - ( offY + ( maxHeight * ( prenh . getValue ( ) ) ) ) ) ) , c [ 4 ] , ScaleDirection . BOTTOM_TOP ) ; view . add ( prenhV ) ; childControllers . add ( new BayesianController ( prenhV , prenh ) ) ; BayesianModel prnenh = dataMap . get ( "prnenh" ) ; BayesianView prnenhV = new BayesianView ( ( ( int ) ( prnhV . getX ( ) ) ) , ( ( int ) ( prnhV . getY ( ) ) ) , ( ( int ) ( prnhV . getWidth ( ) ) ) , ( ( int ) ( maxHeight * ( prnenh . getValue ( ) ) ) ) , c [ 5 ] , ScaleDirection . TOP_BOTTOM ) ; view . add ( prnenhV ) ; childControllers . add ( new BayesianController ( prnenhV , prnenh ) ) ; } }

Fix:
BayesianModel prnh = dataMap . get ( "prnh" ) ;
Buggy code:
public class RemoveAddressFromWhiteListAction extends AbstractColumbaAction implements SelectionListener { public RemoveAddressFromWhiteListAction ( FrameMediator frameMediator ) { } public void selectionChanged ( SelectionChangedEvent e ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new RemoveAddressFromWhiteListCommand ( r ) ) ; } }

Fix:
FolderCommandReference r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class CafeMac { public enum State { STATE_RUNNING , STATE_GAMEOVER ; } Protagonist protag ; Antagonist antag ; Antagonist evilTwinAntag ; Array < Food > foodArray = new Array < Food > ( ) ; ArrayList < Vector2 > takenPositions = new ArrayList < Vector2 > ( ) ; TiledMap tiledMap = new TmxMapLoader ( ) . load ( "graphics//cafeMacMap.tmx" ) ; MapLayer objectLayer ; MapObjects collisionObjects ; ArrayList < Shape2D > collisionShapes ; CafeMac . State state = CafeMac . State . STATE_RUNNING ; public Protagonist getProtagonist ( ) { } public Antagonist getAntagonist ( ) { } public Antagonist getEvilTwin ( ) { } public Array < Food > getFoodArray ( ) { } public CafeMac . State getState ( ) { } public TiledMap getTiledMap ( ) { } public ArrayList < Shape2D > getCollisionShapes ( ) { } public ArrayList < Vector2 > getTakenPositions ( ) { } public void setState ( CafeMac . State state ) { } public CafeMac ( ) { } private void createCafeMac ( ) { protag = new Protagonist ( new Vector2 ( 50 , 50 ) ) ; antag = new Antagonist ( new Vector2 ( 1 , 1 ) ) ; <START_BUG> evilTwinAntag = new Antagonist ( new Vector2 ( 1 , 1 ) ) ; <END_BUG> addCollisionShapes ( ) ; for ( int foodIndex = 0 ; foodIndex < 4 ; foodIndex ++ ) { for ( int i = 0 ; i < 3 ; i ++ ) { Vector2 position = getFreePosition ( ) ; Food food = new Food ( position , foodIndex ) ; foodArray . add ( food ) ; } } } public void removeFood ( Vector2 foodPosition ) { } public Food addFood ( ) { } private Vector2 getFreePosition ( ) { } private void addCollisionShapes ( ) { } }

Fix:
evilTwinAntag = new Antagonist ( new Vector2 ( ( - 30 ) , ( - 30 ) ) ) ;
Buggy code:
public class Spinner extends Composite { int hwndText ; int hwndUpDown ; boolean ignoreModify ; int pageIncrement ; static final int EditProc ; static final TCHAR EditClass = new TCHAR ( 0 , "EDIT" , true ) ; static final int UpDownProc ; static final TCHAR UpDownClass = new TCHAR ( 0 , OS . UPDOWN_CLASS , true ) ; public Spinner ( Composite parent , int style ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } boolean checkHandle ( int hwnd ) { <START_BUG> return ( ( hwnd == ( hwndText ) ) || ( hwnd == ( hwndUpDown ) ) ) || ( hwnd == ( handle ) ) ; <END_BUG> } protected void checkSubclass ( ) { } void createHandle ( ) { } public void addModifyListener ( ModifyListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } void addVerifyListener ( VerifyListener listener ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } public void copy ( ) { } public void cut ( ) { } int defaultBackground ( ) { } void deregister ( ) { } boolean hasFocus ( ) { } public int getIncrement ( ) { } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getPageIncrement ( ) { } public int getSelection ( ) { } int getSelectionText ( ) { } int mbcsToWcsPos ( int mbcsPos ) { } public void paste ( ) { } void register ( ) { } void releaseHandle ( ) { } public void removeModifyListener ( ModifyListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } void removeVerifyListener ( VerifyListener listener ) { } boolean sendKeyEvent ( int type , int msg , int wParam , int lParam , Event event ) { } void setBackgroundPixel ( int pixel ) { } void setForegroundPixel ( int pixel ) { } public void setIncrement ( int value ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setPageIncrement ( int value ) { } public void setSelection ( int value ) { } void setSelection ( int value , boolean notify ) { } void subclass ( ) { } void unsubclass ( ) { } String verifyText ( String string , int start , int end , Event keyEvent ) { } int widgetExtStyle ( ) { } int windowProc ( int hwnd , int msg , int wParam , int lParam ) { } LRESULT WM_ERASEBKGND ( int wParam , int lParam ) { } LRESULT WM_KILLFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFOCUS ( int wParam , int lParam ) { } LRESULT WM_SETFONT ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT wmChar ( int hwnd , int wParam , int lParam ) { } LRESULT wmClipboard ( int hwndText , int msg , int wParam , int lParam ) { } LRESULT wmCommandChild ( int wParam , int lParam ) { } LRESULT wmKeyDown ( int hwnd , int wParam , int lParam ) { } LRESULT wmKillFocus ( int hwnd , int wParam , int lParam ) { } LRESULT wmScrollChild ( int wParam , int lParam ) { } }

Fix:
return ( ( hwnd == ( handle ) ) || ( hwnd == ( hwndText ) ) ) || ( hwnd == ( hwndUpDown ) ) ;
Buggy code:
public class EmbeddedIndexSearcher implements IndexSearchable { public static String SolrHomePath ; public static String solrCoreName ; public static final String DEFAULTHOMEPATH = "C:\\SOLRServer\\solr" ; public static final String DEFAULTCORENAME = "collection1" ; private static volatile SolrServer service ; public EmbeddedIndexSearcher ( ) { } private static SolrServer initService ( ) { } public static SolrServer getService ( ) { } public long searchTermSize ( String term ) throws SolrServerException { String queryTerm = ( "\"" + term ) + "\"" ; SolrQuery query = new SolrQuery ( ) ; <START_BUG> query . setQuery ( term ) ; <END_BUG> query . setHighlight ( false ) ; QueryResponse rsp = EmbeddedIndexSearcher . getService ( ) . query ( query ) ; SolrDocumentList docs = rsp . getResults ( ) ; return docs . getNumFound ( ) ; } public long searchMultipleTerm ( String [ ] terms ) throws SolrServerException { } }

Fix:
query . setQuery ( queryTerm ) ;
Buggy code:
public class FTPUtil { private static final ThreadLocal openClients = new ThreadLocal ( ) ; public static IClient createClient ( URL url ) throws FtpException { } public static IClient getClient ( ) { } public static void run ( URL url , IFtpRunnable runnable , IProgressMonitor monitor ) throws FtpException { monitor = Policy . monitorFor ( monitor ) ; IClient openClient = ( ( IClient ) ( FTPUtil . openClients . get ( ) ) ) ; <START_BUG> monitor . beginTask ( null , 100 ) ; <END_BUG> if ( ( openClient != null ) && ( ! ( openClient . getUrl ( ) . equals ( url ) ) ) ) { openClient . close ( new SubProgressMonitor ( monitor , 0 ) ) ; openClient = null ; } if ( openClient == null ) { openClient = FTPUtil . createClient ( url ) ; openClient . open ( new SubProgressMonitor ( monitor , 5 ) ) ; openClient . changeDirectory ( url . getPath ( ) , new SubProgressMonitor ( monitor , 5 ) ) ; FTPUtil . openClients . set ( openClient ) ; } runnable . run ( new SubProgressMonitor ( monitor , 90 ) ) ; } public static IFileInfo entryToFileInfo ( IDirectoryEntry entry ) { } }

Fix:
monitor . beginTask ( "" , 100 ) ;
Buggy code:
public class PluginETag extends Plugin { public PluginETag ( String name , PluginRegistry registry ) { } @ Override public void receive ( EventBus bus , Event event ) { if ( event instanceof EventGenerateResponse ) { EventGenerateResponse egr = ( ( EventGenerateResponse ) ( event ) ) ; ResponsePacket response = egr . getResponse ( ) ; RequestPacket request = egr . getRequest ( ) ; if ( ( ( ( ( ( ( request . parent ) != null ) || ( ( response . statusCode ) != 200 ) ) || ( ( ( request . method ) != ( Method . GET ) ) && ( ( request . method ) != ( Method . HEAD ) ) ) ) || ( ( response . body ) == null ) ) || ( ( response . body . data ) == null ) ) || ( ( response . body . data . length ) == 0 ) ) return ; CRC32 crc = new CRC32 ( ) ; <START_BUG> crc . update ( request . body . data ) ; <END_BUG> String etag = ( crc . getValue ( ) ) + "" ; if ( request . headers . hasHeader ( "If-None-Match" ) ) { if ( request . headers . getHeader ( "If-None-Match" ) . replace ( "\"" , "" ) . equals ( etag ) ) { ResponseGenerator . generateDefaultResponse ( response , NOT_MODIFIED ) ; response . body = null ; } } else { response . headers . addHeader ( "ETag" , ( ( "\"" + etag ) + "\"" ) ) ; } } } @ Override public void register ( EventBus bus ) { } }

Fix:
crc . update ( response . body . data ) ;
Buggy code:
public class ExplicitConstructorCall extends Statement implements InvocationSite { public Expression [ ] arguments ; public Expression qualification ; public MethodBinding binding ; protected MethodBinding codegenBinding ; MethodBinding syntheticAccessor ; public int accessMode ; public TypeReference [ ] typeArguments ; public TypeBinding [ ] genericTypeArguments ; public static final int ImplicitSuper = 1 ; public static final int Super = 2 ; public static final int This = 3 ; public VariableBinding [ ] [ ] implicitArguments ; boolean discardEnclosingInstance ; public ExplicitConstructorCall ( int accessMode ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public TypeBinding [ ] genericTypeArguments ( ) { } public boolean isImplicitSuper ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } void manageEnclosingInstanceAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo ) { if ( ! ( flowInfo . isReachable ( ) ) ) return ; this . codegenBinding = this . binding . original ( ) ; if ( ( binding . isPrivate ( ) ) && ( ( accessMode ) != ( ExplicitConstructorCall . This ) ) ) { if ( currentScope . environment ( ) . options . isPrivateConstructorAccessChangingVisibility ) { this . codegenBinding . tagForClearingPrivateModifier ( ) ; } else { <START_BUG> syntheticAccessor = ( ( SourceTypeBinding ) ( binding . declaringClass ) ) . addSyntheticMethod ( this . codegenBinding , isSuperAccess ( ) ) ; <END_BUG> currentScope . problemReporter ( ) . needToEmulateMethodAccess ( this . codegenBinding , this ) ; } } } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope scope ) { } public void setActualReceiverType ( ReferenceBinding receiverType ) { } public void setDepth ( int depth ) { } public void setFieldIndex ( int depth ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
syntheticAccessor = ( ( SourceTypeBinding ) ( this . codegenBinding . declaringClass ) ) . addSyntheticMethod ( this . codegenBinding , isSuperAccess ( ) ) ;
Buggy code:
boolean ycenterIsh = ( ycd * ycd ) < ( 2 * 2 ) ; if ( ! xcenterIsh ) ur = false ; if ( ! xcenterIsh ) dr = false ; if ( ! ycenterIsh ) lr = false ; if ( ! ycenterIsh ) rr = false ; int lWeight = 0 ; int uWeight = 0 ; int rWeight = 0 ; int dWeight = 0 ; if ( ( noTurnTime ) > 0 ) ( noTurnTime ) -- ; if ( ( ( noTurnTime ) == 0 ) && ( ( ( ! cr ) || ( ( dir ) == 0 ) ) || centerIsh ) ) { noTurnTime = 4 ; if ( ( ( dir ) == 1 ) && lr ) lWeight += 16 ; if ( ( ( dir ) == 2 ) && ur ) uWeight += 16 ; if ( ( ( dir ) == 3 ) && rr ) rWeight += 16 ; if ( ( ( dir ) == 4 ) && dr ) dWeight += 16 ; if ( ( ( ( lWeight + uWeight ) + rWeight ) + dWeight ) == 0 ) { if ( ( ( dir ) == 1 ) || ( ( dir ) == 3 ) ) { if ( ur ) uWeight += 4 ; if ( dr ) dWeight += 4 ; } if ( ( ( dir ) == 2 ) || ( ( dir ) == 4 ) ) { if ( lr ) lWeight += 4 ; if ( rr ) rWeight += 4 ; } } if ( ( ( ( lWeight + uWeight ) + rWeight ) + dWeight ) == 0 ) { if ( lr ) lWeight += 1 ; if ( ur ) uWeight += 1 ; if ( rr ) rWeight += 1 ; if ( dr ) dWeight += 1 ; } if ( ( dir ) == 1 ) rWeight = 0 ; if ( ( dir ) == 2 ) dWeight = 0 ; if ( ( dir ) == 3 ) lWeight = 0 ; if ( ( dir ) == 4 ) uWeight = 0 ; int totalWeight = ( ( lWeight + uWeight ) + rWeight ) + dWeight ; if ( totalWeight == 0 ) { dir = 0 ; } else { int res = synchedRandom . nextInt ( totalWeight ) ; dir = ( ( ( ( dir ) - 1 ) + 2 ) & 3 ) + 1 ; uWeight += lWeight ; rWeight += uWeight ; dWeight += rWeight ; if ( res < lWeight ) dir = 1 ; else if ( res < uWeight ) dir = 2 ; else if ( res < rWeight ) dir = 3 ; else if ( res < dWeight ) dir = 4 ; } } if ( cr ) { double r = 1 ; if ( ( ! ( ( ( dir ) == 1 ) || ( ( dir ) == 3 ) ) ) && ( xcd < ( - r ) ) ) xd += 0.3 ; if ( ( ! ( ( ( dir ) == 1 ) || ( ( dir ) == 3 ) ) ) && ( xcd > ( + r ) ) ) xd -= 0.3 ; if ( ( ! ( ( ( dir ) == 2 ) || ( ( dir ) == 4 ) ) ) && ( ycd < ( - r ) ) ) yd += 0.3 ; if ( ( ! ( ( ( dir ) == 2 ) || ( ( dir ) == 4 ) ) ) && ( ycd > ( + r ) ) ) yd -= 0.3 ; } double speed = 0.7 ; if ( ( dir ) > 0 ) lDir = dir ; if ( ( dir ) == 1 ) xd -= speed ; if ( ( dir ) == 2 ) yd -= speed ; if ( ( dir ) == 3 ) xd += speed ; if ( ( dir ) == 4 ) yd += speed ; Vec2 oldPos = pos . clone ( ) ; move ( xd , yd ) ; if ( ( ( dir ) > 0 ) && ( ( oldPos . distSqr ( pos ) ) < ( 0.1 * 0.1 ) ) ) { if ( hadPaused ) { dir = ( ( ( ( dir ) - 1 ) + 2 ) & 3 ) + 1 ; noTurnTime = 0 ; } else { pauseTime = 10 ; noTurnTime = 0 ; } } if ( ( ! ( carrying ) ) && ( ( swapTime ) == 0 ) ) { if ( ( level . getEntities ( getBB ( ) . grow ( 32 ) , TreasurePile . class ) . size ( ) ) > 0 ) { swapTime = 30 ; carrying = true ; } } if ( ( carrying ) && ( ( swapTime ) == 0 ) ) { <START_BUG> if ( ( pos . y ) < ( 7 * ( Tile . HEIGHT ) ) ) { <END_BUG> carrying = false ; level . player2Score += 2 ; } if ( ( pos . y ) > ( ( ( ( level . height ) - 7 ) - 1 ) * ( Tile . HEIGHT ) ) ) { carrying = false ; level . player1Score += 2 ; } } } @ Override public Bitmap getSprite ( ) { } public void handleCollision ( Entity entity , double xa , double ya ) { } @ Override protected boolean shouldBlock ( Entity e ) { } public void render ( Screen screen ) { } }

Fix:
if ( ( pos . y ) < ( 8 * ( Tile . HEIGHT ) ) ) {
Buggy code:
public class API_UsageExample { public static void main ( String [ ] args ) throws Exception { String modelFile = args [ 0 ] ; int numOfThreads = 8 ; InfStruct infStruct = new InfStruct ( modelFile ) ; ArrayList < Integer > dependencyLabels = infStruct . dependencyLabels ; IndexMaps maps = infStruct . maps ; AveragedPerceptron averagedPerceptron = new AveragedPerceptron ( infStruct ) ; int featureSize = averagedPerceptron . featureSize ( ) ; KBeamArcEagerParser parser = new KBeamArcEagerParser ( averagedPerceptron , dependencyLabels , featureSize , maps , numOfThreads ) ; String [ ] words = new String [ ] { "I" , "am" , "here" , "." } ; String [ ] tags = new String [ ] { "PRP" , "VBP" , "RB" , "." } ; Configuration bestParse = parser . parse ( maps . makeSentence ( words , tags , infStruct . options . rootFirst , infStruct . options . lowercase ) , infStruct . options . rootFirst , infStruct . options . beamWidth , numOfThreads ) ; if ( infStruct . options . rootFirst ) { for ( int i = 0 ; i < ( words . length ) ; i ++ ) { System . out . println ( ( ( ( ( ( ( ( words [ i ] ) + "\t" ) + ( tags [ i ] ) ) + "\t" ) + ( bestParse . state . getHead ( ( i + 1 ) ) ) ) + "\t" ) + ( maps . revWords [ bestParse . state . getDependency ( ( i + 1 ) ) ] ) ) ) ; } } else { for ( int i = 0 ; i < ( words . length ) ; i ++ ) { int head = bestParse . state . getHead ( ( i + 1 ) ) ; <START_BUG> if ( head == ( ( words . length ) + 1 ) ) <END_BUG> head = 0 ; System . out . println ( ( ( ( ( ( ( ( words [ i ] ) + "\t" ) + ( tags [ i ] ) ) + "\t" ) + head ) + "\t" ) + ( maps . revWords [ bestParse . state . getDependency ( ( i + 1 ) ) ] ) ) ) ; } } parser . shutDownLiveThreads ( ) ; System . exit ( 0 ) ; } }

Fix:
if ( head == ( words . length ) )
Buggy code:
public class TaxonEnricherImpl implements PropertyEnricher { private static final Log LOG = LogFactory . getLog ( TaxonEnricherImpl . class ) ; private final List < PropertyEnricher > services = new ArrayList < PropertyEnricher > ( ) ; private final HashMap < Class , Integer > errorCounts = new HashMap < Class , Integer > ( ) ; @ Override public Map < String , String > enrich ( final Map < String , String > properties ) throws PropertyEnricherException { Map < String , String > enrichedProperties = new HashMap < String , String > ( properties ) ; for ( PropertyEnricher service : services ) { try { <START_BUG> enrichedProperties = enrichTaxonWithPropertyValue ( errorCounts , service , enrichedProperties ) ; <END_BUG> if ( TaxonUtil . isResolved ( enrichedProperties ) ) { break ; } } catch ( PropertyEnricherException e ) { TaxonEnricherImpl . LOG . warn ( "problem<seq2seq4repair_space>with<seq2seq4repair_space>taxon<seq2seq4repair_space>lookup" , e ) ; service . shutdown ( ) ; } } return Collections . unmodifiableMap ( enrichedProperties ) ; } @ Override public void shutdown ( ) { } private Map < String , String > enrichTaxonWithPropertyValue ( Map < Class , Integer > errorCounts , PropertyEnricher service , Map < String , String > properties ) throws PropertyEnricherException { } private Map < String , String > enrichTaxon ( Map < Class , Integer > errorCounts , PropertyEnricher service , Integer errorCount , Map < String , String > properties ) throws PropertyEnricherException { } private void resetErrorCount ( Map < Class , Integer > errorCounts , PropertyEnricher service ) { } private void incrementErrorCount ( Map < Class , Integer > errorCounts , PropertyEnricher service , Integer errorCount ) { } private void shutdownServices ( ) { } public void setServices ( List < PropertyEnricher > services ) { } }

Fix:
enrichedProperties = enrichTaxonWithPropertyValue ( errorCounts , service , properties ) ;
Buggy code:
public class StateComparisonVersionStrategy extends AbstractVersionStrategy { public static final String ALIAS = "state-comparison" ; private static final Localizer _loc = Localizer . forPackage ( StateComparisonVersionStrategy . class ) ; public String getAlias ( ) { } public void map ( boolean adapt ) { } public void insert ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public void customInsert ( OpenJPAStateManager sm , JDBCStore store ) throws SQLException { } public void update ( OpenJPAStateManager sm , JDBCStore store , RowManager rm ) throws SQLException { } public StateComparisonVersionStrategy . CustomUpdate customUpdate ( OpenJPAStateManager sm , JDBCStore store , Table table , boolean record ) throws SQLException { } public void afterLoad ( OpenJPAStateManager sm , JDBCStore store ) { } public boolean checkVersion ( OpenJPAStateManager sm , JDBCStore store , boolean updateVersion ) throws SQLException { } public int compareVersion ( Object v1 , Object v2 ) { } public static class CustomUpdate extends RowImpl implements RowManager { private CustomUpdate ( Table table ) { } private CustomUpdate ( Column [ ] cols ) { } public String getSQL ( ) { Column [ ] cols = getTable ( ) . getColumns ( ) ; <START_BUG> StringBuffer buf = new StringBuffer ( ) ; <END_BUG> boolean hasWhere = false ; Object val ; for ( int i = 0 ; i < ( cols . length ) ; i ++ ) { val = getWhere ( cols [ i ] ) ; if ( val == null ) continue ; if ( hasWhere ) buf . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) ; if ( val == ( NULL ) ) buf . append ( cols [ i ] ) . append ( "<seq2seq4repair_space>IS<seq2seq4repair_space>NULL" ) ; else buf . append ( cols [ i ] ) . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ; hasWhere = true ; } return buf . toString ( ) ; } protected RowImpl newInstance ( Column [ ] cols , int action ) { } public boolean hasAutoAssignConstraints ( ) { } public Collection getInserts ( ) { } public Collection getUpdates ( ) { } public Collection getDeletes ( ) { } public Collection getSecondaryUpdates ( ) { } public Collection getSecondaryDeletes ( ) { } public Collection getAllRowUpdates ( ) { } public Collection getAllRowDeletes ( ) { } public Row getRow ( Table table , int action , OpenJPAStateManager sm , boolean create ) { } public Row getSecondaryRow ( Table table , int action ) { } public void flushSecondaryRow ( Row row ) { } public Row getAllRows ( Table table , int action ) { } public void flushAllRows ( Row row ) { } public void setObject ( Column col , Object val ) throws SQLException { } } }

Fix:
StringBuilder buf = new StringBuilder ( ) ;
Buggy code:
public class ConversionUtils { private static final String CHARSET_EQ = "charset=" ; private static final int CHARSET_EQ_LEN = ConversionUtils . CHARSET_EQ . length ( ) ; public static String getEncodingFromContentType ( String contentType ) { String charSet = null ; if ( contentType != null ) { <START_BUG> int charSetStartPos = contentType . toLowerCase ( ) . indexOf ( ConversionUtils . CHARSET_EQ ) ; <END_BUG> if ( charSetStartPos >= 0 ) { charSet = contentType . substring ( ( charSetStartPos + ( ConversionUtils . CHARSET_EQ_LEN ) ) ) ; if ( charSet != null ) { charSet = JOrphanUtils . replaceAllChars ( charSet , '"' , "" ) ; charSet = charSet . trim ( ) ; if ( ( charSet . length ( ) ) > 0 ) { int semi = charSet . indexOf ( ";" ) ; if ( semi == 0 ) { return null ; } if ( semi != ( - 1 ) ) { charSet = charSet . substring ( 0 , semi ) ; } if ( ! ( Charset . isSupported ( charSet ) ) ) { return null ; } return charSet ; } return null ; } } } return charSet ; } }

Fix:
int charSetStartPos = contentType . toLowerCase ( Locale . ENGLISH ) . indexOf ( ConversionUtils . CHARSET_EQ ) ;
Buggy code:
public class Test_org_eclipse_swt_widgets_FontDialog extends Test_org_eclipse_swt_widgets_Dialog { public Test_org_eclipse_swt_widgets_FontDialog ( String name ) { } public static void main ( String [ ] args ) { } protected void setUp ( ) { } protected void tearDown ( ) { } public void test_ConstructorLorg_eclipse_swt_widgets_Shell ( ) { <START_BUG> FontDialog fd = new FontDialog ( shell ) ; <END_BUG> try { new FontDialog ( null ) ; fail ( "No<seq2seq4repair_space>exception<seq2seq4repair_space>thrown<seq2seq4repair_space>for<seq2seq4repair_space>parent<seq2seq4repair_space>==<seq2seq4repair_space>null" ) ; } catch ( IllegalArgumentException e ) { } } public void test_ConstructorLorg_eclipse_swt_widgets_ShellI ( ) { } public void test_getFontData ( ) { } public void test_getFontList ( ) { } public void test_getRGB ( ) { } public void test_open ( ) { } public void test_setFontDataLorg_eclipse_swt_graphics_FontData ( ) { } public void test_setFontList$Lorg_eclipse_swt_graphics_FontData ( ) { } public void test_setRGBLorg_eclipse_swt_graphics_RGB ( ) { } public static Test suite ( ) { } public static Vector methodNames ( ) { } protected void runTest ( ) throws Throwable { } FontDialog fontDialog ; }

Fix:
new FontDialog ( shell ) ;
Buggy code:
public class MetaUtil { public static FileMetaData createMeta ( File file , Set < String > tags ) { FileMetaData meta = new FileMetaData ( ) ; try { String fileName = file . getName ( ) ; int extIndex = fileName . lastIndexOf ( "." ) ; meta . Tags = tags ; meta . BlockHashes = MetaUtil . getBlockHashes ( file ) ; <START_BUG> meta . Meta = JsonUtil . createJson ( "path" , file . getCanonicalPath ( ) , "filename" , fileName , "fileext" , ( extIndex >= 0 ? fileName . substring ( extIndex ) : null ) , "filesize" , file . length ( ) , "filedate" , file . lastModified ( ) , "blocks" , meta . BlockHashes ) ; <END_BUG> meta . MetaHash = ( CryptoUtil . computeHashAsString ( new ByteArrayInputStream ( meta . Meta . toString ( ) . getBytes ( ) ) ) ) + ".meta" ; } catch ( JSONException e ) { e . printStackTrace ( ) ; meta = null ; } catch ( IOException e ) { e . printStackTrace ( ) ; meta = null ; } return meta ; } static JSONArray getBlockHashes ( File file ) { } private static long getFileSize ( File file ) { } public static Set < String > createRowTagSet ( String rowTags ) { } }

Fix:
meta . Meta = JsonUtil . createJson ( "path" , file . getCanonicalPath ( ) , "filename" , fileName , "fileext" , ( extIndex >= 0 ? fileName . substring ( ( extIndex + 1 ) ) : null ) , "filesize" , file . length ( ) , "filedate" , file . lastModified ( ) , "blocks" , meta . BlockHashes ) ;
Buggy code:
public class NSBox extends NSView { public NSBox ( ) { } public NSBox ( int id ) { } public NSColor borderColor ( ) { } public NSRect borderRect ( ) { } public int borderType ( ) { } public float borderWidth ( ) { } public int boxType ( ) { } public NSView contentView ( ) { } public NSSize contentViewMargins ( ) { NSSize result = new NSSize ( ) ; <START_BUG> OS . objc_msgSend_stret ( result , this . id , sel_contentViewMargins ) ; <END_BUG> return result ; } public float cornerRadius ( ) { } public NSColor fillColor ( ) { } public boolean isTransparent ( ) { } public void setBorderColor ( NSColor borderColor ) { } public void setBorderType ( int aType ) { } public void setBorderWidth ( float borderWidth ) { } public void setBoxType ( int boxType ) { } public void setContentView ( NSView aView ) { } public void setContentViewMargins ( NSSize offsetSize ) { } public void setCornerRadius ( float cornerRadius ) { } public void setFillColor ( NSColor fillColor ) { } public void setFrameFromContentFrame ( NSRect contentFrame ) { } public void setTitle ( NSString aString ) { } public void setTitleFont ( NSFont fontObj ) { } public void setTitlePosition ( int aPosition ) { } public void setTitleWithMnemonic ( NSString stringWithAmpersand ) { } public void setTransparent ( boolean flag ) { } public void sizeToFit ( ) { } public NSString title ( ) { } public NSCell titleCell ( ) { } public NSFont titleFont ( ) { } public int titlePosition ( ) { } public NSRect titleRect ( ) { } }

Fix:
OS . objc_msgSend_struct ( result , this . id , sel_contentViewMargins ) ;
Buggy code:
public class WebRequestEncoder implements IRequestEncoder { private static Log log = LogFactory . getLog ( WebRequestEncoder . class ) ; private SortedMap mountsOnPath = new TreeMap ( WebRequestEncoder . lengthComparator ) ; private String urlPrefix ; public WebRequestEncoder ( ) { } protected IMountEncoder getMountEncoder ( IRequestTarget requestTarget ) { } public final String encode ( RequestCycle requestCycle , IRequestTarget requestTarget ) { } protected String doEncode ( RequestCycle requestCycle , IRequestTarget requestTarget ) { } public final RequestParameters decode ( Request request ) { } public final void mountPath ( String path , IMountEncoder encoder ) { } public final void unmountPath ( String path ) { } public final IRequestTarget targetForPath ( String path ) { } public final IMountEncoder encoderForPath ( String path ) { } public final String pathForTarget ( IRequestTarget requestTarget ) { } protected String getRequestPath ( Request request ) { } protected final String encode ( RequestCycle requestCycle , IBookmarkablePageRequestTarget requestTarget ) { } protected final String encode ( RequestCycle requestCycle , IListenerInterfaceRequestTarget requestTarget ) { } protected final String encode ( RequestCycle requestCycle , ISharedResourceRequestTarget requestTarget ) { } protected void addPageParameters ( Request request , RequestParameters parameters ) { } protected void addBookmarkablePageParameters ( Request request , RequestParameters parameters ) { <START_BUG> String pageClass = request . getParameter ( "bookmarkablePage" ) ; <END_BUG> parameters . setBookmarkablePageClass ( pageClass ) ; parameters . setParameters ( request . getParameterMap ( ) ) ; } protected void addResourceParameters ( Request request , RequestParameters parameters ) { } protected final String urlPrefix ( RequestCycle requestCycle ) { } private static final Comparator lengthComparator = new Comparator ( ) { public int compare ( Object o1 , Object o2 ) { } } ; }

Fix:
String pageClass = request . getParameter ( BOOKMARKABLE_PAGE ) ;
Buggy code:
@ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . ANNOTATION_TYPE ) @ Documented public @ interface FactoryMethod { Class < ? extends BeanDefinitionRegistrar > registrar ( ) ; <START_BUG> Class < ? extends MethodInterceptor > interceptor ( ) default NoOpInterceptor . class ; <END_BUG> Class < ? extends Validator > [ ] validators ( ) default { } ; }

Fix:
Class < ? extends MethodInterceptor > interceptor ( ) ;
Buggy code:
@ Path ( "//v1" ) @ Api public class PackageResource { @ PUT @ Path ( "//items//{packageNumber}" ) @ ApiOperation ( "op1" ) public Response op1 ( @ ApiParam ( value = "PackageNumber" , required = true ) @ PathParam ( "packageNumber" ) PackageNumber number ) { Package pkg = new Package ( ) ; <START_BUG> pkg . assignPackageNumber ( new PackageNumber ( "1234" ) ) ; <END_BUG> return Response . ok ( ) . entity ( pkg ) . build ( ) ; } @ POST @ Consumes ( "application//xml" ) @ Path ( "//items" ) @ ApiOperation ( "op2" ) public Response op2 ( Package pkg ) { } }

Fix:
pkg . assignPackageNumber ( number ) ;
Buggy code:
class Command72QueryActiveBackends extends AbstractProtocolCommand < List < String > > { public Command72QueryActiveBackends ( Translator translator , Parser parser ) { } @ Override protected String getMessage ( ) throws ProtocolException { } @ Override public List < String > send ( SocketManager socketManager ) throws IOException { String response = socketManager . sendAndWait ( getMessage ( ) ) ; List < String > args = getParser ( ) . splitArguments ( response ) ; if ( args . isEmpty ( ) ) { throw new ProtocolException ( response , Direction . RECEIVE ) ; } try { int size = Integer . parseInt ( args . get ( 0 ) ) ; <START_BUG> if ( ( args . size ( ) ) != ( size - 1 ) ) { <END_BUG> throw new ProtocolException ( response , Direction . RECEIVE ) ; } return args . subList ( 1 , args . size ( ) ) ; } catch ( NumberFormatException e ) { throw new ProtocolException ( response , Direction . RECEIVE ) ; } } }

Fix:
if ( ( ( args . size ( ) ) - 1 ) != size ) {
Buggy code:
public class AnonymousClassDeclaration extends ASTNode { private ASTNode . NodeList bodyDeclarations = new ASTNode . NodeList ( true , BodyDeclaration . class ) ; AnonymousClassDeclaration ( AST ast ) { } public int getNodeType ( ) { } ASTNode clone ( AST target ) { AnonymousClassDeclaration result = new AnonymousClassDeclaration ( target ) ; <START_BUG> result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ; <END_BUG> result . bodyDeclarations ( ) . addAll ( ASTNode . copySubtrees ( target , bodyDeclarations ( ) ) ) ; return result ; } public boolean subtreeMatch ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public List bodyDeclarations ( ) { } public ITypeBinding resolveBinding ( ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ;
Buggy code:
public class EclipseFileTransfer extends FileTransferSharedObject implements FileTransferListener { private static final long serialVersionUID = - 4496151870561737078L ; FileSenderUI senderUI ; ID eclipseStageID ; public EclipseFileTransfer ( FileSenderUI view , ID target , InputStream ins , FileTransferParams params , ID receiverID ) { } protected ReplicaSharedObjectDescription getReplicaDescription ( ID remoteMember ) { HashMap map = new HashMap ( ) ; map . put ( "args" , new Object [ ] { transferParams , eclipseStageID } ) ; map . put ( "types" , new String [ ] { FileTransferParams . class . getName ( ) , ID . class . getName ( ) } ) ; <START_BUG> return new ReplicaSharedObjectDescription ( getID ( ) , getClass ( ) . getName ( ) , map , ( ( replicateID ) ++ ) ) ; <END_BUG> } public void init ( ISharedObjectConfig config ) throws SharedObjectInitException { } public EclipseFileTransfer ( FileTransferParams params , ID receiverID ) { } public EclipseFileTransfer ( ) { } public void sendStart ( FileTransferSharedObject obj , long length , float rate ) { } public void sendData ( FileTransferSharedObject obj , int dataLength ) { } public void sendDone ( FileTransferSharedObject obj , Exception e ) { } protected File createPath ( EclipseCollabSharedObject stage , boolean server , File file , long length , float rate ) { } protected File localFile = null ; protected FileReceiverUI receiverUI = null ; protected EclipseCollabSharedObject receiverStage = null ; public void receiveStart ( FileTransferSharedObject obj , File aFile , long length , float rate ) { } public void receiveData ( FileTransferSharedObject obj , int dataLength ) { } public void receiveDone ( FileTransferSharedObject obj , Exception e ) { } protected boolean votingCompleted ( ) throws SharedObjectAddAbortException { } private class FileReceiver implements Runnable { private File aFile = null ; private long length ; private float rate ; public FileReceiver ( File aFile , long length , float rate ) { } public void run ( ) { } } }

Fix:
return new ReplicaSharedObjectDescription ( getClass ( ) , getID ( ) , getConfig ( ) . getHomeContainerID ( ) , map , ( ( replicateID ) ++ ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class CustomHandlerOperationsTestCase extends AbstractLoggingOperationsTestCase { private static final String FILE_NAME = "custom-handler-file.log" ; private static final String CUSTOM_HANDLER_NAME = "customFileHandler" ; private static final PathAddress CUSTOM_HANDLER_ADDRESS = createCustomHandlerAddress ( CustomHandlerOperationsTestCase . CUSTOM_HANDLER_NAME ) ; @ ContainerResource private ManagementClient managementClient ; @ ArquillianResource ( DefaultLoggingServlet . class ) private URL url ; private File logFile = null ; @ Deployment public static WebArchive createDeployment ( ) { } @ Before public void setLogFile ( ) throws Exception { } @ Override protected ManagementClient getManagementClient ( ) { } @ Test public void testCustomHandler ( ) throws Exception { } private void testCustomHandler ( final String profileName ) throws Exception { <START_BUG> final ModelNode address = createCustomHandlerAddress ( profileName , "CONSOLE2" ) . toModelNode ( ) ; <END_BUG> final ModelNode addOp = Operations . createAddOperation ( address ) ; addOp . get ( "module" ) . set ( "org.jboss.logmanager" ) ; addOp . get ( "class" ) . set ( ConsoleHandler . class . getName ( ) ) ; executeOperation ( addOp ) ; testWrite ( address , "level" , "INFO" ) ; testWrite ( address , "enabled" , true ) ; testWrite ( address , "encoding" , "utf-8" ) ; testWrite ( address , "formatter" , "[test]<seq2seq4repair_space>%d{HH:mm:ss,SSS}<seq2seq4repair_space>%-5p<seq2seq4repair_space>[%c]<seq2seq4repair_space>%s%E%n" ) ; testWrite ( address , "filter-spec" , "deny" ) ; testWrite ( address , "class" , QueueHandler . class . getName ( ) ) ; testWrite ( address , "module" , "org.jboss.logmanager" ) ; final ModelNode properties = new ModelNode ( ) . setEmptyObject ( ) ; properties . get ( "autoFlush" ) . set ( true ) ; properties . get ( "target" ) . set ( "SYSTEM_OUT" ) ; testWrite ( address , "properties" , properties ) ; testUndefine ( address , "level" ) ; testUndefine ( address , "enabled" ) ; testUndefine ( address , "encoding" ) ; testUndefine ( address , "formatter" ) ; testUndefine ( address , "filter-spec" ) ; testUndefine ( address , "properties" ) ; executeOperation ( Operations . createRemoveOperation ( address ) ) ; verifyRemoved ( address ) ; } }

Fix:
final ModelNode address = createCustomHandlerAddress ( profileName , "CONSOLE" ) . toModelNode ( ) ;
Buggy code:
public class MainActivity extends BaseActivity { private static final String TAG = "MainActivity" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( activity_content ) ; setupActionBar ( ) ; if ( savedInstanceState == null ) { <START_BUG> getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( content , AppListFragment . newInstance ( ) ) . commit ( ) ; <END_BUG> } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void setupActionBar ( ) { } }

Fix:
getSupportFragmentManager ( ) . beginTransaction ( ) . replace ( content , MainFragment . newInstance ( ) ) . commit ( ) ;