nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BoxBorderTest extends WicketTestCase { public void test1 ( ) throws Exception { } public void test2 ( ) throws Exception { } @ SuppressWarnings ( { "unchecked" } ) public void test3 ( ) throws Exception { executeTest ( BoxBorderTestPage_3 . class , "BoxBorderTestPage_ExpectedResult_3.html" ) ; Border border = ( ( Border ) ( tester . getLastRenderedPage ( ) . get ( "border" ) ) ) ; assertNotNull ( border ) ; Form < ? > form = ( ( Form < ? > ) ( tester . getLastRenderedPage ( ) . get ( "border:myForm" ) ) ) ; TextField < String > input = ( ( TextField < String > ) ( tester . getLastRenderedPage ( ) . get ( "border:myForm:border_body:name" ) ) ) ; assertEquals ( "" , input . getDefaultModelObjectAsString ( ) ) ; <START_BUG> tester . getRequest ( ) . getPostRequestParameters ( ) . setParameterValue ( input . getInputName ( ) , "jdo" ) ; <END_BUG> tester . submitForm ( form . getPageRelativePath ( ) ) ; input = ( ( TextField < String > ) ( tester . getLastRenderedPage ( ) . get ( "border:myForm:border_body:name" ) ) ) ; assertEquals ( "jdo" , input . getDefaultModelObjectAsString ( ) ) ; } public void test4 ( ) throws Exception { } public void testRenderWrapped ( ) throws Exception { } public void test5 ( ) throws Exception { } public void test6 ( ) throws Exception { } public void test7 ( ) throws Exception { } public void test8 ( ) throws Exception { } public void test9 ( ) throws Exception { } public void test10 ( ) throws Exception { } public void test11 ( ) throws Exception { } }

Fix:
tester . getRequest ( ) . getPostParameters ( ) . setParameterValue ( input . getInputName ( ) , "jdo" ) ;
Buggy code:
@ RunWith ( Arquillian . class ) public class TransactionInvocationTestCase { public static final String SERVER_DEPLOYMENT = "server" ; public static final String CLIENT_DEPLOYMENT = "client" ; @ Deployment ( name = "server" , testable = false ) @ TargetsContainer ( "multinode-server" ) public static Archive < ? > deployment ( ) { } @ Deployment ( name = "client" , testable = true ) @ TargetsContainer ( "multinode-client" ) public static Archive < ? > clientDeployment ( ) { final JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , ( ( TransactionInvocationTestCase . CLIENT_DEPLOYMENT ) + ".jar" ) ) ; jar . addClasses ( ClientEjb . class , TransactionalRemote . class , TransactionInvocationTestCase . class , TransactionalStatefulRemote . class ) ; <START_BUG> jar . addAsManifestResource ( "META-INF//jboss-ejb-client.xml" , "jboss-ejb-client.xml" ) ; <END_BUG> return jar ; } @ Test @ OperateOnDeployment ( "client" ) public void testRemoteInvocation ( ) throws IOException , NamingException , NotSupportedException , SystemException { } @ Test @ OperateOnDeployment ( "client" ) public void testRollbackOnly ( ) throws IOException , NamingException , NotSupportedException , SystemException { } @ Test @ OperateOnDeployment ( "client" ) public void testRollbackOnlyBeforeCompletion ( ) throws IOException , NamingException , HeuristicMixedException , HeuristicRollbackException , NotSupportedException , SystemException { } @ Test @ OperateOnDeployment ( "client" ) public void testSameTransactionEachCall ( ) throws IOException , NamingException , NotSupportedException , SystemException { } @ Test @ OperateOnDeployment ( "client" ) public void testSynchronizationSucceeded ( ) throws IOException , NamingException , HeuristicMixedException , HeuristicRollbackException , NotSupportedException , RollbackException , SystemException { } @ Test @ OperateOnDeployment ( "client" ) public void testSynchronizationFailed ( ) throws IOException , NamingException , HeuristicMixedException , HeuristicRollbackException , NotSupportedException , RollbackException , SystemException { } private ClientEjb getClient ( ) throws NamingException { } }

Fix:
jar . addAsManifestResource ( "META-INF//jboss-ejb-client-receivers.xml" , "jboss-ejb-client.xml" ) ;
Buggy code:
public final class BytesRef implements Externalizable , Comparable < BytesRef > { public static final byte [ ] EMPTY_BYTES = new byte [ 0 ] ; public byte [ ] bytes ; public int offset ; public int length ; public BytesRef ( ) { } public BytesRef ( byte [ ] bytes , int offset , int length ) { } public BytesRef ( byte [ ] bytes ) { } public BytesRef ( int capacity ) { } public BytesRef ( CharSequence text ) { } public BytesRef ( BytesRef other ) { } public void copy ( CharSequence text ) { } public boolean bytesEquals ( BytesRef other ) { } @ Override public Object clone ( ) { } private boolean sliceEquals ( BytesRef other , int pos ) { } public boolean startsWith ( BytesRef other ) { } public boolean endsWith ( BytesRef other ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object other ) { } public String utf8ToString ( ) { } public String toString ( ) { } public void copy ( BytesRef other ) { } public void grow ( int newLength ) { } public int compareTo ( BytesRef other ) { } private static final Comparator < BytesRef > utf8SortedAsUnicodeSortOrder = new BytesRef . UTF8SortedAsUnicodeComparator ( ) ; public static Comparator < BytesRef > getUTF8SortedAsUnicodeComparator ( ) { } private static class UTF8SortedAsUnicodeComparator implements Comparator < BytesRef > { private UTF8SortedAsUnicodeComparator ( ) { } public int compare ( BytesRef a , BytesRef b ) { } } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { length = in . readInt ( ) ; offset = 0 ; if ( ( length ) > 0 ) { bytes = new byte [ length ] ; in . read ( bytes , 0 , length ) ; } else { <START_BUG> bytes = null ; <END_BUG> } } }

Fix:
bytes = BytesRef . EMPTY_BYTES ;
Buggy code:
public interface EmployeeManager { <START_BUG> Employee addNickNames ( final Employee employee , final String ... nickNames ) ; <END_BUG> }

Fix:
AliasedEmployee addNickNames ( final Employee employee , final String ... nickNames ) ;
Buggy code:
@ Entity @ Cache public class Series implements Mergeable < Series > { public static class WITH_SEASONS { } public static class COMPLETE_TREE extends Series . WITH_SEASONS { } private static final Logger logger = Logger . getLogger ( Series . class . getName ( ) ) ; @ Id private String key ; private String name ; private String description ; private int season_count ; private Date start_date ; private Date end_date ; @ Index private String name_normalized ; private Map < String , String > identifiers = new HashMap < > ( ) ; @ ApiResourceProperty ( ignored = AnnotationBoolean . TRUE ) private BlobKey poster ; @ ApiResourceProperty ( ignored = AnnotationBoolean . TRUE ) private BlobKey backdrop ; @ ApiResourceProperty ( ignored = AnnotationBoolean . TRUE ) @ Load ( Series . WITH_SEASONS . class ) private List < Ref < Season > > seasons = new ArrayList < > ( ) ; @ ApiResourceProperty ( ignored = AnnotationBoolean . TRUE ) @ Index private List < String > subscribers = new ArrayList < > ( ) ; @ Ignore private final Set < Season > modified_seasons = new HashSet < > ( ) ; private Series ( ) { } public Series ( String name , int season_count , Date start_date ) { } @ Override public boolean merge ( Series other ) { } public List < Season > getSeasons ( ) { } public Season getSeason ( int season_nr ) { } public void putSeason ( Season season ) { } @ OnSave private void saveSeasons ( ) { } public void subscribe ( User subscriber ) { } public void unsubscribe ( User subscriber ) { } public List < String > getSubscribers ( ) { } public String getName ( ) { } public String getDescription ( ) { } public void setDescription ( String description ) { } public Date getStartDate ( ) { } public Date getEndDate ( ) { } public void setEndDate ( Date end_date ) { } @ ApiResourceProperty ( ignored = AnnotationBoolean . TRUE ) public BlobKey getPoster ( ) { } public String getPosterLink ( ) { } public void setPoster ( BlobKey poster ) { } public BlobKey getBackdrop ( ) { } public String getBackdropLink ( ) { } public void setBackdrop ( BlobKey backdrop ) { } public int getSeasonCount ( ) { } public String optIdentifier ( String key , String fallback ) { } public void putIdentifier ( String key , String identifier ) { } public String getId ( ) { } @ Override public String toString ( ) { <START_BUG> return String . format ( "Series<seq2seq4repair_space>'%s'<seq2seq4repair_space>has<seq2seq4repair_space>%s<seq2seq4repair_space>seasons" , name , season_count ) ; <END_BUG> } }

Fix:
return String . format ( "'%s'<seq2seq4repair_space>(ID=%s)" , name , key ) ;
Buggy code:
public class DistributedEuclideanDistanceVectorSimilarity extends AbstractDistributedVectorSimilarity { @ Override <START_BUG> protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , int numberOfColumns ) { <END_BUG> double n = 0.0 ; double sumXYdiff2 = 0.0 ; for ( Cooccurrence cooccurrence : cooccurrences ) { double diff = ( cooccurrence . getValueA ( ) ) - ( cooccurrence . getValueB ( ) ) ; sumXYdiff2 += diff * diff ; n ++ ; } return n // ( 1.0 + ( Math . sqrt ( sumXYdiff2 ) ) ) ; } }

Fix:
protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , long numberOfColumns ) {
Buggy code:
public abstract class Baseroom { private int roomxcor ; private int roomycor ; private int floor ; private Thing [ ] [ ] grid = new Thing [ 25 ] [ 15 ] ; private Random rnd = new Random ( ) ; public Baseroom ( int f , int rx , int ry ) { } public boolean addThing ( Thing t , int x , int y ) { } public abstract boolean createRoom ( ) { } public boolean unitCollision ( Character movingChar ) { } public boolean itemDrop ( Character deadChar ) { int chance = rnd . nextInt ( 100 ) ; if ( chance < 20 ) { if ( chance < 10 ) { <START_BUG> int loc = deadChar . getLocation ( ) ; <END_BUG> CurvedTestGrade ctg = new CurvedTestGrade ( loc [ 0 ] , loc [ 1 ] , loc [ 2 ] , loc [ 3 ] , loc [ 4 ] ) ; addThing ( ctg , loc [ 3 ] , loc [ 4 ] ) ; } } } public void die ( Character deadChar ) { } public int getRX ( ) { } public int getRY ( ) { } public int getFloor ( ) { } }

Fix:
int [ ] loc = deadChar . getLocation ( ) ;
Buggy code:
public class HttpRecordTest extends HttpTest { @ Test public void testRecord ( ) throws Exception { Thread serverThread = startServer ( ) ; endRecording ( ) ; <START_BUG> String recordName = "httpRecordTest" ; <END_BUG> startRecording ( recordName ) ; String gid = newGame ( "Huey" , "red" ) ; list ( "joinable" , gid ) ; joinGame ( gid , "Louie" , "green" ) ; startGame ( gid , "Huey" , true ) ; startGame ( gid , "Louie" , true ) ; String currentPlayer = getActivePlayer ( gid ) ; String mileposts = "[{\"x\":34,\"y\":58},{\"x\":33,\"y\":58},{\"x\":32,\"y\":58},{\"x\":31,\"y\":59}]" ; buildTrack ( gid , currentPlayer , mileposts ) ; endTurn ( gid , currentPlayer ) ; upgradeTrain ( gid , getActivePlayer ( gid ) , "Speed" ) ; endTurn ( gid , getActivePlayer ( gid ) ) ; endTurn ( gid , getActivePlayer ( gid ) ) ; endTurn ( gid , getActivePlayer ( gid ) ) ; endTurn ( gid , getActivePlayer ( gid ) ) ; endTurn ( gid , getActivePlayer ( gid ) ) ; placeTrain ( gid , currentPlayer , 0 , "{\"x\":34,<seq2seq4repair_space>\"y\":58}" ) ; String moveMileposts = "[<seq2seq4repair_space>{\"x\":33,\"y\":58},{\"x\":32,\"y\":58},{\"x\":31,\"y\":59}]" ; pickupLoad ( gid , currentPlayer , 0 , "Diamonds" ) ; pickupLoad ( gid , currentPlayer , 0 , "Arms" ) ; moveTrain ( gid , currentPlayer , currentPlayer , 0 , moveMileposts ) ; dumpLoad ( gid , currentPlayer , 0 , "Arms" ) ; endTurn ( gid , currentPlayer ) ; endRecording ( ) ; HttpTrainServer . stopServer ( ) ; serverThread . join ( ) ; serverThread = startServer ( ) ; Thread . sleep ( 2000 ) ; playRecording ( recordName ) ; HttpTrainServer . stopServer ( ) ; serverThread . join ( ) ; } }

Fix:
String recordName = "httpRecordTest.tr" ;
Buggy code:
public class EstimateIntrinsicDimensionality < O > extends AbstractDistanceBasedAlgorithm < O , Result > { private static final Logging LOG = Logging . getLogger ( EstimateIntrinsicDimensionality . class ) ; private double krate ; private double samples ; private IntrinsicDimensionalityEstimator estimator = HillEstimator . STATIC ; public EstimateIntrinsicDimensionality ( DistanceFunction < ? super O > distanceFunction , IntrinsicDimensionalityEstimator estimator , double krate , double samples ) { } public Result run ( Database database , Relation < O > relation ) { } @ Override public TypeInformation [ ] getInputTypeRestriction ( ) { } @ Override protected Logging getLogger ( ) { } public static class Parameterizer < O > extends AbstractDistanceBasedAlgorithm . Parameterizer < O > { private static final OptionID ESTIMATOR_ID = new OptionID ( "idist.estimator" , "Estimation<seq2seq4repair_space>method<seq2seq4repair_space>for<seq2seq4repair_space>intrinsic<seq2seq4repair_space>dimensionality." ) ; private static final OptionID KRATE_ID = new OptionID ( "idist.k" , "Number<seq2seq4repair_space>of<seq2seq4repair_space>kNN<seq2seq4repair_space>(absolute<seq2seq4repair_space>or<seq2seq4repair_space>relative)" ) ; private static final OptionID SAMPLES_ID = new OptionID ( "idist.sampling" , "Sample<seq2seq4repair_space>size<seq2seq4repair_space>(absolute<seq2seq4repair_space>or<seq2seq4repair_space>relative)" ) ; private IntrinsicDimensionalityEstimator estimator = HillEstimator . STATIC ; private double krate ; private double samples ; @ Override protected void makeOptions ( Parameterization config ) { super . makeOptions ( config ) ; <START_BUG> ObjectParameter < IntrinsicDimensionalityEstimator > estimatorP = new ObjectParameter ( EstimateIntrinsicDimensionality . Parameterizer . ESTIMATOR_ID , GEDEstimator . class ) ; <END_BUG> if ( config . grab ( estimatorP ) ) { estimator = estimatorP . instantiateClass ( config ) ; } DoubleParameter krateP = new DoubleParameter ( EstimateIntrinsicDimensionality . Parameterizer . KRATE_ID , 50 ) ; if ( config . grab ( krateP ) ) { krate = krateP . doubleValue ( ) ; } DoubleParameter samplesP = new DoubleParameter ( EstimateIntrinsicDimensionality . Parameterizer . SAMPLES_ID , 0.1 ) ; if ( config . grab ( samplesP ) ) { samples = samplesP . doubleValue ( ) ; } } @ Override protected EstimateIntrinsicDimensionality < O > makeInstance ( ) { } } }

Fix:
ObjectParameter < IntrinsicDimensionalityEstimator > estimatorP = new ObjectParameter ( EstimateIntrinsicDimensionality . Parameterizer . ESTIMATOR_ID , IntrinsicDimensionalityEstimator . class , GEDEstimator . class ) ;
Buggy code:
public class BusinessFolderController extends BusinessFolderRepository { @ Inject protected BusinessFolderService businessFolderService ; public void createSaleOrder ( ActionRequest request , ActionResponse response ) throws AxelorException { BusinessFolder businessFolder = this . find ( Long . parseLong ( request . getContext ( ) . get ( "_idFolder" ) . toString ( ) ) ) ; SaleOrder saleOrder = null ; <START_BUG> if ( ( businessFolder . getTemplate ( ) ) == null ) { <END_BUG> saleOrder = businessFolderService . createSaleOrder ( businessFolder ) ; } else { saleOrder = businessFolderService . createSaleOrderFromTemplate ( businessFolder ) ; } response . setValues ( saleOrder ) ; } public void generateViewSaleOrder ( ActionRequest request , ActionResponse response ) { } }

Fix:
if ( ( businessFolder . getTemplateSaleOrder ( ) ) == null ) {
Buggy code:
public class VanillaNetworkSynchronizer extends NetworkSynchronizer { @ SuppressWarnings ( "unused" ) private static final int POSITION_UPDATE_TICKS = 20 ; private static final double STANCE = 1.6 ; private static final int TIMEOUT = 15000 ; public VanillaNetworkSynchronizer ( Player player ) { } public VanillaNetworkSynchronizer ( Player player , Entity entity ) { } private TIntPairObjectHashMap < TIntHashSet > activeChunks = new TIntPairObjectHashMap < TIntHashSet > ( ) ; private TIntHashSet activeEntities = new TIntHashSet ( ) ; @ Override protected void freeChunk ( Point p ) { } @ Override protected void initChunk ( Point p ) { } @ Override public void sendChunk ( Chunk c ) { int x = c . getX ( ) ; int y = c . getY ( ) ; int z = c . getZ ( ) ; if ( ( y < 0 ) || ( y > 7 ) ) { return ; } ChunkSnapshot snapshot = c . getSnapshot ( false ) ; short [ ] rawBlockIdArray = snapshot . getBlockIds ( ) ; short [ ] rawBlockData = snapshot . getBlockData ( ) ; byte [ ] fullChunkData = new byte [ ( ( ( 5 * 16 ) * 16 ) * 16 ) // 2 ] ; final int maxIdIndex = ( 16 * 16 ) * 16 ; final int maxDataIndex = maxIdIndex + ( ( ( 16 * 16 ) * 16 ) // 2 ) ; for ( int i = 0 ; i < ( fullChunkData . length ) ; i ++ ) { if ( i < maxIdIndex ) { fullChunkData [ i ] = ( ( byte ) ( 0 ) ) ; } else if ( i < maxDataIndex ) { fullChunkData [ i ] = ( ( byte ) ( 0 ) ) ; } else { fullChunkData [ i ] = ( ( byte ) ( 255 ) ) ; } } for ( int i = 0 ; i < ( rawBlockIdArray . length ) ; i ++ ) { fullChunkData [ i ] = ( ( byte ) ( ( rawBlockIdArray [ i ] ) & 255 ) ) ; } <START_BUG> for ( int i = 0 ; i < ( ( rawBlockData . length ) // 2 ) ; i += 2 ) { <END_BUG> fullChunkData [ ( i + maxIdIndex ) ] = ( ( byte ) ( ( ( rawBlockData [ ( i + 1 ) ] ) & ( 15 << 4 ) ) | ( ( rawBlockData [ i ] ) & 15 ) ) ) ; } CompressedChunkMessage CCMsg = new CompressedChunkMessage ( ( x * ( Chunk . CHUNK_SIZE ) ) , ( y * ( Chunk . CHUNK_SIZE ) ) , ( z * ( Chunk . CHUNK_SIZE ) ) , Chunk . CHUNK_SIZE , Chunk . CHUNK_SIZE , Chunk . CHUNK_SIZE , fullChunkData ) ; owner . getSession ( ) . send ( CCMsg ) ; } @ Override protected void sendPosition ( Point p , float yaw , float pitch ) { } boolean first = true ; @ Override protected void worldChanged ( World world ) { } long lastKeepAlive = System . currentTimeMillis ( ) ; @ Override public void preSnapshot ( ) { } @ Override public void updateBlock ( Chunk chunk , int x , int y , int z , short id , short data ) { } @ Override public void spawnEntity ( Entity e ) { } @ Override public void destroyEntity ( Entity e ) { } @ Override public void syncEntity ( Entity e ) { } }

Fix:
for ( int i = 0 ; i < ( rawBlockData . length ) ; i += 2 ) {
Buggy code:
public class NavigatorPane extends JPanel implements ItemListener , TreeSelectionListener , QuadrantPanel { public static int MAX_HISTORY = 10 ; protected Vector _perspectives = new Vector ( ) ; protected ToolBar _toolbar = new ToolBar ( ) ; protected JComboBox _combo = new JComboBox ( ) ; protected Object _root = null ; protected Vector _navHistory = new Vector ( ) ; protected int _historyIndex = 0 ; protected NavPerspective _curPerspective = null ; protected DisplayTextTree _tree = new DisplayTextTree ( ) ; public static int _clicksInNavPane = 0 ; public static int _navPerspectivesChanged = 0 ; public NavigatorPane ( ) { } public void setRoot ( Object r ) { } public Object getRoot ( ) { } public Vector getPerspectives ( ) { } public void setPerspectives ( Vector pers ) { } public NavPerspective getCurPerspective ( ) { } public void setCurPerspective ( NavPerspective per ) { } public Object getSelectedObject ( ) { } public void forceUpdate ( ) { } public void setSelection ( Object level1 , Object level2 ) { } public Dimension getMinimumSize ( ) { } public void itemStateChanged ( ItemEvent e ) { } public void valueChanged ( TreeSelectionEvent e ) { } public void mySingleClick ( int row , TreePath path ) { } public void myDoubleClick ( int row , TreePath path ) { } public void navDown ( ) { } public void navUp ( ) { } public void clearHistory ( ) { } public void addToHistory ( Object sel ) { } public boolean canNavBack ( ) { } public void navBack ( ) { } public boolean canNavForw ( ) { } public void navForw ( ) { } protected void updateTree ( ) { } protected final String menuLocalize ( String key ) { } class NavigatorMouseListener extends MouseAdapter { public void mouseClicked ( MouseEvent me ) { } public void showPopupMenu ( MouseEvent me ) { JPopupMenu popup = new JPopupMenu ( "test" ) ; Object obj = getSelectedObject ( ) ; if ( obj instanceof PopupGenerator ) { Vector actions = ( ( PopupGenerator ) ( obj ) ) . getPopUpActions ( me ) ; for ( Enumeration e = actions . elements ( ) ; e . hasMoreElements ( ) ; ) { popup . add ( ( ( AbstractAction ) ( e . nextElement ( ) ) ) ) ; } } else if ( ( ( ( ( ( obj instanceof MClassifier ) || ( obj instanceof MUseCase ) ) || ( obj instanceof MActor ) ) || ( obj instanceof MPackage ) ) || ( obj instanceof MStateVertex ) ) || ( obj instanceof MInstance ) ) { popup . add ( new ActionGoToDetails ( menuLocalize ( "Properties" ) ) ) ; <START_BUG> popup . add ( new ActionAddExistingNode ( menuLocalize ( "Add<seq2seq4repair_space>to<seq2seq4repair_space>Diagram" ) , obj ) ) ; <END_BUG> popup . add ( SINGLETON ) ; } else if ( ( obj instanceof MModelElement ) || ( obj instanceof Diagram ) ) { popup . add ( new ActionGoToDetails ( menuLocalize ( "Properties" ) ) ) ; popup . add ( SINGLETON ) ; } popup . show ( _tree , me . getX ( ) , me . getY ( ) ) ; } public void mousePressed ( MouseEvent me ) { } public void mouseReleased ( MouseEvent me ) { } } class NavigatorKeyListener extends KeyAdapter { public void keyPressed ( KeyEvent e ) { } } public int getQuadrant ( ) { } }

Fix:
popup . add ( new ActionAddExistingNode ( menuLocalize ( "menu.popup.add-to-diagram" ) , obj ) ) ;
Buggy code:
public class ProfileParser { public static void saveProfile ( Profile profile ) { try { boolean newProfile = true ; ArrayList < Profile > profiles = ProfileParser . loadProfiles ( ) ; for ( Profile loadedProfile : profiles ) { <START_BUG> if ( ( profile . getUserName ( ) ) == ( loadedProfile . getUserName ( ) ) ) { <END_BUG> newProfile = false ; loadedProfile = profile ; break ; } } if ( newProfile ) { profiles . add ( profile ) ; } FileOutputStream fileOutputStream = new FileOutputStream ( "Profiles.ser" ) ; ObjectOutputStream objectOutputStream = new ObjectOutputStream ( fileOutputStream ) ; objectOutputStream . writeObject ( profiles ) ; objectOutputStream . close ( ) ; fileOutputStream . close ( ) ; } catch ( IOException ex ) { ex . printStackTrace ( ) ; } } public static ArrayList < Profile > loadProfiles ( ) { } public static Profile getProfile ( String userName ) { } }

Fix:
if ( profile . getUserName ( ) . equals ( loadedProfile . getUserName ( ) ) ) {
Buggy code:
public class MarkFolderAsReadAction extends AbstractColumbaAction implements SelectionListener { public MarkFolderAsReadAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent e ) { <START_BUG> FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( frameMediator . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ; <END_BUG> processor . addOp ( new MarkFolderAsReadCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference r = ( ( FolderCommandReference ) ( frameMediator . getSelectionManager ( ) . getSelection ( "mail.tree" ) ) ) ;
Buggy code:
public class WeldDependencyProcessor implements DeploymentUnitProcessor { private static ModuleIdentifier JAVAX_PERSISTENCE_API_ID = ModuleIdentifier . create ( "javax.persistence.api" ) ; private static ModuleIdentifier JAVAEE_API_ID = ModuleIdentifier . create ( "javaee.api" ) ; private static final ModuleIdentifier JAVASSIST_ID = ModuleIdentifier . create ( "org.javassist" ) ; private static ModuleIdentifier JBOSS_INTERCEPTOR_ID = ModuleIdentifier . create ( "org.jboss.interceptor" ) ; private static ModuleIdentifier JBOSS_AS_WELD_ID = ModuleIdentifier . create ( "org.jboss.as.weld" ) ; private static ModuleIdentifier JBOSS_LOGGING_ID = ModuleIdentifier . create ( "org.jboss.logging" ) ; private static ModuleIdentifier WELD_CORE_ID = ModuleIdentifier . create ( "org.jboss.weld.core" ) ; private static ModuleIdentifier WELD_API_ID = ModuleIdentifier . create ( "org.jboss.weld.api" ) ; private static ModuleIdentifier WELD_SPI_ID = ModuleIdentifier . create ( "org.jboss.weld.spi" ) ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final ModuleSpecification moduleSpecification = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; <START_BUG> if ( ! ( WeldDeploymentMarker . isWeldDeployment ( deploymentUnit ) ) ) { <END_BUG> return ; } final ModuleLoader moduleLoader = Module . getBootModuleLoader ( ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . JAVAX_PERSISTENCE_API_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . JAVAEE_API_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . JBOSS_INTERCEPTOR_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . JBOSS_LOGGING_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . JAVASSIST_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . WELD_CORE_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . WELD_API_ID ) ; addDepdenency ( moduleSpecification , moduleLoader , WeldDependencyProcessor . WELD_SPI_ID ) ; if ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) { ModuleDependency dep = new ModuleDependency ( moduleLoader , WeldDependencyProcessor . JBOSS_AS_WELD_ID , false , false , false ) ; dep . addImportFilter ( PathFilters . getMetaInfFilter ( ) , true ) ; dep . addExportFilter ( PathFilters . getMetaInfFilter ( ) , true ) ; moduleSpecification . addDependency ( dep ) ; } } private void addDepdenency ( ModuleSpecification moduleSpecification , ModuleLoader moduleLoader , ModuleIdentifier moduleIdentifier ) { } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
if ( ! ( WeldDeploymentMarker . isPartOfWeldDeployment ( deploymentUnit ) ) ) {
Buggy code:
public abstract class AbstractDefaultAjaxBehavior extends AbstractAjaxBehavior { private static final long serialVersionUID = 1L ; public static final PackageResourceReference INDICATOR = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "indicator.gif" ) ; private static final PackageResourceReference JAVASCRIPT = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax.js" ) ; private static final PackageResourceReference JAVASCRIPT_DEBUG_DRAG = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug-drag.js" ) ; private static final PackageResourceReference JAVASCRIPT_DEBUG = new PackageResourceReference ( AbstractDefaultAjaxBehavior . class , "wicket-ajax-debug.js" ) ; @ Override protected final String getImplementationId ( ) { } @ Override protected void onBind ( ) { } @ Override protected void onRenderHeadInitContribution ( final Response response ) { final IAjaxSettings settings = Application . get ( ) . getAjaxSettings ( ) ; writeJsReference ( response , AbstractDefaultAjaxBehavior . JAVASCRIPT ) ; if ( settings . isAjaxDebugModeEnabled ( ) ) { <START_BUG> JavascriptUtils . writeJavascript ( response , "wicketAjaxDebugEnable=true;" ) ; <END_BUG> writeJsReference ( response , AbstractDefaultAjaxBehavior . JAVASCRIPT_DEBUG_DRAG ) ; writeJsReference ( response , AbstractDefaultAjaxBehavior . JAVASCRIPT_DEBUG ) ; } } protected IAjaxCallDecorator getAjaxCallDecorator ( ) { } protected CharSequence getCallbackScript ( ) { } protected CharSequence getCallbackScript ( boolean recordPageVersion ) { } protected CharSequence getCallbackScript ( final CharSequence partialCall , final CharSequence onSuccessScript , final CharSequence onFailureScript ) { } private String findIndicatorId ( ) { } public final void onRequest ( ) { } protected abstract void respond ( AjaxRequestTarget target ) { } public static final CharSequence throttleScript ( CharSequence script , String throttleId , Duration throttleDelay ) { } }

Fix:
JavascriptUtils . writeJavascript ( response , "wicketAjaxDebugEnable=true;" , "wicket-ajax-debug-enable" ) ;
Buggy code:
public final class ConnectorExtension implements Extension { @ Override public void registerElementHandlers ( final XMLMapper mapper ) { <START_BUG> mapper . registerRootElement ( new QName ( "urn:jboss:domain:transactions:1.0" , "subsystem" ) , new ConnectorSubsystemElementParser ( ) ) ; <END_BUG> } @ Override public void activate ( final ServiceActivatorContext context ) { } }

Fix:
mapper . registerRootElement ( new QName ( CONNECTOR_1_0 . getUriString ( ) , "subsystem" ) , new ConnectorSubsystemElementParser ( ) ) ;
Buggy code:
public class TransformPickerActivity extends AppCompatActivity { private Spinner transformTypeSpinner ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void startPicturePreview ( View view ) { } private Class < ? > chooseActivity ( int position ) { switch ( position ) { case 0 : return PicturePreviewActivity . class ; case 1 : <START_BUG> return PicturePickerActivity . class ; <END_BUG> default : return PicturePreviewActivity . class ; } } }

Fix:
return ChoosePictureActivity . class ;
Buggy code:
public class Query extends org . tigris . scarab . om . BaseQuery implements Persistent { public static Query getInstance ( ) { } public void setModule ( ModuleEntity me ) throws Exception { } public ModuleEntity getModule ( ) throws Exception { } public void saveAndSendEmail ( ScarabUser user , ModuleEntity module , TemplateContext context ) throws Exception { } public String getExecuteLink ( String link ) { } public String getEditLink ( String link ) { } public List getFrequencies ( ) throws Exception { } public List getSubscribedUsers ( ) throws Exception { } public boolean isUserSubscribed ( NumberKey userId ) throws Exception { } public RQueryUser getSubscription ( NumberKey userId ) throws Exception { } public void approve ( ScarabUser user , boolean approved ) throws Exception { } public void delete ( ScarabUser user ) throws Exception { ModuleEntity module = getModule ( ) ; ScarabSecurity security = SecurityFactory . getInstance ( ) ; <START_BUG> if ( ( security . hasPermission ( ITEM__APPROVE , user , module ) ) || ( ( user . getUserId ( ) . equals ( getUserId ( ) ) ) && ( getScope ( ) . equals ( PERSONAL__PK ) ) ) ) { <END_BUG> setDeleted ( true ) ; save ( ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } }

Fix:
if ( ( security . hasPermission ( ITEM__APPROVE , user , module ) ) || ( ( user . getUserId ( ) . equals ( getUserId ( ) ) ) && ( getScopeId ( ) . equals ( PERSONAL__PK ) ) ) ) {
Buggy code:
public class PreferencePagesArea { private Composite control ; private FilteredPreferenceDialog dialog ; public PreferencePagesArea ( FilteredPreferenceDialog preferenceDialog ) { } void createContents ( Composite parent , int style ) { } Control getControl ( ) { } boolean show ( IPreferenceNode node ) { node . createPage ( ) ; PreferenceAreaEntry newEntry = new PreferenceAreaEntry ( node , dialog ) ; newEntry . createContents ( control ) ; <START_BUG> control . pack ( true ) ; <END_BUG> return true ; } }

Fix:
control . layout ( true ) ;
Buggy code:
public class TestIsCurrent extends LuceneTestCase { private RandomIndexWriter writer ; private Directory directory ; @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { super . tearDown ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> directory . close ( ) ; } @ Test public void testDeleteByTermIsCurrent ( ) throws IOException { } @ Test public void testDeleteAllIsCurrent ( ) throws IOException { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class FlashmailFragment extends Fragment { private static final int ANSWER_CODE = 1 ; private static final int ANSWER_ID = ( Menu . FIRST ) + 3 ; private static final int MARK_READ_ID = ( Menu . FIRST ) + 4 ; private FlashmailFragment fma = this ; private FlashmailAdapter adapter ; private ListView flashmailList ; private Handler handler ; private Timer timer ; private TimerTask doAsynchronousTask ; private List < Integer > notificationsDisplayed = new ArrayList < Integer > ( ) ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onCreateContextMenu ( ContextMenu menu , View v , ContextMenu . ContextMenuInfo menuInfo ) { } @ Override public boolean onContextItemSelected ( MenuItem item ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { super . onPause ( ) ; Log . d ( "FlashmailFragment" , "onPause<seq2seq4repair_space>called" ) ; SharedPreferences prefs = PreferenceManager . getDefaultSharedPreferences ( this . getActivity ( ) ) ; timer . cancel ( ) ; timer = new Timer ( ) ; doAsynchronousTask = new FlashmailFragment . FlashmailTimerTask ( ) ; <START_BUG> timer . schedule ( doAsynchronousTask , ( ( prefs . getInt ( "settingSyncFrequency" , 60 ) ) * 1000 ) , ( ( prefs . getInt ( "settingSyncFrequency" , 60 ) ) * 1000 ) ) ; <END_BUG> } public TimerTask getFlashmailTask ( ) { } public void setFlashmails ( String json ) { } public List < Integer > createNotifications ( List < Flashmail > flashmails ) { } public void compareNotifications ( Collection < Integer > oldNotifications , Collection < Integer > newNotifications ) { } public void removeAllNotifications ( ) { } public void answerFlashmail ( Flashmail flashmail ) { } public void markFlashmailRead ( Flashmail flashmail ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { } private class FlashmailTimerTask extends TimerTask { @ Override public void run ( ) { } } }

Fix:
timer . schedule ( doAsynchronousTask , ( ( Integer . parseInt ( prefs . getString ( "settingSyncFrequency" , "60" ) ) ) * 1000 ) , ( ( Integer . parseInt ( prefs . getString ( "settingSyncFrequency" , "60" ) ) ) * 1000 ) ) ;
Buggy code:
public class Swing implements ActionListener { private static final Swing I = new Swing ( ) ; private static final JFrame jf = new JFrame ( ) ; private static final JRadioButton gp = new JRadioButton ( "Profile" , true ) ; private static final JComboBox < String > cp = new JComboBox < String > ( Main . getProfiles ( ) ) ; private static final JCheckBox rew = new JCheckBox ( "Fix<seq2seq4repair_space>profile" , true ) ; private static final JRadioButton gv = new JRadioButton ( "Version" ) ; private static final JComboBox < String > cv = new JComboBox < String > ( Main . getVersions ( ) ) ; private static final JLabel jl1 = new JLabel ( "New<seq2seq4repair_space>version<seq2seq4repair_space>name" ) ; private static final JLabel jl2 = new JLabel ( "IME<seq2seq4repair_space>is<seq2seq4repair_space>already<seq2seq4repair_space>installed.<seq2seq4repair_space>Update<seq2seq4repair_space>only" ) ; private static final JTextField dst = new JTextField ( 20 ) ; private static final JButton jb = new JButton ( "OK" ) ; private static String last = null ; private static boolean lv = false ; private Swing ( ) { } @ Override public void actionPerformed ( final ActionEvent e ) { if ( ( e != null ) && ( ( e . getSource ( ) ) == ( Swing . jb ) ) ) { Main . install ( Swing . last , Swing . dst . getText ( ) , ( ! ( Swing . lv ) ) ) ; JOptionPane . showMessageDialog ( null , "Install<seq2seq4repair_space>succeeded!" , "Minecraft<seq2seq4repair_space>IME<seq2seq4repair_space>installer" , JOptionPane . INFORMATION_MESSAGE ) ; Swing . jf . dispose ( ) ; } else { String nsel = null ; boolean nv = false ; if ( Swing . gv . isSelected ( ) ) { nv = true ; Swing . cp . setEnabled ( false ) ; Swing . rew . setVisible ( false ) ; Swing . rew . setSelected ( false ) ; Swing . cv . setVisible ( true ) ; nsel = ( ( String ) ( Swing . cv . getSelectedItem ( ) ) ) ; } else if ( Swing . gp . isSelected ( ) ) { Swing . cp . setEnabled ( true ) ; Swing . rew . setSelected ( true ) ; Swing . rew . setVisible ( true ) ; Swing . cv . setVisible ( false ) ; nsel = ( ( String ) ( Swing . cp . getSelectedItem ( ) ) ) ; } <START_BUG> if ( ( nsel == null ) || ( ( nsel . equals ( Swing . last ) ) && ( nv == ( Swing . lv ) ) ) ) <END_BUG> return ; final String v ; if ( nv ) v = nsel ; else v = Main . p2v ( nsel ) ; if ( Main . isIME ( v ) ) { Swing . jl1 . setVisible ( false ) ; Swing . jl2 . setVisible ( true ) ; Swing . dst . setVisible ( false ) ; Swing . dst . setText ( "" ) ; } else { Swing . jl1 . setVisible ( true ) ; Swing . jl2 . setVisible ( false ) ; Swing . dst . setText ( ( v + "-IME" ) ) ; Swing . dst . setVisible ( true ) ; } Swing . last = nsel ; Swing . lv = nv ; } } static final void show ( ) { } }

Fix:
if ( ( ( nsel != null ) && ( nsel . equals ( Swing . last ) ) ) && ( nv == ( Swing . lv ) ) )
Buggy code:
public class Vector3DFormat extends CompositeFormat { private static final long serialVersionUID = - 5447606608652576301L ; private static final String DEFAULT_PREFIX = "{" ; private static final String DEFAULT_SUFFIX = "}" ; private static final String DEFAULT_SEPARATOR = ";<seq2seq4repair_space>" ; private final String prefix ; private final String suffix ; private final String separator ; private final String trimmedPrefix ; private final String trimmedSuffix ; private final String trimmedSeparator ; private NumberFormat format ; public Vector3DFormat ( ) { } public Vector3DFormat ( final NumberFormat format ) { } public Vector3DFormat ( final String prefix , final String suffix , final String separator ) { } public Vector3DFormat ( final String prefix , final String suffix , final String separator , final NumberFormat format ) { } public static Locale [ ] getAvailableLocales ( ) { } public String getPrefix ( ) { } public String getSuffix ( ) { } public String getSeparator ( ) { } public NumberFormat getFormat ( ) { } public static Vector3DFormat getInstance ( ) { } public static Vector3DFormat getInstance ( final Locale locale ) { } public static String formatVector3D ( Vector3D v ) { } public StringBuffer format ( Vector3D vector , StringBuffer toAppendTo , FieldPosition pos ) { } @ Override public StringBuffer format ( Object obj , StringBuffer toAppendTo , FieldPosition pos ) { } public Vector3D parse ( String source ) throws ParseException { ParsePosition parsePosition = new ParsePosition ( 0 ) ; Vector3D result = parse ( source , parsePosition ) ; if ( ( parsePosition . getIndex ( ) ) == 0 ) { <START_BUG> throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , "unparseable<seq2seq4repair_space>3D<seq2seq4repair_space>vector:<seq2seq4repair_space>\"{0}\"" , source ) ; <END_BUG> } return result ; } public Vector3D parse ( String source , ParsePosition pos ) { } @ Override public Object parseObject ( String source , ParsePosition pos ) { } }

Fix:
throw MathRuntimeException . createParseException ( parsePosition . getErrorIndex ( ) , UNPARSEABLE_3D_VECTOR , source ) ;
Buggy code:
public abstract class OverflowingLRUCache extends LRUCache { protected int fOverflow = 0 ; protected boolean fTimestampsOn = true ; protected double fLoadFactor = 0.333 ; public OverflowingLRUCache ( int size ) { } public OverflowingLRUCache ( int size , int overflow ) { } public Object clone ( ) { } protected abstract boolean close ( LRUCache . LRUCacheEntry entry ) { } public Enumeration elements ( ) { } public double fillingRate ( ) { } public Hashtable getEntryTable ( ) { } public double getLoadFactor ( ) { } public int getOverflow ( ) { } protected boolean makeSpace ( int space ) { } protected abstract LRUCache newInstance ( int size , int overflow ) { } public Object peek ( Object key ) { } public void printStats ( ) { } protected void privateRemoveEntry ( LRUCache . LRUCacheEntry entry , boolean shuffle ) { } protected void privateRemoveEntry ( LRUCache . LRUCacheEntry entry , boolean shuffle , boolean external ) { if ( ! shuffle ) { if ( external ) { fEntryTable . remove ( entry . _fKey ) ; fCurrentSpace -= entry . _fSpace ; privateNotifyDeletionFromCache ( entry ) ; } else { if ( ! ( close ( entry ) ) ) return ; <START_BUG> if ( ( fEntryTable . get ( entry ) ) == null ) { <END_BUG> return ; } else { fEntryTable . remove ( entry . _fKey ) ; fCurrentSpace -= entry . _fSpace ; privateNotifyDeletionFromCache ( entry ) ; } } } LRUCache . LRUCacheEntry previous = entry . _fPrevious ; LRUCache . LRUCacheEntry next = entry . _fNext ; if ( previous == null ) { fEntryQueue = next ; } else { previous . _fNext = next ; } if ( next == null ) { fEntryQueueTail = previous ; } else { next . _fPrevious = previous ; } } public Object put ( Object key , Object value ) { } public Object remove ( Object key ) { } public void setLoadFactor ( double newLoadFactor ) throws IllegalArgumentException { } public void setSpaceLimit ( int limit ) { } public boolean shrink ( ) { } public String toString ( ) { } protected void updateTimestamp ( LRUCache . LRUCacheEntry entry ) { } }

Fix:
if ( ( fEntryTable . get ( entry . _fKey ) ) == null ) {
Buggy code:
public class RecentDirectoriesMenu extends EnhancedMenu { public RecentDirectoriesMenu ( ) { } public void setPopupMenuVisible ( boolean b ) { if ( b ) { <START_BUG> final View view = EditAction . getView ( this ) ; <END_BUG> if ( ( getMenuComponentCount ( ) ) != 0 ) removeAll ( ) ; ActionListener actionListener = new ActionListener ( ) { public void actionPerformed ( ActionEvent evt ) { DockableWindowManager wm = view . getDockableWindowManager ( ) ; wm . addDockableWindow ( NAME ) ; final VFSBrowser browser = ( ( VFSBrowser ) ( wm . getDockable ( NAME ) ) ) ; final String path = evt . getActionCommand ( ) ; VFSManager . runInAWTThread ( new Runnable ( ) { public void run ( ) { if ( ! ( browser . getDirectory ( ) . equals ( path ) ) ) browser . setDirectory ( path ) ; } } ) ; view . getStatus ( ) . setMessage ( null ) ; } } ; MouseListener mouseListener = new MouseAdapter ( ) { public void mouseEntered ( MouseEvent evt ) { view . getStatus ( ) . setMessage ( ( ( JMenuItem ) ( evt . getSource ( ) ) ) . getActionCommand ( ) ) ; } public void mouseExited ( MouseEvent evt ) { view . getStatus ( ) . setMessage ( null ) ; } } ; HistoryModel model = HistoryModel . getModel ( "vfs.browser.path" ) ; if ( ( model . getSize ( ) ) == 0 ) { add ( GUIUtilities . loadMenuItem ( "no-recent-dirs" ) ) ; super . setPopupMenuVisible ( b ) ; return ; } boolean sort = jEdit . getBooleanProperty ( "sortRecent" ) ; Vector menuItems = new Vector ( ) ; for ( int i = 0 ; i < ( model . getSize ( ) ) ; i ++ ) { String path = model . getItem ( i ) ; VFS vfs = VFSManager . getVFSForPath ( path ) ; JMenuItem menuItem = new JMenuItem ( vfs . getFileName ( path ) ) ; menuItem . setActionCommand ( path ) ; menuItem . addActionListener ( actionListener ) ; menuItem . addMouseListener ( mouseListener ) ; menuItem . setIcon ( dirIcon ) ; if ( sort ) menuItems . addElement ( menuItem ) ; else add ( menuItem ) ; } if ( sort ) { MiscUtilities . quicksort ( menuItems , new MiscUtilities . MenuItemCompare ( ) ) ; for ( int i = 0 ; i < ( menuItems . size ( ) ) ; i ++ ) { add ( ( ( JMenuItem ) ( menuItems . elementAt ( i ) ) ) ) ; } } } super . setPopupMenuVisible ( b ) ; } }

Fix:
final View view = GUIUtilities . getView ( this ) ;
Buggy code:
public class Event extends Resource { private static final String TAG = "davdroid.Event" ; public static final String MIME_TYPE = "text//calendar" ; private static final TimeZoneRegistry tzRegistry = new DefaultTimeZoneRegistryFactory ( ) . createRegistry ( ) ; @ Getter @ Setter private String summary ; @ Getter @ Setter private String location ; @ Getter @ Setter private String description ; @ Getter private DtStart dtStart ; @ Getter private DtEnd dtEnd ; @ Getter @ Setter private Duration duration ; @ Getter @ Setter private RDate rdate ; @ Getter @ Setter private RRule rrule ; @ Getter @ Setter private ExDate exdate ; @ Getter @ Setter private ExRule exrule ; @ Getter @ Setter private Boolean forPublic ; @ Getter @ Setter private Status status ; @ Getter @ Setter private boolean opaque ; @ Getter @ Setter private Organizer organizer ; @ Getter private List < Attendee > attendees = new LinkedList < Attendee > ( ) ; public void addAttendee ( Attendee attendee ) { } @ Getter private List < VAlarm > alarms = new LinkedList < VAlarm > ( ) ; public void addAlarm ( VAlarm alarm ) { } public Event ( String name , String ETag ) { } public Event ( long localID , String name , String ETag ) { } @ Override public void initialize ( ) { } protected void generateUID ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public void parseEntity ( @ NonNull InputStream entity ) throws InvalidResourceException , IOException { } @ Override @ SuppressWarnings ( "unchecked" ) public ByteArrayOutputStream toEntity ( ) throws IOException { } public long getDtStartInMillis ( ) { } public String getDtStartTzID ( ) { } public void setDtStart ( long tsStart , String tzID ) { } public long getDtEndInMillis ( ) { } public String getDtEndTzID ( ) { } public void setDtEnd ( long tsEnd , String tzID ) { } public boolean isAllDay ( ) { } protected static boolean hasTime ( DateProperty date ) { } protected static String getTzId ( DateProperty date ) { } protected static void validateTimeZone ( DateProperty date ) { } public static String TimezoneDefToTzId ( String timezoneDef ) throws IllegalArgumentException { try { if ( timezoneDef != null ) { CalendarBuilder builder = new CalendarBuilder ( ) ; Calendar cal = builder . build ( new StringReader ( timezoneDef ) ) ; VTimeZone timezone = ( ( VTimeZone ) ( cal . getComponent ( VTIMEZONE ) ) ) ; return timezone . getTimeZoneId ( ) . getValue ( ) ; } } catch ( Exception ex ) { <START_BUG> Log . w ( Event . TAG , "Can't<seq2seq4repair_space>understand<seq2seq4repair_space>time<seq2seq4repair_space>zone<seq2seq4repair_space>definition" , ex ) ; <END_BUG> } throw new IllegalArgumentException ( ) ; } }

Fix:
Log . w ( Event . TAG , "Can't<seq2seq4repair_space>understand<seq2seq4repair_space>time<seq2seq4repair_space>zone<seq2seq4repair_space>definition,<seq2seq4repair_space>ignoring" , ex ) ;
Buggy code:
public class SelectOption < T > extends WebMarkupContainer < T > { private static final long serialVersionUID = 1L ; public SelectOption ( MarkupContainer parent , final String id ) { } public SelectOption ( MarkupContainer parent , final String id , IModel < T > model ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "option" ) ; <START_BUG> Select select = SelectOption . findParent ( Select . class ) ; <END_BUG> if ( select == null ) { throw new wicket . WicketRuntimeException ( ( ( "SelectOption<seq2seq4repair_space>component<seq2seq4repair_space>[" + ( SelectOption . getPath ( ) ) ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>Select.<seq2seq4repair_space>All<seq2seq4repair_space>SelectOption<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>or<seq2seq4repair_space>below<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>hierarchy<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>Select<seq2seq4repair_space>component." ) ) ; } tag . put ( "value" , SelectOption . getPath ( ) ) ; if ( select . isSelected ( this ) ) { tag . put ( "selected" , "true" ) ; } super . onComponentTag ( tag ) ; } }

Fix:
AbstractSelect select = SelectOption . findParent ( AbstractSelect . class ) ;