nus-yam/ex-repair huggingface dataset:
Buggy code:
class ReflectionTab extends OpenGLTab { private float ballY = 0.0F ; private float ballZ = 1.6666666F ; private float ballX = 0.0F ; private float ballRot = 0.0F ; private float cubeX = 2.5F ; private float cubeY = - 2.0F ; private float cubeZ = 2.0F ; private float xPos = 0.0F ; private float yPos = 0.0F ; private float zPos = 22.0F ; private float ballRotSpeed = 0.0F ; private int quadratic ; private int [ ] textures = new int [ 3 ] ; private static final int LIST_INDEX_BALL = 1 ; private static final int LIST_INDEX_BOX = 2 ; private static final int LIST_INDEX_MIRROR = 3 ; private static final int LIST_INDEX_ROOM = 4 ; private static final int TEXTURE_INDEX_BALL = 0 ; private static final int TEXTURE_INDEX_FLOOR = 1 ; private static final int TEXTURE_INDEX_BOX = 2 ; private static final String [ ] IMAGES = new String [ ] { "images//Ball.jpg" , "images//Floor.jpg" , "images//Box.bmp" } ; private static final int SLEEP_LENGTH = 50 ; void createBall ( ) { } void createBox ( ) { } void createControls ( Composite composite ) { } void createMirror ( ) { } void createRoom ( ) { } void dispose ( ) { } int getSleepLength ( ) { } String getTabText ( ) { } void init ( ) { if ( ! ( hasStencilSupport ( ) ) ) return ; GL . glClearColor ( 1.0F , 1.0F , 1.0F , 1.0F ) ; GL . glClearDepth ( 1.0F ) ; GL . glClearStencil ( 0 ) ; GL . glGenTextures ( ReflectionTab . IMAGES . length , textures ) ; for ( int i = 0 ; i < ( ReflectionTab . IMAGES . length ) ; i ++ ) { <START_BUG> loadTexture ( getContext ( ) , ReflectionTab . IMAGES [ i ] , i , textures ) ; <END_BUG> } GL . glShadeModel ( GL_SMOOTH ) ; quadratic = GLU . gluNewQuadric ( ) ; GLU . gluQuadricNormals ( quadratic , GL_SMOOTH ) ; GLU . gluQuadricTexture ( quadratic , true ) ; GL . glDepthFunc ( GL_LEQUAL ) ; GL . glBlendFunc ( GL_SRC_ALPHA , GL_ONE_MINUS_SRC_ALPHA ) ; GL . glHint ( GL_PERSPECTIVE_CORRECTION_HINT , GL_NICEST ) ; float [ ] LightAmb = new float [ ] { 0.7F , 0.7F , 0.7F , 1.0F } ; float [ ] LightDif = new float [ ] { 1.0F , 1.0F , 1.0F , 1.0F } ; float [ ] lightsAmbient = new float [ ] { 0.5F , 0.5F , 0.5F , 1.0F } ; GL . glLightModelfv ( GL_LIGHT_MODEL_AMBIENT , lightsAmbient ) ; GL . glLightfv ( GL_LIGHT0 , GL_AMBIENT , LightAmb ) ; GL . glLightfv ( GL_LIGHT0 , GL_DIFFUSE , LightDif ) ; GL . glEnable ( GL_LIGHT0 ) ; GL . glEnable ( GL_LIGHTING ) ; GL . glEnable ( GL_LINE_SMOOTH ) ; GL . glEnable ( GL_DEPTH_TEST ) ; GL . glEnable ( GL_TEXTURE_2D ) ; GL . glEnable ( GL_BLEND ) ; createRoom ( ) ; createBall ( ) ; createBox ( ) ; createMirror ( ) ; } boolean isStencilSupportNeeded ( ) { } void renderScene ( ) { } }

Fix:
loadTexture ( getGlCanvas ( ) , ReflectionTab . IMAGES [ i ] , i , textures ) ;
Buggy code:
public enum StopID { SPRING_GARDEN ( 101 , 1 ) , READCO ( 102 , 2 ) , RAIL_TRAIL ( 103 , 3 ) , GRUM ( 104 , 4 ) , WOLF_TO_CREEK ( 100 , 5 ) , CREEK ( 105 , 6 ) , NSC ( 106 , 7 ) , WOLF_TO_WEST ( 1100 , 8 ) ; private int id ; private int num ; StopID ( int id , int num ) { } public int getId ( ) { } public int getNum ( ) { } public String toString ( ) { int intId = this . getId ( ) ; switch ( intId ) { case 1100 : return "Wolf<seq2seq4repair_space>Hall<seq2seq4repair_space>to<seq2seq4repair_space>West<seq2seq4repair_space>Campus" ; case 100 : return "Wolf<seq2seq4repair_space>Hall<seq2seq4repair_space>to<seq2seq4repair_space>Creek<seq2seq4repair_space>Crossing" ; case 101 : return "Spring<seq2seq4repair_space>Garden<seq2seq4repair_space>Appts." ; case 102 : return "Readco<seq2seq4repair_space>Lot" ; case 103 : return "Rail<seq2seq4repair_space>Trail<seq2seq4repair_space>Lot" ; case 104 : <START_BUG> return "Grumbacher//Dhiel<seq2seq4repair_space>Lot" ; <END_BUG> case 105 : return "Creek<seq2seq4repair_space>Crossing" ; case 106 : return "North<seq2seq4repair_space>Side<seq2seq4repair_space>Commons" ; default : return "Incorrect<seq2seq4repair_space>stop<seq2seq4repair_space>ID" ; } } public String getGeoString ( ) { } public Location getLocation ( ) { } public boolean equals ( StopID s ) { } }

Fix:
return "Grumbacher//Diehl<seq2seq4repair_space>Lot" ;
Buggy code:
public final class WyilFilePrinter implements Transform < WyilFile > { private PrintWriter out ; private boolean writeLabels = WyilFilePrinter . getLabels ( ) ; private boolean writeAttributes = WyilFilePrinter . getAttributes ( ) ; private boolean writeSlots = WyilFilePrinter . getSlots ( ) ; public WyilFilePrinter ( Builder builder ) { } public WyilFilePrinter ( PrintWriter writer ) { } public WyilFilePrinter ( OutputStream stream ) { } public void setLabels ( boolean flag ) { } public static boolean getLabels ( ) { <START_BUG> return false ; <END_BUG> } public static String describeLabels ( ) { } public void setAttributes ( boolean flag ) { } public static boolean getAttributes ( ) { } public static String describeAttributes ( ) { } public void setSlots ( boolean flag ) { } public static boolean getSlots ( ) { } public static String describeSlots ( ) { } public void apply ( WyilFile module ) throws IOException { } private void write ( FunctionOrMethodDeclaration method , PrintWriter out ) { } private void write ( Case mcase , FunctionOrMethodDeclaration method , PrintWriter out ) { } private void write ( int indent , CodeBlock blk , PrintWriter out ) { } private void write ( int indent , Code c , PrintWriter out ) { } private static void writeModifiers ( List < Modifier > modifiers , PrintWriter out ) { } private static String getLocal ( int index , List < String > locals ) { } private static void tabIndent ( int indent , PrintWriter out ) { } }

Fix:
return true ;
Buggy code:
public abstract class AbstractJasperReportsViewTests extends AbstractJasperReportsTests { protected AbstractJasperReportsView getView ( String url ) throws Exception { } public void testCompiledReport ( ) throws Exception { AbstractJasperReportsView view = getView ( COMPILED_REPORT ) ; view . render ( getModel ( ) , request , response ) ; assertTrue ( ( ( response . getContentAsByteArray ( ) . length ) > 0 ) ) ; if ( ( view instanceof AbstractJasperReportsSingleFormatView ) && ( ( ( AbstractJasperReportsSingleFormatView ) ( view ) ) . useWriter ( ) ) ) { String output = response . getContentAsString ( ) ; <START_BUG> assertTrue ( "Output<seq2seq4repair_space>should<seq2seq4repair_space>contain<seq2seq4repair_space>'MeineSeite'" , ( ( output . indexOf ( "MeineSeite" ) ) > ( - 1 ) ) ) ; <END_BUG> } } public void testUncompiledReport ( ) throws Exception { } public void testWithInvalidPath ( ) throws Exception { } public void testInvalidExtension ( ) throws Exception { } public void testContentType ( ) throws Exception { } public void testWithoutDatasource ( ) throws Exception { } public void testWithCollection ( ) throws Exception { } public void testWithMultipleCollections ( ) throws Exception { } public void testWithJRDataSourceProvider ( ) throws Exception { } public void testWithSpecificCollection ( ) throws Exception { } public void testWithArray ( ) throws Exception { } public void testWithMultipleArrays ( ) throws Exception { } public void testWithSpecificArray ( ) throws Exception { } public void testWithSubReport ( ) throws Exception { } public void testWithNonExistentSubReport ( ) throws Exception { } @ Ignore public void ignoreTestOverrideExporterParameters ( ) throws Exception { } public void testSubReportWithUnspecifiedParentDataSource ( ) throws Exception { } public void testContentDisposition ( ) throws Exception { } public void testOverrideContentDisposition ( ) throws Exception { } public void testSetCustomHeaders ( ) throws Exception { } public void testWithJdbcDataSource ( ) throws Exception { } public void testWithJdbcDataSourceInModel ( ) throws Exception { } public void testJRDataSourceOverridesJdbcDataSource ( ) throws Exception { } private DataSource getMockJdbcDataSource ( ) throws SQLException { } public void testWithCharacterEncoding ( ) throws Exception { } protected abstract AbstractJasperReportsView getViewImplementation ( ) { } protected abstract String getDesiredContentType ( ) { } private class MockDataSourceProvider extends JRAbstractBeanDataSourceProvider { public MockDataSourceProvider ( Class clazz ) { } public JRDataSource create ( JasperReport jasperReport ) throws JRException { } public void dispose ( JRDataSource jrDataSource ) throws JRException { } } }

Fix:
assertTrue ( "Output<seq2seq4repair_space>should<seq2seq4repair_space>contain<seq2seq4repair_space>'MeineSeite'" , output . contains ( "MeineSeite" ) ) ;
Buggy code:
public class ThisReference extends Reference { public static final ThisReference ThisImplicit = new ThisReference ( ) ; public ThisReference ( ) { } public ThisReference ( int s , int sourceEnd ) { } protected boolean checkAccess ( MethodScope methodScope ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public boolean isThis ( ) { } public TypeBinding resolveType ( BlockScope scope ) { constant = NotAConstant ; if ( ( ( this ) != ( ThisReference . ThisImplicit ) ) && ( ! ( checkAccess ( scope . methodScope ( ) ) ) ) ) return null ; <START_BUG> return scope . enclosingSourceType ( ) ; <END_BUG> } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope blockScope ) { } }

Fix:
return this . expressionType = scope . enclosingSourceType ( ) ;
Buggy code:
public class KeystoreConfig extends ConfigTestElement implements TestBean , TestListener { private static final long serialVersionUID = - 5781402012242794890L ; private Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String KEY_STORE_START_INDEX = "https.keyStoreStartIndex" ; private static final String KEY_STORE_END_INDEX = "https.keyStoreEndIndex" ; private String startIndex ; private String endIndex ; private String preload ; public KeystoreConfig ( ) { } public void testEnded ( ) { } public void testEnded ( String host ) { } public void testIterationStart ( LoopIterationEvent event ) { } public void testStarted ( ) { } public void testStarted ( String host ) { int startIndexAsInt = JMeterUtils . getPropDefault ( KeystoreConfig . KEY_STORE_START_INDEX , 0 ) ; int endIndexAsInt = JMeterUtils . getPropDefault ( KeystoreConfig . KEY_STORE_END_INDEX , 0 ) ; if ( ! ( StringUtils . isEmpty ( this . startIndex ) ) ) { try { startIndexAsInt = Integer . parseInt ( this . startIndex ) ; } catch ( NumberFormatException e ) { log . warn ( ( ( ( ( ( "Failed<seq2seq4repair_space>parsing<seq2seq4repair_space>startIndex<seq2seq4repair_space>:'" + ( this . startIndex ) ) + "',<seq2seq4repair_space>will<seq2seq4repair_space>default<seq2seq4repair_space>to:'" ) + startIndexAsInt ) + "',<seq2seq4repair_space>error<seq2seq4repair_space>message:" ) + ( e . getMessage ( ) ) ) , e ) ; } } if ( ! ( StringUtils . isEmpty ( this . endIndex ) ) ) { try { endIndexAsInt = Integer . parseInt ( this . endIndex ) ; } catch ( NumberFormatException e ) { log . warn ( ( ( ( ( ( "Failed<seq2seq4repair_space>parsing<seq2seq4repair_space>endIndex<seq2seq4repair_space>:'" + ( this . endIndex ) ) + "',<seq2seq4repair_space>will<seq2seq4repair_space>default<seq2seq4repair_space>to:'" ) + endIndexAsInt ) + "',<seq2seq4repair_space>error<seq2seq4repair_space>message:" ) + ( e . getMessage ( ) ) ) , e ) ; } } if ( startIndexAsInt > endIndexAsInt ) { throw new JMeterStopTestException ( "Keystore<seq2seq4repair_space>Config<seq2seq4repair_space>error<seq2seq4repair_space>:<seq2seq4repair_space>Alias<seq2seq4repair_space>start<seq2seq4repair_space>index<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>lower<seq2seq4repair_space>than<seq2seq4repair_space>Alias<seq2seq4repair_space>end<seq2seq4repair_space>index" ) ; } log . info ( ( ( ( ( ( ( "Configuring<seq2seq4repair_space>Keystore<seq2seq4repair_space>with<seq2seq4repair_space>(preload:" + ( preload ) ) + ",<seq2seq4repair_space>startIndex:" ) + startIndexAsInt ) + ",<seq2seq4repair_space>endIndex:" ) + endIndexAsInt ) + ")" ) ) ; <START_BUG> SSLManager . getInstance ( ) . configureKeystore ( Boolean . valueOf ( preload ) , startIndexAsInt , endIndexAsInt ) ; <END_BUG> } public String getEndIndex ( ) { } public void setEndIndex ( String endIndex ) { } public String getStartIndex ( ) { } public void setStartIndex ( String startIndex ) { } public String getPreload ( ) { } public void setPreload ( String preload ) { } }

Fix:
SSLManager . getInstance ( ) . configureKeystore ( Boolean . parseBoolean ( preload ) , startIndexAsInt , endIndexAsInt ) ;
Buggy code:
public class Drive extends Subsystem { private Talon leftDrive = new Talon ( Ports . PWM_Left_Drive ) ; private Talon rightDrive = new Talon ( Ports . PWM_Right_Drive ) ; private Encoder rightEncoder = new Encoder ( Ports . DIO_RDriveEncA , Ports . DIO_RDriveEncB ) ; private Encoder leftEncoder = new Encoder ( Ports . DIO_LDriveEncA , Ports . DIO_LDriveEncB ) ; private DigitalInput limitSwitch = new DigitalInput ( Ports . DIO_LimitSwitch ) ; private Ultrasonic rangeFinder = new Ultrasonic ( Ports . ULTRASONIC_PING , Ports . ULTRASONIC_ECHO , Unit . kInches ) ; private AnalogPotentiometer pot = new AnalogPotentiometer ( Ports . POTENTIOMETER ) ; private Solenoid Shifter = new Solenoid ( Ports . Sol_Shifter ) ; private Solenoid Light = new Solenoid ( Ports . Sol_Light ) ; protected void initDefaultCommand ( ) { } public void setPower ( double speed ) { } public void setLeftPower ( double power ) { <START_BUG> leftDrive . set ( ( - power ) ) ; <END_BUG> } public void setRightPower ( double power ) { } public void setShifter ( boolean highGear ) { } public double getUltrasonicDistance ( ) { } public double getLeftEncoderDistance ( ) { } public double getRightEncoderDistance ( ) { } public double getAverageEncoderDistance ( ) { } public void resetEncoders ( ) { } public float translateDrive ( float trans ) { } public void setLight ( boolean b ) { } public boolean getSwitch ( ) { } public double getPot ( ) { } }

Fix:
leftDrive . set ( power ) ;
Buggy code:
public class TrafficFragment extends Fragment implements CacheManager . CacheListener { private Preferences mPreference ; private ViewGroup mTrafficLayout ; private String mCurrentLat ; private String mCurrentLong ; private String mWorkLat ; private String mWorkLong ; private TextView txtDestination ; private TextView txtDistance ; private TextView txtTravelTime ; private Handler mHandler = new Handler ( ) ; private CacheManager mCacheManager = null ; private final int DATA_UPDATE_FREQUENCY = 600 ; public static final String TRAFFIC_CACHE = "traffic<seq2seq4repair_space>cache" ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onStart ( ) { } @ Override public void onResume ( ) { } @ Override public void onPause ( ) { } private void startTrafficUpdate ( ) { } private void hideTraffic ( ) { } private void showTraffic ( ) { } private void renderTraffic ( JSONObject json ) { try { JSONObject data = json . getJSONArray ( "rows" ) . getJSONObject ( 0 ) . getJSONArray ( "elements" ) . getJSONObject ( 0 ) ; double tripDistance = Double . parseDouble ( splitString ( data . getJSONObject ( "distance" ) . getString ( "text" ) ) ) ; String tripTime = data . getJSONObject ( "duration" ) . getString ( "text" ) ; String units = "kilometers" ; if ( mPreference . getWeatherUnits ( ) . equals ( ENGLISH ) ) { units = "miles" ; } <START_BUG> txtDestination . setText ( ( "Destination:<seq2seq4repair_space>" + ( mPreference . getWorkLocation ( ) ) ) ) ; <END_BUG> txtDistance . setText ( ( ( ( "" + tripDistance ) + "<seq2seq4repair_space>" ) + units ) ) ; txtTravelTime . setText ( tripTime ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } } private String splitString ( String str ) { } private void updateTrafficData ( final String request ) { } private void updateTrafficCache ( JSONObject data ) { } @ Override public void onCacheExpired ( String cacheName ) { } @ Override public void onCacheChanged ( String cacheName ) { } }

Fix:
txtDestination . setText ( mPreference . getWorkLocation ( ) ) ;
Buggy code:
public class Functions { public static boolean isPowerOfTwo ( long number ) { <START_BUG> if ( number <= 0 ) { <END_BUG> throw new IllegalArgumentException ( ( ( "number:<seq2seq4repair_space>" + number ) + ".<seq2seq4repair_space>Number<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>neagative." ) ) ; } if ( ( number & ( - number ) ) == number ) { return true ; } return false ; } public static int log2 ( long num ) { } }

Fix:
if ( number < 0 ) {
Buggy code:
public class ServerDriver { public static void main ( String [ ] args ) throws IOException { <START_BUG> MessageHandler . loadMessageHandlers ( Arrays . asList ( "server.protocols" ) ) ; <END_BUG> int port = 1234 ; String clientDataDirName = "clientdata" ; String localDataDirName = "localdata" ; ServerDriver . createRandomWelcomeMessage ( clientDataDirName ) ; ServingChat server = new ServingChat ( port , clientDataDirName , localDataDirName ) ; server . startServer ( ) ; System . out . println ( "Server<seq2seq4repair_space>started." ) ; } private static void createRandomWelcomeMessage ( String clientDataDirName ) throws IOException { } }

Fix:
MessageHandler . loadMessageHandlers ( Arrays . asList ( "com.hoten.servingchat.server.protocols" ) ) ;
Buggy code:
public abstract class JobManager implements Runnable { protected IJob [ ] awaitingJobs = new IJob [ 10 ] ; protected int jobStart = 0 ; protected int jobEnd = - 1 ; protected boolean executing = false ; protected Thread processingThread ; private boolean enabled = true ; public static boolean VERBOSE = false ; public boolean activated = false ; private int awaitingClients = 0 ; public static void verbose ( String log ) { } public void activateProcessing ( ) { } public synchronized int awaitingJobsCount ( ) { } public synchronized IJob currentJob ( ) { } public void disable ( ) { } public void discardJobs ( String jobFamily ) { if ( JobManager . VERBOSE ) JobManager . verbose ( ( "DISCARD<seq2seq4repair_space>background<seq2seq4repair_space>job<seq2seq4repair_space>family<seq2seq4repair_space>-<seq2seq4repair_space>" + jobFamily ) ) ; boolean wasEnabled = isEnabled ( ) ; try { IJob currentJob ; synchronized ( this ) { currentJob = this . currentJob ( ) ; disable ( ) ; } <START_BUG> if ( ( ( currentJob != null ) && ( jobFamily == null ) ) || ( currentJob . belongsTo ( jobFamily ) ) ) { <END_BUG> currentJob . cancel ( ) ; while ( ( ( this . processingThread ) != null ) && ( this . executing ) ) { try { if ( JobManager . VERBOSE ) JobManager . verbose ( ( "-><seq2seq4repair_space>waiting<seq2seq4repair_space>end<seq2seq4repair_space>of<seq2seq4repair_space>current<seq2seq4repair_space>background<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + currentJob ) ) ; Thread . sleep ( 50 ) ; } catch ( InterruptedException e ) { } } } int loc = - 1 ; synchronized ( this ) { for ( int i = this . jobStart ; i <= ( this . jobEnd ) ; i ++ ) { currentJob = this . awaitingJobs [ i ] ; this . awaitingJobs [ i ] = null ; if ( ! ( ( jobFamily == null ) || ( currentJob . belongsTo ( jobFamily ) ) ) ) { this . awaitingJobs [ ( ++ loc ) ] = currentJob ; } else { if ( JobManager . VERBOSE ) JobManager . verbose ( ( "-><seq2seq4repair_space>discarding<seq2seq4repair_space>background<seq2seq4repair_space>job<seq2seq4repair_space>-<seq2seq4repair_space>" + currentJob ) ) ; currentJob . cancel ( ) ; } } this . jobStart = 0 ; this . jobEnd = loc ; } } finally { if ( wasEnabled ) enable ( ) ; } if ( JobManager . VERBOSE ) JobManager . verbose ( ( "DISCARD<seq2seq4repair_space>DONE<seq2seq4repair_space>with<seq2seq4repair_space>background<seq2seq4repair_space>job<seq2seq4repair_space>family<seq2seq4repair_space>-<seq2seq4repair_space>" + jobFamily ) ) ; } public synchronized void enable ( ) { } public boolean isEnabled ( ) { } protected synchronized void moveToNextJob ( ) { } protected void notifyIdle ( long idlingTime ) { } public boolean performConcurrentJob ( IJob searchJob , int waitingPolicy , IProgressMonitor progress ) { } public abstract String processName ( ) { } public synchronized void request ( IJob job ) { } public void reset ( ) { } public void run ( ) { } public void shutdown ( ) { } public String toString ( ) { } }

Fix:
if ( ( currentJob != null ) && ( ( jobFamily == null ) || ( currentJob . belongsTo ( jobFamily ) ) ) ) {
Buggy code:
public class TermsFilterTest extends LuceneTestCase { public void testCachability ( ) throws Exception { } public void testMissingTerms ( ) throws Exception { } public void testMissingField ( ) throws Exception { String fieldName = "field1" ; Directory rd1 = newDirectory ( ) ; RandomIndexWriter w1 = new RandomIndexWriter ( random ( ) , rd1 ) ; Document doc = new Document ( ) ; doc . add ( newStringField ( fieldName , "content1" , YES ) ) ; w1 . addDocument ( doc ) ; IndexReader reader1 = w1 . getReader ( ) ; w1 . close ( ) ; fieldName = "field2" ; Directory rd2 = newDirectory ( ) ; RandomIndexWriter w2 = new RandomIndexWriter ( random ( ) , rd2 ) ; doc = new Document ( ) ; doc . add ( newStringField ( fieldName , "content2" , YES ) ) ; w2 . addDocument ( doc ) ; IndexReader reader2 = w2 . getReader ( ) ; w2 . close ( ) ; TermsFilter tf = new TermsFilter ( ) ; tf . addTerm ( new Term ( fieldName , "content1" ) ) ; MultiReader multi = new MultiReader ( reader1 , reader2 ) ; <START_BUG> for ( AtomicReaderContext context : multi . getTopReaderContext ( ) . leaves ( ) ) { <END_BUG> FixedBitSet bits = ( ( FixedBitSet ) ( tf . getDocIdSet ( context , context . reader ( ) . getLiveDocs ( ) ) ) ) ; assertTrue ( "Must<seq2seq4repair_space>be<seq2seq4repair_space>>=<seq2seq4repair_space>0" , ( ( bits . cardinality ( ) ) >= 0 ) ) ; } multi . close ( ) ; reader1 . close ( ) ; reader2 . close ( ) ; rd1 . close ( ) ; rd2 . close ( ) ; } }

Fix:
for ( AtomicReaderContext context : multi . leaves ( ) ) {
Buggy code:
public interface BeanManagerFactoryBuilderProvider { <START_BUG> < G , I > BeanManagerFactoryBuilder < G , I > getBeanManagerFactoryBuilder ( String name , BeanManagerFactoryBuilderConfiguration config ) ; <END_BUG> }

Fix:
< G , I > BeanManagerFactoryBuilder < G , I > getBeanManagerFactoryBuilder ( BeanManagerFactoryBuilderConfiguration config ) ;
Buggy code:
@ Repository public interface AnuncioRepository extends CrudRepository < Anuncio , Long > { @ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>WHERE<seq2seq4repair_space>an.ativo<seq2seq4repair_space>=<seq2seq4repair_space>'true'<seq2seq4repair_space>ORDER<seq2seq4repair_space>BY<seq2seq4repair_space>an.dataPostagem<seq2seq4repair_space>DESC" ) public List < Anuncio > findAll ( ) { } <START_BUG> @ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>an.loja<seq2seq4repair_space>as<seq2seq4repair_space>loj<seq2seq4repair_space>WHERE<seq2seq4repair_space>loj.codigo<seq2seq4repair_space>=<seq2seq4repair_space>?<seq2seq4repair_space>and<seq2seq4repair_space>an.ativo<seq2seq4repair_space>=<seq2seq4repair_space>'true'" ) <END_BUG> public List < Anuncio > findByLoja ( Long id ) ; @ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>WHERE<seq2seq4repair_space>an.categoria<seq2seq4repair_space>=<seq2seq4repair_space>?" ) public List < Anuncio > findByCategoria ( CategoriaAnuncio categoria ) { } @ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>WHERE<seq2seq4repair_space>an.ativo<seq2seq4repair_space>=<seq2seq4repair_space>'true'<seq2seq4repair_space>AND<seq2seq4repair_space>an.permanente<seq2seq4repair_space>=<seq2seq4repair_space>'true'" ) public List < Anuncio > findByAtivoNaoPermanentes ( ) { } @ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>WHERE<seq2seq4repair_space>an.ativo<seq2seq4repair_space>=<seq2seq4repair_space>'false'<seq2seq4repair_space>AND<seq2seq4repair_space>an.permanente<seq2seq4repair_space>=<seq2seq4repair_space>'true'" ) public List < Anuncio > findByNaoAtivosNaoPermanentes ( ) { } }

Fix:
@ Query ( "SELECT<seq2seq4repair_space>an<seq2seq4repair_space>FROM<seq2seq4repair_space>Anuncio<seq2seq4repair_space>an<seq2seq4repair_space>INNER<seq2seq4repair_space>JOIN<seq2seq4repair_space>an.loja<seq2seq4repair_space>as<seq2seq4repair_space>loj<seq2seq4repair_space>WHERE<seq2seq4repair_space>loj.codigo<seq2seq4repair_space>=<seq2seq4repair_space>?" )
Buggy code:
public class CSVParser { private static final int INITIAL_TOKEN_LENGTH = 50 ; protected static final int TT_INVALID = - 1 ; protected static final int TT_TOKEN = 0 ; protected static final int TT_EOF = 1 ; protected static final int TT_EORECORD = 2 ; private ExtendedBufferedReader in ; private CSVStrategy strategy ; class Token { int type ; StringBuffer content ; boolean isReady ; Token ( ) { } } public CSVParser ( InputStream input ) { } public CSVParser ( Reader input ) { } public CSVParser ( Reader input , char delimiter ) { } public CSVParser ( Reader input , char delimiter , char encapsulator , char commentStart ) { } public String [ ] [ ] getAllValues ( ) throws IOException { } public String nextValue ( ) throws IOException { } public String [ ] getLine ( ) throws IOException { } public int getLineNumber ( ) { } protected CSVParser . Token nextToken ( ) throws IOException { } private CSVParser . Token simpleTokenLexer ( CSVParser . Token tkn , int c ) throws IOException { } private CSVParser . Token encapsulatedTokenLexer ( CSVParser . Token tkn , int c ) throws IOException { } protected int unicodeEscapeLexer ( int c ) throws IOException { } public CSVParser setStrategy ( CSVStrategy strategy ) { } public CSVStrategy getStrategy ( ) { } private boolean isWhitespace ( int c ) { <START_BUG> return Character . isWhitespace ( ( ( char ) ( c ) ) ) ; <END_BUG> } private boolean isEndOfLine ( int c ) throws IOException { } private boolean isEndOfFile ( int c ) { } }

Fix:
return ( Character . isWhitespace ( ( ( char ) ( c ) ) ) ) && ( c != ( strategy . getDelimiter ( ) ) ) ;
Buggy code:
public class JHDDragSourceListener implements DragSourceListener { private Undoable sourceUndoable ; private Boolean autoscrollState ; private DrawingEditor editor ; public JHDDragSourceListener ( DrawingEditor editor , DrawingView view ) { } protected DrawingEditor editor ( ) { } public void dragDropEnd ( DragSourceDropEvent dsde ) { DrawingView view = ( ( DrawingView ) ( dsde . getDragSourceContext ( ) . getComponent ( ) ) ) ; JHDDragSourceListener . log ( "DragSourceDropEvent-dragDropEnd" ) ; if ( ( dsde . getDropSuccess ( ) ) == true ) { if ( ( dsde . getDropAction ( ) ) == ( DnDConstants . ACTION_MOVE ) ) { JHDDragSourceListener . log ( "DragSourceDropEvent-ACTION_MOVE" ) ; setSourceUndoActivity ( createSourceUndoActivity ( view ) ) ; <START_BUG> DNDFigures df = ( ( DNDFigures ) ( DNDHelper . ProcessReceivedData ( DNDFiguresFlavor , dsde . getDragSourceContext ( ) . getTransferable ( ) ) ) ) ; <END_BUG> getSourceUndoActivity ( ) . setAffectedFigures ( df . getFigures ( ) ) ; DeleteFromDrawingVisitor deleteVisitor = new DeleteFromDrawingVisitor ( view . drawing ( ) ) ; FigureEnumeration fe = getSourceUndoActivity ( ) . getAffectedFigures ( ) ; while ( fe . hasNextFigure ( ) ) { fe . nextFigure ( ) . visit ( deleteVisitor ) ; } view . clearSelection ( ) ; view . checkDamage ( ) ; editor ( ) . getUndoManager ( ) . pushUndo ( getSourceUndoActivity ( ) ) ; editor ( ) . getUndoManager ( ) . clearRedos ( ) ; editor ( ) . figureSelectionChanged ( view ) ; } else if ( ( dsde . getDropAction ( ) ) == ( DnDConstants . ACTION_COPY ) ) { JHDDragSourceListener . log ( "DragSourceDropEvent-ACTION_COPY" ) ; } } if ( ( autoscrollState ) != null ) { Component c = dsde . getDragSourceContext ( ) . getComponent ( ) ; if ( JComponent . class . isInstance ( c ) ) { JComponent jc = ( ( JComponent ) ( c ) ) ; jc . setAutoscrolls ( autoscrollState . booleanValue ( ) ) ; autoscrollState = null ; } } } public void dragEnter ( DragSourceDragEvent dsde ) { } public void dragExit ( DragSourceEvent dse ) { } public void dragOver ( DragSourceDragEvent dsde ) { } public void dropActionChanged ( DragSourceDragEvent dsde ) { } protected Undoable createSourceUndoActivity ( DrawingView drawingView ) { } protected void setSourceUndoActivity ( Undoable undoable ) { } protected Undoable getSourceUndoActivity ( ) { } public static class RemoveUndoActivity extends UndoableAdapter { private boolean undone = false ; public RemoveUndoActivity ( DrawingView view ) { } public boolean undo ( ) { } public boolean redo ( ) { } public void release ( ) { } } private static void log ( String message ) { } }

Fix:
DNDFigures df = ( ( DNDFigures ) ( DNDHelper . processReceivedData ( DNDFiguresFlavor , dsde . getDragSourceContext ( ) . getTransferable ( ) ) ) ) ;
Buggy code:
public class Euler { public static void main ( String [ ] args ) { <START_BUG> Problem curProb = new PE0046 ( ) ; <END_BUG> String result = curProb . getResult ( ) ; IO . info ( ( "result<seq2seq4repair_space>for<seq2seq4repair_space>problem<seq2seq4repair_space>#" + curProb ) ) ; IO . info ( ( ( "<seq2seq4repair_space>is<seq2seq4repair_space>'" + result ) + "'" ) ) ; IO . infoln ( ( ( "<seq2seq4repair_space>found<seq2seq4repair_space>in<seq2seq4repair_space>" + ( curProb . getRuntime ( 2 ) ) ) + "<seq2seq4repair_space>ms" ) ) ; } }

Fix:
Problem curProb = new PE0047 ( ) ;
Buggy code:
final class WWinKeyBindingService { private static class KeyModeContributionItem extends ContributionItem { private int fixedWidth = - 1 ; private String text ; private CLabel label ; KeyModeContributionItem ( String id ) { } void setText ( String msg ) { } public void fill ( Composite parent ) { } } private final WWinKeyBindingService . KeyModeContributionItem keyModeContributionItem = new WWinKeyBindingService . KeyModeContributionItem ( "KeyModeContribution" ) ; private final IPartListener partListener = new IPartListener ( ) { public void partActivated ( IWorkbenchPart part ) { } public void partBroughtToTop ( IWorkbenchPart part ) { } public void partClosed ( IWorkbenchPart part ) { } public void partDeactivated ( IWorkbenchPart part ) { } public void partOpened ( IWorkbenchPart part ) { } } ; private final ShellListener shellListener = new ShellAdapter ( ) { public void shellDeactivated ( ShellEvent e ) { } } ; private final VerifyListener verifyListener = new VerifyListener ( ) { public void verifyText ( VerifyEvent event ) { } } ; private AcceleratorMenu acceleratorMenu ; private SortedMap actionSetsCommandIdToActionMap = new TreeMap ( ) ; private KeyBindingService activeKeyBindingService ; private SortedMap globalActionsCommandIdToActionMap = new TreeMap ( ) ; private WorkbenchWindow workbenchWindow ; WWinKeyBindingService ( WorkbenchWindow workbenchWindow ) { } void clear ( ) { } IAction getAction ( String command ) { } void pressed ( Stroke stroke , Event event ) { Manager manager = Manager . getInstance ( ) ; SequenceMachine keyMachine = manager . getKeyMachine ( ) ; List strokes = new ArrayList ( keyMachine . getMode ( ) . getStrokes ( ) ) ; strokes . add ( stroke ) ; Sequence childMode = Sequence . create ( strokes ) ; Map sequenceMapForMode = keyMachine . getSequenceMapForMode ( ) ; keyMachine . setMode ( childMode ) ; Map childSequenceMapForMode = keyMachine . getSequenceMapForMode ( ) ; if ( childSequenceMapForMode . isEmpty ( ) ) { clear ( ) ; String command = ( ( String ) ( sequenceMapForMode . get ( childMode ) ) ) ; if ( ( command != null ) && ( ( activeKeyBindingService ) != null ) ) { IAction action = getAction ( command ) ; if ( ( action != null ) && ( action . isEnabled ( ) ) ) action . runWithEvent ( event ) ; } } else { <START_BUG> keyModeContributionItem . setText ( KeySupport . formatSequence ( childMode ) ) ; <END_BUG> updateAccelerators ( ) ; } } void registerActionSets ( IActionSet [ ] actionSets ) { } void registerGlobalAction ( IAction globalAction ) { } void update ( IWorkbenchPart part ) { } void updateAccelerators ( ) { } }

Fix:
keyModeContributionItem . setText ( KeySupport . formatSequence ( childMode , true ) ) ;
Buggy code:
public class Initializer implements IInitializer { private static Log log = LogFactory . getLog ( Initializer . class ) ; public void init ( wicket . Application application ) { try { String name = application . getName ( ) ; MBeanServer mbs = ManagementFactory . getPlatformMBeanServer ( ) ; String domain = "wicket.app." + name ; ObjectName appBeanName = new ObjectName ( ( domain + ":type=Application" ) ) ; String tempDomain = domain ; int i = 0 ; while ( mbs . isRegistered ( appBeanName ) ) { <START_BUG> tempDomain = ( name + "-" ) + i ; <END_BUG> appBeanName = new ObjectName ( ( tempDomain + ":type=Application" ) ) ; } name = tempDomain ; Application appBean = new Application ( application ) ; mbs . registerMBean ( appBean , appBeanName ) ; mbs . registerMBean ( new ApplicationSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ApplicationSettings" ) ) ) ; mbs . registerMBean ( new DebugSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=DebugSettings" ) ) ) ; mbs . registerMBean ( new MarkupSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=MarkupSettings" ) ) ) ; mbs . registerMBean ( new ResourceSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=ResourceSettings" ) ) ) ; mbs . registerMBean ( new PageSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=PageSettings" ) ) ) ; mbs . registerMBean ( new RequestCycleSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=RequestCycleSettings" ) ) ) ; mbs . registerMBean ( new SecuritySettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SecuritySettings" ) ) ) ; mbs . registerMBean ( new SessionSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=SessionSettings" ) ) ) ; mbs . registerMBean ( new CookieValuePersisterSettings ( application ) , new ObjectName ( ( domain + ":type=Application,name=CookieValuePersisterSettings" ) ) ) ; RequestLogger sessionsBean = new RequestLogger ( application ) ; ObjectName sessionsBeanName = new ObjectName ( ( domain + ":type=RequestLogger" ) ) ; mbs . registerMBean ( sessionsBean , sessionsBeanName ) ; } catch ( MalformedObjectNameException e ) { throw new WicketRuntimeException ( e ) ; } catch ( InstanceAlreadyExistsException e ) { throw new WicketRuntimeException ( e ) ; } catch ( MBeanRegistrationException e ) { throw new WicketRuntimeException ( e ) ; } catch ( NotCompliantMBeanException e ) { throw new WicketRuntimeException ( e ) ; } } }

Fix:
tempDomain = ( name + "-" ) + ( i ++ ) ;
Buggy code:
@ SuppressWarnings ( "unchecked" ) public class RowToStructuredRecordTransformTest { @ Test ( expected = IllegalArgumentException . class ) public void testBadRowFieldThrowsException ( ) throws Exception { } @ Test ( expected = IllegalArgumentException . class ) public void testInvalidFieldTypeThrowsException ( ) throws Exception { } @ Test public void testTransform ( ) throws Exception { byte [ ] rowKey = Bytes . toBytes ( 28 ) ; final Schema schema = Schema . recordOf ( "record" , Field . of ( "boolField" , Schema . nullableOf ( Schema . of ( BOOLEAN ) ) ) , Field . of ( "intField" , Schema . of ( INT ) ) , Field . of ( "longField" , Schema . nullableOf ( Schema . of ( LONG ) ) ) , Field . of ( "floatField" , Schema . nullableOf ( Schema . of ( FLOAT ) ) ) , Field . of ( "doubleField" , Schema . nullableOf ( Schema . of ( DOUBLE ) ) ) , Field . of ( "bytesField" , Schema . nullableOf ( Schema . of ( BYTES ) ) ) , Field . of ( "stringField" , Schema . nullableOf ( Schema . of ( STRING ) ) ) ) ; Map < byte [ ] , byte [ ] > inputColumns = Maps . newTreeMap ( BYTES_COMPARATOR ) ; inputColumns . put ( Bytes . toBytes ( "boolField" ) , Bytes . toBytes ( true ) ) ; inputColumns . put ( Bytes . toBytes ( "longField" ) , Bytes . toBytes ( 512L ) ) ; inputColumns . put ( Bytes . toBytes ( "floatField" ) , Bytes . toBytes ( 3.14F ) ) ; inputColumns . put ( Bytes . toBytes ( "bytesField" ) , Bytes . toBytes ( "foo" ) ) ; inputColumns . put ( Bytes . toBytes ( "stringField" ) , Bytes . toBytes ( "rock" ) ) ; inputColumns . put ( Bytes . toBytes ( "extraField" ) , Bytes . toBytes ( "bar" ) ) ; Row input = new Result ( rowKey , inputColumns ) ; Transform transform = new RowToStructuredRecordTransform ( ) ; TransformContext transformContext = new MockTransformContext ( ImmutableMap . of ( "row.field" , "intField" , "schema" , schema . toString ( ) ) ) ; transform . initialize ( transformContext ) ; MockEmitter < byte [ ] , StructuredRecord > emitter = new MockEmitter < byte [ ] , StructuredRecord > ( ) ; transform . transform ( rowKey , input , emitter ) ; <START_BUG> StructuredRecord actual = emitter . getEmitted ( rowKey ) ; <END_BUG> Assert . assertTrue ( ( ( Boolean ) ( actual . get ( "boolField" ) ) ) ) ; Assert . assertEquals ( 512L , actual . get ( "longField" ) ) ; Assert . assertTrue ( ( ( Math . abs ( ( 3.14F - ( ( Float ) ( actual . get ( "floatField" ) ) ) ) ) ) < 1.0E-6 ) ) ; Assert . assertEquals ( "foo" , Bytes . toString ( ( ( byte [ ] ) ( actual . get ( "bytesField" ) ) ) ) ) ; Assert . assertEquals ( "rock" , actual . get ( "stringField" ) ) ; Assert . assertNull ( actual . get ( "extraField" ) ) ; Assert . assertNull ( actual . get ( "doubleField" ) ) ; } }

Fix:
StructuredRecord actual = emitter . getEmitted ( ) . get ( 0 ) . getVal ( ) ;
Buggy code:
public final class StringUtils { public static final String [ ] splitOnSpace ( String string ) { } public static final String [ ] split ( String string , char character ) { } public static final String [ ] split ( String string , String delimiter ) { } public static final String [ ] split ( String string , String delimiter , int limit ) { } public static final String splitSubstring ( String string , String delimiter , int pos ) { } public static final String xmlDecode ( String string ) { } public static final String xmlEncode ( String string ) { } public static boolean contains ( String string , String target ) { } public static String replaceAll ( String string , String target , String replace ) { final int index = string . indexOf ( target ) ; if ( index == ( - 1 ) ) return string ; <START_BUG> return ( ( string . substring ( 0 , index ) ) + replace ) + ( StringUtils . replaceAll ( string . substring ( ( index + ( replace . length ( ) ) ) ) , target , replace ) ) ; <END_BUG> } }

Fix:
return ( ( string . substring ( 0 , index ) ) + replace ) + ( StringUtils . replaceAll ( string . substring ( ( index + ( target . length ( ) ) ) ) , target , replace ) ) ;
Buggy code:
public class FullRedundancyReplicationPolicy implements ReplicationPolicy { @ Override public Collection < Long > getSitesToReplicate ( Connection connection ) throws Exception { try ( Statement statement = connection . createStatement ( ) ) { ArrayList < Long > result = new ArrayList < > ( ) ; <START_BUG> ResultSet resultSet = statement . executeQuery ( "SELECT<seq2seq4repair_space>storageSiteId<seq2seq4repair_space>FROM<seq2seq4repair_space>storage_site_table<seq2seq4repair_space>WHERE<seq2seq4repair_space>private=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>removing=FALSE" ) ; <END_BUG> while ( resultSet . next ( ) ) { result . add ( resultSet . getLong ( 1 ) ) ; } return result ; } } }

Fix:
ResultSet resultSet = statement . executeQuery ( "SELECT<seq2seq4repair_space>storageSiteId<seq2seq4repair_space>FROM<seq2seq4repair_space>storage_site_table<seq2seq4repair_space>WHERE<seq2seq4repair_space>private=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>removing=FALSE<seq2seq4repair_space>AND<seq2seq4repair_space>isCache=FALSE" ) ;
Buggy code:
public class ScilabImageConverter implements ExternalImageConverter { private static final byte [ ] BOM = new byte [ ] { ( ( byte ) ( 239 ) ) , ( ( byte ) ( 187 ) ) , ( ( byte ) ( 191 ) ) } ; private final StringBuilder buffer ; private final DocbookTagConverter conv ; public ScilabImageConverter ( DocbookTagConverter conv ) { } public String getMimeType ( ) { } public boolean mustRegenerate ( ) { } public String getFileWithScilabCode ( ) { } public String convertToImage ( String currentFile , String code , Map < String , String > attributes , File imageFile , String imageName ) { } public String convertToImage ( File code , Map < String , String > attributes , File imageFile , String imageName ) { } private final String convertToPNG ( String currentFile , String code , Map < String , String > attributes , File imageFile , String imageName ) { buffer . append ( "function<seq2seq4repair_space>_generate_image_from_doc\n" ) ; buffer . append ( "__olddrv__=driver();\n" ) ; <START_BUG> buffer . append ( ( ( ( ( "disp(\"Generate<seq2seq4repair_space>image<seq2seq4repair_space>" + imageName ) + "<seq2seq4repair_space>from<seq2seq4repair_space>Scilab<seq2seq4repair_space>code<seq2seq4repair_space>from<seq2seq4repair_space>file<seq2seq4repair_space>" ) + ( new File ( currentFile ) . getName ( ) ) ) + "\");" ) ) ; <END_BUG> buffer . append ( "driver(\"png\");\n" ) ; buffer . append ( "xinit(\"" ) . append ( imageFile . getAbsolutePath ( ) ) . append ( "\");\n" ) ; buffer . append ( "clf();\n" ) ; buffer . append ( code ) . append ( "\n" ) ; buffer . append ( "___f___=gcf();___f___.anti_aliasing=\"2x\";clear(\"___f___\");\n" ) ; buffer . append ( "xend();\n" ) ; buffer . append ( "driver(__olddrv__);\n" ) ; buffer . append ( "endfunction\n" ) ; buffer . append ( "_generate_image_from_doc();\n" ) ; buffer . append ( "clear<seq2seq4repair_space>_generate_image_from_doc;\n" ) ; return conv . generateImageCode ( code , ( ( conv . getBaseImagePath ( ) ) + imageName ) , attributes ) ; } }

Fix:
buffer . append ( ( ( ( ( "mprintf(\"Generate<seq2seq4repair_space>image<seq2seq4repair_space>" + imageName ) + "<seq2seq4repair_space>from<seq2seq4repair_space>Scilab<seq2seq4repair_space>code<seq2seq4repair_space>from<seq2seq4repair_space>file<seq2seq4repair_space>" ) + ( new File ( currentFile ) . getName ( ) ) ) + "\\n\");" ) ) ;
Buggy code:
public class ItemProveedor { private double volMax ; private long tiempoEntrega ; private Material material ; private String idMaterial ; private double costo ; public void asignarIdMaterial ( String id ) { } public double darVolMax ( ) { } public void asignarVolMax ( double volMax ) { } public long darTiempoEntrega ( ) { } public void asignarTiempoEntrega ( long tiempoEntrega ) { } public Material darMaterial ( ) { } public void asignarCosto ( double costo ) { } public double darCosto ( ) { } public void cargarMaterial ( ) throws Exception { Tabla tab = Tabla . MATERIALES ; List < HashMap < String , Object > > list = ProdAndes . darInstanciaSistema ( ) . consultarRelacion ( tab . nombre ( ) , tab . pk ( ) , idMaterial , null ) ; if ( ( list . size ( ) ) != 1 ) throw new Exception ( "Error<seq2seq4repair_space>al<seq2seq4repair_space>cargar<seq2seq4repair_space>el<seq2seq4repair_space>material<seq2seq4repair_space>de<seq2seq4repair_space>un<seq2seq4repair_space>insumo:<seq2seq4repair_space>Inconsitencia<seq2seq4repair_space>en<seq2seq4repair_space>la<seq2seq4repair_space>informacion<seq2seq4repair_space>obtenida" ) ; HashMap < String , Object > info = list . get ( 0 ) ; material = new Material ( ) ; material . asignarCantidadInicial ( ( ( BigDecimal ) ( info . get ( "cantidadInicial" . toUpperCase ( ) ) ) ) . doubleValue ( ) ) ; material . asignarCodigo ( idMaterial ) ; material . asignarUnidadMedida ( ( ( String ) ( info . get ( "unidadMedida" . toUpperCase ( ) ) ) ) ) ; <START_BUG> material . asignarFechaUltimaRecepcion ( new DATE ( new Date ( ( ( Timestamp ) ( info . get ( "fechaUltimaRecepcion" . toUpperCase ( ) ) ) ) . getDateTime ( ) ) ) ) ; <END_BUG> } }

Fix:
material . asignarFechaUltimaRecepcion ( new DATE ( new Date ( ( ( Timestamp ) ( info . get ( "FECHAULTIMARECEPCION" ) ) ) . getTime ( ) ) ) ) ;
Buggy code:
public abstract class Game { private Camera cam = new Camera ( getLocalPlayerID ( ) ) ; private GameTileMap tileMap ; private LinkedList < ExtendedCosmetic > cosmetics = new LinkedList < ExtendedCosmetic > ( ) ; private LinkedList < Kill > kills = new LinkedList < Kill > ( ) ; public Game ( LobbyTileMap lobbyTileMap ) { } public abstract void tick ( ) { } protected abstract int getLocalPlayerID ( ) { } public abstract LinkedList < GamePlayer > getUncastedPlayers ( ) { } public GamePlayer getLocalPlayer ( ) { } public abstract LinkedList < MinimizedEntity > getMinimizedEntities ( ) { } public LinkedList < ExtendedCosmetic > getCosmetics ( ) { } public BufferedImage getPixelMapImage ( ) { } public BufferedImage getMapImage ( ) { } public GameTileMap getGameTileMap ( ) { } public static Game get ( ) { <START_BUG> Debug . warnIf ( ( ( Game . get ( ) ) == null ) , "Game.get():<seq2seq4repair_space>returns<seq2seq4repair_space>null" ) ; <END_BUG> return Main . getGame ( ) ; } public Camera getCamera ( ) { } }

Fix:
Debug . warnIf ( ( ( Main . getGame ( ) ) == null ) , "Game.get():<seq2seq4repair_space>returns<seq2seq4repair_space>null" ) ;
Buggy code:
public class AriesApplicationManagerImpl implements AriesApplicationManager { private ApplicationMetadataFactory _applicationMetadataFactory ; private DeploymentMetadataFactory _deploymentMetadataFactory ; private List < BundleConverter > _bundleConverters ; private AriesApplicationResolver _resolver ; private LocalPlatform _localPlatform ; private AriesApplicationContextManager _applicationContextManager ; private BundleContext _bundleContext ; private static final Logger _logger = LoggerFactory . getLogger ( "org.apache.aries.application.management.impl" ) ; public void setApplicationMetadataFactory ( ApplicationMetadataFactory amf ) { } public void setDeploymentMetadataFactory ( DeploymentMetadataFactory dmf ) { } public void setBundleConverters ( List < BundleConverter > bcs ) { } public void setResolver ( AriesApplicationResolver resolver ) { } public void setLocalPlatform ( LocalPlatform lp ) { } public void setApplicationContextManager ( AriesApplicationContextManager acm ) { } public void setBundleContext ( BundleContext b ) { } public AriesApplication createApplication ( IDirectory ebaFile ) throws ManagementException { } private String buildAppContent ( Set < BundleInfo > bundleInfos ) { } public AriesApplication createApplication ( URL url ) throws ManagementException { } public AriesApplication resolve ( AriesApplication originalApp , ResolveConstraint ... constraints ) throws ResolverException { } public AriesApplicationContext install ( AriesApplication app ) throws ManagementException , ResolverException , BundleException { if ( ! ( app . isResolved ( ) ) ) { app = resolve ( app ) ; } Dictionary dict = new Hashtable ( ) ; dict . put ( REPOSITORY_SCOPE , app . getApplicationMetadata ( ) . getApplicationScope ( ) ) ; <START_BUG> _bundleContext . registerService ( BundleRepository . class . getName ( ) , new org . apache . aries . application . management . repository . ApplicationRepository ( _resolver ) , dict ) ; <END_BUG> AriesApplicationContext result = _applicationContextManager . getApplicationContext ( app ) ; return result ; } public void uninstall ( AriesApplicationContext app ) throws BundleException { } public void addApplicationListener ( AriesApplicationListener l ) { } public void removeApplicationListener ( AriesApplicationListener l ) { } private Manifest parseApplicationManifest ( IDirectory source ) throws IOException { } private BundleManifest getBundleManifest ( IFile file ) throws IOException { } }

Fix:
_bundleContext . registerService ( BundleRepository . class . getName ( ) , new org . apache . aries . application . management . repository . ApplicationRepository ( app ) , dict ) ;