nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ClassLoaderWeavingAdaptor extends WeavingAdaptor { private static final String AOP_XML = "META-INF//aop.xml" ; private List m_dumpTypePattern = new ArrayList ( ) ; private List m_includeTypePattern = new ArrayList ( ) ; private List m_excludeTypePattern = new ArrayList ( ) ; private List m_aspectExcludeTypePattern = new ArrayList ( ) ; private StringBuffer namespace ; private IWeavingContext weavingContext ; public ClassLoaderWeavingAdaptor ( final ClassLoader loader , IWeavingContext wContext ) { } void initialize ( final ClassLoader loader , IWeavingContext wContext ) { } private void registerDefinitions ( final BcelWeaver weaver , final ClassLoader loader ) { } private void registerOptions ( final BcelWeaver weaver , final ClassLoader loader , final List definitions ) { } private void registerAspectExclude ( final BcelWeaver weaver , final ClassLoader loader , final List definitions ) { } private void registerAspects ( final BcelWeaver weaver , final ClassLoader loader , final List definitions ) { } private void registerIncludeExclude ( final BcelWeaver weaver , final ClassLoader loader , final List definitions ) { } private void registerDump ( final BcelWeaver weaver , final ClassLoader loader , final List definitions ) { } protected boolean accept ( String className ) { } private boolean acceptAspect ( String aspectClassName ) { } public boolean shouldDump ( String className ) { } public String getNamespace ( ) { } public boolean generatedClassesExist ( ) { } public void flushGeneratedClasses ( ) { } private String readAspect ( String name , ClassLoader loader ) { if ( true ) <START_BUG> return ( name + "@" ) + ( loader == null ? "0" : loader . hashCode ( ) ) ; <END_BUG> InputStream is = null ; try { String result = "" ; is = loader . getResourceAsStream ( ( ( name . replace ( '.' , '//' ) ) + ".class" ) ) ; int b = is . read ( ) ; while ( b != ( - 1 ) ) { result = result + b ; b = is . read ( ) ; } is . close ( ) ; return result ; } catch ( IOException e ) { e . printStackTrace ( ) ; return "" ; } catch ( NullPointerException e ) { System . err . println ( ( ( ( "ClassLoaderWeavingAdaptor.readAspect()<seq2seq4repair_space>name:<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>Exception:<seq2seq4repair_space>" ) + e ) ) ; return "" ; } finally { try { is . close ( ) ; } catch ( Throwable t ) { } } } }

Fix:
return ( name + "@" ) + ( loader == null ? "0" : Integer . toString ( loader . hashCode ( ) ) ) ;
Buggy code:
class TransactionSubsystem10Parser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > { public static final TransactionSubsystem10Parser INSTANCE = new TransactionSubsystem10Parser ( ) ; private TransactionSubsystem10Parser ( ) { } @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } static void parseObjectStoreEnvironmentElementAndEnrichOperation ( final XMLExtendedStreamReader reader , ModelNode operation ) throws XMLStreamException { } static void parseCoordinatorEnvironmentElement ( final XMLExtendedStreamReader reader , final ModelNode operation ) throws XMLStreamException { final int count = reader . getAttributeCount ( ) ; for ( int i = 0 ; i < count ; i ++ ) { requireNoNamespaceAttribute ( reader , i ) ; final String value = reader . getAttributeValue ( i ) ; final Attribute attribute = Attribute . forName ( reader . getAttributeLocalName ( i ) ) ; switch ( attribute ) { case ENABLE_STATISTICS : <START_BUG> STATISTICS_ENABLED . parseAndSetParameter ( value , operation , reader ) ; <END_BUG> break ; case ENABLE_TSM_STATUS : ENABLE_TSM_STATUS . parseAndSetParameter ( value , operation , reader ) ; break ; case DEFAULT_TIMEOUT : DEFAULT_TIMEOUT . parseAndSetParameter ( value , operation , reader ) ; break ; default : throw unexpectedAttribute ( reader , i ) ; } } requireNoContent ( reader ) ; } static void parseCoreEnvironmentElement ( final XMLExtendedStreamReader reader , final ModelNode operation ) throws XMLStreamException { } static void parseProcessIdEnvironmentElement ( XMLExtendedStreamReader reader , ModelNode coreEnvironmentAdd ) throws XMLStreamException { } static void parseSocketProcessIdElement ( XMLExtendedStreamReader reader , ModelNode coreEnvironmentAdd ) throws XMLStreamException { } static void parseRecoveryEnvironmentElement ( final XMLExtendedStreamReader reader , final ModelNode operation ) throws XMLStreamException { } }

Fix:
ENABLE_STATISTICS . parseAndSetParameter ( value , operation , reader ) ;
Buggy code:
public class XmlLogger implements BuildListener { private static final DocumentBuilder builder = XmlLogger . getDocumentBuilder ( ) ; private static DocumentBuilder getDocumentBuilder ( ) { } private static final String BUILD_TAG = "build" ; private static final String TARGET_TAG = "target" ; private static final String TASK_TAG = "task" ; private static final String MESSAGE_TAG = "message" ; private static final String NAME_ATTR = "name" ; private static final String TIME_ATTR = "time" ; private static final String PRIORITY_ATTR = "priority" ; private static final String LOCATION_ATTR = "location" ; private static final String ERROR_ATTR = "error" ; private Document doc ; private Hashtable tasks = new Hashtable ( ) ; private Hashtable targets = new Hashtable ( ) ; private Hashtable threadStacks = new Hashtable ( ) ; private XmlLogger . TimedElement buildElement = null ; private static class TimedElement { long startTime ; Element element ; } public XmlLogger ( ) { } public void buildStarted ( BuildEvent event ) { } public void buildFinished ( BuildEvent event ) { } private Stack getStack ( ) { } public void targetStarted ( BuildEvent event ) { } public void targetFinished ( BuildEvent event ) { } public void taskStarted ( BuildEvent event ) { } public void taskFinished ( BuildEvent event ) { } public void messageLogged ( BuildEvent event ) { Element messageElement = doc . createElement ( XmlLogger . MESSAGE_TAG ) ; <START_BUG> String name ; <END_BUG> switch ( event . getPriority ( ) ) { case Project . MSG_ERR : name = "error" ; break ; case Project . MSG_WARN : name = "warn" ; break ; case Project . MSG_INFO : name = "info" ; break ; default : name = "debug" ; break ; } messageElement . setAttribute ( XmlLogger . PRIORITY_ATTR , name ) ; Text messageText = doc . createCDATASection ( event . getMessage ( ) ) ; messageElement . appendChild ( messageText ) ; XmlLogger . TimedElement parentElement = null ; Task task = event . getTask ( ) ; Target target = event . getTarget ( ) ; if ( task != null ) { parentElement = ( ( XmlLogger . TimedElement ) ( tasks . get ( task ) ) ) ; } if ( ( parentElement == null ) && ( target != null ) ) { parentElement = ( ( XmlLogger . TimedElement ) ( targets . get ( target ) ) ) ; } if ( parentElement == null ) { Stack threadStack = ( ( Stack ) ( threadStacks . get ( Thread . currentThread ( ) ) ) ) ; if ( threadStack != null ) { if ( ! ( threadStack . empty ( ) ) ) { parentElement = ( ( XmlLogger . TimedElement ) ( threadStack . peek ( ) ) ) ; } } } if ( parentElement != null ) { parentElement . element . appendChild ( messageElement ) ; } else { buildElement . element . appendChild ( messageElement ) ; } } }

Fix:
String name = "debug" ;
Buggy code:
public class Snippet88 { public static void main ( String [ ] args ) { Display display = new Display ( ) ; Shell shell = new Shell ( display ) ; shell . setLayout ( new FillLayout ( ) ) ; final Table table = new Table ( shell , ( ( SWT . FULL_SELECTION ) | ( SWT . HIDE_SELECTION ) ) ) ; TableColumn column1 = new TableColumn ( table , SWT . NONE ) ; TableColumn column2 = new TableColumn ( table , SWT . NONE ) ; for ( int i = 0 ; i < 10 ; i ++ ) { TableItem item = new TableItem ( table , SWT . NONE ) ; item . setText ( new String [ ] { "item<seq2seq4repair_space>" + i , "edit<seq2seq4repair_space>this<seq2seq4repair_space>value" } ) ; } column1 . pack ( ) ; column2 . pack ( ) ; final TableEditor editor = new TableEditor ( table ) ; editor . horizontalAlignment = SWT . LEFT ; editor . grabHorizontal = true ; editor . minimumWidth = 50 ; final int EDITABLECOLUMN = 1 ; table . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { Control oldEditor = editor . getEditor ( ) ; if ( oldEditor != null ) oldEditor . dispose ( ) ; TableItem item = ( ( TableItem ) ( e . item ) ) ; if ( item == null ) return ; Text newEditor = new Text ( table , SWT . NONE ) ; newEditor . setText ( item . getText ( EDITABLECOLUMN ) ) ; newEditor . addModifyListener ( new ModifyListener ( ) { <START_BUG> public void modifyText ( ModifyEvent e ) { <END_BUG> Text text = ( ( Text ) ( editor . getEditor ( ) ) ) ; editor . getItem ( ) . setText ( EDITABLECOLUMN , text . getText ( ) ) ; } } ) ; newEditor . selectAll ( ) ; newEditor . setFocus ( ) ; editor . setEditor ( newEditor , item , EDITABLECOLUMN ) ; } } ) ; shell . setSize ( 300 , 300 ) ; shell . open ( ) ; while ( ! ( shell . isDisposed ( ) ) ) { if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } display . dispose ( ) ; } }

Fix:
public void modifyText ( ModifyEvent me ) {
Buggy code:
public class ByteUtil { private static final int BO_LE = 0 ; private static final int BO_BE = 1 ; public static final ByteUtil LITTLE_ENDIAN = new ByteUtil ( ByteUtil . BO_LE ) ; public static final ByteUtil BIG_ENDIAN = new ByteUtil ( ByteUtil . BO_BE ) ; public static final int INT_64_SIZE = 8 ; public static final int INT_32_SIZE = 4 ; public static final int INT_16_SIZE = 2 ; public static final int INT_8_SIZE = 1 ; public static final int BYTE_SIZE = 8 ; private final int byteOrder ; private ByteUtil ( int byteOrder ) { } public static int hashcode ( byte [ ] a ) { } public static String toHexString ( byte b ) { } public static String toHexString ( short s ) { } public static String toHexString ( byte [ ] data , int offset , int length ) { } public static String toString ( byte [ ] buffer , int off , int len ) { } public static String toString ( byte [ ] buffer , int off , int len , boolean resp ) { } private long toInt ( byte [ ] src , int off , int size , int index ) { long dest = 0 ; for ( int p = 0 ; p < size ; p ++ ) { <START_BUG> int d = ( src [ ( off + ( p + ( size * index ) ) ) ] ) & 255 ; <END_BUG> if ( ( byteOrder ) == ( ByteUtil . BO_LE ) ) { dest |= d << ( ( ByteUtil . BYTE_SIZE ) * p ) ; } else { dest |= d << ( ( ByteUtil . BYTE_SIZE ) * ( ( size - 1 ) - p ) ) ; } } return dest ; } public long toInt ( byte [ ] src , int off , int size ) { } public long toInt64 ( byte [ ] src , int off ) { } public int toInt16 ( byte [ ] src , int off ) { } public int toInt32 ( byte [ ] src , int off ) { } public int [ ] toInt32Array ( byte [ ] src , int off , int size , int length ) { } public byte [ ] toByteArray ( int [ ] src , int size , int length ) { } public byte [ ] toByteArray ( int src , int size ) { } public byte [ ] toByteArray ( long src , int size ) { } public byte [ ] toByteArray ( String src ) { } }

Fix:
long d = ( src [ ( off + ( p + ( size * index ) ) ) ] ) & 255L ;
Buggy code:
@ SuppressWarnings ( "PMD" ) @ ContextConfiguration ( locations = { "classpath:ui-test-context.xml" } ) public class CreateSavingsAccountTest extends UiTestCaseBase { private SavingsAccountHelper savingsAccountHelper ; private QuestionGroupTestHelper questionGroupTestHelper ; @ Override @ SuppressWarnings ( "PMD.SignatureDeclareThrowsException" ) @ BeforeMethod ( alwaysRun = true ) public void setUp ( ) throws Exception { } @ AfterMethod ( alwaysRun = true ) public void logOut ( ) { } @ SuppressWarnings ( "PMD.SignatureDeclareThrowsException" ) @ Test ( singleThreaded = true , groups = { "savings" , "acceptance" , "ui" , "no_db_unit" } ) public void verifyPaymentTypesForWithdrawalsAndDeposits ( ) throws Exception { } @ SuppressWarnings ( "PMD.SignatureDeclareThrowsException" ) @ Test ( singleThreaded = true , groups = { "smoke" , "savings" , "acceptance" , "ui" , "no_db_unit" } ) public void newMandatoryClientSavingsAccountWithDateTypeCustomField ( ) throws Exception { CreateSavingsAccountSearchParameters searchParameters = new CreateSavingsAccountSearchParameters ( ) ; searchParameters . setSearchString ( "Client<seq2seq4repair_space>-<seq2seq4repair_space>Mary<seq2seq4repair_space>Monthly" ) ; searchParameters . setSavingsProduct ( "MonthlyClientSavingsAccount" ) ; CreateSavingsAccountSubmitParameters submitAccountParameters = new CreateSavingsAccountSubmitParameters ( ) ; <START_BUG> submitAccountParameters . setAmount ( "248.0" ) ; <END_BUG> verifySavingsAccountCreationWithQG ( searchParameters , submitAccountParameters ) ; } private void verifySavingsAccountCreationWithQG ( CreateSavingsAccountSearchParameters searchParameters , CreateSavingsAccountSubmitParameters submitAccountParameters ) { } }

Fix:
submitAccountParameters . setAmount ( "248" ) ;
Buggy code:
public class DistributedTanimotoCoefficientVectorSimilarity extends AbstractDistributedVectorSimilarity { @ Override <START_BUG> protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , int numberOfColumns ) { <END_BUG> double cooccurrenceCount = countElements ( cooccurrences ) ; if ( cooccurrenceCount == 0 ) { return Double . NaN ; } return cooccurrenceCount // ( ( weightOfVectorA + weightOfVectorB ) - cooccurrenceCount ) ; } @ Override public double weight ( Vector v ) { } }

Fix:
protected double doComputeResult ( int rowA , int rowB , Iterable < Cooccurrence > cooccurrences , double weightOfVectorA , double weightOfVectorB , long numberOfColumns ) {
Buggy code:
@ Stateless public class MyEjbBean implements MyEjb { protected MyObject lookup ( ) { 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 { ctx . close ( ) ; } } catch ( NamingException e ) { throw new RuntimeException ( e ) ; } } public String doIt ( ) { } }

Fix:
env . put ( Context . PROVIDER_URL , ( ( "http-remoting:////" + address ) + ":8080" ) ) ;
Buggy code:
public class Applet extends WebComponent implements IResourceListener , IFormSubmitListener { private static final long serialVersionUID = 1L ; private Class appletClass ; private List classes = new ArrayList ( 2 ) ; public Applet ( final String id , final Class appletClass ) { } public Applet ( final String id , final IModel model , final Class appletClass ) { } public void addClass ( final Class c ) { } public Object getAppletModel ( ) { } public void onFormSubmitted ( ) { } public void onResourceRequested ( ) { } public void setAppletModel ( final Object model ) { } protected int getHeight ( ) { } protected int getWidth ( ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "applet" ) ; tag . put ( "code" , HostApplet . class . getName ( ) ) ; final String jarName = ( appletClass . getName ( ) ) + ".jar" ; final ResourceReference jarResourceReference = new ResourceReference ( jarName ) { protected Resource newResource ( ) { final JarResourceFactory factory = new JarResourceFactory ( ) ; factory . addClassClosures ( classes ) ; return factory . getResource ( ) ; } } ; String servletPath = ( ( wicket . protocol . http . servlet . ServletWebRequest ) ( getRequest ( ) ) ) . getServletPath ( ) ; <START_BUG> tag . put ( "codebase" , ( ( ( servletPath + '//' ) + ( Strings . beforeLastPathComponent ( jarResourceReference . getPath ( ) , '//' ) ) ) + "//" ) ) ; <END_BUG> tag . put ( "archive" , jarName ) ; tag . put ( "name" , getPageRelativePath ( ) . replace ( ':' , '_' ) ) ; final int width = getWidth ( ) ; if ( width != ( - 1 ) ) { tag . put ( "width" , width ) ; } final int height = getHeight ( ) ; if ( height != ( - 1 ) ) { tag . put ( "height" , height ) ; } tag . setType ( OPEN ) ; super . onComponentTag ( tag ) ; } protected void onComponentTagBody ( final MarkupStream markupStream , final ComponentTag openTag ) { } private void addAppletClass ( final Class appletClass ) { } }

Fix:
tag . put ( "codebase" , ( ( ( servletPath + '//' ) + ( Strings . beforeLastPathComponent ( jarResourceReference . getRelativeUrl ( ) , '//' ) ) ) + "//" ) ) ;
Buggy code:
public class ComponentResolvingPage extends WebPage implements IComponentResolver { private static final long serialVersionUID = 1L ; public boolean onEndRequestWasCalledOnAutoAddedComponent = false ; public ComponentResolvingPage ( ) { } public boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( "test" . equals ( tag . getId ( ) ) ) { <START_BUG> autoAdd ( new Label ( "test" , "TEST" ) { <END_BUG> private static final long serialVersionUID = 1L ; protected void onEndRequest ( ) { onEndRequestWasCalledOnAutoAddedComponent = true ; } } ) ; return true ; } return false ; } }

Fix:
autoAdd ( new Label ( this , "test" , "TEST" ) {
Buggy code:
public class Notifier { private static final int NOTIFICATION_ID = 1 ; private static Context context ; private static Handler handler ; private static NotificationManager notificationManager ; private static Subscription subscription ; public static void start ( Context context ) { } public static void resume ( ) { } public static void pause ( ) { } private static void doResume ( ) { } private static Observable < Conversations . Notification > notifications ( ) { } private static void refresh ( Conversations . Notification notification ) { } private static Intent mainActivityIntent ( ) { } private static Intent conversationActivityIntent ( Conversation conversation ) { } private static PublicKey partyPuk ( Conversation conversation ) { <START_BUG> return conversation . party ( ) . publicKey ( ) . current ( ) ; <END_BUG> } private static void notify ( Conversations . Notification notification , Intent intent ) { } private static void doPause ( ) { } private static void cancelNotification ( ) { } private static void unsubscribe ( ) { } private static boolean isSubscribed ( ) { } private static boolean isUnsubscribed ( ) { } private static void notify ( Intent intent , String title , String contentInfo , String contentText ) { } }

Fix:
return conversation . contact ( ) . party ( ) . current ( ) . publicKey ( ) . current ( ) ;
Buggy code:
public abstract class Pair < L , R > implements Serializable , Comparable < Pair < L , R > > , Map . Entry < L , R > { private static final long serialVersionUID = 4954918890077093841L ; public static < L , R > Pair < L , R > of ( final L left , final R right ) { } public abstract L getLeft ( ) { } public abstract R getRight ( ) { } @ Override public final L getKey ( ) { } @ Override public R getValue ( ) { } @ Override public int compareTo ( final Pair < L , R > other ) { } @ Override public boolean equals ( final Object obj ) { if ( obj == ( this ) ) { return true ; } if ( obj instanceof Map . Entry < ? , ? > ) { <START_BUG> Map . Entry < ? , ? > other = ( ( Map . Entry < ? , ? > ) ( obj ) ) ; <END_BUG> return ( ObjectUtils . equals ( getKey ( ) , other . getKey ( ) ) ) && ( ObjectUtils . equals ( getValue ( ) , other . getValue ( ) ) ) ; } return false ; } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } public String toString ( final String format ) { } }

Fix:
final Map . Entry < ? , ? > other = ( ( Map . Entry < ? , ? > ) ( obj ) ) ;
Buggy code:
public class CountSeqs { public static void main ( String [ ] args ) throws Exception { BufferedWriter writer = new BufferedWriter ( new FileWriter ( new File ( "//projects//afodor_research//kylie_2015//counts.txt" ) ) ) ; writer . write ( "sample\tcount\n" ) ; for ( String s : FASTQ_DIR . list ( ) ) { System . out . println ( s ) ; <START_BUG> File fastQFile = new File ( ( ( ( FASTA_DIR . getAbsolutePath ( ) ) + ( File . separator ) ) + s ) ) ; <END_BUG> BufferedReader reader = new BufferedReader ( new InputStreamReader ( new GZIPInputStream ( new FileInputStream ( fastQFile ) ) ) ) ; long count = 0 ; for ( FastQ fastq = FastQ . readOneOrNull ( reader ) ; fastq != null ; fastq = FastQ . readOneOrNull ( reader ) ) { count ++ ; } writer . write ( ( ( ( s + "\t" ) + count ) + "\n" ) ) ; } writer . flush ( ) ; writer . close ( ) ; } }

Fix:
File fastQFile = new File ( ( ( ( FASTQ_DIR . getAbsolutePath ( ) ) + ( File . separator ) ) + s ) ) ;
Buggy code:
public abstract class ScampProtocol implements example . PeerSamplingService , CDProtocol , Linkable , EDProtocol { private static final String PAR_C = "c" ; private static final String SCAMP_PROT = "0" ; private static final String PAR_INDIRTTL = "indirectionTTL" ; private static final String PAR_LEASE_MAX = "leaseTimeoutMax" ; private static final String PAR_LEASE_MIN = "leaseTimeoutMin" ; private static final String PAR_TRANSPORT = "transport" ; protected static int c ; protected static int indirTTL ; protected static long leaseTimeoutMin ; protected static long leaseTimeoutMax ; protected final int tid ; public static int pid ; public long randomLeaseTimeout ; public ScampProtocol ( String n ) { } public Object clone ( ) { } protected static void print ( Object s ) { if ( true ) { <START_BUG> System . out . println ( s ) ; <END_BUG> } } @ Override public void pack ( ) { } @ Override public void onKill ( ) { } public void send ( Node sender , Node destination , ScampMessage m ) { } public static void subscribe ( Node n , Node s ) { } public abstract void acceptSubscription ( Node acceptor , Node subscriber ) { } public abstract void join ( Node me , Node subscriber ) { } public abstract void rejoin ( Node me ) { } public abstract void unsubscribe ( Node me ) { } }

Fix:
System . err . println ( s ) ;
Buggy code:
public class JPEGImageUtilTestCase { @ Test public void testDecodeImageHeader ( ) throws IOException { } @ Test public void testDecodeImage ( ) throws IOException { ImageDecoder jpgDecoder ; ImageDecoder ppmDecoder ; jpgDecoder = JPEGImageUtil . getInstance ( ) ; ppmDecoder = PPMImageUtil . getInstance ( ) ; FileInputStream fis ; FloatImage ppmImage ; FloatImage jpgImage ; String [ ] fileName = new String [ ] { "canon-ixus" , "cmyk-jpeg-format" } ; for ( int i = 0 ; i < ( fileName . length ) ; i ++ ) { fis = new FileInputStream ( ( ( "data//test//JPEGImageUtilTestCase//truth//" + ( fileName [ i ] ) ) + ".ppm" ) ) ; ppmImage = ppmDecoder . decodeImage ( fis ) ; assumeNotNull ( ppmImage ) ; fis = new FileInputStream ( ( ( "data//test//JPEGImageUtilTestCase//decode//" + ( fileName [ i ] ) ) + ".jpg" ) ) ; jpgImage = jpgDecoder . decodeImage ( fis ) ; assumeNotNull ( jpgImage ) ; <START_BUG> assertArrayEquals ( ( ( fileName [ i ] ) + "<seq2seq4repair_space>decoding<seq2seq4repair_space>fails" ) , ppmImage . getData ( ) , jpgImage . getData ( ) , 1 ) ; <END_BUG> } } @ Test public void testEncodeImage ( ) throws IOException { } }

Fix:
assertEquals ( ( ( fileName [ i ] ) + "<seq2seq4repair_space>decoding<seq2seq4repair_space>fails" ) , ppmImage , jpgImage ) ;
Buggy code:
public abstract class AbstractTreeColumn extends AbstractColumn { public AbstractTreeColumn ( ColumnLocation location , String header ) { } public Component newCell ( MarkupContainer parent , String id , TreeNode node , int level ) { return TreeTable . newTreeCell ( parent , id , node , level , new TreeTable . IRenderNodeCallback ( ) { private static final long serialVersionUID = 1L ; public String renderNode ( TreeNode node ) { return AbstractTreeColumn . this . renderNode ( node ) ; } <START_BUG> } ) ; <END_BUG> } public IRenderable newCell ( TreeNode node , int level ) { } public abstract String renderNode ( TreeNode node ) { } }

Fix:
} , getTreeTable ( ) ) ;
Buggy code:
public class TestMultiLevelSkipList extends LuceneTestCase { class CountingRAMDirectory extends MockDirectoryWrapper { public CountingRAMDirectory ( Directory delegate ) { } @ Override public IndexInput openInput ( String fileName , IOContext context ) throws IOException { } } @ Override @ Before public void setUp ( ) throws Exception { } public void testSimpleSkip ( ) throws IOException { Directory dir = new TestMultiLevelSkipList . CountingRAMDirectory ( new RAMDirectory ( ) ) ; IndexWriter writer = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new TestMultiLevelSkipList . PayloadAnalyzer ( ) ) . setCodec ( TestUtil . alwaysPostingsFormat ( new Lucene41PostingsFormat ( ) ) ) . setMergePolicy ( newLogMergePolicy ( ) ) ) ; Term term = new Term ( "test" , "a" ) ; for ( int i = 0 ; i < 5000 ; i ++ ) { Document d1 = new Document ( ) ; d1 . add ( newTextField ( term . field ( ) , term . text ( ) , NO ) ) ; writer . addDocument ( d1 ) ; } writer . commit ( ) ; writer . forceMerge ( 1 ) ; <START_BUG> writer . close ( ) ; <END_BUG> AtomicReader reader = getOnlySegmentReader ( DirectoryReader . open ( dir ) ) ; for ( int i = 0 ; i < 2 ; i ++ ) { counter = 0 ; DocsAndPositionsEnum tp = reader . termPositionsEnum ( term ) ; checkSkipTo ( tp , 14 , 185 ) ; checkSkipTo ( tp , 17 , 190 ) ; checkSkipTo ( tp , 287 , 200 ) ; checkSkipTo ( tp , 4800 , 250 ) ; } } public void checkSkipTo ( DocsAndPositionsEnum tp , int target , int maxCounter ) throws IOException { } private static class PayloadAnalyzer extends Analyzer { private final AtomicInteger payloadCount = new AtomicInteger ( ( - 1 ) ) ; @ Override public TokenStreamComponents createComponents ( String fieldName ) { } } private static class PayloadFilter extends TokenFilter { PayloadAttribute payloadAtt ; private AtomicInteger payloadCount ; protected PayloadFilter ( AtomicInteger payloadCount , TokenStream input ) { } @ Override public boolean incrementToken ( ) throws IOException { } } private int counter = 0 ; class CountingStream extends IndexInput { private IndexInput input ; CountingStream ( IndexInput input ) { } @ Override public byte readByte ( ) throws IOException { } @ Override public void readBytes ( byte [ ] b , int offset , int len ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public long getFilePointer ( ) { } @ Override public void seek ( long pos ) throws IOException { } @ Override public long length ( ) { } @ Override public TestMultiLevelSkipList . CountingStream clone ( ) { } } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class EditHandlerTest { Memory memory = new Memory ( ) ; DateTime startDate = new DateTime ( 2015 , 9 , 29 , 0 , 0 , 0 ) ; DateTime endDate = new DateTime ( 2015 , 11 , 10 , 18 , 59 , 0 ) ; String title = "Meet<seq2seq4repair_space>parents<seq2seq4repair_space>for<seq2seq4repair_space>dinner" ; String start = "7pm<seq2seq4repair_space>6<seq2seq4repair_space>May" ; String end = "2100h<seq2seq4repair_space>6<seq2seq4repair_space>May" ; @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) throws Exception { } @ Test public void test ( ) { memory . add ( new Todo ( new DateTime ( ) , "Project<seq2seq4repair_space>meeting" , startDate , endDate ) ) ; ArrayList < KeyParamPair > paramList = new ArrayList < KeyParamPair > ( ) ; paramList . add ( new KeyParamPair ( "" , "1" ) ) ; paramList . add ( new KeyParamPair ( "title" , title ) ) ; paramList . add ( new KeyParamPair ( "start" , start ) ) ; paramList . add ( new KeyParamPair ( "end" , end ) ) ; ParsedInput input = new ParsedInput ( null , paramList ) ; EditHandler . process ( input , memory ) ; Todo expectedTodo ; try { expectedTodo = new Todo ( new DateTime ( ) , title , DateParser . parseDate ( start ) , DateParser . parseDate ( end ) ) ; <START_BUG> assertEquals ( memory . get ( 1 ) , expectedTodo ) ; <END_BUG> } catch ( DateUndefinedException e ) { e . printStackTrace ( ) ; } } }

Fix:
assertEquals ( expectedTodo , memory . get ( 1 ) ) ;
Buggy code:
public class BuildingParser { public static Board parse ( String filename ) { <START_BUG> int [ ] [ ] rules = new int [ ] [ ] { new int [ ] { 1 , 1 , 1 } , new int [ ] { 3 , 3 , 3 } , new int [ ] { 1 , 1 , 1 } , new int [ ] { 3 , 3 , 3 } } ; <END_BUG> Settings . restrictions = rules ; Board parsed = new Board ( 3 ) ; return parsed ; } }

Fix:
int [ ] [ ] rules = new int [ ] [ ] { new int [ ] { 1 , 2 , 2 } , new int [ ] { 3 , 1 , 2 } , new int [ ] { 1 , 2 , 2 } , new int [ ] { 3 , 1 , 2 } } ;
Buggy code:
public class CharArraySet extends AbstractSet < Object > { private static final int INIT_SIZE = 8 ; private char [ ] [ ] entries ; private int count ; private final boolean ignoreCase ; public static final CharArraySet EMPTY_SET = CharArraySet . unmodifiableSet ( new CharArraySet ( Version . LUCENE_CURRENT , 0 , false ) ) ; private final CharacterUtils charUtils ; private final Version matchVersion ; public CharArraySet ( Version matchVersion , int startSize , boolean ignoreCase ) { } public CharArraySet ( Version matchVersion , Collection < ? extends Object > c , boolean ignoreCase ) { } @ Deprecated public CharArraySet ( int startSize , boolean ignoreCase ) { } @ Deprecated public CharArraySet ( Collection < ? extends Object > c , boolean ignoreCase ) { } private CharArraySet ( Version matchVersion , char [ ] [ ] entries , boolean ignoreCase , int count ) { } @ Override public void clear ( ) { } public boolean contains ( char [ ] text , int off , int len ) { } public boolean contains ( CharSequence cs ) { } private int getSlot ( char [ ] text , int off , int len ) { } private int getSlot ( CharSequence text ) { } public boolean add ( CharSequence text ) { } public boolean add ( String text ) { } public boolean add ( char [ ] text ) { } private boolean equals ( char [ ] text1 , int off , int len , char [ ] text2 ) { } private boolean equals ( CharSequence text1 , char [ ] text2 ) { } private void rehash ( ) { } private int getHashCode ( char [ ] text , int offset , int len ) { } private int getHashCode ( CharSequence text ) { } @ Override public int size ( ) { } @ Override public boolean isEmpty ( ) { } @ Override public boolean contains ( Object o ) { } @ Override public boolean add ( Object o ) { } public static CharArraySet unmodifiableSet ( CharArraySet set ) { } @ Deprecated public static CharArraySet copy ( final Set < ? > set ) { if ( set == ( CharArraySet . EMPTY_SET ) ) return CharArraySet . EMPTY_SET ; <START_BUG> return set instanceof CharArraySet ? CharArraySet . copy ( ( ( CharArraySet ) ( set ) ) ) : CharArraySet . copy ( LUCENE_30 , set ) ; <END_BUG> } public static CharArraySet copy ( final Version matchVersion , final Set < ? > set ) { } public class CharArraySetIterator implements Iterator < String > { int pos = - 1 ; char [ ] next ; CharArraySetIterator ( ) { } private void goNext ( ) { } public boolean hasNext ( ) { } public char [ ] nextCharArray ( ) { } public String next ( ) { } public void remove ( ) { } } public Iterator < String > stringIterator ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public Iterator < Object > iterator ( ) { } private static final class UnmodifiableCharArraySet extends CharArraySet { private UnmodifiableCharArraySet ( Version matchVersion , char [ ] [ ] entries , boolean ignoreCase , int count ) { } @ Override public void clear ( ) { } @ Override public boolean add ( Object o ) { } @ Override public boolean addAll ( Collection < ? extends Object > coll ) { } @ Override public boolean add ( char [ ] text ) { } @ Override public boolean add ( CharSequence text ) { } @ Override public boolean add ( String text ) { } } }

Fix:
return CharArraySet . copy ( LUCENE_30 , set ) ;
Buggy code:
public class ModClusterEnableContext implements OperationStepHandler { static final ModClusterEnableContext INSTANCE = new ModClusterEnableContext ( ) ; static OperationDefinition getDefinition ( ResourceDescriptionResolver descriptionResolver ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { if ( ( context . isNormalServer ( ) ) && ( ( context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ) != null ) ) { context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { ServiceController < ? > controller = context . getServiceRegistry ( false ) . getService ( SERVICE_NAME ) ; final ModClusterServiceMBean service = ( ( ModClusterServiceMBean ) ( controller . getValue ( ) ) ) ; ModClusterLogger . ROOT_LOGGER . debugf ( "enable-context:<seq2seq4repair_space>%s" , operation ) ; final String webHost = ModClusterSubsystemResourceDefinition . VIRTUAL_HOST . resolveModelAttribute ( context , operation ) . asString ( ) ; final String webContext = ModClusterSubsystemResourceDefinition . CONTEXT . resolveModelAttribute ( context , operation ) . asString ( ) ; try { service . enableContext ( webHost , webContext ) ; } catch ( IllegalArgumentException e ) { <START_BUG> throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . ContextOrHostNotFound ( webHost , webContext ) ) ) ; <END_BUG> } context . completeStep ( new OperationContext . RollbackHandler ( ) { @ Override public void handleRollback ( OperationContext context , ModelNode operation ) { service . disableContext ( webHost , webContext ) ; } } ) ; } } , RUNTIME ) ; } context . stepCompleted ( ) ; } }

Fix:
throw new OperationFailedException ( new ModelNode ( ) . set ( ROOT_LOGGER . contextOrHostNotFound ( webHost , webContext ) ) ) ;
Buggy code:
public class Utils { private static final Logger log = Logger . getLogger ( Utils . class ) ; public static void setProperty ( String name , String value , ModelControllerClient client ) { } public static void removeProperty ( String name , ModelControllerClient client ) { } public static void redefineProperty ( String name , String value , ModelControllerClient client ) { } public static ModelNode executeOp ( ModelNode op , ModelControllerClient client ) { ModelNode modelNodeResult ; try { modelNodeResult = client . execute ( op ) ; } catch ( IOException ioe ) { throw new RuntimeException ( ioe ) ; } if ( ! ( SUCCESS . equals ( modelNodeResult . get ( OUTCOME ) . asString ( ) ) ) ) { <START_BUG> throw new RuntimeException ( ( ( ( "Management<seq2seq4repair_space>operation:<seq2seq4repair_space>" + op ) + "<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>successful.<seq2seq4repair_space>Result<seq2seq4repair_space>was:<seq2seq4repair_space>" ) + modelNodeResult ) ) ; <END_BUG> } return modelNodeResult ; } public static String getProperty ( String name , ModelControllerClient client ) { } }

Fix:
throw new RuntimeException ( ( ( ( "Management<seq2seq4repair_space>operation:<seq2seq4repair_space>" + op ) + "<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>succesful.<seq2seq4repair_space>Result<seq2seq4repair_space>was:<seq2seq4repair_space>" ) + modelNodeResult ) ) ;
Buggy code:
public class PageProvider implements IPageProvider { private Integer renderCount ; private IPageSource pageSource ; private IRequestablePage pageInstance ; private Class < ? extends IRequestablePage > pageClass ; private Integer pageId ; private PageParameters pageParameters ; public PageProvider ( final int pageId , final Integer renderCount ) { } public PageProvider ( final int pageId , final Class < ? extends IRequestablePage > pageClass , Integer renderCount ) { } public PageProvider ( final int pageId , final Class < ? extends IRequestablePage > pageClass , final PageParameters pageParameters , final Integer renderCount ) { } public PageProvider ( final Class < ? extends IRequestablePage > pageClass , final PageParameters pageParameters ) { } public PageProvider ( Class < ? extends IRequestablePage > pageClass ) { } public PageProvider ( IRequestablePage page ) { } public IRequestablePage getPageInstance ( ) { } public PageParameters getPageParameters ( ) { } public boolean isNewPageInstance ( ) { } public Class < ? extends IRequestablePage > getPageClass ( ) { } protected boolean prepareForRenderNewPage ( ) { } protected IPageSource getPageSource ( ) { } private IRequestablePage getPageInstance ( Integer pageId , Class < ? extends IRequestablePage > pageClass , PageParameters pageParameters , Integer renderCount ) { IRequestablePage page = null ; boolean freshCreated = false ; if ( pageId != null ) { page = getPageSource ( ) . getPageInstance ( pageId ) ; if ( ( ( page != null ) && ( pageClass != null ) ) && ( ( page . getClass ( ) . equals ( pageClass ) ) == false ) ) { page = null ; } else if ( ( page != null ) && ( pageParameters != null ) ) { page . getPageParameters ( ) . overwriteWith ( pageParameters ) ; } } if ( page == null ) { if ( pageClass != null ) { page = getPageSource ( ) . newPageInstance ( pageClass , pageParameters ) ; freshCreated = true ; if ( ( prepareForRenderNewPage ( ) ) && ( page instanceof Page ) ) { <START_BUG> ( ( Page ) ( page ) ) . prepareForRender ( false ) ; <END_BUG> } } } if ( ( page != null ) && ( ! freshCreated ) ) { if ( ( renderCount != null ) && ( ( page . getRenderCount ( ) ) != renderCount ) ) { throw new org . apache . wicket . request . mapper . StalePageException ( page ) ; } } return page ; } public void detach ( ) { } public void setPageSource ( IPageSource pageSource ) { } private void setPageClass ( Class < ? extends IRequestablePage > pageClass ) { } private void setPageParameters ( PageParameters pageParameters ) { } private void touchPageInstance ( ) { } }

Fix:
( ( Page ) ( page ) ) . internalPrepareForRender ( false ) ;
Buggy code:
public class TestCustomSearcherSort extends LuceneTestCase { private Directory index = null ; private IndexReader reader ; private Query query = null ; private int INDEX_SIZE ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; INDEX_SIZE = atLeast ( 2000 ) ; index = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random ( ) , index ) ; TestCustomSearcherSort . RandomGen random = new TestCustomSearcherSort . RandomGen ( random ( ) ) ; for ( int i = 0 ; i < ( INDEX_SIZE ) ; ++ i ) { Document doc = new Document ( ) ; if ( ( i % 5 ) != 0 ) { doc . add ( newStringField ( "publicationDate_" , random . getLuceneDate ( ) , YES ) ) ; } if ( ( i % 7 ) == 0 ) { doc . add ( newTextField ( "content" , "test" , YES ) ) ; } doc . add ( newStringField ( "mandant" , Integer . toString ( ( i % 3 ) ) , YES ) ) ; writer . addDocument ( doc ) ; } reader = writer . getReader ( ) ; <START_BUG> writer . close ( ) ; <END_BUG> query = new TermQuery ( new Term ( "content" , "test" ) ) ; } @ Override public void tearDown ( ) throws Exception { } public void testFieldSortCustomSearcher ( ) throws Exception { } public void testFieldSortSingleSearcher ( ) throws Exception { } private void matchHits ( IndexSearcher searcher , Sort sort ) throws IOException { } private void checkHits ( ScoreDoc [ ] hits , String prefix ) { } private void log ( String message ) { } public class CustomSearcher extends IndexSearcher { private int switcher ; public CustomSearcher ( IndexReader r , int switcher ) { } @ Override public TopFieldDocs search ( Query query , Filter filter , int nDocs , Sort sort ) throws IOException { } @ Override public TopDocs search ( Query query , Filter filter , int nDocs ) throws IOException { } } private class RandomGen { RandomGen ( Random random ) { } private Random random ; private Calendar base = new GregorianCalendar ( TimeZone . getDefault ( ) , Locale . getDefault ( ) ) ; private String getLuceneDate ( ) { } } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class Concatenator { private StringBuilder source = null ; private boolean exported = false ; private boolean pretty = true ; private String rootNameSpace = "" ; public Concatenator ( String packageName , ArrayList < String > namespaces , boolean prettyPrint ) { } public Concatenator ( String packageName , ArrayList < String > namespaces ) { } private void init ( String packageName , ArrayList < String > namespaces ) { } public void add ( JSArtifact artifact ) { } public String export ( ) { } private void writeIndent ( ) { } private void writeIndent ( int numberOfIndents ) { } private void writeHeader ( String packageName ) { source . append ( "////<seq2seq4repair_space>Generated<seq2seq4repair_space>by<seq2seq4repair_space>jscompile<seq2seq4repair_space>(https:////github.com//rliota//jscompile)<seq2seq4repair_space>on<seq2seq4repair_space>" ) ; source . append ( new Date ( ) ) ; source . append ( "\n" ) ; <START_BUG> source . append ( "function<seq2seq4repair_space>initialize" ) ; <END_BUG> source . append ( packageName ) ; source . append ( "(){\n" ) ; } private void writeNamespaces ( ArrayList < String > namespaceList ) { } private void writeNamespaceMemberDefinition ( String namespace , String memberName , ArrayList < String > dependencies , String memberSource ) { } private void writeFooter ( ) { } }

Fix:
source . append ( "function<seq2seq4repair_space>" ) ;
Buggy code:
public final class Hasher { private static final long C1 = - 8663945395140668459L ; private static final long C2 = 5545529020109919103L ; public static < T > long hash ( T input , Access < T > access , long offset , long length ) { assert ( offset >= 0L ) && ( length >= 0L ) ; long h1 = 0L ; long h2 = 0L ; long remaining = length ; while ( remaining >= 16L ) { long k1 = access . getLong ( input , offset ) ; <START_BUG> long k2 = access . getLong ( input , offset ) ; <END_BUG> offset += 16L ; remaining -= 16L ; h1 ^= Hasher . mixK1 ( k1 ) ; h1 = Long . rotateLeft ( h1 , 27 ) ; h1 += h2 ; h1 = ( h1 * 5L ) + 1390208809L ; h2 ^= Hasher . mixK2 ( k2 ) ; h2 = Long . rotateLeft ( h2 , 31 ) ; h2 += h1 ; h2 = ( h2 * 5L ) + 944331445L ; } if ( remaining > 0L ) { long k1 = 0L ; long k2 = 0L ; switch ( ( ( int ) ( remaining ) ) ) { case 15 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 14L ) ) ) ) << 48 ; case 14 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 13L ) ) ) ) << 40 ; case 13 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 12L ) ) ) ) << 32 ; case 12 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 11L ) ) ) ) << 24 ; case 11 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 10L ) ) ) ) << 16 ; case 10 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 9L ) ) ) ) << 8 ; case 9 : k2 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 8L ) ) ) ) ; case 8 : k1 ^= access . getLong ( input , offset ) ; break ; case 7 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 6L ) ) ) ) << 48 ; case 6 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 5L ) ) ) ) << 40 ; case 5 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 4L ) ) ) ) << 32 ; case 4 : k1 ^= access . getUnsignedInt ( input , offset ) ; break ; case 3 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 2L ) ) ) ) << 16 ; case 2 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , ( offset + 1L ) ) ) ) << 8 ; case 1 : k1 ^= ( ( long ) ( access . getUnsignedByte ( input , offset ) ) ) ; case 0 : break ; default : throw new AssertionError ( "Should<seq2seq4repair_space>never<seq2seq4repair_space>get<seq2seq4repair_space>here." ) ; } h1 ^= Hasher . mixK1 ( k1 ) ; h2 ^= Hasher . mixK2 ( k2 ) ; } return Hasher . finalize ( length , h1 , h2 ) ; } private static long finalize ( long length , long h1 , long h2 ) { } private static long fmix64 ( long k ) { } private static long mixK1 ( long k1 ) { } private static long mixK2 ( long k2 ) { } public static long hash ( Bytes bytes ) { } public static long hash ( Bytes bytes , long offset , long limit ) { } public static long hash ( byte [ ] array ) { } public static long hash ( char [ ] array ) { } public static long hash ( int value ) { } public static long hash ( long value ) { } private Hasher ( ) { } }

Fix:
long k2 = access . getLong ( input , ( offset + 8L ) ) ;
Buggy code:
@ Component public class MovingManager { @ Autowired private Assets assets ; @ Autowired private ScreenFactory screenFactory ; @ Autowired private PositionInfo positionInfo ; @ Autowired private MovingInfo movingInfo ; @ Autowired private EncounterManager encounterManager ; public void goForward ( ) { } public void goBackward ( ) { } private void plusLeftRoadLength ( ) { } public void minusLeftRoadLength ( ) { } private void movingRoad ( ) { } private void goIntoCurrentNode ( ) { } private boolean isRoadLeft ( ) { <START_BUG> return ( movingInfo . getLeftRoadLength ( ) ) >= 0 ? true : false ; <END_BUG> } private boolean isRoadFull ( ) { } }

Fix:
return ( movingInfo . getLeftRoadLength ( ) ) > 0 ? true : false ;
Buggy code:
public class GameActivity extends Activity { private Hand hand ; private Deck deck ; private int cash ; private int placeInDeck = 0 ; private boolean [ ] changePosition = new boolean [ 5 ] ; private boolean readyForNewRound ; private boolean gameInProgress = false ; private Button dealButton ; private TextView cashView ; private TextView winMessage ; private Context context ; private RetainedFragment dataFragment ; public void onCreate ( Bundle savedInstanceState ) { } @ Override public void onSaveInstanceState ( Bundle savedInstanceState ) { } @ Override public void onRestoreInstanceState ( Bundle savedInstanceState ) { } @ Override public void onDestroy ( ) { } void showCash ( ) { } void gameOver ( ) { } void newRound ( ) { } void updateCards ( ) { for ( int i = 0 ; i < 5 ; i ++ ) { <START_BUG> if ( changePosition [ i ] ) { <END_BUG> ImageView card = ( ( ImageView ) ( findViewById ( getResources ( ) . getIdentifier ( ( "card" + ( i + 1 ) ) , "id" , getPackageName ( ) ) ) ) ) ; card . setImageResource ( red_back ) ; } else { ImageView card = ( ( ImageView ) ( findViewById ( getResources ( ) . getIdentifier ( ( "card" + ( i + 1 ) ) , "id" , getPackageName ( ) ) ) ) ) ; card . setImageResource ( context . getResources ( ) . getIdentifier ( hand . hand [ i ] . toString ( ) , "drawable" , context . getPackageName ( ) ) ) ; } } if ( readyForNewRound ) { dealButton . setText ( getResources ( ) . getString ( deal ) ) ; } else { dealButton . setText ( getResources ( ) . getString ( change ) ) ; } } void changeCards ( ) { } void finishRound ( ) { } void resetChange ( ) { } }

Fix:
if ( ( changePosition [ i ] ) || ( ( hand . hand [ i ] ) == null ) ) {
Buggy code:
public class TempFolderFactory implements MailboxTstFactory { public TempFolderFactory ( ) { } <START_BUG> public MessageFolder createFolder ( int folderId ) { <END_BUG> return new org . columba . mail . folder . temp . TempFolder ( ( ( ( FolderTstHelper . homeDirectory ) + "//folders//" ) + folderId ) ) ; } }

Fix:
public AbstractMessageFolder createFolder ( int folderId ) {
Buggy code:
public class ExampleCodeGenerator extends AbstractCodeGenerator < TLModelElement > { @ Override public void doGenerateOutput ( TLModelElement source , CodeGenerationContext context ) throws CodeGenerationException { } private ExampleGeneratorOptions getOptions ( CodeGenerationContext context ) { } private void registerSchemaLocations ( ExampleDocumentBuilder builder , TLModel model , CodeGenerationContext context ) { if ( model != null ) { for ( AbstractLibrary library : model . getAllLibraries ( ) ) { String schemaPath = context . getValue ( CK_EXAMPLE_SCHEMA_RELATIVE_PATH ) ; String schemaFilename = getFilenameBuilder ( ) . buildFilename ( library , "xsd" ) ; String schemaLocation ; if ( library instanceof TLLibrary ) { schemaLocation = schemaPath + schemaFilename ; } else if ( library instanceof XSDLibrary ) { schemaLocation = ( ( schemaPath + ( getLegacySchemaOutputLocation ( context ) ) ) + "//" ) + schemaFilename ; } else { schemaLocation = ( ( schemaPath + ( getBuiltInSchemaOutputLocation ( context ) ) ) + "//" ) + schemaFilename ; } <START_BUG> builder . addSchemaLocation ( library . getNamespace ( ) , schemaLocation ) ; <END_BUG> } } } @ Override protected File getOutputFile ( TLModelElement source , CodeGenerationContext context ) { } @ Override protected CodeGenerationFilenameBuilder < TLModelElement > getDefaultFilenameBuilder ( ) { } @ Override protected AbstractLibrary getLibrary ( TLModelElement source ) { } @ Override protected boolean isSupportedSourceObject ( TLModelElement source ) { } }

Fix:
builder . addSchemaLocation ( library , schemaLocation ) ;