nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ModuleUtils { public static void createTestModule ( String moduleName , String moduleXml , Class < ? > ... classes ) throws IOException { <START_BUG> File testModuleRoot = new File ( ModuleUtils . getModulePath ( ) , ( "test//" + moduleName ) ) ; <END_BUG> if ( testModuleRoot . exists ( ) ) { throw new IllegalArgumentException ( ( testModuleRoot + "<seq2seq4repair_space>already<seq2seq4repair_space>exists" ) ) ; } File file = new File ( testModuleRoot , "main" ) ; if ( ! ( file . mkdirs ( ) ) ) { throw new IllegalArgumentException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>create<seq2seq4repair_space>" + file ) ) ; } URL url = classes [ 0 ] . getResource ( moduleXml ) ; if ( url == null ) { throw new IllegalStateException ( ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>find<seq2seq4repair_space>module.xml:<seq2seq4repair_space>" + moduleXml ) ) ; } ModuleUtils . copyFile ( new File ( file , "module.xml" ) , url . openStream ( ) ) ; JavaArchive jar = ShrinkWrap . create ( JavaArchive . class , ( moduleName + ".jar" ) ) ; jar . addClasses ( classes ) ; jar . addAsManifestResource ( INSTANCE , "beans.xml" ) ; Indexer indexer = new Indexer ( ) ; for ( Class < ? > clazz : classes ) { try ( final InputStream resource = clazz . getResourceAsStream ( ( ( clazz . getSimpleName ( ) ) + ".class" ) ) ) { indexer . index ( resource ) ; } } Index index = indexer . complete ( ) ; ByteArrayOutputStream data = new ByteArrayOutputStream ( ) ; IndexWriter writer = new IndexWriter ( data ) ; writer . write ( index ) ; jar . addAsManifestResource ( new ByteArrayAsset ( data . toByteArray ( ) ) , "jandex.idx" ) ; FileOutputStream jarFile = new FileOutputStream ( new File ( file , ( moduleName + ".jar" ) ) ) ; try { jar . as ( ZipExporter . class ) . exportTo ( jarFile ) ; } finally { jarFile . flush ( ) ; jarFile . close ( ) ; } } private static void copyFile ( File target , InputStream src ) throws IOException { } public static File getModulePath ( ) { } public static void deleteRecursively ( File file ) { } }

Fix:
File testModuleRoot = new File ( ModuleUtils . getModulePath ( ) , ( ( "test" + ( File . separatorChar ) ) + moduleName ) ) ;
Buggy code:
public class Board { private Cell [ ] [ ] board ; private int rows ; private int cols ; private int countLiveCells = 0 ; public Cell [ ] [ ] getBoard ( ) { } public void setBoard ( Cell [ ] [ ] board ) { } public int getBoardRows ( ) { } public int getBoardCols ( ) { } public boolean getCellIsAlive ( int i , int j ) { } public Cell getCellAt ( int i , int j ) { } public int countSurroungingLiveCells ( int i , int j ) { countLiveCells = 0 ; <START_BUG> if ( getCellAt ( ( i + 1 ) , ( j + 1 ) ) . isAlive ( ) ) { <END_BUG> ( countLiveCells ) ++ ; } if ( getCellAt ( ( i + 1 ) , j ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( ( i + 1 ) , ( j + 1 ) ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( i , ( j + 1 ) ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( ( i - 1 ) , ( j + 1 ) ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( ( i - 1 ) , j ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( ( i - 1 ) , ( j - 1 ) ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } if ( getCellAt ( i , ( j - 1 ) ) . isAlive ( ) ) { ( countLiveCells ) ++ ; } return countLiveCells ; } public void printBoard ( ) { } public Board ( int rows , int cols ) { } }

Fix:
if ( getCellAt ( ( i + 1 ) , ( j - 1 ) ) . isAlive ( ) ) {
Buggy code:
public class WiFiBroad extends WiFiPulic { private static final String TAG = WiFiBroad . class . getSimpleName ( ) ; private Process proc ; private WifiManager wifi ; private MulticastSocket socket = null ; public static final String multicastHost = "224.0.0.1" ; public static final int localPort = 9988 ; private TelephonyManager tm ; private RecvMulti recvThd = null ; private ObjectMulti objThd = null ; private final PipedOutputStream po = new PipedOutputStream ( ) ; private final PipedInputStream pi = new PipedInputStream ( po ) ; private SendMulti sendThd ; public static final int EMERGEN_SEND_TAG = - 2 ; public static final int FRAG_REQST_TAG = - 3 ; public static String myIP ; public static final String baseIP = "192.168.1." ; private int numIP ; public WiFiBroad ( Context contect ) throws IOException , InterruptedException { } @ Override public void EmergencySend ( byte [ ] data ) throws FileFragmentException , IOException { <START_BUG> FileFragment f = new FileFragment ( numIP , 0 , data . length , WiFiBroad . EMERGEN_SEND_TAG , ( - 1 ) ) ; <END_BUG> f . setData ( data ) ; data = f . toBytes ( ) ; DatagramPacket dp = new DatagramPacket ( data , data . length , InetAddress . getByName ( WiFiBroad . multicastHost ) , WiFiBroad . localPort ) ; synchronized ( taskList ) { socket . send ( dp ) ; } } @ Override public void destroy ( ) throws InterruptedException { } @ Override public void notify ( int seg , int start ) { } }

Fix:
FileFragment f = new FileFragment ( numIP , data . length , WiFiBroad . EMERGEN_SEND_TAG , ( - 1 ) ) ;
Buggy code:
public class DisplayBlockTest extends ComponentTest { @ Test public void initTest ( ) throws IOException { } @ Test public void inputOutputTest ( ) throws IOException { DisplayBlock block = DisplayBlock . newInstance ( ) ; assertEquals ( block . getOutput ( ) , "New<seq2seq4repair_space>Output" ) ; <START_BUG> block . setInput ( "8" ) ; <END_BUG> assertEquals ( block . getOutput ( ) , "8" ) ; } }

Fix:
block . setOutput ( "8" ) ;
Buggy code:
public class SpatiotemporalModeEvents extends SpatiotemporalMode { protected Double amplitudeMax ; public SpatiotemporalModeEvents ( ) { } public SpatiotemporalModeEvents ( final OcelotlCore ocelotlCore ) { } @ SuppressWarnings ( "unchecked" ) @ Override protected void computeProportions ( EventProducerNode node ) { } @ Override public MainEvent getMainEvent ( EventProducerNode epn , int start , int end ) { double max = 0.0 ; MainEvent maj = new MainEvent ( Void , max ) ; <START_BUG> for ( String event : getEvents ( ) ) { <END_BUG> double amp = 0.0 ; for ( int i = start ; i < end ; i ++ ) amp += proportions . get ( epn ) . get ( i ) . get ( event ) ; amp = ( amp // ( end - start ) ) // ( amplitudeMax ) ; if ( amp > max ) { maj = new MainEvent ( event , amp ) ; max = amp ; } } return maj ; } }

Fix:
for ( String event : getAllEvents ( ) ) {
Buggy code:
public abstract class AbstractAnalyzer implements DependencyAnalyzer { public static final int MAX_LOOPS = 1000 ; private Path sourcePath = new Path ( null ) ; private Path classPath = new Path ( null ) ; private Vector rootClasses = new Vector ( ) ; private boolean determined = false ; private Vector fileDependencies ; private Vector classDependencies ; private boolean closure = true ; protected AbstractAnalyzer ( ) { } public void setClosure ( boolean closure ) { } public Enumeration getFileDependencies ( ) { } public Enumeration getClassDependencies ( ) { } public File getClassContainer ( String classname ) throws IOException { } public File getSourceContainer ( String classname ) throws IOException { } public void addSourcePath ( Path sourcePath ) { } public void addClassPath ( Path classPath ) { } public void addRootClass ( String className ) { } public void config ( String name , Object info ) { } public void reset ( ) { <START_BUG> rootClasses . clear ( ) ; <END_BUG> determined = false ; fileDependencies = new Vector ( ) ; classDependencies = new Vector ( ) ; } protected Enumeration getRootClasses ( ) { } protected boolean isClosureRequired ( ) { } protected abstract void determineDependencies ( Vector files , Vector classes ) { } protected abstract boolean supportsFileDependencies ( ) { } private File getResourceContainer ( String resourceLocation , String [ ] paths ) throws IOException { } }

Fix:
rootClasses . removeAllElements ( ) ;
Buggy code:
public class DataTable extends AbstractDataSource implements MutableDataSource { private static final long serialVersionUID = 535236774042654449L ; private final List < Comparable < ? > [ ] > rows ; private final class RowComparator implements Comparator < Comparable < ? > [ ] > { private final DataComparator [ ] comparators ; public RowComparator ( DataComparator [ ] comparators ) { } public int compare ( Comparable < ? > [ ] row1 , Comparable < ? > [ ] row2 ) { } } public DataTable ( Class < ? extends Comparable < ? > > ... types ) { } @ SuppressWarnings ( "unchecked" ) public DataTable ( int cols , Class < ? extends Comparable < ? > > type ) { } public DataTable ( DataSource source ) { } public int add ( Comparable < ? > ... values ) { } public int add ( Collection < ? extends Comparable < ? > > values ) { } public int add ( Row row ) { } public void remove ( int row ) { } public void removeLast ( ) { } public void clear ( ) { } public Comparable < ? > get ( int col , int row ) { } @ SuppressWarnings ( "unchecked" ) public < T > Comparable < T > set ( int col , int row , Comparable < T > value ) { Comparable < T > old ; DataChangeEvent event = null ; synchronized ( this ) { old = ( ( Comparable < T > ) ( get ( col , row ) ) ) ; <START_BUG> if ( ! ( old . equals ( value ) ) ) { <END_BUG> rows . get ( row ) [ col ] = value ; event = new DataChangeEvent ( this , col , row , old , value ) ; } } if ( event != null ) { notifyDataUpdated ( event ) ; } return old ; } public int getRowCount ( ) { } public void sort ( final DataComparator ... comparators ) { } }

Fix:
if ( ( old == null ) || ( ! ( old . equals ( value ) ) ) ) {
Buggy code:
public class Main extends Application { private IntegerProperty brightness = new SimpleIntegerProperty ( ) ; @ Override public void start ( Stage primaryStage ) throws Exception { <START_BUG> URL location = getClass ( ) . getResource ( "//View.fxml" ) ; <END_BUG> Parent root = FXMLLoader . load ( location ) ; final DoubleBinding colorValue = brightness . multiply ( 2.55 ) ; StringExpression styleString = Bindings . format ( "-fx-base:rgb(%1$.0f<seq2seq4repair_space>,<seq2seq4repair_space>%1$.0f,<seq2seq4repair_space>%1$.0f)" , colorValue ) ; brightness . set ( 20 ) ; root . styleProperty ( ) . bind ( styleString ) ; primaryStage . setScene ( new Scene ( root ) ) ; primaryStage . sizeToScene ( ) ; primaryStage . show ( ) ; initBrightnessControl ( primaryStage ) ; } private void initBrightnessControl ( Stage primaryStage ) { } public static void main ( String [ ] args ) { } }

Fix:
URL location = getClass ( ) . getResource ( "View.fxml" ) ;
Buggy code:
public class DateDV extends DateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { } protected String dateToString ( DateTimeData date ) { } protected XMLGregorianCalendar getXMLGregorianCalendar ( DateTimeData date ) { <START_BUG> return factory . newXMLGregorianCalendar ( date . unNormYear , date . unNormMonth , date . unNormDay , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , ( date . hasTimeZone ( ) ? ( ( date . timezoneHr ) * 60 ) + ( date . timezoneMin ) : DatatypeConstants . FIELD_UNDEFINED ) ) ; <END_BUG> } }

Fix:
return datatypeFactory . newXMLGregorianCalendar ( date . unNormYear , date . unNormMonth , date . unNormDay , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , DatatypeConstants . FIELD_UNDEFINED , ( date . hasTimeZone ( ) ? ( ( date . timezoneHr ) * 60 ) + ( date . timezoneMin ) : DatatypeConstants . FIELD_UNDEFINED ) ) ;
Buggy code:
public class ClasspathJar implements FileSystem . Classpath { ZipFile zipFile ; Hashtable packageCache ; boolean closeZipFileAtEnd ; public ClasspathJar ( File file ) throws IOException { } public ClasspathJar ( ZipFile zipFile , boolean closeZipFileAtEnd ) throws IOException { } public NameEnvironmentAnswer findClass ( char [ ] typeName , String qualifiedPackageName , String qualifiedBinaryFileName ) { } public boolean isPackage ( String qualifiedPackageName ) { } public void reset ( ) { } public String toString ( ) { <START_BUG> return "Classpath<seq2seq4repair_space>for<seq2seq4repair_space>jar<seq2seq4repair_space>file<seq2seq4repair_space>" + ( zipFile ) ; <END_BUG> } }

Fix:
return "Classpath<seq2seq4repair_space>for<seq2seq4repair_space>jar<seq2seq4repair_space>file<seq2seq4repair_space>" + ( zipFile . getName ( ) ) ;
Buggy code:
public class ConcurrentDataCache extends AbstractDataCache implements RemoteCommitListener { private static final Localizer _loc = Localizer . forPackage ( ConcurrentDataCache . class ) ; private final CacheMap _cache = newCacheMap ( ) ; public CacheMap getCacheMap ( ) { } public void setCacheSize ( int size ) { } public int getCacheSize ( ) { } public void setSoftReferenceSize ( int size ) { } public int getSoftReferenceSize ( ) { } public void initialize ( DataCacheManager mgr ) { super . initialize ( mgr ) ; <START_BUG> conf . getRemoteCommitEventManager ( ) . addListener ( this ) ; <END_BUG> } public void unpinAll ( Class cls , boolean subs ) { } public void writeLock ( ) { } public void writeUnlock ( ) { } protected CacheMap newCacheMap ( ) { } protected DataCachePCData getInternal ( Object key ) { } protected DataCachePCData putInternal ( Object key , DataCachePCData pc ) { } protected DataCachePCData removeInternal ( Object key ) { } protected void removeAllInternal ( Class cls , boolean subs ) { } protected void clearInternal ( ) { } protected boolean pinInternal ( Object key ) { } protected boolean unpinInternal ( Object key ) { } }

Fix:
conf . getRemoteCommitEventManager ( ) . addInternalListener ( this ) ;
Buggy code:
public class BoosterGetPlayerName extends AsyncTask < BoosterDescription , Void , String > { Exception except = null ; Context mContext ; BoosterDescription playerName ; ListView list ; boolean isActive ; ProgressBar bar ; TextView tooltip ; public BoosterGetPlayerName ( Context context , ListView listView , boolean isActiveOnly , ProgressBar bars , TextView tooltips ) { } @ Override protected String doInBackground ( BoosterDescription ... playerData ) { } protected void onPostExecute ( String json ) { } private boolean checkHistory ( PlayerReply reply ) { } private void checkIfComplete ( ) { if ( ( ( MainStaticVars . tmpBooster ) == ( MainStaticVars . numOfBoosters ) ) && ( ! ( MainStaticVars . parseRes ) ) ) { tooltip . setVisibility ( INVISIBLE ) ; MainStaticVars . parseRes = true ; MainStaticVars . boosterUpdated = true ; MainStaticVars . inProg = false ; if ( ! ( isActive ) ) { BoosterDescListAdapter adapter = new BoosterDescListAdapter ( mContext , layout . listview_booster_desc , MainStaticVars . boosterList ) ; list . setAdapter ( adapter ) ; bar . setVisibility ( GONE ) ; } else { ArrayList < BoosterDescription > tmp = new ArrayList < > ( ) ; for ( BoosterDescription desc : MainStaticVars . boosterList ) { tmp . add ( desc ) ; } Iterator < BoosterDescription > iter = tmp . iterator ( ) ; while ( iter . hasNext ( ) ) { BoosterDescription desc = iter . next ( ) ; if ( ! ( desc . checkIfBoosterActive ( ) ) ) iter . remove ( ) ; } BoosterDescListAdapter adapter = new BoosterDescListAdapter ( mContext , layout . listview_booster_desc , tmp ) ; list . setAdapter ( adapter ) ; bar . setVisibility ( GONE ) ; MainStaticVars . parseRes = false ; } } <START_BUG> if ( MainStaticVars . parseRes ) { <END_BUG> tooltip . setVisibility ( VISIBLE ) ; tooltip . setText ( ( ( ( "Processed<seq2seq4repair_space>Player<seq2seq4repair_space>" + ( MainStaticVars . boosterProcessCounter ) ) + "//" ) + ( MainStaticVars . boosterMaxProcessCounter ) ) ) ; } } }

Fix:
if ( MainStaticVars . inProg ) {
Buggy code:
public class PackageResourceTest extends WicketTestCase { public WebApplication application ; @ Override protected void setUp ( ) throws Exception { } public void testBindAbsolutePackageResource ( ) throws Exception { } public void testPackageResourceGuard ( ) throws Exception { } public void testLenientPackageResourceMatching ( ) throws Exception { ResourceReference invalidResource = new PackageResourceReference ( PackageResourceTest . class , "i_do_not_exist.txt" , Locale . ENGLISH , null , null ) ; assertNotNull ( "resource<seq2seq4repair_space>packaged3.txt<seq2seq4repair_space>SHOULD<seq2seq4repair_space>be<seq2seq4repair_space>available<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>packaged<seq2seq4repair_space>resource<seq2seq4repair_space>even<seq2seq4repair_space>if<seq2seq4repair_space>it<seq2seq4repair_space>doesn't<seq2seq4repair_space>exist" , invalidResource . getResource ( ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1.txt" , null , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1.txt" , Locale . CHINA , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1.txt" , Locale . CHINA , "foo" , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1.txt" , null , "foo" , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en.txt" , null , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en_US.txt" , null , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en_US.txt" , null , "foo" , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en_US.txt" , Locale . US , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en_US.txt" , Locale . CANADA , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_en_US.txt" , Locale . CHINA , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_foo_bar_en.txt" , null , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_foo_bar_en_US.txt" , null , null , null ) ) ; assertTrue ( PackageResource . exists ( PackageResourceTest . class , "packaged1_foo_bar_en_US_MAC.txt" , null , null , null ) ) ; <START_BUG> tester . getRequest ( ) . setUrl ( tester . getRequestCycle ( ) . urlFor ( invalidResource ) ) ; <END_BUG> assertFalse ( tester . processRequest ( ) ) ; } }

Fix:
tester . getRequest ( ) . setUrl ( tester . getRequestCycle ( ) . mapUrlFor ( invalidResource , null ) ) ;
Buggy code:
@ DefaultKey ( "uri" ) @ ValidScope ( Scope . REQUEST ) public class UriTool { private HttpServletRequest request ; public String of ( String path ) { } private String baseUrl ( ) { <START_BUG> return ( ( ( ( request . getScheme ( ) ) + ":////" ) + ( request . getServerName ( ) ) ) + ( request . getContextPath ( ) ) ) + ( serverPort ( ) ) ; <END_BUG> } private String uri ( String path ) { } private String serverPort ( ) { } private boolean usingDefaultPort ( ) { } public void setRequest ( HttpServletRequest request ) { } }

Fix:
return ( ( ( ( request . getScheme ( ) ) + ":////" ) + ( request . getServerName ( ) ) ) + ( serverPort ( ) ) ) + ( request . getContextPath ( ) ) ;
Buggy code:
public class Mkdir extends Task { private File dir ; public void execute ( ) throws BuildException { if ( ( dir ) == null ) { throw new BuildException ( "dir<seq2seq4repair_space>attribute<seq2seq4repair_space>is<seq2seq4repair_space>required" , location ) ; } if ( dir . isFile ( ) ) { throw new BuildException ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>directory<seq2seq4repair_space>as<seq2seq4repair_space>a<seq2seq4repair_space>file<seq2seq4repair_space>already<seq2seq4repair_space>exists<seq2seq4repair_space>with<seq2seq4repair_space>that<seq2seq4repair_space>name:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } if ( ! ( dir . exists ( ) ) ) { boolean result = dir . mkdirs ( ) ; if ( result == false ) { <START_BUG> String msg = ( ( "Directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "succesfull<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; <END_BUG> throw new BuildException ( msg , location ) ; } log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } } public void setDir ( File dir ) { } }

Fix:
String msg = ( ( "Directory<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "successful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ;
Buggy code:
public class RemoteTcpClientTest extends ThreadMonitoringTest { class MyMarshallable implements Marshallable { String someData ; public MyMarshallable ( String someData ) { } @ Override public void writeMarshallable ( WireOut wire ) { } @ Override public void readMarshallable ( WireIn wire ) throws IllegalStateException { } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } } @ Test ( timeout = 50000 ) public void testMarshable ( ) throws Exception { try ( final ServerEndpoint serverEndpoint = new ServerEndpoint ( ( ( byte ) ( 1 ) ) ) ) { int serverPort = serverEndpoint . getPort ( ) ; <START_BUG> try ( final RemoteTcpClientChronicleContext context = new RemoteTcpClientChronicleContext ( "localhost" , serverPort ) ) { <END_BUG> try ( ChronicleMap < RemoteTcpClientTest . MyMarshallable , Long > numbers = context . getMap ( "marshallable-keys" , RemoteTcpClientTest . MyMarshallable . class , Long . class ) ) { RemoteTcpClientTest . MyMarshallable key1 = new RemoteTcpClientTest . MyMarshallable ( "key1" ) ; RemoteTcpClientTest . MyMarshallable key2 = new RemoteTcpClientTest . MyMarshallable ( "key2" ) ; numbers . put ( key1 , 1L ) ; numbers . put ( key2 , 2L ) ; } try ( ChronicleMap < RemoteTcpClientTest . MyMarshallable , Long > numbers = context . getMap ( "marshallable-keys" , RemoteTcpClientTest . MyMarshallable . class , Long . class ) ) { RemoteTcpClientTest . MyMarshallable key1 = new RemoteTcpClientTest . MyMarshallable ( "key1" ) ; RemoteTcpClientTest . MyMarshallable key2 = new RemoteTcpClientTest . MyMarshallable ( "key2" ) ; assertEquals ( 2 , numbers . size ( ) ) ; assertEquals ( Long . valueOf ( 1 ) , numbers . get ( key1 ) ) ; assertEquals ( Long . valueOf ( 2 ) , numbers . get ( key2 ) ) ; } } } } No newline ; at end ; of file ; }

Fix:
try ( final RemoteTcpClientChronicleContext context = new RemoteTcpClientChronicleContext ( "localhost" , serverPort , ( ( byte ) ( 2 ) ) ) ) {
Buggy code:
@ RunWith ( RobolectricGradleTestRunner . class ) @ Config ( constants = BuildConfig . class , sdk = 21 ) public class NewsApiTest { @ Test public void checkGetNewsResponseIsSuccessful ( ) { try { <START_BUG> if ( ! ( new Retrofit . Builder ( ) . baseUrl ( BASE_URL ) . addConverterFactory ( GsonConverterFactory . create ( ) ) . build ( ) . create ( NewsApi . class ) . getNews ( ) . execute ( ) . isSuccess ( ) ) ) { <END_BUG> throw new RuntimeException ( "Api<seq2seq4repair_space>call<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>successful" ) ; } } catch ( IOException e ) { throw new RuntimeException ( "No<seq2seq4repair_space>internet<seq2seq4repair_space>connection" ) ; } } }

Fix:
if ( ! ( new Retrofit . Builder ( ) . baseUrl ( BASE_URL ) . addConverterFactory ( GsonConverterFactory . create ( ) ) . build ( ) . create ( NewsApi . class ) . getNews ( 0 , 10 ) . execute ( ) . isSuccess ( ) ) ) {
Buggy code:
public class RowManagerImpl implements RowManager { private Map < RowManagerImpl . Key , PrimaryRow > _inserts = null ; private Map < RowManagerImpl . Key , PrimaryRow > _updates = null ; private Map < RowManagerImpl . Key , PrimaryRow > _deletes = null ; private Collection < SecondaryRow > _secondaryUpdates = null ; private Collection < SecondaryRow > _secondaryDeletes = null ; private Collection < Row > _allRowUpdates = null ; private Collection < Row > _allRowDeletes = null ; private final List < PrimaryRow > _primaryOrder ; private boolean _auto = false ; private RowManagerImpl . Key _key = null ; private PrimaryRow _row = null ; public RowManagerImpl ( boolean order ) { } public boolean hasAutoAssignConstraints ( ) { } public List < PrimaryRow > getOrdered ( ) { } public Collection < PrimaryRow > getInserts ( ) { } public Collection < PrimaryRow > getUpdates ( ) { } public Collection < PrimaryRow > getDeletes ( ) { } public Collection < SecondaryRow > getSecondaryUpdates ( ) { } public Collection < SecondaryRow > getSecondaryDeletes ( ) { } public Collection < Row > getAllRowUpdates ( ) { } public Collection < Row > getAllRowDeletes ( ) { } public Row getSecondaryRow ( Table table , int action ) { } public void flushSecondaryRow ( Row row ) throws SQLException { } public Row getAllRows ( Table table , int action ) { } public void flushAllRows ( Row row ) { } public Row getRow ( Table table , int action , OpenJPAStateManager sm , boolean create ) { } private static class Key { public final Table table ; public final OpenJPAStateManager sm ; public Key ( Table table , OpenJPAStateManager sm ) { } public int hashCode ( ) { <START_BUG> return ( ( table . hashCode ( ) ) + ( sm . hashCode ( ) ) ) % ( Integer . MAX_VALUE ) ; <END_BUG> } public boolean equals ( Object other ) { } } }

Fix:
return ( ( table ) == null ? 0 : table . hashCode ( ) ) + ( ( ( sm ) == null ? 0 : sm . hashCode ( ) ) % ( Integer . MAX_VALUE ) ) ;
Buggy code:
public class ExtensionAnnotationProcessor extends AbstractProcessor { private Map < String , Set < String > > extensions = new HashMap < > ( ) ; private Map < String , Set < String > > oldExtensions = new HashMap < > ( ) ; private ExtensionStorage storage ; @ Override public synchronized void init ( ProcessingEnvironment processingEnv ) { } @ Override public SourceVersion getSupportedSourceVersion ( ) { } @ Override public Set < String > getSupportedAnnotationTypes ( ) { } @ Override public boolean process ( Set < ? extends TypeElement > annotations , RoundEnvironment roundEnv ) { if ( roundEnv . processingOver ( ) ) { return false ; } for ( Element element : roundEnv . getElementsAnnotatedWith ( Extension . class ) ) { if ( ! ( element instanceof TypeElement ) ) { continue ; } if ( ! ( isExtension ( element . asType ( ) ) ) ) { continue ; } TypeElement extensionElement = ( ( TypeElement ) ( element ) ) ; List < TypeElement > extensionPointElements = findExtensionPoints ( extensionElement ) ; if ( extensionPointElements . isEmpty ( ) ) { continue ; } String extension = getBinaryName ( extensionElement ) ; for ( TypeElement extensionPointElement : extensionPointElements ) { String extensionPoint = getBinaryName ( extensionPointElement ) ; Set < String > extensionPoints = extensions . get ( extensionPoint ) ; if ( extensionPoints == null ) { extensionPoints = new TreeSet < > ( ) ; extensions . put ( extensionPoint , extensionPoints ) ; } extensionPoints . add ( extension ) ; } } oldExtensions = storage . read ( ) ; for ( Map . Entry < String , Set < String > > entry : oldExtensions . entrySet ( ) ) { String extensionPoint = entry . getKey ( ) ; if ( extensions . containsKey ( extensionPoint ) ) { <START_BUG> entry . getValue ( ) . addAll ( entry . getValue ( ) ) ; <END_BUG> } else { extensions . put ( extensionPoint , entry . getValue ( ) ) ; } } storage . write ( extensions ) ; return false ; } public ProcessingEnvironment getProcessingEnvironment ( ) { } public void error ( String message , Object ... args ) { } public void error ( Element element , String message , Object ... args ) { } public void note ( String message , Object ... args ) { } public void note ( Element element , String message , Object ... args ) { } public String getBinaryName ( TypeElement element ) { } public Map < String , Set < String > > getExtensions ( ) { } public Map < String , Set < String > > getOldExtensions ( ) { } private List < TypeElement > findExtensionPoints ( TypeElement extensionElement ) { } private boolean isExtension ( TypeMirror typeMirror ) { } private TypeMirror getExtensionPointType ( ) { } }

Fix:
extensions . get ( extensionPoint ) . addAll ( entry . getValue ( ) ) ;
Buggy code:
public class RRset implements TypedObject { private List rrs ; private short nsigs ; private short position ; public RRset ( ) { } public RRset ( RRset rrset ) { } private void safeAddRR ( Record r ) { } public synchronized void addRR ( Record r ) { } public synchronized void deleteRR ( Record r ) { } public synchronized void clear ( ) { } private synchronized Iterator iterator ( boolean data , boolean cycle ) { } public synchronized Iterator rrs ( boolean cycle ) { } public synchronized Iterator rrs ( ) { } public synchronized Iterator sigs ( ) { } public int size ( ) { } public Name getName ( ) { } public int getType ( ) { } public int getDClass ( ) { } public synchronized long getTTL ( ) { } public synchronized Record first ( ) { if ( ( rrs . size ( ) ) == 0 ) <START_BUG> throw new IllegalArgumentException ( "rrset<seq2seq4repair_space>is<seq2seq4repair_space>empty" ) ; <END_BUG> return ( ( Record ) ( rrs . get ( 0 ) ) ) ; } private String iteratorToString ( Iterator it ) { } public String toString ( ) { } }

Fix:
throw new IllegalStateException ( "rrset<seq2seq4repair_space>is<seq2seq4repair_space>empty" ) ;
Buggy code:
public class GraphicsThread extends Thread { public static double fps ; private Drawable [ ] points ; public GraphicsThread ( Drawable [ ] points , KeyListener keyListener ) { } @ Override public synchronized void run ( ) { long frametime = 0 ; long start = 0 ; long maxFrame = ( ( long ) ( 1000 // ( GraphicsThread . fps ) ) ) ; while ( true ) { <START_BUG> if ( frametime > maxFrame ) { <END_BUG> System . out . println ( frametime ) ; } else { try { wait ( ( maxFrame - frametime ) ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } start = System . currentTimeMillis ( ) ; DrawUtil . update ( points ) ; frametime = ( System . currentTimeMillis ( ) ) - start ; } } }

Fix:
if ( frametime >= maxFrame ) {
Buggy code:
public class ContinuousOutputModelTest extends TestCase { public ContinuousOutputModelTest ( String name ) { } public void testBoundaries ( ) throws DerivativeException , IntegratorException { } public void testRandomAccess ( ) throws DerivativeException , IntegratorException { } public void testModelsMerging ( ) throws DerivativeException , IntegratorException { } public void testErrorConditions ( ) throws DerivativeException { } private boolean checkAppendError ( ContinuousOutputModel cm , double t0 , double [ ] y0 , double t1 ) throws DerivativeException { } private StepInterpolator buildInterpolator ( double t0 , double [ ] y0 , double t1 ) { <START_BUG> DummyStepInterpolator interpolator = new DummyStepInterpolator ( y0 , ( t1 >= t0 ) ) ; <END_BUG> interpolator . storeTime ( t0 ) ; interpolator . shift ( ) ; interpolator . storeTime ( t1 ) ; return interpolator ; } public void checkValue ( double value , double reference ) { } @ Override public void setUp ( ) { } @ Override public void tearDown ( ) { } TestProblem3 pb ; FirstOrderIntegrator integ ; }

Fix:
DummyStepInterpolator interpolator = new DummyStepInterpolator ( y0 , new double [ y0 . length ] , ( t1 >= t0 ) ) ;
Buggy code:
factoryBean = this . beanFactory . getBean ( factoryBeanName ) ; if ( factoryBean == null ) { <START_BUG> throw new org . springframework . beans . factory . BeanCreationException ( mbd . getResourceDescription ( ) , beanName , ( ( "factory-bean<seq2seq4repair_space>'" + factoryBeanName ) + "'<seq2seq4repair_space>returned<seq2seq4repair_space>null" ) ) ; <END_BUG>

Fix:
throw new org . springframework . beans . factory . BeanCreationException ( mbd . getResourceDescription ( ) , beanName , ( ( "factory-bean<seq2seq4repair_space>'" + factoryBeanName ) + "'<seq2seq4repair_space>(or<seq2seq4repair_space>a<seq2seq4repair_space>BeanPostProcessor<seq2seq4repair_space>involved)<seq2seq4repair_space>returned<seq2seq4repair_space>null" ) ) ;
Buggy code:
public class MessageFrameController extends AbstractMailFrameController { FolderCommandReference [ ] treeReference ; FolderCommandReference [ ] tableReference ; FixedTableSelectionHandler tableSelectionHandler ; public MessageFrameController ( ) { } protected void init ( ) { } public void selectInbox ( ) { Folder inboxFolder = ( ( Folder ) ( treeModel . getFolder ( 101 ) ) ) ; try { <START_BUG> Object [ ] uids = inboxFolder . getUids ( null ) ; <END_BUG> if ( ( uids . length ) > 0 ) { Object uid = uids [ 0 ] ; Object [ ] newUids = new Object [ 1 ] ; newUids [ 0 ] = uid ; FolderCommandReference [ ] r = new FolderCommandReference [ 1 ] ; r [ 0 ] = new FolderCommandReference ( inboxFolder , newUids ) ; treeReference = new FolderCommandReference [ 1 ] ; treeReference [ 0 ] = new FolderCommandReference ( inboxFolder ) ; tableReference = new FolderCommandReference [ 1 ] ; tableReference [ 0 ] = new FolderCommandReference ( inboxFolder , newUids ) ; processor . addOp ( new org . columba . mail . gui . message . command . ViewMessageCommand ( this , r ) ) ; } } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } public AbstractFrameView createView ( ) { } public void close ( ) { } public void saveAndClose ( ) { } protected void initInternActions ( ) { } public FolderCommandReference [ ] getTableSelection ( ) { } public FolderCommandReference [ ] getTreeSelection ( ) { } public void setTreeSelection ( FolderCommandReference [ ] references ) { } public void setTableSelection ( FolderCommandReference [ ] references ) { } public boolean hasTable ( ) { } }

Fix:
Object [ ] uids = inboxFolder . getUids ( ) ;
Buggy code:
public class CompetitionMatches { private static ObservableList < Match > matchList = FXCollections . observableArrayList ( ) ; @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static void start ( Stage primaryStage ) { } @ SuppressWarnings ( { "unchecked" , "rawtypes" } ) private static void setColor ( TableColumn t ) { t . setCellFactory ( new Callback < TableColumn , TableCell > ( ) { public TableCell call ( TableColumn param ) { return new TableCell < Team , String > ( ) { public void updateItem ( String item , boolean empty ) { super . updateItem ( item , empty ) ; if ( ! ( isEmpty ( ) ) ) { <START_BUG> this . setTextFill ( Color . BLACK ) ; <END_BUG> Team t = saveGame . getDB ( ) . findTeam ( this . getItem ( ) ) ; if ( t . getNm ( ) . equals ( saveGame . getMyTeam ( ) . getNm ( ) ) ) { this . setUnderline ( true ) ; } setText ( item ) ; } } } ; } } ) ; } }

Fix:
this . setUnderline ( false ) ;
Buggy code:
final class XATransactionState extends ContextImpl { static final int TRO_TIMEOUT = - 3 ; static final int TRO_DEADLOCK = - 2 ; static final int TRO_FAIL = - 1 ; static final int T0_NOT_ASSOCIATED = 0 ; static final int T1_ASSOCIATED = 1 ; static final int TC_COMPLETED = 3 ; final EmbedConnection conn ; final EmbedXAResource creatingResource ; private EmbedXAResource associatedResource ; final XAXactId xid ; HashMap suspendedList ; int associationState ; int rollbackOnlyCode ; boolean isPrepared ; boolean performTimeoutRollback ; XATransactionState . CancelXATransactionTask timeoutTask = null ; private static class CancelXATransactionTask extends TimerTask { private XATransactionState xaState ; public CancelXATransactionTask ( XATransactionState xaState ) { } public boolean cancel ( ) { } public void run ( ) { } } XATransactionState ( ContextManager cm , EmbedConnection conn , EmbedXAResource resource , XAXactId xid ) { } public void cleanupOnError ( Throwable t ) { if ( t instanceof StandardException ) { StandardException se = ( ( StandardException ) ( t ) ) ; if ( ( se . getSeverity ( ) ) >= ( ExceptionSeverity . SESSION_SEVERITY ) ) { popMe ( ) ; return ; } if ( ( se . getSeverity ( ) ) == ( ExceptionSeverity . TRANSACTION_SEVERITY ) ) { synchronized ( this ) { conn . setApplicationConnection ( null ) ; notifyAll ( ) ; associationState = XATransactionState . TRO_FAIL ; if ( DEADLOCK . equals ( se . getMessageId ( ) ) ) rollbackOnlyCode = XAException . XA_RBDEADLOCK ; else <START_BUG> if ( LOCK_TIMEOUT . equals ( se . getMessageId ( ) ) ) <END_BUG> rollbackOnlyCode = XAException . XA_RBTIMEOUT ; else rollbackOnlyCode = XAException . XA_RBOTHER ; } } } } void start ( EmbedXAResource resource , int flags ) throws XAException { } boolean end ( EmbedXAResource resource , int flags , boolean endingCurrentXid ) throws XAException { } synchronized void scheduleTimeoutTask ( long timeoutMillis ) { } synchronized void xa_rollback ( ) throws SQLException { } synchronized void xa_commit ( boolean onePhase ) throws SQLException { } synchronized int xa_prepare ( ) throws SQLException { } synchronized void xa_finalize ( ) { } synchronized void cancel ( String messageId ) throws XAException { } }

Fix:
if ( se . isLockTimeout ( ) )
Buggy code:
public class EntryDAO extends GenericDAO < EntryTransferObject > { private static final String TABLENAME = "entry" ; private static final String INSERT = "insert<seq2seq4repair_space>into<seq2seq4repair_space>miningsvn.entry<seq2seq4repair_space>values<seq2seq4repair_space>(?,<seq2seq4repair_space>?,<seq2seq4repair_space>?,<seq2seq4repair_space>?)" ; public EntryDAO ( Connection con ) { } @ Override public int count ( ) throws SQLException { <START_BUG> String query = "SELECT<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>count<seq2seq4repair_space>FROM<seq2seq4repair_space>" + ( this . tableName ) ; <END_BUG> PreparedStatement counter ; ResultSet res = null ; try { counter = this . con . prepareStatement ( query ) ; res = counter . executeQuery ( ) ; res . next ( ) ; return res . getInt ( "count" ) ; } catch ( SQLException e ) { throw e ; } finally { if ( res != null ) DBUtil . close ( res ) ; } } public List < EntryTransferObject > getAll ( ) throws SQLException { } public void insertEntry ( EntryTransferObject eto ) { } }

Fix:
String query = "SELECT<seq2seq4repair_space>COUNT(*)<seq2seq4repair_space>AS<seq2seq4repair_space>count<seq2seq4repair_space>FROM<seq2seq4repair_space>miningsvn." + ( this . tableName ) ;
Buggy code:
public abstract class VAJToolsServlet extends HttpServlet { public static final String DIR_PARAM = "dir" ; public static final String INCLUDE_PARAM = "include" ; public static final String EXCLUDE_PARAM = "exclude" ; public static final String CLASSES_PARAM = "cls" ; public static final String SOURCES_PARAM = "src" ; public static final String RESOURCES_PARAM = "res" ; public static final String DEFAULT_EXCLUDES_PARAM = "dex" ; public static final String PROJECT_NAME_PARAM = "project" ; HttpServletRequest request ; HttpServletResponse response ; VAJUtil util ; public void doGet ( HttpServletRequest req , HttpServletResponse res ) throws IOException , ServletException { try { response = res ; request = req ; initRequest ( ) ; executeRequest ( ) ; } catch ( TaskException e ) { <START_BUG> util . log ( ( "Error<seq2seq4repair_space>occured:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) , MSG_ERR ) ; <END_BUG> } catch ( Exception e ) { try { if ( ! ( e instanceof TaskException ) ) { String trace = ExceptionUtil . printStackTrace ( e ) ; util . log ( ( ( ( "Program<seq2seq4repair_space>error<seq2seq4repair_space>in<seq2seq4repair_space>" + ( this . getClass ( ) . getName ( ) ) ) + ":\n" ) + trace ) , MSG_ERR ) ; } } catch ( Throwable t ) { t . printStackTrace ( ) ; } finally { if ( ! ( e instanceof TaskException ) ) { throw new ServletException ( e . getMessage ( ) ) ; } } } } protected boolean getBooleanParam ( String param ) { } protected boolean getBooleanParam ( String param , boolean defaultValue ) { } protected String getFirstParamValueString ( String param ) { } protected String [ ] getParamValues ( String param ) { } protected abstract void executeRequest ( ) { } protected void initRequest ( ) throws IOException { } protected boolean toBoolean ( String string ) { } VAJUtil getUtil ( ) { } class VAJLocalServletUtil extends VAJLocalUtil { public void log ( String msg , int level ) { } } }

Fix:
util . getLogger ( ) . error ( ( "Error<seq2seq4repair_space>occured:<seq2seq4repair_space>" + ( e . getMessage ( ) ) ) ) ;
Buggy code:
public interface LockFactory extends PropertySetCallback { <START_BUG> public CompatibilitySpace createCompatibilitySpace ( Object owner ) ; <END_BUG> public boolean lockObject ( CompatibilitySpace compatibilitySpace , Object group , Lockable ref , Object qualifier , int timeout ) throws StandardException { } public int unlock ( CompatibilitySpace compatibilitySpace , Object group , Lockable ref , Object qualifier ) { } public void unlockGroup ( CompatibilitySpace compatibilitySpace , Object group ) { } public void unlockGroup ( CompatibilitySpace compatibilitySpace , Object group , Matchable key ) { } public void transfer ( CompatibilitySpace compatibilitySpace , Object oldGroup , Object newGroup ) { } public boolean anyoneBlocked ( ) { } public boolean areLocksHeld ( CompatibilitySpace compatibilitySpace , Object group ) { } public boolean areLocksHeld ( CompatibilitySpace compatibilitySpace ) { } public boolean zeroDurationlockObject ( CompatibilitySpace compatibilitySpace , Lockable ref , Object qualifier , int timeout ) throws StandardException { } public boolean isLockHeld ( CompatibilitySpace compatibilitySpace , Object group , Lockable ref , Object qualifier ) { } public void setLimit ( CompatibilitySpace compatibilitySpace , Object group , int limit , Limit callback ) { } public void clearLimit ( CompatibilitySpace compatibilitySpace , Object group ) { } public Enumeration makeVirtualLockTable ( ) { } }

Fix:
public CompatibilitySpace createCompatibilitySpace ( LockOwner owner ) ;
Buggy code:
public class KeyBindings extends Action { private static final String LOG_TAG = KeyBindings . class . getName ( ) ; private static final Map < String , Action > actionObjects = new HashMap < String , Action > ( ) ; private static final Map < Integer , Action > rootKeyBindings = new HashMap < Integer , Action > ( ) ; private static Map < Integer , Action > currentKeyBindings = KeyBindings . rootKeyBindings ; private Map < Integer , Action > keyBindings = new HashMap < Integer , Action > ( ) ; @ Override public final boolean performAction ( ) { } public static void resetKeyBindings ( ) { } private static boolean isKeyBindingsAction ( Action action ) { } public static Action getAction ( int keyMask ) { } public static boolean addKeyBinding ( int [ ] keyMasks , Action action ) { } private static boolean addKeyBinding ( int [ ] keyMasks , String actionName ) { } private static boolean addKeyBinding ( int keyMask , String actionName ) { } private static Action newAction ( String actionName ) { } private static Action getAction ( String actionName ) { } private static int [ ] addKeyMask ( int [ ] oldMasks , int mask ) { } private static int [ ] parseKeys ( String operand ) { int length = operand . length ( ) ; int [ ] masks = null ; int mask = 0 ; for ( int index = 0 ; index < length ; index += 1 ) { char character = operand . charAt ( index ) ; int bit ; switch ( character ) { case '1' : bit = KeyMask . DOT_1 ; break ; case '2' : bit = KeyMask . DOT_2 ; break ; case '3' : bit = KeyMask . DOT_3 ; break ; case '4' : bit = KeyMask . DOT_4 ; break ; case '5' : bit = KeyMask . DOT_5 ; break ; case '6' : bit = KeyMask . DOT_6 ; break ; case '7' : bit = KeyMask . DOT_7 ; break ; case '8' : bit = KeyMask . DOT_8 ; break ; case 's' : bit = KeyMask . SPACE ; break ; case 'f' : bit = KeyMask . FORWARD ; break ; case 'b' : bit = KeyMask . BACKWARD ; break ; case 'c' : bit = KeyMask . DPAD_CENTER ; break ; case 'u' : bit = KeyMask . DPAD_UP ; break ; case 'd' : bit = KeyMask . DPAD_DOWN ; break ; case 'l' : bit = KeyMask . DPAD_LEFT ; break ; case 'r' : bit = KeyMask . DPAD_RIGHT ; break ; case '-' : masks = KeyBindings . addKeyMask ( masks , mask ) ; if ( masks == null ) return null ; mask = 0 ; continue ; default : Log . w ( KeyBindings . LOG_TAG , ( "invalid<seq2seq4repair_space>key:<seq2seq4repair_space>" + character ) ) ; return null ; } if ( ( mask & bit ) != 0 ) { <START_BUG> Log . w ( KeyBindings . LOG_TAG , ( "key<seq2seq4repair_space>specified<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>once:<seq2seq4repair_space>" + character ) ) ; <END_BUG> continue ; } mask |= bit ; } return KeyBindings . addKeyMask ( masks , mask ) ; } private static void addKeyBindings ( Reader reader ) { } private static void addKeyBindings ( InputStream stream ) { } private static void addKeyBindings ( String asset ) { } private static void addKeyBindings ( ) { } private KeyBindings ( ) { } public static void load ( ) { } }

Fix:
Log . w ( KeyBindings . LOG_TAG , ( "key<seq2seq4repair_space>specified<seq2seq4repair_space>more<seq2seq4repair_space>than<seq2seq4repair_space>once:<seq2seq4repair_space>" + operand ) ) ;
Buggy code:
public interface IRoleRegistryListener { <START_BUG> void roleRegistryChanged ( IRoleRegistryEvent roleRegistryEvent ) ; <END_BUG> }

Fix:
void roleRegistryChanged ( RoleRegistryEvent roleRegistryEvent ) ;
Buggy code:
public class SlidingWindowRollingPolicy implements RollingPolicy , OptionHandler { static Logger logger = Logger . getLogger ( SlidingWindowRollingPolicy . class ) ; int maxIndex ; int minIndex ; FileNamePattern fileNamePattern ; String activeFileName ; public SlidingWindowRollingPolicy ( ) { } <START_BUG> public void rollover ( File f ) { <END_BUG> if ( ( maxIndex ) >= 0 ) { File file = new File ( fileNamePattern . convert ( maxIndex ) ) ; if ( file . exists ( ) ) { file . delete ( ) ; } for ( int i = ( maxIndex ) - 1 ; i > ( minIndex ) ; i -- ) { Util . rename ( fileNamePattern . convert ( i ) , fileNamePattern . convert ( ( i + 1 ) ) ) ; } if ( ( activeFileName ) != null ) { Util . rename ( activeFileName , fileNamePattern . convert ( minIndex ) ) ; } else { Util . rename ( fileNamePattern . convert ( minIndex ) , fileNamePattern . convert ( ( ( minIndex ) + 1 ) ) ) ; } } } public void activateOptions ( ) { } public String getActiveLogFileName ( ) { } public String getFileNamePattern ( ) { } public int getMaxIndex ( ) { } public int getMinIndex ( ) { } public void setFileNamePattern ( String fnp ) { } public void setMaxIndex ( int maxIndex ) { } public void setMinIndex ( int minIndex ) { } }

Fix:
public void rollover ( ) {
Buggy code:
public abstract class Proletariat extends Soveti { Direction priorityDirection ; private MapLocation dest ; private Boolean onWall ; protected Direction facing ; private LinkedList < MapLocation > helper ; private HashSet < MapLocation > visited ; public Proletariat ( RobotController rc ) throws GameActionException { } @ Override public void run ( ) throws GameActionException { } protected boolean setDestination ( MapLocation loc ) { } protected boolean move ( Direction dir ) throws GameActionException { } protected boolean bug ( ) throws GameActionException { } private boolean isNormalTile ( Direction dir ) throws GameActionException { } protected void mine ( ) throws GameActionException { } @ Override public void transferSupplies ( ) throws GameActionException { double totSupply = rc . getSupplyLevel ( ) ; RobotInfo [ ] nearbyAllies = rc . senseNearbyRobots ( SUPPLY_TRANSFER_RADIUS_SQUARED , myTeam ) ; double lowestSupply = totSupply ; MapLocation allyLoc = null ; for ( RobotInfo teamMember : nearbyAllies ) { if ( ( teamMember . supplyLevel ) < lowestSupply ) { lowestSupply = teamMember . supplyLevel ; allyLoc = teamMember . location ; } } <START_BUG> if ( ( dest ) != null ) { <END_BUG> int transferAmount = ( ( int ) ( ( totSupply - lowestSupply ) // 2.0 ) ) ; rc . transferSupplies ( transferAmount , allyLoc ) ; } } }

Fix:
if ( allyLoc != null ) {