nus-yam/ex-repair huggingface dataset:
Buggy code:
@ SuppressWarnings ( "serial" ) public class AntFarm extends PApplet { private static final int [ ] HIVE_COLORS = new int [ ] { new Color ( 60 , 60 , 235 ) . getRGB ( ) , new Color ( 255 , 80 , 0 ) . getRGB ( ) , new Color ( 255 , 220 , 0 ) . getRGB ( ) , new Color ( 148 , 56 , 161 ) . getRGB ( ) } ; public static final float MIN_STATIC_SPAWN_DISTANCE = 150 ; public static final float BORDER_SPANW_DISTANCE = 10 ; public static int FOOD_COUNT = 2 ; public static float TIME_LAPSE = 1.0F ; private final Set < SceneObject > staticSceneObjects = new HashSet < SceneObject > ( 1000 ) ; private final Set < Ant > ants = new HashSet < Ant > ( 1000 ) ; private final Set < SceneObject > removeObjects = new HashSet < SceneObject > ( ) ; private final Set < SceneObject > addObjects = new HashSet < SceneObject > ( ) ; private Overlay overlay ; private PGraphics pheromones ; private PImage bgTexture ; public static boolean drawViewDirection = false ; private int currentFoodCount = 0 ; @ Override public void setup ( ) { } private void loadAssets ( ) { } @ Override public void draw ( ) { } private void update ( float delta ) { } private void addAndRemoveSceneObjects ( ) { } public void spawnAnt ( final Hive hive ) { } public void removeAnt ( final Ant ant ) { } private void spawnFood ( ) { } public void removeFood ( final Food food ) { } public void removeHive ( final Hive hive ) { } public boolean isDrawViewDirectionEnabled ( ) { } public boolean isPathBlocked ( final Ant me , final PVector translation ) { } public Ant hitsEnemyAnt ( final Ant me ) { } public void moveAnt ( final Ant ant , final PVector newPosition ) throws OutOfBoundsException , PathIsBlockedException { } public void antFight ( final Ant a , final Ant b ) { } private void assertAntInBounds ( PVector newPosition ) throws OutOfBoundsException { } public PVector calcStaticSpawnPosition ( final SceneObject me , float size ) { } public Food getFoodInProximity ( Ant ant ) { for ( Object o : staticSceneObjects ) { if ( o instanceof Food ) { Food food = ( ( Food ) ( o ) ) ; double distance = Math . abs ( PVector . dist ( ant . getPosition ( ) , food . getPosition ( ) ) ) ; <START_BUG> distance -= food . getRelativeSize ( ) ; <END_BUG> if ( distance < 30.0 ) { return food ; } } } return null ; } public void putPheromone ( final Ant me ) { } public PVector getClosePheromoneTrail ( final Ant me ) { } private void fadeOutPheromoneTrails ( final float delta ) { } }

Fix:
distance -= Food . SIZE ;
Buggy code:
final class DeploymentModelBuilderJAXWS_JSE extends AbstractDeploymentModelBuilder { DeploymentModelBuilderJAXWS_JSE ( ) { } @ Override protected void build ( final Deployment dep , final DeploymentUnit unit ) { this . log . debug ( "Creating<seq2seq4repair_space>JAXWS<seq2seq4repair_space>JSE<seq2seq4repair_space>endpoints<seq2seq4repair_space>meta<seq2seq4repair_space>data<seq2seq4repair_space>model" ) ; final JBossWebMetaData webMetaData = ASHelper . getJBossWebMetaData ( unit ) ; if ( webMetaData != null ) { dep . addAttachment ( JBossWebMetaData . class , webMetaData ) ; final List < ServletMetaData > servlets = ASHelper . getJaxwsServlets ( unit ) ; for ( ServletMetaData servlet : servlets ) { final String servletName = servlet . getName ( ) ; this . log . debug ( ( "JSE<seq2seq4repair_space>name:<seq2seq4repair_space>" + servletName ) ) ; <START_BUG> final String servletClass = ASHelper . getEndpointName ( servlet ) ; <END_BUG> this . log . debug ( ( "JSE<seq2seq4repair_space>class:<seq2seq4repair_space>" + servletClass ) ) ; this . newHttpEndpoint ( servletClass , servletName , dep ) ; } } final JMSEndpointsMetaData jmsEndpointsMD = ASHelper . getOptionalAttachment ( unit , JMS_ENDPOINT_METADATA_KEY ) ; if ( jmsEndpointsMD != null ) { dep . addAttachment ( JMSEndpointsMetaData . class , jmsEndpointsMD ) ; for ( JMSEndpointMetaData endpoint : jmsEndpointsMD . getEndpointsMetaData ( ) ) { if ( ( endpoint . getName ( ) ) == null ) { endpoint . setName ( endpoint . getImplementor ( ) ) ; } this . newJMSEndpoint ( endpoint . getImplementor ( ) , endpoint . getName ( ) , endpoint . getSoapAddress ( ) , dep ) ; } } } }

Fix:
final String servletClass = ASHelper . getEndpointClassName ( servlet ) ;
Buggy code:
public class CameraCaptureActivity extends Activity implements SurfaceTexture . OnFrameAvailableListener , OnItemSelectedListener { private static final String TAG = MainActivity . TAG ; private static final boolean VERBOSE = false ; static final int FILTER_NONE = 0 ; static final int FILTER_BLACK_WHITE = 1 ; static final int FILTER_BLUR = 2 ; static final int FILTER_SHARPEN = 3 ; static final int FILTER_EDGE_DETECT = 4 ; static final int FILTER_EMBOSS = 5 ; private GLSurfaceView mGLView ; private CameraSurfaceRenderer mRenderer ; private Camera mCamera ; private CameraCaptureActivity . CameraHandler mCameraHandler ; private boolean mRecordingEnabled ; private int mCameraPreviewWidth ; private int mCameraPreviewHeight ; private static TextureMovieEncoder sVideoEncoder = new TextureMovieEncoder ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { Log . d ( CameraCaptureActivity . TAG , "onResume<seq2seq4repair_space>--<seq2seq4repair_space>acquiring<seq2seq4repair_space>camera" ) ; super . onResume ( ) ; updateControls ( ) ; <START_BUG> openCamera ( 720 , 720 ) ; <END_BUG> AspectFrameLayout layout = ( ( AspectFrameLayout ) ( findViewById ( cameraPreview_afl ) ) ) ; layout . setAspectRatio ( ( ( ( double ) ( mCameraPreviewWidth ) ) // ( mCameraPreviewHeight ) ) ) ; mGLView . onResume ( ) ; mGLView . queueEvent ( new Runnable ( ) { @ Override public void run ( ) { mRenderer . setCameraPreviewSize ( mCameraPreviewWidth , mCameraPreviewHeight ) ; } } ) ; Log . d ( CameraCaptureActivity . TAG , ( "onResume<seq2seq4repair_space>complete:<seq2seq4repair_space>" + ( this ) ) ) ; } @ Override protected void onPause ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int pos , long id ) { } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } private void openCamera ( int desiredWidth , int desiredHeight ) { } private void releaseCamera ( ) { } public void clickToggleRecording ( @ SuppressWarnings ( "unused" ) View unused ) { } private void updateControls ( ) { } private void handleSetSurfaceTexture ( SurfaceTexture st ) { } @ Override public void onFrameAvailable ( SurfaceTexture st ) { } static class CameraHandler extends Handler { public static final int MSG_SET_SURFACE_TEXTURE = 0 ; private WeakReference < CameraCaptureActivity > mWeakActivity ; public CameraHandler ( CameraCaptureActivity activity ) { } public void invalidateHandler ( ) { } @ Override public void handleMessage ( Message inputMessage ) { } } }

Fix:
openCamera ( 1080 , 1080 ) ;
Buggy code:
public class ConfigFrame implements ActionListener , ListSelectionListener { private JDialog dialog ; private Config config ; private IdentityPanel identityPanel ; private IncomingServerPanel incomingPanel ; private OutgoingServerPanel outgoingServerPanel ; private boolean newAccount = false ; private AccountListTable listView ; private AccountList accountList ; private AccountItem accountItem ; JPanel eastPanel = new JPanel ( ) ; JPanel jPanel1 = new JPanel ( ) ; JTextField nameTextField = new JTextField ( ) ; JLabel nameLabel = new JLabel ( ) ; JButton addButton = new JButton ( ) ; HelpButton helpButton ; CloseButton closeButton ; JButton removeButton = new JButton ( ) ; JButton editButton = new JButton ( ) ; private int index ; public ConfigFrame ( ) { } public AccountItem getSelected ( ) { } public void setSelected ( AccountItem item ) { } public void initComponents ( ) { } protected JPanel createButtonPanel ( ) { } public void valueChanged ( ListSelectionEvent e ) { } public void showAccountDialog ( ) { } public void actionPerformed ( ActionEvent e ) { String action = e . getActionCommand ( ) ; if ( action . equals ( "CLOSE" ) ) { try { Config . save ( ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } dialog . setVisible ( false ) ; } else if ( action . equals ( "ADD" ) ) { System . out . println ( MailResourceLoader . getString ( "dialog" , "account" , "add" ) ) ; <START_BUG> AccountWizard wizard = new AccountWizard ( false ) ; <END_BUG> listView . update ( ) ; } else if ( action . equals ( "REMOVE" ) ) { System . out . println ( MailResourceLoader . getString ( "dialog" , "account" , "remove" ) ) ; AccountItem item = accountList . remove ( index ) ; if ( ( item . isPopAccount ( ) ) == true ) { popServerCollection . removePopServer ( item . getUid ( ) ) ; frameModel . updatePop3Menu ( ) ; } else { Folder folder = ( ( Folder ) ( treeModel . getImapFolder ( item . getUid ( ) ) ) ) ; folder . removeFromParent ( ) ; } removeButton . setEnabled ( false ) ; editButton . setEnabled ( false ) ; listView . update ( ) ; } else if ( action . equals ( "EDIT" ) ) { showAccountDialog ( ) ; listView . update ( ) ; } } public class WizardTopBorder extends AbstractBorder { protected Insets borderInsets = new Insets ( 2 , 0 , 0 , 0 ) ; public void paintBorder ( Component c , Graphics g , int x , int y , int w , int h ) { } public Insets getBorderInsets ( Component c ) { } } }

Fix:
AccountWizard wizard = new AccountWizard ( true ) ;
Buggy code:
class LogStoreAddHandler implements OperationStepHandler { private LogStoreResource resource = null ; LogStoreAddHandler ( LogStoreResource resource ) { } @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final ModelNode model = resource . getModel ( ) ; for ( final SimpleAttributeDefinition attribute : LogStoreDefinition . LOG_STORE_ATTRIBUTE ) { if ( operation . get ( attribute . getName ( ) ) . isDefined ( ) ) { attribute . validateAndSet ( operation , model ) ; } else { model . get ( attribute . getName ( ) ) . set ( attribute . getDefaultValue ( ) ) ; } } context . addResource ( EMPTY_ADDRESS , resource ) ; <START_BUG> context . completeStep ( ) ; <END_BUG> } }

Fix:
context . stepCompleted ( ) ;
Buggy code:
public class TestMultiFields extends LuceneTestCase { public void testRandom ( ) throws Exception { for ( int iter = 0 ; iter < ( 2 * ( _TestUtil . getRandomMultiplier ( ) ) ) ; iter ++ ) { Directory dir = new MockRAMDirectory ( ) ; IndexWriter w = new IndexWriter ( dir , new IndexWriterConfig ( TEST_VERSION_CURRENT , new MockAnalyzer ( ) ) . setMergePolicy ( COMPOUND_FILES ) ) ; Random r = new Random ( ) ; Map < BytesRef , List < Integer > > docs = new HashMap < BytesRef , List < Integer > > ( ) ; Set < Integer > deleted = new HashSet < Integer > ( ) ; List < BytesRef > terms = new ArrayList < BytesRef > ( ) ; <START_BUG> int numDocs = r . nextInt ( ( 100 * ( _TestUtil . getRandomMultiplier ( ) ) ) ) ; <END_BUG> Document doc = new Document ( ) ; Field f = new Field ( "field" , "" , Store . NO , Index . NOT_ANALYZED ) ; doc . add ( f ) ; Field id = new Field ( "id" , "" , Store . NO , Index . NOT_ANALYZED ) ; doc . add ( id ) ; boolean onlyUniqueTerms = r . nextBoolean ( ) ; for ( int i = 0 ; i < numDocs ; i ++ ) { if ( ( ( ! onlyUniqueTerms ) && ( r . nextBoolean ( ) ) ) && ( ( terms . size ( ) ) > 0 ) ) { BytesRef term = terms . get ( r . nextInt ( terms . size ( ) ) ) ; docs . get ( term ) . add ( i ) ; f . setValue ( term . utf8ToString ( ) ) ; } else { String s = _TestUtil . randomUnicodeString ( r , 10 ) ; BytesRef term = new BytesRef ( s ) ; if ( ! ( docs . containsKey ( term ) ) ) { docs . put ( term , new ArrayList < Integer > ( ) ) ; } docs . get ( term ) . add ( i ) ; terms . add ( term ) ; f . setValue ( s ) ; } id . setValue ( ( "" + i ) ) ; w . addDocument ( doc ) ; if ( ( r . nextInt ( 4 ) ) == 1 ) { w . commit ( ) ; } if ( ( i > 0 ) && ( ( r . nextInt ( 20 ) ) == 1 ) ) { int delID = r . nextInt ( i ) ; deleted . add ( delID ) ; w . deleteDocuments ( new Term ( "id" , ( "" + delID ) ) ) ; } } IndexReader reader = w . getReader ( ) ; w . close ( ) ; Bits delDocs = MultiFields . getDeletedDocs ( reader ) ; for ( int delDoc : deleted ) { assertTrue ( delDocs . get ( delDoc ) ) ; } Terms terms2 = MultiFields . getTerms ( reader , "field" ) ; for ( int i = 0 ; i < 100 ; i ++ ) { BytesRef term = terms . get ( r . nextInt ( terms . size ( ) ) ) ; DocsEnum docsEnum = terms2 . docs ( delDocs , term , null ) ; int count = 0 ; for ( int docID : docs . get ( term ) ) { if ( ! ( deleted . contains ( docID ) ) ) { assertEquals ( docID , docsEnum . nextDoc ( ) ) ; count ++ ; } } assertEquals ( docsEnum . NO_MORE_DOCS , docsEnum . nextDoc ( ) ) ; } reader . close ( ) ; dir . close ( ) ; } } private void verify ( IndexReader r , String term , List < Integer > expected ) throws Exception { } }

Fix:
int numDocs = _TestUtil . nextInt ( r , 1 , ( 100 * ( _TestUtil . getRandomMultiplier ( ) ) ) ) ;
Buggy code:
public class XTSExtension implements Extension { public static final String SUBSYSTEM_NAME = "xts" ; private static final XTSExtension . XTSSubsystemParser parser = new XTSExtension . XTSSubsystemParser ( ) ; public void initialize ( ExtensionContext context ) { ROOT_LOGGER . debug ( "Initializing<seq2seq4repair_space>XTS<seq2seq4repair_space>Extension" ) ; <START_BUG> final SubsystemRegistration subsystem = context . registerSubsystem ( XTSExtension . SUBSYSTEM_NAME , 1 , 0 ) ; <END_BUG> final ManagementResourceRegistration registration = subsystem . registerSubsystemModel ( SUBSYSTEM ) ; registration . registerOperationHandler ( ADD , INSTANCE , SUBSYSTEM_ADD , false ) ; registration . registerOperationHandler ( REMOVE , XTSSubsystemRemove . INSTANCE , SUBSYSTEM_REMOVE , false ) ; registration . registerOperationHandler ( DESCRIBE , GenericSubsystemDescribeHandler . INSTANCE , GenericSubsystemDescribeHandler . INSTANCE , false , PRIVATE ) ; subsystem . registerXMLElementWriter ( XTSExtension . parser ) ; } public void initializeParsers ( ExtensionParsingContext context ) { } private static ModelNode createEmptyAddOperation ( ) { } static class XTSSubsystemParser implements XMLStreamConstants , XMLElementReader < List < ModelNode > > , XMLElementWriter < SubsystemMarshallingContext > { @ Override public void readElement ( XMLExtendedStreamReader reader , List < ModelNode > list ) throws XMLStreamException { } static ModelNode parseXTSEnvironmentElement ( XMLExtendedStreamReader reader ) throws XMLStreamException { } @ Override public void writeContent ( XMLExtendedStreamWriter writer , SubsystemMarshallingContext context ) throws XMLStreamException { } private boolean has ( ModelNode node , String name ) { } private void writeAttribute ( final XMLExtendedStreamWriter writer , final Attribute attr , final ModelNode value ) throws XMLStreamException { } } }

Fix:
final SubsystemRegistration subsystem = context . registerSubsystem ( XTSExtension . SUBSYSTEM_NAME , 1 , 1 ) ;
Buggy code:
final class ManagedProcess { private final ProcessManagerMaster master ; private final String processName ; private final List < String > command ; private final Map < String , String > env ; private final String workingDirectory ; private final long [ ] startTimeHistory = new long [ 5 ] ; private boolean start ; private OutputStream commandStream ; private Process process ; ManagedProcess ( final ProcessManagerMaster master , final String processName , final List < String > command , final Map < String , String > env , final String workingDirectory ) { } void start ( ) throws IOException { } void stop ( ) throws IOException { } boolean isStart ( ) { } void send ( final List < String > msg ) throws IOException { final StringBuilder b = new StringBuilder ( ) ; b . append ( "MSG" ) ; for ( String s : msg ) { <START_BUG> b . append ( '' ) . append ( s ) ; <END_BUG> } b . append ( '\n' ) ; StreamUtils . writeString ( commandStream , b ) ; } private final class OutputStreamHandler implements Runnable { private final InputStream inputStream ; OutputStreamHandler ( final InputStream inputStream ) { } public void run ( ) { } } private static final class ErrorStreamHandler implements Runnable { private static final Logger log = Logger . getLogger ( "org.jboss.as.process.stderr" ) ; private final String processName ; private final InputStream errorStream ; private ErrorStreamHandler ( final String processName , final InputStream errorStream ) { } public void run ( ) { } } private static void safeClose ( final Closeable closeable ) { } }

Fix:
b . append ( '' ) . append ( msg ) ;
Buggy code:
public class AbilityData implements IExtendedEntityProperties { public static final String IDENTIFIER = "ac_ability" ; private final EntityPlayer player ; int catID ; int levelId ; float currentCP ; float maxCP ; float [ ] skillExps ; int [ ] skillLevels ; public AbilityData ( EntityPlayer player ) { } public AbilityData ( EntityPlayer player , Category category ) { } public AbilityData ( EntityPlayer player , NBTTagCompound nbt ) { } public EntityPlayer getPlayer ( ) { } public boolean hasAbility ( ) { } public Category getCategory ( ) { } public int getCategoryID ( ) { } public int getSkillCount ( ) { } public void setCategory ( Category cat ) { } public void setCategoryID ( int value ) { } public Level getLevel ( ) { } public boolean canUpdateLevel ( ) { } public int getLevelID ( ) { } public int getLevelCount ( ) { } public void setLevelID ( int value ) { } public float getMaxCPIncr ( float consumedCP ) { } public int getSkillID ( SkillBase skill ) { } public SkillBase getSkill ( int sid ) { } public float getSkillExp ( int sid ) { } public boolean isSkillLearned ( int sid ) { } public boolean isSkillLearned ( SkillBase skill ) { } public List < Integer > getCanLearnSkillList ( ) { } public List < Integer > getLearnedSkillList ( ) { } public List < Integer > getControlSkillList ( ) { } public void setSkillExp ( float [ ] values ) { } public int getMaxSkillLevel ( int skillID ) { } public int getSkillLevel ( SkillBase skill ) { } public int getSkillLevel ( int skillID ) { } public void setSkillLevel ( int skillID , int level ) { } public void setSkillLevel ( int [ ] values ) { } @ Deprecated public float [ ] getSkillExpArray ( ) { } @ Deprecated public int [ ] getSkillLevelArray ( ) { } @ Deprecated public void setSkillExp ( int skillID , float value ) { } public float getCurrentCP ( ) { } public float getMaxCP ( ) { } public void setCurrentCP ( float value ) { } public void setMaxCP ( float value ) { } @ Deprecated public boolean decreaseCP ( float need ) { } @ Deprecated public boolean decreaseCP ( float need , boolean force ) { } public boolean decreaseCP ( float need , SkillBase skill ) { } public boolean decreaseCP ( float need , SkillBase base , boolean force ) { } private float getRecoverRate ( ) { } public boolean recoverCP ( ) { } protected float getSexpForSkillLevel ( SkillBase sb , int lev ) { } protected float getSexpForCP ( float cp ) { <START_BUG> return cp * 0.002F ; <END_BUG> } public boolean canSkillUpgrade ( int sid ) { } public void addSkillExp ( int sid , float exp ) { } public double getSkillUpgradeProgress ( int sid ) { } public void upgrade ( int sid ) { } @ Override public void saveNBTData ( NBTTagCompound playerNBT ) { } @ Override public void loadNBTData ( NBTTagCompound playerNBT ) { } public void onPlayerTick ( ) { } private void syncSimple ( ) { } private void syncAll ( ) { } private void setInitial ( Category category ) { } @ Override public void init ( Entity entity , World world ) { } private boolean isInSetup = false ; private boolean needToReset = false ; private int tickCount = 0 ; }

Fix:
return cp * 0.003F ;
Buggy code:
public class CDConfigPropertyAdd extends AbstractBoottimeAddStepHandler implements DescriptionProvider { public static final CDConfigPropertyAdd INSTANCE = new CDConfigPropertyAdd ( ) ; @ Override public ModelNode getModelDescription ( Locale locale ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode modelNode ) throws OperationFailedException { } @ Override protected void performBoottime ( OperationContext context , ModelNode operation , ModelNode recoveryEnvModel , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > serviceControllers ) throws OperationFailedException { <START_BUG> final String configPropertyValue = Constants . CONFIG_PROPERTY_VALUE . validateResolvedOperation ( recoveryEnvModel ) . asString ( ) ; <END_BUG> final ModelNode address = operation . require ( OP_ADDR ) ; PathAddress path = PathAddress . pathAddress ( address ) ; final String archiveName = path . getElement ( ( ( path . size ( ) ) - 3 ) ) . getValue ( ) ; final String cfName = path . getElement ( ( ( path . size ( ) ) - 2 ) ) . getValue ( ) ; final String configPropertyName = PathAddress . pathAddress ( address ) . getLastElement ( ) . getValue ( ) ; ServiceName serviceName = ServiceName . of ( RA_SERVICE , archiveName , cfName , configPropertyName ) ; ServiceName cfServiceName = ServiceName . of ( RA_SERVICE , archiveName , cfName ) ; final ServiceTarget serviceTarget = context . getServiceTarget ( ) ; final CDConfigPropertiesService service = new CDConfigPropertiesService ( configPropertyName , configPropertyValue ) ; ServiceController < ? > controller = serviceTarget . addService ( serviceName , service ) . setInitialMode ( ACTIVE ) . addDependency ( cfServiceName , ModifiableConnDef . class , service . getRaInjector ( ) ) . addListener ( verificationHandler ) . install ( ) ; context . addStep ( verificationHandler , VERIFY ) ; } }

Fix:
final String configPropertyValue = Constants . CONFIG_PROPERTY_VALUE . resolveModelAttribute ( context , recoveryEnvModel ) . asString ( ) ;
Buggy code:
public class Expand extends MatchingTask { private boolean overwrite = true ; private Vector patternsets = new Vector ( ) ; private Vector filesets = new Vector ( ) ; private File dest ; private File source ; public void setDest ( File d ) { } public void setOverwrite ( boolean b ) { } public void setSrc ( File s ) { } public void addFileset ( FileSet set ) { } public void addPatternset ( PatternSet set ) { } public void execute ( ) throws TaskException { } protected void expandFile ( FileUtils fileUtils , File srcF , File dir ) throws TaskException { } protected void extractFile ( FileUtils fileUtils , File srcF , File dir , InputStream compressedInputStream , String entryName , Date entryDate , boolean isDirectory ) throws IOException , TaskException { if ( ( ( patternsets ) != null ) && ( ( patternsets . size ( ) ) > 0 ) ) { String name = entryName ; boolean included = false ; for ( int v = 0 ; v < ( patternsets . size ( ) ) ; v ++ ) { PatternSet p = ( ( PatternSet ) ( patternsets . elementAt ( v ) ) ) ; String [ ] incls = p . getIncludePatterns ( project ) ; if ( incls != null ) { for ( int w = 0 ; w < ( incls . length ) ; w ++ ) { boolean isIncl = DirectoryScanner . match ( incls [ w ] , name ) ; if ( isIncl ) { included = true ; break ; } } } String [ ] excls = p . getExcludePatterns ( project ) ; if ( excls != null ) { for ( int w = 0 ; w < ( excls . length ) ; w ++ ) { boolean isExcl = DirectoryScanner . match ( excls [ w ] , name ) ; if ( isExcl ) { included = false ; break ; } } } } if ( ! included ) { return ; } } File f = fileUtils . resolveFile ( dir , entryName ) ; try { if ( ( ( ! ( overwrite ) ) && ( f . exists ( ) ) ) && ( ( f . lastModified ( ) ) >= ( entryDate . getTime ( ) ) ) ) { log ( ( ( "Skipping<seq2seq4repair_space>" + f ) + "<seq2seq4repair_space>as<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>up-to-date" ) , MSG_DEBUG ) ; return ; } log ( ( ( ( "expanding<seq2seq4repair_space>" + entryName ) + "<seq2seq4repair_space>to<seq2seq4repair_space>" ) + f ) , MSG_VERBOSE ) ; <START_BUG> File dirF = fileUtils . getParentFile ( f ) ; <END_BUG> dirF . mkdirs ( ) ; if ( isDirectory ) { f . mkdirs ( ) ; } else { byte [ ] buffer = new byte [ 1024 ] ; int length = 0 ; FileOutputStream fos = null ; try { fos = new FileOutputStream ( f ) ; while ( ( length = compressedInputStream . read ( buffer ) ) >= 0 ) { fos . write ( buffer , 0 , length ) ; } fos . close ( ) ; fos = null ; } finally { if ( fos != null ) { try { fos . close ( ) ; } catch ( IOException e ) { } } } } f . setLastModified ( entryDate . getTime ( ) ) ; } catch ( FileNotFoundException ex ) { log ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>expand<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>" + ( f . getPath ( ) ) ) , MSG_WARN ) ; } } }

Fix:
File dirF = f . getParentFile ( ) ;
Buggy code:
class XSDWildcardTraverser extends XSDAbstractTraverser { XSDWildcardTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } XSParticleDecl traverseAny ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } XSWildcardDecl traverseAnyAttribute ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { } XSWildcardDecl traverseWildcardDecl ( Element elmNode , Object [ ] attrValues , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { XSWildcardDecl wildcard = new XSWildcardDecl ( ) ; XInt namespaceTypeAttr = ( ( XInt ) ( attrValues [ XSAttributeChecker . ATTIDX_NAMESPACE ] ) ) ; wildcard . fType = namespaceTypeAttr . shortValue ( ) ; wildcard . fNamespaceList = ( ( String [ ] ) ( attrValues [ XSAttributeChecker . ATTIDX_NAMESPACE_LIST ] ) ) ; XInt processContentsAttr = ( ( XInt ) ( attrValues [ XSAttributeChecker . ATTIDX_PROCESSCONTENTS ] ) ) ; wildcard . fProcessContents = processContentsAttr . shortValue ( ) ; Element child = DOMUtil . getFirstChildElement ( elmNode ) ; XSAnnotationImpl annotation = null ; if ( child != null ) { if ( DOMUtil . getLocalName ( child ) . equals ( ELT_ANNOTATION ) ) { annotation = traverseAnnotationDecl ( child , attrValues , false , schemaDoc ) ; child = DOMUtil . getNextSiblingElement ( child ) ; } else { String text = DOMUtil . getSyntheticAnnotation ( elmNode ) ; if ( text != null ) { annotation = traverseSyntheticAnnotation ( elmNode , text , attrValues , false , schemaDoc ) ; } } if ( child != null ) { reportSchemaError ( "s4s-elt-must-match.1" , new Object [ ] { "wildcard" , "(annotation?)" , DOMUtil . getLocalName ( child ) } , elmNode ) ; } } else { String text = DOMUtil . getSyntheticAnnotation ( elmNode ) ; if ( text != null ) { annotation = traverseSyntheticAnnotation ( elmNode , text , attrValues , false , schemaDoc ) ; } } XSObjectList annotations ; if ( annotation != null ) { annotations = new XSObjectListImpl ( ) ; <START_BUG> ( ( XSObjectListImpl ) ( annotations ) ) . add ( annotation ) ; <END_BUG> } else { annotations = XSObjectListImpl . EMPTY_LIST ; } wildcard . fAnnotations = annotations ; return wildcard ; } }

Fix:
( ( XSObjectListImpl ) ( annotations ) ) . addXSObject ( annotation ) ;
Buggy code:
public class Price implements Externalizable { private static final int FIRST_VERSION = 0 ; private static final int TIMESTAMPED_VERSION = ( Price . FIRST_VERSION ) + 1 ; private static final Timestamp DEFAULT_TIMESTAMP = new Timestamp ( 0L ) ; private static Price _savedPrice ; public String currencyCode ; public BigDecimal amount ; public Timestamp timeInstant ; public static Price makePrice ( ) { <START_BUG> return new Price ( "USD" , new BigDecimal ( 1 ) , Price . DEFAULT_TIMESTAMP ) ; <END_BUG> } public static Price makePrice ( String currencyCode , BigDecimal amount , Timestamp timeInstant ) { } public static String getCurrencyCode ( Price price ) { } public static BigDecimal getAmount ( Price price ) { } public static Timestamp getTimeInstant ( Price price ) { } public static void savePrice ( Price price ) { } public static Price getSavedPrice ( ) { } public Price ( ) { } public Price ( String currencyCode , BigDecimal amount , Timestamp timeInstant ) { } public String toString ( ) { } public boolean equals ( Object other ) { } public void writeExternal ( ObjectOutput out ) throws IOException { } public void readExternal ( ObjectInput in ) throws IOException , ClassNotFoundException { } }

Fix:
return new Price ( "USD" , BigDecimal . valueOf ( 1L ) , Price . DEFAULT_TIMESTAMP ) ;
Buggy code:
public class EeWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { private final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor ; private final GlobalModuleDependencyProcessor moduleDependencyProcessor ; private final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor ; private final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor ; public EeWriteAttributeHandler ( final DefaultEarSubDeploymentsIsolationProcessor isolationProcessor , final GlobalModuleDependencyProcessor moduleDependencyProcessor , final DescriptorPropertyReplacementProcessor specDescriptorPropertyReplacementProcessor , final DescriptorPropertyReplacementProcessor jbossDescriptorPropertyReplacementProcessor ) { } public void registerAttributes ( final ManagementResourceRegistration registry ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode newValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } private void applyUpdateToDeploymentUnitProcessor ( final OperationContext context , ModelNode newValue , String attributeName ) throws OperationFailedException { if ( INSTANCE . getName ( ) . equals ( attributeName ) ) { <START_BUG> moduleDependencyProcessor . setGlobalModules ( newValue ) ; <END_BUG> } else if ( EAR_SUBDEPLOYMENTS_ISOLATED . getName ( ) . equals ( attributeName ) ) { boolean isolate = newValue . asBoolean ( ) ; isolationProcessor . setEarSubDeploymentsIsolated ( isolate ) ; } else if ( SPEC_DESCRIPTOR_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) { boolean enabled = newValue . asBoolean ( ) ; specDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( enabled ) ; } else if ( JBOSS_DESCRIPTOR_PROPERTY_REPLACEMENT . getName ( ) . equals ( attributeName ) ) { boolean enabled = newValue . asBoolean ( ) ; jbossDescriptorPropertyReplacementProcessor . setDescriptorPropertyReplacement ( enabled ) ; } } }

Fix:
moduleDependencyProcessor . setGlobalModules ( GlobalModulesDefinition . createModuleList ( context , newValue ) ) ;
Buggy code:
public class MainGame { public static void main ( String [ ] args ) throws SlickException { <START_BUG> AppGameContainer jumper = new AppGameContainer ( new GameApp ( "Jump<seq2seq4repair_space>And<seq2seq4repair_space>Run<seq2seq4repair_space>beta<seq2seq4repair_space>0.2.5" ) ) ; <END_BUG> jumper . setDisplayMode ( 800 , 450 , false ) ; jumper . setAlwaysRender ( true ) ; jumper . setShowFPS ( false ) ; jumper . start ( ) ; } }

Fix:
AppGameContainer jumper = new AppGameContainer ( new GameApp ( "Jump<seq2seq4repair_space>And<seq2seq4repair_space>Run<seq2seq4repair_space>beta<seq2seq4repair_space>0.7.5" ) ) ;
Buggy code:
public class TestGenerationType extends TestCase { private OpenJPAEntityManagerFactory emf ; public void setUp ( ) { <START_BUG> Map props = new HashMap ( ) ; <END_BUG> props . put ( "openjpa.MetaDataFactory" , ( ( "jpa(Types=" + ( IdentityGenerationType . class . getName ( ) ) ) + ")" ) ) ; emf = ( ( OpenJPAEntityManagerFactory ) ( Persistence . createEntityManagerFactory ( "test" , props ) ) ) ; JDBCConfiguration conf = ( ( JDBCConfiguration ) ( emf . getConfiguration ( ) ) ) ; if ( ! ( conf . getDBDictionaryInstance ( ) . supportsAutoAssign ) ) { emf = null ; } } public void tearDown ( ) { } public void testCreateEntityManager ( ) { } public void testPersist ( ) { } public void testQuery ( ) { } public static void main ( String [ ] args ) { } }

Fix:
Map props = new HashMap ( System . getProperties ( ) ) ;
Buggy code:
public abstract class ConcreteTypeMunger implements PartialOrder . PartialComparable { protected ResolvedTypeMunger munger ; protected ResolvedTypeX aspectType ; public ConcreteTypeMunger ( ResolvedTypeMunger munger , ResolvedTypeX aspectType ) { } public ResolvedTypeMunger getMunger ( ) { } public ResolvedTypeX getAspectType ( ) { } public ResolvedMember getSignature ( ) { } public ISourceLocation getSourceLocation ( ) { } public boolean matches ( ResolvedTypeX onType ) { if ( ( munger ) == null ) throw new RuntimeException ( ( "huh:<seq2seq4repair_space>" + ( this ) ) ) ; <START_BUG> return munger . matches ( onType ) ; <END_BUG> } public ResolvedMember getMatchingSyntheticMember ( Member member ) { } public int compareTo ( Object other ) { } public int fallbackCompareTo ( Object other ) { } }

Fix:
return munger . matches ( onType , aspectType ) ;
Buggy code:
public class ServerConnection { private Socket socket ; private ObjectOutputStream out ; private ObjectInputStream in ; private NetworkFileList fileList ; private int localPort ; public ServerConnection ( InetAddress ip , int serverPort , int localPort , Hashtable < String , File > fileTable ) { } public void sendHello ( ) { } public void sendFileList ( ) { } private void buildFileList ( Hashtable < String , File > fileTable ) { NetworkFileList result ; List < SharedFile > list = new ArrayList < SharedFile > ( ) ; Set < Map . Entry < String , File > > entries = fileTable . entrySet ( ) ; for ( Map . Entry < String , File > e : entries ) { File f = e . getValue ( ) ; list . add ( new SharedFile ( f . getName ( ) , f . length ( ) , e . getKey ( ) ) ) ; } InetAddress addr ; try { addr = InetAddress . getLocalHost ( ) ; <START_BUG> this . fileList = new NetworkFileList ( Protocol . FILE_LIST , list , addr , localPort ) ; <END_BUG> } catch ( UnknownHostException e1 ) { Logger logger = Client . getLogger ( ) ; logger . log ( Level . WARNING , ( "Connection:<seq2seq4repair_space>Error<seq2seq4repair_space>while<seq2seq4repair_space>creating<seq2seq4repair_space>networkFileList" + e1 ) ) ; e1 . printStackTrace ( ) ; } } }

Fix:
this . fileList = new NetworkFileList ( list , addr , localPort ) ;
Buggy code:
public class TestPurchaseController { @ Before public void SetUp ( ) { } @ After public void tearDown ( ) { } @ Test public void testPressed0 ( ) { } @ Test public void testPressed1 ( ) { } @ Test public void testPressed2 ( ) { } @ Test public void testPressed3 ( ) { } @ Test public void testPressed4 ( ) { } @ Test public void testPressed5 ( ) { } @ Test public void testPressed6 ( ) { } @ Test public void testPressed7 ( ) { } @ Test public void testPressed8 ( ) { } @ Test public void testPressed9 ( ) { final PopInventory pop = mockingContext . mock ( PopInventory . class ) ; mockingContext . checking ( new Expectations ( ) { } ) ; final CoinInventory coin = mockingContext . mock ( CoinInventory . class ) ; mockingContext . checking ( new Expectations ( ) { } ) ; @ SuppressWarnings ( "unchecked" ) final Map < Integer , CoinRack > coinRackMap = ( ( Map < Integer , CoinRack > ) ( mockingContext . mock ( Map . class ) ) ) ; mockingContext . checking ( new Expectations ( ) { } ) ; final CoinLocationManager coinLocation = mockingContext . mock ( CoinLocationManager . class ) ; mockingContext . checking ( new Expectations ( ) { } ) ; final ChangeMaker changeMaker = mockingContext . mock ( ChangeMaker . class ) ; mockingContext . checking ( new Expectations ( ) { } ) ; purchaseController = new Iteration2PurchaseController ( pop , coin , coinLocation , defaultCard ) ; purchaseController . pressed ( button ) ; <START_BUG> assertEquals ( "Notice:<seq2seq4repair_space>Cannot<seq2seq4repair_space>Make<seq2seq4repair_space>Change" , outContent . toString ( ) ) ; <END_BUG> assertEquals ( false , hasDispensedPop ) ; } private CoinRack makeCoinRack ( final int arrayIndex , String coinRackName ) { } private final ByteArrayOutputStream outContent = new ByteArrayOutputStream ( ) ; private Iteration2PurchaseController purchaseController ; private Mockery mockingContext ; private PopInventory defaultPop ; private CoinInventory defaultCoin ; private CoinLocationManager defaultCoinLocation ; private CardManager defaultCard ; private int [ ] coinValues ; private int [ ] numberOfCoinsReleased ; private boolean hasDispensedPop ; private CoinRack [ ] racks ; private SelectionButton button ; private CoinReceptacle coinReceptacle ; }

Fix:
assertEquals ( "Notice:<seq2seq4repair_space>Cannot<seq2seq4repair_space>Make<seq2seq4repair_space>Change.<seq2seq4repair_space>Please<seq2seq4repair_space>call<seq2seq4repair_space>(555)555-5555." , outContent . toString ( ) ) ;
Buggy code:
public class ServerAndClientTimeFilter implements IResponseFilter { private static Log log = LogFactory . getLog ( ServerAndClientTimeFilter . class ) ; public StringBuffer filter ( StringBuffer responseBuffer ) { int headIndex = responseBuffer . indexOf ( "<head>" ) ; int bodyIndex = responseBuffer . indexOf ( "<//body>" ) ; long timeTaken = ( System . currentTimeMillis ( ) ) - ( RequestCycle . get ( ) . getStartTime ( ) ) ; if ( ( headIndex != ( - 1 ) ) && ( bodyIndex != ( - 1 ) ) ) { HashMap map = new HashMap ( 4 ) ; map . put ( "clienttime" , "'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ) ; map . put ( "servertime" , ( ( ( ( double ) ( timeTaken ) ) // 1000 ) + "s" ) ) ; String defaultValue = ( "Server<seq2seq4repair_space>parsetime:<seq2seq4repair_space>" + ( ( ( double ) ( timeTaken ) ) // 1000 ) ) + "s,<seq2seq4repair_space>Client<seq2seq4repair_space>parsetime:<seq2seq4repair_space>'<seq2seq4repair_space>+<seq2seq4repair_space>(new<seq2seq4repair_space>Date().getTime()<seq2seq4repair_space>-<seq2seq4repair_space>clientTimeVariable)//1000<seq2seq4repair_space>+<seq2seq4repair_space>'s" ; <START_BUG> String txt = Application . get ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . valueOf ( map ) , Session . get ( ) . getLocale ( ) , Session . get ( ) . getStyle ( ) , defaultValue ) ; <END_BUG> StringBuffer endScript = new StringBuffer ( "\n<script>\nwindow.defaultStatus=\'" ) ; endScript . append ( txt ) ; endScript . append ( "\';\n<//script>\n" ) ; responseBuffer . insert ( ( bodyIndex - 1 ) , endScript ) ; StringBuffer beginScript = new StringBuffer ( "\n<script>\nvar<seq2seq4repair_space>clientTimeVariable<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>Date().getTime();\n<//script>\n" ) ; responseBuffer . insert ( ( headIndex + 6 ) , beginScript ) ; } ServerAndClientTimeFilter . log . info ( ( ( ( ( timeTaken + "ms<seq2seq4repair_space>server<seq2seq4repair_space>time<seq2seq4repair_space>taken<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" ) + ( RequestCycle . get ( ) . getRequest ( ) . getURL ( ) ) ) + "<seq2seq4repair_space>response<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( responseBuffer . length ( ) ) ) ) ; return responseBuffer ; } }

Fix:
String txt = Application . get ( ) . getMarkupSettings ( ) . getLocalizer ( ) . getString ( "ServerAndClientTimeFilter.statustext" , null , Model . valueOf ( map ) , Session . get ( ) . getLocale ( ) , Session . get ( ) . getStyle ( ) , defaultValue ) ;
Buggy code:
public class BuildingProblem implements GPSProblem { private Board initBoard ; private List < GPSRule > rules ; public BuildingProblem ( ) { } private void initializeRules ( ) { rules = new LinkedList < GPSRule > ( ) ; int maxHeight = initBoard . getSize ( ) ; for ( int i = 0 ; i < maxHeight ; i ++ ) { for ( int j = 0 ; j < maxHeight ; j ++ ) { <START_BUG> for ( int k = 0 ; k < maxHeight ; k ++ ) { <END_BUG> rules . add ( new BuildingRule ( i , j , k ) ) ; } } } } @ Override public GPSState getGoalState ( ) { } @ Override public Integer getHValue ( GPSState state ) { } @ Override public GPSState getInitState ( ) { } @ Override public List < GPSRule > getRules ( ) { } }

Fix:
for ( int k = 1 ; k < ( maxHeight + 1 ) ; k ++ ) {
Buggy code:
public final class MessagingExtension implements Extension { private static final Logger log = Logger . getLogger ( "org.jboss.as.messaging" ) ; public void registerElementHandlers ( final XMLMapper mapper ) { QName messagingNamespace = new QName ( MESSAGING_1_0 . getUriString ( ) , SUBSYSTEM . getLocalName ( ) ) ; mapper . registerRootElement ( messagingNamespace , MessagingSubsystemParser . getInstance ( ) ) ; <START_BUG> MessagingExtension . log . info ( ( "Registered<seq2seq4repair_space>messaging<seq2seq4repair_space>subsystem<seq2seq4repair_space>under:<seq2seq4repair_space>" + messagingNamespace ) ) ; <END_BUG> } public void activate ( final ServiceActivatorContext context ) { } }

Fix:
MessagingExtension . log . infof ( "Registered<seq2seq4repair_space>messaging<seq2seq4repair_space>subsystem<seq2seq4repair_space>under:<seq2seq4repair_space>%s" , messagingNamespace ) ;
Buggy code:
public class RegistrationIntentService extends IntentService { private static final String TAG = "RegIntentService" ; private static final String [ ] TOPICS = new String [ ] { "global" } ; public RegistrationIntentService ( ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private void sendRegistrationToServer ( String token ) throws IOException { <START_BUG> Registration . Builder builder = new Registration . Builder ( com . google . api . client . extensions . android . http . AndroidHttp . newCompatibleTransport ( ) , new com . google . api . client . extensions . android . json . AndroidJsonFactory ( ) , null ) . setRootUrl ( "http:////forkpoint-1265.appspot.com//_ah//api//" ) . setGoogleClientRequestInitializer ( new GoogleClientRequestInitializer ( ) { <END_BUG> @ Override public void initialize ( AbstractGoogleClientRequest < ? > request ) throws IOException { request . setDisableGZipContent ( true ) ; } } ) ; Registration regService = builder . build ( ) ; regService . register ( token ) . execute ( ) ; } private void subscribeTopics ( String token ) throws IOException { } }

Fix:
Registration . Builder builder = new Registration . Builder ( com . google . api . client . extensions . android . http . AndroidHttp . newCompatibleTransport ( ) , new com . google . api . client . extensions . android . json . AndroidJsonFactory ( ) , null ) . setRootUrl ( "https:////forkpoint-1265.appspot.com//_ah//api//" ) . setGoogleClientRequestInitializer ( new GoogleClientRequestInitializer ( ) {
Buggy code:
public class ArrayReference extends Reference { public Expression receiver ; public Expression position ; public ArrayReference ( Expression rec , Expression pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean compoundAssignment ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { receiver . generateCode ( currentScope , codeStream , true ) ; if ( ( ( receiver ) instanceof CastExpression ) && ( ( ( ( CastExpression ) ( receiver ) ) . innermostCastedExpression ( ) . resolvedType ) == ( NullBinding ) ) ) { codeStream . checkcast ( receiver . resolvedType ) ; } position . generateCode ( currentScope , codeStream , true ) ; codeStream . dup2 ( ) ; codeStream . arrayAt ( this . resolvedType . id ) ; int operationTypeID ; <START_BUG> if ( ( operationTypeID = ( ( implicitConversion ) & ( TypeIds . IMPLICIT_CONVERSION_MASK ) ) > > 4 ) == ( T_String ) ) { <END_BUG> codeStream . generateStringConcatenationAppend ( currentScope , null , expression ) ; } else { codeStream . generateImplicitConversion ( implicitConversion ) ; if ( expression == ( IntLiteral . One ) ) { codeStream . generateConstant ( expression . constant , implicitConversion ) ; } else { expression . generateCode ( currentScope , codeStream , true ) ; } codeStream . sendOperator ( operator , operationTypeID ) ; codeStream . generateImplicitConversion ( assignmentImplicitConversion ) ; } codeStream . arrayAtPut ( this . resolvedType . id , valueRequired ) ; } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( operationTypeID = ( ( implicitConversion ) & ( TypeIds . IMPLICIT_CONVERSION_MASK ) ) > > 4 ) == ( TypeIds . T_JavaLangString ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) public class StatelessBeanIntegrationTestCase { static final String EJB3_DEPLOYMENT_NAME = "ejb3-osgi.jar" ; @ Inject public Bundle bundle ; @ ArquillianResource public Deployer deployer ; @ Deployment public static JavaArchive createDeployment ( ) { } @ Test public void testTargetBundle ( ) throws Exception { } @ Test public void testStatelessBean ( ) throws Exception { deployer . deploy ( StatelessBeanIntegrationTestCase . EJB3_DEPLOYMENT_NAME ) ; try { <START_BUG> String jndiname = "java:global//ejb3-osgi//SimpleStatelessSessionBean!org.jboss.as.testsuite.integration.osgi.ejb3.SimpleStatelessSessionBean" ; <END_BUG> Echo service = ( ( Echo ) ( new InitialContext ( ) . lookup ( jndiname ) ) ) ; assertNotNull ( "StatelessBean<seq2seq4repair_space>not<seq2seq4repair_space>null" , service ) ; assertEquals ( "ejb3-osgi-target" , service . echo ( Constants . BUNDLE_SYMBOLICNAME ) ) ; assertEquals ( "foo" , service . echo ( "foo" ) ) ; } finally { deployer . undeploy ( StatelessBeanIntegrationTestCase . EJB3_DEPLOYMENT_NAME ) ; } } @ Deployment ( name = StatelessBeanIntegrationTestCase . EJB3_DEPLOYMENT_NAME , managed = false , testable = false ) public static JavaArchive getTestArchive ( ) { } }

Fix:
String jndiname = "java:global//ejb3-osgi//SimpleStatelessSessionBean!org.jboss.as.testsuite.integration.osgi.xservice.api.Echo" ;
Buggy code:
public class ValueEditingSupport extends EditingSupport { private ColumnViewer viewer ; public ValueEditingSupport ( ColumnViewer viewer ) { } @ Override protected CellEditor getCellEditor ( final Object element ) { } protected CellEditor createColorEditor ( final ColorNode element ) { } private boolean somethingChanged = false ; protected CellEditor createNumericEditor ( final NumericNode < ? > element ) { } private int getDecimalPlaces ( NumericNode < ? extends Quantity > node ) { } private class NumericNodeEditor extends FloatSpinnerCellEditor { private NumericNode < ? > element ; public NumericNodeEditor ( NumericNode < ? > element , Composite control , int switches ) { } @ Override protected Object doGetValue ( ) { } @ Override protected void doSetValue ( Object value ) { } @ Override public void dispose ( ) { } } protected CellEditor createComboEditor ( final ComboNode element ) { } @ Override protected boolean canEdit ( Object element ) { } @ Override protected Object getValue ( Object element ) { } @ Override protected void setValue ( Object element , Object value ) { if ( element instanceof NumericNode ) { NumericNode < ? extends Quantity > node = ( ( NumericNode < ? > ) ( element ) ) ; node . setDoubleValue ( ( ( Double ) ( value ) ) ) ; } if ( element instanceof ColorNode ) { ColorNode node = ( ( ColorNode ) ( element ) ) ; if ( value instanceof RGB ) { node . setColor ( new Color ( null , ( ( RGB ) ( value ) ) ) ) ; } else { node . setColor ( ( ( Color ) ( value ) ) ) ; } viewer . setSelection ( null ) ; } if ( element instanceof ComboNode ) { ComboNode node = ( ( ComboNode ) ( element ) ) ; node . setValue ( ( ( Integer ) ( value ) ) ) ; } if ( element instanceof ObjectNode ) { ObjectNode node = ( ( ObjectNode ) ( element ) ) ; <START_BUG> node . setValue ( ( ( String ) ( value ) ) ) ; <END_BUG> } viewer . refresh ( element ) ; } }

Fix:
node . setValue ( value . toString ( ) ) ;