nus-yam/ex-repair huggingface dataset:
Buggy code:
public class RenameExtensions extends MatchingTask { private String fromExtension = "" ; private String toExtension = "" ; private boolean replace = false ; private File srcDir ; private MapperType globType ; public RenameExtensions ( ) { } public void setFromExtension ( String from ) { } public void setToExtension ( String to ) { } public void setReplace ( boolean replace ) { } public void setSrcDir ( File srcDir ) { } public void execute ( ) throws BuildException { if ( ( ( ( fromExtension ) == null ) || ( ( toExtension ) == null ) ) || ( ( srcDir ) == null ) ) { throw new BuildException ( ( "srcDir,<seq2seq4repair_space>fromExtension<seq2seq4repair_space>and<seq2seq4repair_space>toExtension<seq2seq4repair_space>" + "attributes<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set!" ) ) ; } log ( "DEPRECATED<seq2seq4repair_space>-<seq2seq4repair_space>The<seq2seq4repair_space>renameext<seq2seq4repair_space>task<seq2seq4repair_space>is<seq2seq4repair_space>deprecated.<seq2seq4repair_space>Use<seq2seq4repair_space>move<seq2seq4repair_space>instead." , MSG_WARN ) ; log ( "Replace<seq2seq4repair_space>this<seq2seq4repair_space>with:" , MSG_INFO ) ; log ( ( ( ( ( "<move<seq2seq4repair_space>todir=\"" + ( srcDir ) ) + "\"<seq2seq4repair_space>overwrite=\"" ) + ( replace ) ) + "\">" ) , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space><fileset<seq2seq4repair_space>dir=\"" + ( srcDir ) ) + "\"<seq2seq4repair_space>//>" ) , MSG_INFO ) ; log ( "<seq2seq4repair_space><mapper<seq2seq4repair_space>type=\"glob\"" , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space>from=\"*" + ( fromExtension ) ) + "\"" ) , MSG_INFO ) ; log ( ( ( "<seq2seq4repair_space>to=\"*" + ( toExtension ) ) + "\"<seq2seq4repair_space>//>" ) , MSG_INFO ) ; log ( "<//move>" , MSG_INFO ) ; log ( "using<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>patterns<seq2seq4repair_space>on<seq2seq4repair_space><fileset><seq2seq4repair_space>as<seq2seq4repair_space>you\'ve<seq2seq4repair_space>used<seq2seq4repair_space>here" , MSG_INFO ) ; <START_BUG> Move move = ( ( Move ) ( project . createTask ( "move" ) ) ) ; <END_BUG> move . setOwningTarget ( target ) ; move . setTaskName ( getTaskName ( ) ) ; move . setLocation ( getLocation ( ) ) ; move . setTodir ( srcDir ) ; move . setOverwrite ( replace ) ; fileset . setDir ( srcDir ) ; move . addFileset ( fileset ) ; Mapper me = move . createMapper ( ) ; me . setType ( globType ) ; me . setFrom ( ( "*" + ( fromExtension ) ) ) ; me . setTo ( ( "*" + ( toExtension ) ) ) ; move . execute ( ) ; } }

Fix:
Move move = ( ( Move ) ( getProject ( ) . createTask ( "move" ) ) ) ;
Buggy code:
@ WebServlet ( name = "RunRmiServlet" , urlPatterns = { "//RunRmiServlet" } ) public class RunRmiServlet extends HttpServlet { private List < Context > contexts = new ArrayList < Context > ( ) ; protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { } protected MyObject lookup ( ) throws ServletException { try { Properties env = new Properties ( ) ; String address = System . getProperty ( "node0" , "localhost" ) ; address = NetworkUtils . formatPossibleIpv6Address ( address ) ; <START_BUG> env . put ( Context . PROVIDER_URL , ( ( "remote:////" + address ) + ":4447" ) ) ; <END_BUG> env . put ( Context . INITIAL_CONTEXT_FACTORY , "org.jboss.naming.remote.client.InitialContextFactory" ) ; Context ctx = new InitialContext ( env ) ; try { return ( ( MyObject ) ( ctx . lookup ( "loc//stub" ) ) ) ; } finally { contexts . add ( ctx ) ; } } catch ( NamingException e ) { throw new ServletException ( e ) ; } } public void destroy ( ) { } }

Fix:
env . put ( Context . PROVIDER_URL , ( ( "http-remoting:////" + address ) + ":8080" ) ) ;
Buggy code:
public class receiver extends ReceivingCircuit { private int dataPin ; @ Override public void inputChange ( int inIdx , boolean newLevel ) { } @ Override protected boolean init ( CommandSender sender , String [ ] args ) { } @ Override public void receive ( BitSet7 bits ) { if ( hasDebuggers ( ) ) <START_BUG> debug ( ( "Received<seq2seq4repair_space>" + ( BitSetUtils . bitSetToBinaryString ( bits , 1 , ( ( outputs . length ) - 1 ) ) ) ) ) ; <END_BUG> this . sendBitSet ( dataPin , ( ( outputs . length ) - ( dataPin ) ) , bits ) ; if ( ( outputs . length ) > 1 ) { this . sendOutput ( 0 , true ) ; this . sendOutput ( 0 , false ) ; } } @ Override public int getChannelLength ( ) { } @ Override protected boolean isStateless ( ) { } }

Fix:
debug ( ( "Received<seq2seq4repair_space>" + ( BitSetUtils . bitSetToBinaryString ( bits , 0 , getChannelLength ( ) ) ) ) ) ;
Buggy code:
public class SimpleSlickGame extends BasicGame { public SimpleSlickGame ( String gamename ) { } @ Override public void init ( GameContainer gc ) throws SlickException { } @ Override public void update ( GameContainer gc , int i ) throws SlickException { } public void render ( GameContainer gc , Graphics g ) throws SlickException { } public static void main ( String [ ] args ) { int screenH = 640 ; int screenW = 1024 ; try { AppGameContainer appgc ; appgc = new AppGameContainer ( new SimpleSlickGame ( "Breakout" ) ) ; <START_BUG> appgc . setDisplayMode ( screenW , screenH , true ) ; <END_BUG> appgc . start ( ) ; } catch ( SlickException ex ) { Logger . getLogger ( SimpleSlickGame . class . getName ( ) ) . log ( Level . SEVERE , null , ex ) ; } } }

Fix:
appgc . setDisplayMode ( screenW , screenH , false ) ;
Buggy code:
public class TajoWorkerClientService extends AbstractService { private static final Log LOG = LogFactory . getLog ( TajoWorkerClientService . class ) ; private final BoolProto BOOL_TRUE = BoolProto . newBuilder ( ) . setValue ( true ) . build ( ) ; private final BoolProto BOOL_FALSE = BoolProto . newBuilder ( ) . setValue ( false ) . build ( ) ; private BlockingRpcServer rpcServer ; private InetSocketAddress bindAddr ; private int port ; private TajoConf conf ; private WorkerContext workerContext ; private TajoWorkerClientService . TajoWorkerClientProtocolServiceHandler serviceHandler ; public TajoWorkerClientService ( TajoWorker . WorkerContext workerContext , int port ) { } @ Override public void init ( Configuration conf ) { } @ Override public void start ( ) { } @ Override public void stop ( ) { } public InetSocketAddress getBindAddr ( ) { } public class TajoWorkerClientProtocolServiceHandler implements QueryMasterClientProtocol . QueryMasterClientProtocolService . BlockingInterface { @ Override public GetQueryHistoryResponse getQueryHistory ( RpcController controller , QueryIdRequest request ) throws ServiceException { GetQueryHistoryResponse . Builder builder = GetQueryHistoryResponse . newBuilder ( ) ; try { QueryId queryId = new QueryId ( request . getQueryId ( ) ) ; <START_BUG> QueryMasterTask queryMasterTask = workerContext . getQueryMaster ( ) . getQueryMasterTask ( queryId ) ; <END_BUG> QueryHistory queryHistory = null ; if ( queryMasterTask == null ) { queryHistory = workerContext . getHistoryReader ( ) . getQueryHistory ( queryId . toString ( ) ) ; } else { queryHistory = queryMasterTask . getQuery ( ) . getQueryHistory ( ) ; } if ( queryHistory != null ) { builder . setQueryHistory ( queryHistory . getProto ( ) ) ; } builder . setResultCode ( OK ) ; } catch ( Throwable t ) { TajoWorkerClientService . LOG . warn ( t . getMessage ( ) , t ) ; builder . setResultCode ( ERROR ) ; builder . setErrorMessage ( StringUtils . stringifyException ( t ) ) ; } return builder . build ( ) ; } } }

Fix:
QueryMasterTask queryMasterTask = workerContext . getQueryMaster ( ) . getQueryMasterTask ( queryId , true ) ;
Buggy code:
public interface IContactItemMap { void add ( Object uid , IContactItem contactItem ) { } <START_BUG> ContactItem get ( Object uid ) ; <END_BUG> void remove ( Object uid ) { } boolean exists ( Object uid ) { } int count ( ) { } Iterator iterator ( ) { } void clear ( ) { } }

Fix:
IContactItem get ( Object uid ) ;
Buggy code:
public class ClientHandler extends Thread { Scanner input ; PrintWriter writer ; EchoServer es ; String userName ; ClientHandler ( Socket socket , EchoServer echo ) throws IOException { } public void run ( ) { } private void sendMessage ( String msg ) { } private void messageToAll ( int type , String user , String msg ) { } <START_BUG> private void messageToPersons ( String user , String msg , String allPersons ) { <END_BUG> String splitter = "[,]" ; String [ ] tokens = allPersons . split ( splitter ) ; ArrayList < String > usersList = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( tokens . length ) ; i ++ ) { usersList . add ( tokens [ i ] ) ; } ArrayList < ClientHandler > clientsOnline = es . getClientsFromUserNames ( usersList ) ; for ( ClientHandler ch : clientsOnline ) { ch . sendMessage ( ( ( ( "MESSAGE#" + user ) + "#" ) + msg ) ) ; } } private void sendOnlineMessage ( ) { } private void closeConnection ( ) { } private void removeClient ( ClientHandler ch , String user ) { } }

Fix:
private void messageToPersons ( String user , String allPersons , String msg ) {
Buggy code:
public final class DepthShader extends Shader { interface Resources extends DefaultResources { DepthShader . Resources INSTANCE = GWT . create ( DepthShader . Resources . class ) ; @ Source ( "source//depth.vs" ) TextResource getVertexShader ( ) { } @ Source ( "source//depth.fs" ) TextResource getFragmentShader ( ) { } } public DepthShader ( ) { } @ Override protected void initUniforms ( ) { } @ Override protected void updateVertexSource ( String src ) { List < String > vars = Arrays . asList ( MORPHTARGET_PARS , LOGDEPTHBUF_PAR ) ; List < String > main1 = Arrays . asList ( MORPHTARGET , DEFAULT , LOGDEPTHBUF ) ; <START_BUG> super . updateFragmentSource ( Shader . updateShaderSource ( src , vars , main1 ) ) ; <END_BUG> } @ Override protected void updateFragmentSource ( String src ) { } }

Fix:
super . updateVertexSource ( Shader . updateShaderSource ( src , vars , main1 ) ) ;
Buggy code:
public class SpliceJunctionHelper { static Logger log = Logger . getLogger ( SpliceJunctionHelper . class ) ; List < SpliceJunctionFeature > spliceJunctionFeatures = new ArrayList ( ) ; Map < Integer , Map < Integer , SpliceJunctionFeature > > posStartEndJunctionsMap = new HashMap < Integer , Map < Integer , SpliceJunctionFeature > > ( ) ; Map < Integer , Map < Integer , SpliceJunctionFeature > > negStartEndJunctionsMap = new HashMap < Integer , Map < Integer , SpliceJunctionFeature > > ( ) ; PreferenceManager prefs = PreferenceManager . getInstance ( ) ; int minJunctionCoverage = prefs . getAsInt ( SAM_JUNCTION_MIN_COVERAGE ) ; int minReadFlankingWidth = prefs . getAsInt ( SAM_JUNCTION_MIN_FLANKING_WIDTH ) ; public List < SpliceJunctionFeature > getFeatures ( ) { } public void addAlignment ( Alignment alignment ) { AlignmentBlock [ ] blocks = alignment . getAlignmentBlocks ( ) ; <START_BUG> if ( ( blocks . length ) < 2 ) { <END_BUG> return ; } boolean isNegativeStrand ; Object strandAttr = alignment . getAttribute ( "XS" ) ; if ( strandAttr != null ) { isNegativeStrand = ( strandAttr . toString ( ) . charAt ( 0 ) ) == '-' ; } else { isNegativeStrand = alignment . isNegativeStrand ( ) ; } Map < Integer , Map < Integer , SpliceJunctionFeature > > startEndJunctionsMapThisStrand = ( isNegativeStrand ) ? negStartEndJunctionsMap : posStartEndJunctionsMap ; int flankingStart = - 1 ; int junctionStart = - 1 ; int gapCount = - 1 ; char [ ] gapTypes = alignment . getGapTypes ( ) ; for ( AlignmentBlock block : blocks ) { int flankingEnd = block . getEnd ( ) ; int junctionEnd = block . getStart ( ) ; if ( ( ( junctionStart != ( - 1 ) ) && ( gapCount < ( gapTypes . length ) ) ) && ( ( gapTypes [ gapCount ] ) == ( SamAlignment . SKIPPED_REGION ) ) ) { if ( ( ( minReadFlankingWidth ) == 0 ) || ( ( ( junctionStart - flankingStart ) >= ( minReadFlankingWidth ) ) && ( ( flankingEnd - junctionEnd ) >= ( minReadFlankingWidth ) ) ) ) { Map < Integer , SpliceJunctionFeature > endJunctionsMap = startEndJunctionsMapThisStrand . get ( junctionStart ) ; if ( endJunctionsMap == null ) { endJunctionsMap = new HashMap < Integer , SpliceJunctionFeature > ( ) ; startEndJunctionsMapThisStrand . put ( junctionStart , endJunctionsMap ) ; } SpliceJunctionFeature junction = endJunctionsMap . get ( junctionEnd ) ; if ( junction == null ) { junction = new SpliceJunctionFeature ( alignment . getChr ( ) , junctionStart , junctionEnd , ( isNegativeStrand ? Strand . NEGATIVE : Strand . POSITIVE ) ) ; endJunctionsMap . put ( junctionEnd , junction ) ; spliceJunctionFeatures . add ( junction ) ; } junction . addRead ( flankingStart , flankingEnd ) ; } } flankingStart = junctionEnd ; junctionStart = flankingEnd ; gapCount += 1 ; } } public void finish ( ) { } }

Fix:
if ( ( blocks == null ) || ( ( blocks . length ) < 2 ) ) {
Buggy code:
class SimpleSubsystemAdd extends AbstractBoottimeAddStepHandler { static final SimpleSubsystemAdd INSTANCE = new SimpleSubsystemAdd ( ) ; private final Logger log = Logger . getLogger ( SimpleSubsystemAdd . class ) ; private SimpleSubsystemAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override public void performBoottime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { context . addStep ( new AbstractDeploymentChainStep ( ) { public void execute ( DeploymentProcessorTarget processorTarget ) { <START_BUG> processorTarget . addDeploymentProcessor ( PHASE , PRIORITY , new SimpleSubsystemDeploymentProcessor ( ) ) ; <END_BUG> } } , RUNTIME ) ; context . getServiceTarget ( ) . addService ( NAME , new SimpleService ( ) ) . install ( ) ; } }

Fix:
processorTarget . addDeploymentProcessor ( SUBSYSTEM_NAME , PHASE , PRIORITY , new SimpleSubsystemDeploymentProcessor ( ) ) ;
Buggy code:
public class TelnetServer implements TtyCodes { private static final Logger logger = Logger . getLogger ( TelnetServer . class . getName ( ) ) ; private final TelnetListener listener ; private final TelnetActivationSpec spec ; private final int port ; private final Map < String , Cmd > cmds = new TreeMap < String , Cmd > ( ) ; private final AtomicBoolean running = new AtomicBoolean ( ) ; private final ServerSocket serverSocket ; public TelnetServer ( TelnetActivationSpec spec , TelnetListener listener , int port ) throws IOException { } public TelnetListener getListener ( ) { } public void activate ( ) throws IOException { } public void deactivate ( ) throws IOException { } public void session ( Socket socket ) throws IOException { } private static void close ( Closeable closeable ) { } protected void prompt ( DataInputStream in , PrintStream out ) throws TelnetServer . StopException { } public class BuiltInCmd extends Cmd { public BuiltInCmd ( String name , Method method ) { } @ Override public void exec ( Object impl , String [ ] args , PrintStream out ) throws Throwable { } } public String help ( String arg ) { final StringBuilder sb = new StringBuilder ( ) ; if ( arg == null ) { for ( String s : cmds . keySet ( ) ) { sb . append ( s ) . append ( "\n" ) ; } } else { final Cmd cmd = cmds . get ( arg ) ; if ( cmd == null ) { <START_BUG> sb . append ( "Unkown<seq2seq4repair_space>command:<seq2seq4repair_space>" ) . append ( arg ) ; <END_BUG> } else { final Method method = cmd . getMethod ( ) ; sb . append ( cmd . getName ( ) ) . append ( "<seq2seq4repair_space>" ) ; final Class < ? > [ ] types = method . getParameterTypes ( ) ; for ( Class < ? > type : types ) { sb . append ( "<" ) . append ( type . getSimpleName ( ) . toLowerCase ( ) ) . append ( ">" ) . append ( "<seq2seq4repair_space>" ) ; } if ( ( types . length ) == 0 ) { sb . append ( "[no<seq2seq4repair_space>options]" ) ; } } } return sb . toString ( ) ; } public void exit ( ) throws TelnetServer . StopException { } public static class StopException extends Exception { public StopException ( ) { } public StopException ( Throwable cause ) { } } }

Fix:
sb . append ( "Unknown<seq2seq4repair_space>command:<seq2seq4repair_space>" ) . append ( arg ) ;
Buggy code:
public class TestSampleResult extends TestCase { public TestSampleResult ( String name ) { } public void testElapsed ( ) throws Exception { } public void testPause ( ) throws Exception { } private static final Formatter fmt = new RawFormatter ( ) ; private StringWriter wr = null ; private void divertLog ( ) { } public void testPause2 ( ) throws Exception { } public void testByteCount ( ) throws Exception { } private static long sampleClock ( ) { <START_BUG> return SampleResult . currentTimeInMs ( ) ; <END_BUG> } public void testSubResults ( ) throws Exception { } public void testEncodingAndType ( ) throws Exception { } }

Fix:
return System . currentTimeMillis ( ) ;
Buggy code:
public class ArticleMerger extends UntypedActor { private LoggingAdapter log = Logging . getLogger ( getContext ( ) . system ( ) , this ) ; private ActorRef workerRouter ; private ArticleRepository articles ; public ArticleMerger ( int storageDays ) { } @ Override public void preStart ( ) throws Exception { log . info ( "OrpArticle<seq2seq4repair_space>Handler<seq2seq4repair_space>started." ) ; workerRouter = getContext ( ) . actorOf ( FromConfig . getInstance ( ) . props ( Props . empty ( ) ) , "workerRouter4" ) ; getContext ( ) . system ( ) . scheduler ( ) . schedule ( Duration . Zero ( ) , Duration . create ( 1 , TimeUnit . SECONDS ) , ( ) -> { workerRouter . tell ( new Broadcast ( new MergedArticles ( articles ) ) , getSelf ( ) ) ; } , getContext ( ) . dispatcher ( ) ) ; <START_BUG> int itemStorageDays = 2 ; <END_BUG> getContext ( ) . system ( ) . scheduler ( ) . schedule ( Duration . create ( 1 , TimeUnit . HOURS ) , Duration . create ( 1 , TimeUnit . HOURS ) , ( ) -> { log . info ( ( ( "Deleting<seq2seq4repair_space>items<seq2seq4repair_space>older<seq2seq4repair_space>than<seq2seq4repair_space>" + itemStorageDays ) + "<seq2seq4repair_space>days." ) ) ; articles . clean ( itemStorageDays ) ; } , getContext ( ) . dispatcher ( ) ) ; super . preStart ( ) ; } @ Override public void onReceive ( Object message ) { } public static Props create ( ) { } private static class ItemHandlerCreator implements Creator < ArticleMerger > { @ Override public ArticleMerger create ( ) throws Exception { } } public static class MergedArticles implements Serializable { private ArticleRepository articles ; public MergedArticles ( ArticleRepository articles ) { } public ArticleRepository getArticles ( ) { } } public static class NewArticles implements Serializable { private HashSet < OrpArticle > newArticles ; public NewArticles ( HashSet < OrpArticle > newArticles ) { } public HashSet < OrpArticle > getNewArticles ( ) { } } public static class RemovedArticles implements Serializable { private HashSet < OrpArticleRemove > removedArticles ; public RemovedArticles ( HashSet < OrpArticleRemove > removedArticles ) { } public HashSet < OrpArticleRemove > getRemovedArticles ( ) { } } }

Fix:
int itemStorageDays = 1 ;
Buggy code:
public class CERTRecord extends Record { short certType ; short keyTag ; byte alg ; byte [ ] cert ; static int NOCONF = 32768 ; static int NOAUTH = 16384 ; public CERTRecord ( Name _name , short _dclass , int _ttl , int _certType , int _keyTag , int _alg , byte [ ] _cert ) { } public CERTRecord ( Name _name , short _dclass , int _ttl , int length , DataByteInputStream in , Compression c ) throws IOException { } public CERTRecord ( Name _name , short _dclass , int _ttl , MyStringTokenizer st , Name origin ) throws IOException { } public String toString ( ) { } public short getCertType ( ) { } public short getKeyTag ( ) { } public byte getAlgorithm ( ) { } void rrToWire ( DataByteOutputStream dbs , Compression c ) throws IOException { if ( ( cert ) == null ) return ; dbs . writeShort ( certType ) ; <START_BUG> dbs . writeByte ( keyTag ) ; <END_BUG> dbs . writeByte ( alg ) ; dbs . write ( cert ) ; } }

Fix:
dbs . writeShort ( keyTag ) ;
Buggy code:
public class PlayerTest { @ Test public void testConstructor ( ) { } @ Test public void testSetName ( ) { } @ Test public void testDealDamage ( ) { } @ Test public void testRunAttempt ( ) { Player p = new Player ( ) ; <START_BUG> Boolean bool = p . runAttempt ( ) ; <END_BUG> if ( bool ) { assertTrue ( true ) ; } else { assertTrue ( false ) ; } } @ Test public void testGetScore ( ) { } @ Test public void testGetRooms ( ) { } @ Test public void testGetMonstersDefeated ( ) { } @ Test public void testIncreaseScore ( ) { } @ Test public void testDefeatedMonster ( ) { } @ Test public void testClearedRoom ( ) { } }

Fix:
boolean bool = p . runAttempt ( ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class CompactBinaryFile extends File { private byte [ ] binary ; private int pos ; private int subPos ; private boolean reading = false ; private boolean writing = false ; public void read ( ) { } public boolean nextBit ( ) { } private boolean bitAt ( byte b , int pos ) { } public long getNumber ( int bits ) { } private long power ( int p ) { } public void write ( ) { } public void addBit ( boolean bit ) { } public void stopWriting ( ) { } public long getLeft ( ) { } public void nextBits ( boolean [ ] bits , int position , int length ) { } public void resetIterator ( ) { <START_BUG> if ( ( ! ( reading ) ) || ( ! ( writing ) ) ) <END_BUG> throw new IllegalStateException ( "Not<seq2seq4repair_space>editing<seq2seq4repair_space>file!" ) ; pos = subPos = 0 ; } public boolean hasFinished ( ) { } public void stopReading ( ) { } public void addNumber ( long number , int bits ) { } public void addString ( String s , int lengthAllocation ) { } public String getString ( int lengthAllocation ) { } public boolean ensureExistance ( ) { } public CompactBinaryFile ( File parent , String child ) { } public CompactBinaryFile ( String parent , String child ) { } public CompactBinaryFile ( URI uri ) { } public CompactBinaryFile ( String file ) { } public long getPosition ( ) { } public boolean isReadingFile ( ) { } public boolean isWritingFile ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ! ( reading ) ) && ( ! ( writing ) ) )
Buggy code:
public class FuzzyKMeansDriver extends AbstractJob { public static final String M_OPTION = "m" ; private static final Logger log = LoggerFactory . getLogger ( FuzzyKMeansDriver . class ) ; public static void main ( String [ ] args ) throws Exception { } @ Override public int run ( String [ ] args ) throws Exception { } public static void run ( Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , int maxIterations , float m , boolean runClustering , boolean emitMostLikely , double threshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static void run ( Configuration conf , Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , int maxIterations , float m , boolean runClustering , boolean emitMostLikely , double threshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static Path buildClusters ( Configuration conf , Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , int maxIterations , float m , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { } public static void clusterData ( Path input , Path clustersIn , Path output , DistanceMeasure measure , double convergenceDelta , float m , boolean emitMostLikely , double threshold , boolean runSequential ) throws IOException , ClassNotFoundException , InterruptedException { ClusterClassifier . writePolicy ( new FuzzyKMeansClusteringPolicy ( m , convergenceDelta ) , clustersIn ) ; <START_BUG> ClusterClassificationDriver . run ( input , output , new Path ( output , PathDirectory . CLUSTERED_POINTS_DIRECTORY ) , threshold , true , runSequential ) ; <END_BUG> } }

Fix:
ClusterClassificationDriver . run ( input , output , new Path ( output , PathDirectory . CLUSTERED_POINTS_DIRECTORY ) , threshold , emitMostLikely , runSequential ) ;
Buggy code:
final class WifiReceiver extends BroadcastReceiver { private final String TAG = "WifiReceiver" ; private final WifiManager mWifiManager ; private final Activity parent ; private final TextView statusView ; WifiReceiver ( WifiManager wifiManager , Activity wifiActivity , TextView statusView , String ssid ) { } @ Override public void onReceive ( Context context , Intent intent ) { if ( intent . getAction ( ) . equals ( SUPPLICANT_STATE_CHANGED_ACTION ) ) { handleChange ( ( ( SupplicantState ) ( intent . getParcelableExtra ( EXTRA_NEW_STATE ) ) ) , intent . hasExtra ( EXTRA_SUPPLICANT_ERROR ) , intent . getIntExtra ( EXTRA_SUPPLICANT_ERROR , 0 ) ) ; } else if ( intent . getAction ( ) . equals ( NETWORK_STATE_CHANGED_ACTION ) ) { handleNetworkStateChanged ( ( ( NetworkInfo ) ( intent . getParcelableExtra ( EXTRA_NETWORK_INFO ) ) ) ) ; } else if ( intent . getAction ( ) . equals ( CONNECTIVITY_ACTION ) ) { final ConnectivityManager con = ( ( ConnectivityManager ) ( parent . getSystemService ( CONNECTIVITY_SERVICE ) ) ) ; final NetworkInfo [ ] s = con . getAllNetworkInfo ( ) ; for ( final NetworkInfo i : s ) { if ( i . getTypeName ( ) . contentEquals ( "WIFI" ) ) { final NetworkInfo . State state = i . getState ( ) ; final String ssid = mWifiManager . getConnectionInfo ( ) . getSSID ( ) ; <START_BUG> if ( state == ( State . CONNECTED ) ) { <END_BUG> mWifiManager . saveConfiguration ( ) ; final String label = parent . getString ( wifi_connected ) ; statusView . setText ( ( ( label + "\n" ) + ssid ) ) ; Runnable delayKill = new Killer ( parent ) ; delayKill . run ( ) ; } if ( state == ( State . DISCONNECTED ) ) { Log . d ( TAG , ( ( ( "Got<seq2seq4repair_space>state:<seq2seq4repair_space>" + ( state . toString ( ) ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>ssid:<seq2seq4repair_space>" ) + ssid ) ) ; ( ( WifiActivity ) ( parent ) ) . gotError ( ) ; } } } } } private void handleNetworkStateChanged ( NetworkInfo networkInfo ) { } private void handleChange ( SupplicantState state , boolean hasError , int error ) { } }

Fix:
if ( ( state == ( State . CONNECTED ) ) && ( ssid != null ) ) {
Buggy code:
public class MultipleTermPositions implements TermPositions { private static final class TermPositionsQueue extends PriorityQueue { TermPositionsQueue ( List termPositions ) throws IOException { } final TermPositions peek ( ) { } public final boolean lessThan ( Object a , Object b ) { } } private static final class IntQueue { private int _arraySize = 16 ; private int _index = 0 ; private int _lastIndex = 0 ; private int [ ] _array = new int [ _arraySize ] ; final void add ( int i ) { } final int next ( ) { } final void sort ( ) { } final void clear ( ) { } final int size ( ) { } private void growArray ( ) { } } private int _doc ; private int _freq ; private MultipleTermPositions . TermPositionsQueue _termPositionsQueue ; private MultipleTermPositions . IntQueue _posList ; public MultipleTermPositions ( IndexReader indexReader , Term [ ] terms ) throws IOException { } public final boolean next ( ) throws IOException { } public final int nextPosition ( ) { } public final boolean skipTo ( int target ) throws IOException { <START_BUG> while ( target > ( _termPositionsQueue . peek ( ) . doc ( ) ) ) { <END_BUG> TermPositions tp = ( ( TermPositions ) ( _termPositionsQueue . pop ( ) ) ) ; if ( tp . skipTo ( target ) ) _termPositionsQueue . put ( tp ) ; else tp . close ( ) ; } return next ( ) ; } public final int doc ( ) { } public final int freq ( ) { } public final void close ( ) throws IOException { } public void seek ( Term arg0 ) throws IOException { } public void seek ( TermEnum termEnum ) throws IOException { } public int read ( int [ ] arg0 , int [ ] arg1 ) throws IOException { } }

Fix:
while ( ( ( _termPositionsQueue . peek ( ) ) != null ) && ( target > ( _termPositionsQueue . peek ( ) . doc ( ) ) ) ) {
Buggy code:
public class Input extends Task { private String validargs = null ; private String message = "" ; private String addproperty = null ; private String defaultvalue = null ; public void setValidargs ( String validargs ) { } public void setAddproperty ( String addproperty ) { } public void setMessage ( String message ) { } public void setDefaultvalue ( String defaultvalue ) { } public void addText ( String msg ) { } public Input ( ) { } public void execute ( ) throws BuildException { InputRequest request = null ; if ( ( validargs ) != null ) { Vector accept = StringUtils . split ( validargs , ',' ) ; request = new MultipleChoiceInputRequest ( message , accept ) ; } else { request = new InputRequest ( message ) ; } getProject ( ) . getInputHandler ( ) . handleInput ( request ) ; String value = request . getInput ( ) ; if ( ( ( value == null ) || ( ( value . trim ( ) . length ( ) ) == 0 ) ) && ( ( defaultvalue ) != null ) ) { value = defaultvalue ; } if ( ( addproperty ) != null ) { <START_BUG> project . setNewProperty ( addproperty , value ) ; <END_BUG> } } }

Fix:
getProject ( ) . setNewProperty ( addproperty , value ) ;
Buggy code:
public class DocGen { public static void main ( String [ ] args ) { <START_BUG> DocGen . events ( "wiki" ) ; <END_BUG> } public static void functions ( String type ) { } public static void events ( String type ) { } private static class PrefilterData { public static String Get ( String [ ] data , String type ) { } private static String ExpandMacro ( String macro , String type ) { } } private static class EventData { public static String Get ( String [ ] data , String type ) { } } private static class MutabilityData { public static String Get ( String [ ] data , String type ) { } } private static class ManualTriggerData { public static String Get ( String [ ] data , String type ) { } } }

Fix:
DocGen . functions ( "wiki" ) ;
Buggy code:
public interface IDebugBarContributor extends Serializable { <START_BUG> Component createComponent ( String id , WicketDebugBar debugBar ) ; <END_BUG> }

Fix:
Component createComponent ( String id , DebugBar debugBar ) ;
Buggy code:
public class SimpsonIntegrator extends UnivariateRealIntegratorImpl { private static final long serialVersionUID = 2535890386567281329L ; @ Deprecated public SimpsonIntegrator ( UnivariateRealFunction f ) { } public SimpsonIntegrator ( ) { } @ Deprecated public double integrate ( final double min , final double max ) throws IllegalArgumentException , FunctionEvaluationException , MaxIterationsExceededException { } public double integrate ( final UnivariateRealFunction f , final double min , final double max ) throws IllegalArgumentException , FunctionEvaluationException , MaxIterationsExceededException { } protected void verifyIterationCount ( ) throws IllegalArgumentException { super . verifyIterationCount ( ) ; if ( ( maximalIterationCount ) > 64 ) { <START_BUG> throw MathRuntimeException . createIllegalArgumentException ( "invalid<seq2seq4repair_space>iteration<seq2seq4repair_space>limits:<seq2seq4repair_space>min={0},<seq2seq4repair_space>max={1}" , new Object [ ] { 0 , 64 } ) ; <END_BUG> } } }

Fix:
throw MathRuntimeException . createIllegalArgumentException ( "invalid<seq2seq4repair_space>iteration<seq2seq4repair_space>limits:<seq2seq4repair_space>min={0},<seq2seq4repair_space>max={1}" , 0 , 64 ) ;
Buggy code:
public class SendLaterAction extends FrameAction { public SendLaterAction ( AbstractFrameController FrameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> final ComposerController composerController = ( ( ComposerController ) ( getFrameController ( ) ) ) ; <END_BUG> if ( composerController . checkState ( ) ) return ; AccountItem item = ( ( org . columba . mail . gui . composer . ComposerModel ) ( composerController . getModel ( ) ) ) . getAccountItem ( ) ; SpecialFoldersItem folderItem = item . getSpecialFoldersItem ( ) ; OutboxFolder destFolder = ( ( OutboxFolder ) ( treeModel . getFolder ( 103 ) ) ) ; ComposerCommandReference [ ] r = new ComposerCommandReference [ 1 ] ; r [ 0 ] = new ComposerCommandReference ( composerController , destFolder ) ; SaveMessageCommand c = new SaveMessageCommand ( r ) ; processor . addOp ( c ) ; } }

Fix:
final ComposerController composerController = ( ( ComposerController ) ( getFrameMediator ( ) ) ) ;
Buggy code:
public interface IEventProcessor { public boolean acceptEvent ( Event event ) { } <START_BUG> public Event processEvent ( Event e ) ; <END_BUG> }

Fix:
public Event processEvent ( Event event ) ;
Buggy code:
public class MainActivity extends Activity implements SharedPreferences . OnSharedPreferenceChangeListener , NavigationDrawerFragment . NavigationDrawerCallbacks { private Fragment mCurrentFragment ; private NavigationDrawerFragment mNavigationDrawerFragment ; private ShowsFragment mShowsFragment ; private ComingEpisodesFragment mComingEpisodesFragment ; private CharSequence mTitle ; private Fragment getCurrentFragment ( ) { } public void setCurrentFragment ( Fragment value ) { } @ Override public void onBackPressed ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public void onNavigationDrawerItemSelected ( int position ) { Fragment fragment = null ; Preferences preferences = new Preferences ( this ) ; boolean hasUrl = ( ( preferences . getSickbeardUrl ( ) ) != null ) && ( ( preferences . getSickbeardUrl ( ) . length ( ) ) > 0 ) ; boolean hasApiKey = ( ( preferences . getApiKey ( ) ) != null ) && ( ( preferences . getApiKey ( ) . length ( ) ) > 0 ) ; <START_BUG> if ( ( ( ! hasUrl ) || ( ! hasApiKey ) ) && ( position != 99 ) ) { <END_BUG> fragment = new SetupFragment ( ) ; } else if ( position == 0 ) { if ( ( mShowsFragment ) == null ) { mShowsFragment = new ShowsFragment ( ) ; } fragment = mShowsFragment ; } else if ( position == 1 ) { if ( ( mComingEpisodesFragment ) == null ) { mComingEpisodesFragment = new ComingEpisodesFragment ( ) ; } fragment = mComingEpisodesFragment ; } else if ( position == 2 ) { fragment = new HistoryFragment ( ) ; } else if ( position == 3 ) { fragment = new LogFragment ( ) ; } else if ( position == 4 ) { fragment = new ProfilesFragment ( ) ; } else if ( position == 99 ) { fragment = new PreferencesFragment ( ) ; } if ( fragment != null ) { FragmentManager manager = this . getFragmentManager ( ) ; manager . beginTransaction ( ) . replace ( container , fragment ) . commit ( ) ; setCurrentFragment ( fragment ) ; } } public void restoreActionBar ( ) { } public void setTitle ( String value ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } private void shutdownSickbeard ( ) { } private void shutdownSickbeard ( boolean prompt ) { } private void restartSickbeard ( boolean prompt ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onSharedPreferenceChanged ( SharedPreferences sharedPreferences , String s ) { } public void invalidateFragmentCache ( ) { } }

Fix:
if ( ( ( ( ! hasUrl ) || ( ! hasApiKey ) ) && ( position != 4 ) ) && ( position != 99 ) ) {
Buggy code:
@ Deprecated public abstract class ConditionalTestCase extends TestCase { private static int disabledTestCount ; public static int getDisabledTestCount ( ) { } protected final Log logger = LogFactory . getLog ( getClass ( ) ) ; public ConditionalTestCase ( ) { } public ConditionalTestCase ( String name ) { } public void runBare ( ) throws Throwable { if ( isDisabledInThisEnvironment ( getName ( ) ) ) { recordDisabled ( ) ; <START_BUG> this . logger . info ( ( ( ( ( ( ( "****<seq2seq4repair_space>" + ( getClass ( ) . getName ( ) ) ) + "." ) + ( getName ( ) ) ) + "<seq2seq4repair_space>disabled<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>environment:<seq2seq4repair_space>" ) + "Total<seq2seq4repair_space>disabled<seq2seq4repair_space>tests<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( ConditionalTestCase . getDisabledTestCount ( ) ) ) ) ; <END_BUG> return ; } super . runBare ( ) ; } protected boolean isDisabledInThisEnvironment ( String testMethodName ) { } protected int recordDisabled ( ) { } }

Fix:
this . logger . info ( ( ( ( ( ( ( "****<seq2seq4repair_space>" + ( getClass ( ) . getName ( ) ) ) + "." ) + ( getName ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>disabled<seq2seq4repair_space>in<seq2seq4repair_space>this<seq2seq4repair_space>environment:<seq2seq4repair_space>" ) + "Total<seq2seq4repair_space>disabled<seq2seq4repair_space>tests<seq2seq4repair_space>=<seq2seq4repair_space>" ) + ( ConditionalTestCase . getDisabledTestCount ( ) ) ) ) ;
Buggy code:
final class ClientConfigAdd extends AbstractAddStepHandler { static final ClientConfigAdd INSTANCE = new ClientConfigAdd ( ) ; private ClientConfigAdd ( ) { } @ Override protected void populateModel ( final ModelNode operation , final ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model , final ServiceVerificationHandler verificationHandler , final List < ServiceController < ? > > newControllers ) throws OperationFailedException { final ServerConfig config = PackageUtils . getServerConfig ( context ) ; if ( config != null ) { final PathAddress address = PathAddress . pathAddress ( operation . require ( OP_ADDR ) ) ; final String name = address . getLastElement ( ) . getValue ( ) ; ClientConfig clientConfig = new ClientConfig ( ) ; clientConfig . setConfigName ( name ) ; config . addClientConfig ( clientConfig ) ; if ( ! ( context . isBooting ( ) ) ) { <START_BUG> context . restartRequired ( ) ; <END_BUG> } } } }

Fix:
context . reloadRequired ( ) ;
Buggy code:
public class World { public static final int ZOMBIE_WIDTH = 48 ; public static final int ZOMBIE_HEIGHT = 73 ; private static Player player ; private static ArrayList < Zombie > zombies ; private static ArrayList < ZombieSpawner > zombieSpawner ; private static ArrayList < Block > backgroundTiles ; private static ArrayList < Block > tiles ; private static ArrayList < Block > foregroundTiles ; private static ArrayList < Entity > zones ; private static HashMap < String , Image > textures ; public static void init ( ) throws SlickException { } private static void loadTextures ( ) throws SlickException { } private static void loadMap ( ) throws SlickException { } private static void createForeground ( float x , float y , float width , float height , String texture ) throws SlickException { } private static void createBackground ( float x , float y , float width , float height , String texture ) throws SlickException { } private static void createOverlay ( float x , float y , float width , float height , String texture ) throws SlickException { } private static void createStandardEarth ( float x , float y , float width , float height ) throws SlickException { } private static void createEarthPlatform ( float x , float y , float width , float height , boolean shadow ) throws SlickException { World . createForeground ( x , y , width , height , "" ) ; <START_BUG> World . createOverlay ( x , ( y - 4 ) , width , 14 , "GrassOverlay" ) ; <END_BUG> World . createOverlay ( ( x - 4 ) , y , 15 , height , "GrassOverlayLeft" ) ; World . createOverlay ( ( ( x + width ) - 12 ) , y , 15 , height , "GrassOverlayRight" ) ; if ( shadow ) World . createOverlay ( x , ( y + height ) , width , 13 , "EarthShadowOverlay" ) ; } public static void update ( GameContainer gc , int delta ) throws SlickException { } public static void draw ( GameContainer gc , Graphics g ) { } public static Zombie getZombieByIndex ( int index ) { } public static void addZombie ( Zombie zombie ) { } public static int getZombieListSize ( ) { } public static void removeZombieByIndex ( int index ) { } public static void removeZombie ( Zombie zombie ) { } public static ZombieSpawner getZombieSpawnerByIndex ( int index ) { } public static void addZombieSpawner ( ZombieSpawner zs ) { } public static int getZombieSpawnerListSize ( ) { } public static void removeZombieSpawnerByIndex ( int index ) { } public static void removeZombieSpawner ( ZombieSpawner zs ) { } public static Block getTileByIndex ( int index ) { } public static void addTile ( Block block ) { } public static int getTileListSize ( ) { } public static Player getPlayer ( ) { } }

Fix:
World . createOverlay ( x , ( y - 4 ) , width , 15 , "GrassOverlay" ) ;
Buggy code:
public class MatcherFalse < T > implements Matcher < T > { private static final Logger LOGGER = Logger . getLogger ( MatcherFalse . class . getName ( ) ) ; private static final String CLASS_NAME = MatcherFalse . class . getName ( ) ; @ Override public boolean match ( T target ) { } @ Override public String toString ( ) { <START_BUG> return "MatcherTrue" ; <END_BUG> } }

Fix:
return "MatcherFalse" ;
Buggy code:
public class DeadlineControlSet extends PopupControlSet { private boolean isQuickadd = false ; private DateAndTimePicker dateAndTimePicker ; private final View [ ] extraViews ; private final RepeatControlSet repeatControlSet ; public DeadlineControlSet ( Activity activity , int viewLayout , int displayViewLayout , RepeatControlSet repeatControlSet , View ... extraViews ) { } @ Override protected void refreshDisplayView ( ) { } @ Override protected void afterInflate ( ) { } @ Override protected void readFromTaskPrivate ( ) { } @ Override protected String writeToModelPrivate ( Task task ) { } private void initializeWithDate ( long dueDate ) { } public boolean isDeadlineSet ( ) { <START_BUG> return ( dateAndTimePicker . constructDueDate ( ) ) != 0 ; <END_BUG> } public void setIsQuickadd ( boolean isQuickadd ) { } }

Fix:
return ( ( dateAndTimePicker ) != null ) && ( ( dateAndTimePicker . constructDueDate ( ) ) != 0 ) ;
Buggy code:
@ SuppressWarnings ( "deprecation" ) public class iTag extends JavaPlugin implements Listener { private static final MethodAccessor getProtocolVersion = Accessors . getMethodAccessor ( MinecraftReflection . getMinecraftClass ( "NetworkManager" ) , "getVersion" ) ; private static final MethodAccessor playerProfile = Accessors . getMethodAccessor ( MinecraftReflection . getCraftPlayerClass ( ) , "getProfile" ) ; private static final FieldAccessor propertiesField = Accessors . getFieldAcccessorOrNull ( GameProfile . class , "properties" , PropertyMap . class ) ; private static final ConstructorAccessor wrappedProfile = Accessors . getConstructorAccessor ( WrappedGameProfile . class , Object . class ) ; private static final FieldAccessor uuidField = Accessors . getFieldAcccessorOrNull ( GameProfile . class , "id" , UUID . class ) ; @ Getter private static iTag instance ; private Map < Integer , Player > entityIdMap ; @ Override public void onEnable ( ) { } @ EventHandler public void onJoin ( PlayerJoinEvent event ) { } @ EventHandler public void onQuit ( PlayerQuitEvent event ) { } @ Override public void onDisable ( ) { } private WrappedGameProfile getSentName ( int sentEntityId , WrappedGameProfile sent , Player destinationPlayer ) { } private WrappedGameProfile getSentName ( Player namedPlayer , WrappedGameProfile sent , Player destinationPlayer ) { } private int getProcotolVersion ( Player player ) { } public GameProfile checkClone ( Player player , GameProfile profile ) { } public WrappedGameProfile checkClone ( Player player , WrappedGameProfile profile ) { <START_BUG> return ( profile . getHandle ( ) ) == ( iTag . playerProfile . invoke ( player ) ) ? profile : clone ( profile ) ; <END_BUG> } public WrappedGameProfile clone ( WrappedGameProfile original ) { } private GameProfile clone ( GameProfile original ) { } public void refreshPlayer ( Player player ) { } public void refreshPlayer ( final Player player , final Player forWhom ) { } public void refreshPlayer ( Player player , Set < Player > forWhom ) { } }

Fix:
return ( profile . getHandle ( ) ) == ( iTag . playerProfile . invoke ( player ) ) ? clone ( profile ) : profile ;
Buggy code:
public class HTTPArgumentsPanel extends ArgumentsPanel { private static final long serialVersionUID = 240L ; private static final String ENCODE_OR_NOT = "encode?" ; private static final String INCLUDE_EQUALS = "include_equals" ; @ Override protected void initializeTableModel ( ObjectTableModel model ) { <START_BUG> if ( ( tableModel ) == null ) { <END_BUG> tableModel = new ObjectTableModel ( new String [ ] { ArgumentsPanel . COLUMN_RESOURCE_NAMES_0 , ArgumentsPanel . COLUMN_RESOURCE_NAMES_1 , HTTPArgumentsPanel . ENCODE_OR_NOT , HTTPArgumentsPanel . INCLUDE_EQUALS } , HTTPArgument . class , new Functor [ ] { new Functor ( "getName" ) , new Functor ( "getValue" ) , new Functor ( "isAlwaysEncoded" ) , new Functor ( "isUseEquals" ) } , new Functor [ ] { new Functor ( "setName" ) , new Functor ( "setValue" ) , new Functor ( "setAlwaysEncoded" ) , new Functor ( "setUseEquals" ) } , new Class [ ] { String . class , String . class , Boolean . class , Boolean . class } ) ; } else { tableModel = model ; } } public static boolean testFunctors ( ) { } @ Override protected void sizeColumns ( JTable table ) { } @ Override protected HTTPArgument makeNewArgument ( ) { } public HTTPArgumentsPanel ( ) { } @ Override public TestElement createTestElement ( ) { } public Arguments getParameters ( ) { } private Arguments getUnclonedParameters ( ) { } @ Override public void configure ( TestElement el ) { } protected boolean isMetaDataNormal ( HTTPArgument arg ) { } }

Fix:
if ( model == null ) {
Buggy code:
public class DynamicFragment extends Fragment implements View . OnClickListener , AlertDialogFragment . AlertDialogFragmentListener { private static final String DIALOG_TAG = "dialog" ; private static final String ARG_TEXT = "text" ; private String text ; private DynamicFragment . DynamicFragmentListener listener ; public interface DynamicFragmentListener { public void onShowXmlFragment ( ) { } } public static DynamicFragment newInstance ( String text ) { } public DynamicFragment ( ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { super . onViewCreated ( view , savedInstanceState ) ; DynamicFragment . ViewHolder holder = new DynamicFragment . ViewHolder ( view ) ; <START_BUG> view . setTag ( view ) ; <END_BUG> holder . textView . setText ( text ) ; holder . xmlFragmentButton . setOnClickListener ( this ) ; holder . dialogFragmentButton . setOnClickListener ( this ) ; } @ Override public void onDetach ( ) { } @ Override public void onClick ( View v ) { } @ Override public void onOkSelected ( ) { } static class ViewHolder { final TextView textView ; final View xmlFragmentButton ; final View dialogFragmentButton ; ViewHolder ( View view ) { } } }

Fix:
view . setTag ( holder ) ;