nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CollectionHelper { private static final Logger LOG = Logger . getLogger ( CollectionHelper . class ) ; private EgBill bill ; public CollectionHelper ( ) { } public CollectionHelper ( EgBill bill ) { } public BillReceiptInfo executeCollection ( Payment payment , String source ) { } public BillReceiptInfo generateMiscReceipt ( Payment payment ) { } public BillReceiptInfo getReceiptInfo ( String receiptNumber ) { } private List < PaymentInfo > preparePaymentInfo ( Payment payment ) { } private BillInfoImpl prepareBillInfo ( BigDecimal amountPaid , COLLECTIONTYPE collType , String source ) { BillInfoImpl billInfoImpl = initialiseFromBill ( amountPaid , collType ) ; ArrayList < ReceiptDetail > receiptDetails = new ArrayList < ReceiptDetail > ( ) ; List < EgBillDetails > billDetails = new ArrayList < EgBillDetails > ( bill . getEgBillDetails ( ) ) ; Collections . sort ( billDetails ) ; for ( EgBillDetails billDet : billDetails ) { receiptDetails . add ( initReceiptDetail ( billDet . getGlcode ( ) , BigDecimal . ZERO , billDet . getCrAmount ( ) , billDet . getDrAmount ( ) , billDet . getDescription ( ) ) ) ; } <START_BUG> new PropertyTaxCollection ( ) . apportionPaidAmount ( String . valueOf ( bill . getId ( ) ) , amountPaid , receiptDetails ) ; <END_BUG> for ( EgBillDetails billDet : bill . getEgBillDetails ( ) ) { for ( ReceiptDetail rd : receiptDetails ) { if ( ( billDet . getGlcode ( ) . equals ( rd . getAccounthead ( ) . getGlcode ( ) ) ) && ( billDet . getDescription ( ) . equals ( rd . getDescription ( ) ) ) ) { BillAccountDetails billAccDetails = new BillAccountDetails ( billDet . getGlcode ( ) , billDet . getOrderNo ( ) , rd . getCramount ( ) , rd . getDramount ( ) , billDet . getFunctionCode ( ) , billDet . getDescription ( ) , null ) ; billInfoImpl . getPayees ( ) . get ( 0 ) . getBillDetails ( ) . get ( 0 ) . addBillAccountDetails ( billAccDetails ) ; break ; } } } billInfoImpl . setTransactionReferenceNumber ( bill . getTransanctionReferenceNumber ( ) ) ; billInfoImpl . setSource ( ( source != null ? source : "" ) ) ; return billInfoImpl ; } private BillInfoImpl initialiseFromBill ( BigDecimal amountPaid , COLLECTIONTYPE collType ) { } private ReceiptDetail initReceiptDetail ( String glCode , BigDecimal crAmount , BigDecimal crAmountToBePaid , BigDecimal drAmount , String description ) { } private PaymentInfoCard prepareCardPaymentInfo ( CreditCardPayment cardPayment , PaymentInfoCard paymentInfoCard ) { } private boolean isCollectionPermitted ( ) { } private boolean thereIsBalanceToBePaid ( ) { } private boolean thereIsCurrentBalanceToBePaid ( ) { } private void preventSessionSaveOrUpdate ( ) { } EgBill getBill ( ) { } void setBill ( EgBill bill ) { } }

Fix:
SpringBeanUtil . getPropertyTaxCollection ( ) . apportionPaidAmount ( String . valueOf ( bill . getId ( ) ) , amountPaid , receiptDetails ) ;
Buggy code:
public class SpaceShipController extends UnitController implements MovableUnitController { public SpaceShipController ( final Game parentGame ) { } @ Override public void move ( ) { } @ SuppressWarnings ( "checkstyle:magicnumber" ) public final void moveSpaceShip ( final ArrayList < KeyCode > pressedKeys ) { double velX = ( game . getPlayer ( ) . getSpaceShip ( ) . getVelX ( ) ) * 0.98 ; SpaceShip playership = game . getPlayer ( ) . getSpaceShip ( ) ; if ( ( ( ( playership . getXCoor ( ) ) - ( 0.5 * ( playership . getWidth ( ) ) ) ) <= 0 ) && ( velX < 0 ) ) { velX *= - 1 ; } else if ( ( ( ( game . getPlayer ( ) . getSpaceShip ( ) . getXCoor ( ) ) + ( 0.5 * ( playership . getWidth ( ) ) ) ) >= ( game . getCanvasWidth ( ) ) ) && ( velX > 0 ) ) { velX *= - 1 ; } if ( ( ( ( game . getPlayer ( ) . getSpaceShip ( ) . getXCoor ( ) ) - ( 0.5 * ( game . getPlayer ( ) . getSpaceShip ( ) . getWidth ( ) ) ) ) > 0 ) && ( pressedKeys . contains ( KeyCode . A ) ) ) { velX = velX - ( ( ( SpaceShip . MAXVELX ) * ( game . getTickrate ( ) ) ) * 2 ) ; } if ( ( ( ( game . getPlayer ( ) . getSpaceShip ( ) . getXCoor ( ) ) + ( 0.5 * ( game . getPlayer ( ) . getSpaceShip ( ) . getWidth ( ) ) ) ) < ( game . getCanvasWidth ( ) ) ) && ( pressedKeys . contains ( KeyCode . D ) ) ) { velX = velX + ( ( ( SpaceShip . MAXVELX ) * ( game . getTickrate ( ) ) ) * 2 ) ; } if ( velX > ( SpaceShip . MAXVELX ) ) { velX = SpaceShip . MAXVELX ; } else if ( velX < ( - ( SpaceShip . MAXVELX ) ) ) { velX = - ( SpaceShip . MAXVELX ) ; } game . getPlayer ( ) . getSpaceShip ( ) . setVelX ( velX ) ; <START_BUG> game . getPlayer ( ) . getSpaceShip ( ) . moveUnit ( game . getTickrate ( ) ) ; <END_BUG> if ( velX != 0 ) { game . getLogger ( ) . log ( ( "Player<seq2seq4repair_space>moved<seq2seq4repair_space>X:<seq2seq4repair_space>" + velX ) , TRACE ) ; } } @ Override public void create ( ) { } }

Fix:
game . getPlayer ( ) . getSpaceShip ( ) . move ( game . getTickrate ( ) ) ;
Buggy code:
public class BigInventoryPlayer extends InventoryPlayer { @ SideOnly ( Side . CLIENT ) private ItemStack currentItemStack ; public BigInventoryPlayer ( EntityPlayer player ) { } public int getUnlockedSlots ( ) { <START_BUG> int unlocked = ( ( II_Settings . unlockedSlots ) + 9 ) + ( this . player . getEntityData ( ) . getInteger ( "INFINITE_INVO_UNLOCKED" ) ) ; <END_BUG> unlocked = ( unlocked <= ( this . mainInventory . length ) ) ? unlocked : this . mainInventory . length ; return unlocked ; } private int func_146029_c ( Item p_146029_1_ ) { } private int storeItemStack ( ItemStack p_70432_1_ ) { } @ Override public int getFirstEmptyStack ( ) { } @ SideOnly ( Side . CLIENT ) private int func_146024_c ( Item p_146024_1_ , int p_146024_2_ ) { } @ SideOnly ( Side . CLIENT ) @ Override public void func_146030_a ( Item p_146030_1_ , int p_146030_2_ , boolean p_146030_3_ , boolean p_146030_4_ ) { } @ SideOnly ( Side . CLIENT ) @ Override public void func_70439_a ( Item p_70439_1_ , int p_70439_2_ ) { } private int storePartialItemStack ( ItemStack p_70452_1_ ) { } @ Override public boolean addItemStackToInventory ( final ItemStack p_70441_1_ ) { } public NBTTagList writeToNBT ( NBTTagList p_70442_1_ ) { } @ Override public void readFromNBT ( NBTTagList p_70443_1_ ) { } }

Fix:
int unlocked = ( II_Settings . xpUnlock ) ? ( ( II_Settings . unlockedSlots ) + 9 ) + ( this . player . getEntityData ( ) . getInteger ( "INFINITE_INVO_UNLOCKED" ) ) : this . mainInventory . length ;
Buggy code:
public class MultiCommentRegion extends CommentRegion implements IJavaDocTagConstants { private final boolean fIndentDescriptions ; private final boolean fIndentRoots ; private final boolean fParameterNewLine ; private boolean fSeparateRoots ; public MultiCommentRegion ( final IDocument document , final Position position , final CodeFormatterVisitor formatter ) { } protected boolean canAppend ( final CommentLine line , final CommentRange previous , final CommentRange next , final int index , int count ) { } protected String getDelimiter ( CommentLine predecessor , CommentLine successor , CommentRange previous , CommentRange next , String indentation ) { final String delimiter = super . getDelimiter ( predecessor , successor , previous , next , indentation ) ; if ( previous != null ) { if ( ( ( previous . hasAttribute ( ( ( COMMENT_IMMUTABLE ) | ( COMMENT_SEPARATOR ) ) ) ) && ( ! ( next . hasAttribute ( COMMENT_CODE ) ) ) ) && ( ! ( successor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) return delimiter + delimiter ; else if ( ( ( next . hasAttribute ( ( ( COMMENT_IMMUTABLE ) | ( COMMENT_SEPARATOR ) ) ) ) && ( ! ( successor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) && ( ! ( predecessor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) return delimiter + delimiter ; else if ( ( ( ( fSeparateRoots ) && ( previous . hasAttribute ( COMMENT_PARAGRAPH ) ) ) && ( ! ( successor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) && ( ! ( predecessor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) return delimiter + delimiter ; else if ( ( ( ( fIndentRoots ) && ( ! ( predecessor . hasAttribute ( COMMENT_ROOT ) ) ) ) && ( ! ( predecessor . hasAttribute ( COMMENT_PARAMETER ) ) ) ) && ( ! ( predecessor . hasAttribute ( COMMENT_BLANKLINE ) ) ) ) <START_BUG> return delimiter + ( stringToIndent ( predecessor . getIndentationReference ( ) , false ) ) ; <END_BUG> } return delimiter ; } protected String getDelimiter ( final CommentRange previous , final CommentRange next ) { } protected final boolean isIndentDescriptions ( ) { } protected final boolean isIndentRoots ( ) { } protected void markHtmlRanges ( ) { } protected void markHtmlTag ( final CommentRange range , final String token ) { } protected void markJavadocTag ( final CommentRange range , final String token ) { } protected void markRegion ( ) { } protected CommentLine createLine ( ) { } }

Fix:
return delimiter + ( stringToIndent ( predecessor . getIndentationReference ( ) ) ) ;
Buggy code:
public class SegmentCacheHazelcast implements SegmentCache { private static final String MAP = "mondrian" ; private static final IMap < SegmentHeader , SegmentBody > cache = Hazelcast . getMap ( SegmentCacheHazelcast . MAP ) ; private static final ExecutorService executor = Util . getExecutorService ( 1 , "mondrian.rolap.agg.MockSegmentCache$ExecutorThread" ) ; @ Override public Future < SegmentBody > get ( final SegmentHeader header ) { } @ Override public Future < Boolean > contains ( final SegmentHeader header ) { } @ Override public Future < List < SegmentHeader > > getSegmentHeaders ( ) { } @ Override public Future < Boolean > put ( final SegmentHeader header , final SegmentBody body ) { return SegmentCacheHazelcast . executor . submit ( new Callable < Boolean > ( ) { @ Override public Boolean call ( ) throws Exception { <START_BUG> SegmentBody b = SegmentCacheHazelcast . cache . put ( header , body ) ; <END_BUG> return true ; } } ) ; } @ Override public Future < Boolean > remove ( final SegmentHeader header ) { } @ Override public Future < Boolean > flush ( final ConstrainedColumn [ ] region ) { } @ Override public void tearDown ( ) { } }

Fix:
SegmentCacheHazelcast . cache . put ( header , body ) ;
Buggy code:
public class JMSQueueService implements Service < Void > { private final InjectedValue < JMSServerManager > jmsServer = new InjectedValue < JMSServerManager > ( ) ; private final String queueName ; private final String selectorString ; private final boolean durable ; private final String [ ] jndi ; public JMSQueueService ( final String queueName , String selectorString , boolean durable , String [ ] jndi ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { final JMSServerManager jmsManager = jmsServer . getValue ( ) ; try { <START_BUG> jmsManager . destroyQueue ( queueName ) ; <END_BUG> } catch ( Exception e ) { MessagingLogger . MESSAGING_LOGGER . failedToDestroy ( e , "queue" , queueName ) ; } } public Void getValue ( ) throws IllegalStateException { } public InjectedValue < JMSServerManager > getJmsServer ( ) { } }

Fix:
jmsManager . removeQueueFromJNDI ( queueName ) ;
Buggy code:
public class PodcastSlidingUpPanelLayout extends SlidingUpPanelLayout { public PodcastSlidingUpPanelLayout ( Context context ) { } public PodcastSlidingUpPanelLayout ( Context context , AttributeSet attrs ) { } public PodcastSlidingUpPanelLayout ( Context context , AttributeSet attrs , int defStyle ) { } @ Override public boolean onInterceptTouchEvent ( MotionEvent ev ) { } private View mDragView ; private View mSlideableView ; public void setSlideableView ( View view ) { } @ Override public void setDragView ( View dragView ) { } private boolean isDragViewHit ( int x , int y ) { <START_BUG> View v = ( isPanelExpanded ( ) ) ? mDragView : mSlideableView ; <END_BUG> if ( v == null ) return false ; int [ ] viewLocation = new int [ 2 ] ; v . getLocationOnScreen ( viewLocation ) ; int [ ] parentLocation = new int [ 2 ] ; this . getLocationOnScreen ( parentLocation ) ; int screenX = ( parentLocation [ 0 ] ) + x ; int screenY = ( parentLocation [ 1 ] ) + y ; return ( ( ( screenX >= ( viewLocation [ 0 ] ) ) && ( screenX < ( ( viewLocation [ 0 ] ) + ( v . getWidth ( ) ) ) ) ) && ( screenY >= ( viewLocation [ 1 ] ) ) ) && ( screenY < ( ( viewLocation [ 1 ] ) + ( v . getHeight ( ) ) ) ) ; } public static void expand ( final View v ) { } public static void collapse ( final View v ) { } }

Fix:
View v = ( getPanelState ( ) . equals ( EXPANDED ) ) ? mDragView : mSlideableView ;
Buggy code:
public class Types { protected static Localizer _loc = Localizer . forPackage ( Types . class ) ; abstract static class BaseType < X > implements Type < X > { public final Class < X > cls ; protected BaseType ( Class < X > cls ) { } public final Class < X > getJavaType ( ) { } public String toString ( ) { } } public static class Basic < X > extends Types . BaseType < X > implements Type < X > { public Basic ( Class < X > cls ) { } public PersistenceType getPersistenceType ( ) { } } public abstract static class Identifiable < X > extends AbstractManagedType < X > implements IdentifiableType < X > { public Identifiable ( ClassMetaData meta , MetamodelImpl model ) { } public boolean hasVersionAttribute ( ) { } public IdentifiableType < ? super X > getSupertype ( ) { <START_BUG> return ( ( IdentifiableType < ? super X > ) ( model . type ( meta . getPCSuperclassMetaData ( ) . getDescribedType ( ) ) ) ) ; <END_BUG> } public boolean hasIdAttribute ( ) { } public boolean hasSingleIdAttribute ( ) { } public Type < ? > getIdType ( ) { } } public static class Embeddable < X > extends AbstractManagedType < X > implements EmbeddableType < X > { public Embeddable ( ClassMetaData meta , MetamodelImpl model ) { } public PersistenceType getPersistenceType ( ) { } } public static class MappedSuper < X > extends Types . Identifiable < X > implements MappedSuperclassType < X > { public MappedSuper ( ClassMetaData meta , MetamodelImpl model ) { } public PersistenceType getPersistenceType ( ) { } } public static class Entity < X > extends Types . Identifiable < X > implements EntityType < X > { public Entity ( ClassMetaData meta , MetamodelImpl model ) { } public PersistenceType getPersistenceType ( ) { } public String getName ( ) { } public BindableType getBindableType ( ) { } public Class < X > getBindableJavaType ( ) { } } public static class PseudoEntity < X > extends AbstractManagedType < X > { protected PseudoEntity ( Class < X > cls , MetamodelImpl model ) { } public javax . persistence . metamodel . Type . PersistenceType getPersistenceType ( ) { } } }

Fix:
return ( ( IdentifiableType < ? super X > ) ( model . managedType ( meta . getPCSuperclassMetaData ( ) . getDescribedType ( ) ) ) ) ;
Buggy code:
class TableModelStateByProps extends TableModelComposite { public TableModelStateByProps ( ) { } public void initColumns ( ) { } public Vector rowObjectsFor ( Object t ) { System . out . println ( ( "rowObjectsFor<seq2seq4repair_space>" + t ) ) ; if ( ! ( t instanceof UMLStateDiagram ) ) return new Vector ( ) ; UMLStateDiagram d = ( ( UMLStateDiagram ) ( t ) ) ; <START_BUG> Vector nodes = d . getGraphModel ( ) . getNodes ( ) ; <END_BUG> Vector res = new Vector ( ) ; int size = nodes . size ( ) ; for ( int i = 0 ; i < size ; i ++ ) { Object node = nodes . elementAt ( i ) ; if ( node instanceof StateVertex ) res . addElement ( node ) ; } return res ; } public String toString ( ) { } }

Fix:
Vector nodes = d . getNodes ( ) ;
Buggy code:
public class PSOMain implements Constants { private static int numRuns = 3 ; public static void main ( String [ ] Args ) { } private static void runStandardTests ( ) { double [ ] functionMeans = new double [ functions . length ] ; double [ ] functionDeviations = new double [ functions . length ] ; int count = 0 ; for ( String function : functions ) { double [ ] [ ] results = new double [ PSOMain . numRuns ] [ numIterations ] ; double [ ] averagedConvData = new double [ numIterations ] ; double [ ] finalRow = new double [ PSOMain . numRuns ] ; for ( int j = 0 ; j < ( PSOMain . numRuns ) ; j ++ ) { <START_BUG> vonNeuPSO g = new vonNeuPSO ( function ) ; <END_BUG> g . initialise ( ) ; results [ j ] = g . execute ( ) ; } for ( int i = 0 ; i < ( numIterations ) ; i ++ ) { double [ ] oneRowData = new double [ PSOMain . numRuns ] ; for ( int k = 0 ; k < ( PSOMain . numRuns ) ; k ++ ) { oneRowData [ k ] = results [ k ] [ i ] ; } averagedConvData [ i ] = PSOMain . getAverage ( oneRowData ) ; finalRow = oneRowData ; } functionMeans [ count ] = PSOMain . getAverage ( finalRow ) ; functionDeviations [ count ] = PSOMain . getStdDev ( finalRow , functionMeans [ count ] ) ; PSOMain . toConvergenceFile ( averagedConvData , function ) ; System . out . println ( ( "Finished<seq2seq4repair_space>" + function ) ) ; count ++ ; } PSOMain . toMeanDevFile ( functionMeans , functionDeviations ) ; } private static void toMeanDevFile ( double [ ] means , double [ ] devs ) { } private static void toConvergenceFile ( double [ ] averagedConvData , String function ) { } private static double getAverage ( double [ ] arr ) { } private static double getStdDev ( double [ ] data , double mean ) { } private static double getProportion ( double [ ] data ) { } }

Fix:
lBestPSO g = new lBestPSO ( function ) ;
Buggy code:
public class DataProcessorServerApplication implements IApplication { private static final String LB_SERVER_CONTAINER_TYPE = "ecf.jms.activemq.tcp.lb.server" ; private static final String DEFAULT_QUEUE_ID = "tcp:////localhost:61616//exampleQueue" ; private BundleContext bundleContext ; private ServiceTracker containerManagerServiceTracker ; private String containerType = DataProcessorServerApplication . LB_SERVER_CONTAINER_TYPE ; private String queueId = DataProcessorServerApplication . DEFAULT_QUEUE_ID ; private IContainer container ; private DataProcessorImpl dataProcessorImpl ; private IRemoteServiceRegistration dataProcessorRemoteServiceRegistration ; public Object start ( IApplicationContext appContext ) throws Exception { } public void stop ( ) { if ( ( dataProcessorRemoteServiceRegistration ) != null ) { dataProcessorRemoteServiceRegistration . unregister ( ) ; dataProcessorRemoteServiceRegistration = null ; } if ( ( dataProcessorImpl ) != null ) { dataProcessorImpl . stop ( ) ; dataProcessorImpl = null ; } if ( ( container ) != null ) { container . dispose ( ) ; container = null ; getContainerManagerService ( ) . removeAllContainers ( ) ; } if ( ( containerManagerServiceTracker ) != null ) { containerManagerServiceTracker . close ( ) ; containerManagerServiceTracker = null ; } bundleContext = null ; synchronized ( appLock ) { done = true ; <START_BUG> notifyAll ( ) ; <END_BUG> } } private void processArgs ( IApplicationContext appContext ) { } private IContainerManager getContainerManagerService ( ) { } private final Object appLock = new Object ( ) ; private boolean done = false ; private void waitForDone ( ) { } }

Fix:
appLock . notifyAll ( ) ;
Buggy code:
public class SessionBeanXmlDescriptorProcessor extends AbstractEjbXmlDescriptorProcessor < SessionBeanMetaData > { private static final Logger logger = Logger . getLogger ( SessionBeanXmlDescriptorProcessor . class ) ; @ Override protected Class < SessionBeanMetaData > getMetaDataType ( ) { } @ Override protected void processBeanMetaData ( SessionBeanMetaData sessionBean , DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void processSessionBean31 ( SessionBean31MetaData sessionBean31MetaData , SessionBeanComponentDescription sessionBeanComponentDescription ) { } private void processSingletonBean ( SessionBean31MetaData singletonBeanMetaData , SingletonComponentDescription singletonComponentDescription ) { } private EJBMethodDescription getEJBMethodDescription ( NamedMethodMetaData namedMethodMetaData ) { if ( namedMethodMetaData == null ) { return null ; } String methodName = namedMethodMetaData . getMethodName ( ) ; MethodParametersMetaData methodParams = namedMethodMetaData . getMethodParams ( ) ; if ( methodParams == null ) { <START_BUG> return new EJBMethodDescription ( methodName , null ) ; <END_BUG> } return new EJBMethodDescription ( methodName , methodParams . toArray ( new String [ methodParams . size ( ) ] ) ) ; } }

Fix:
return new EJBMethodDescription ( methodName , ( ( String [ ] ) ( null ) ) ) ;
Buggy code:
public class FileUploadField extends FormComponent { private FileUpload fileUpload ; private boolean hasExplicitModel ; public FileUploadField ( final String id ) { } public FileUploadField ( final String id , IModel model ) { } public FileUpload getFileUpload ( ) { final Request request = getRequest ( ) ; if ( request instanceof MultipartWebRequest ) { <START_BUG> final FileItem item = ( ( MultipartWebRequest ) ( request ) ) . getFile ( getPath ( ) ) ; <END_BUG> if ( ( item != null ) && ( ( item . getSize ( ) ) > 0 ) ) { return new FileUpload ( item ) ; } } return null ; } public Component setModel ( IModel model ) { } public void updateModel ( ) { } public boolean isMultiPart ( ) { } protected void onComponentTag ( ComponentTag tag ) { } protected boolean supportsPersistence ( ) { } }

Fix:
final FileItem item = ( ( MultipartWebRequest ) ( request ) ) . getFile ( getInputName ( ) ) ;
Buggy code:
public class GSTAbstractClass { public String Grundschutz = "IT-Grundschutz" ; public String SecurityCheck = "Security<seq2seq4repair_space>Check" ; public String InventoryAnalysis = "Inventory<seq2seq4repair_space>Analysis" ; public String SecurityAnalysis = "Security<seq2seq4repair_space>Analysis" ; public String UserAdministration = "User<seq2seq4repair_space>Administration" ; public String RoleAdministration = "Role<seq2seq4repair_space>Administration" ; public String normal = "normal" ; public String high = "high" ; public String veryHigh = "very<seq2seq4repair_space>high" ; @ BeforeClass public static void setUpClass ( ) throws Exception { String URL = ( Property_Loader . loadProperty ( "site.url" ) ) + "//targetObject.jsf" ; System . out . println ( URL ) ; <START_BUG> Configuration . browser = "chrome" ; <END_BUG> open ( URL ) ; if ( $ ( By . xpath ( ".////*[@id='loginForm']//table" ) ) . exists ( ) ) { Login . LoginProperly ( ) ; } $ ( "#closeChangeSafetyConcept" ) . waitUntil ( enabled , 10000 ) . click ( ) ; $ ( "#changeSafetyConceptPanelHeader" ) . waitUntil ( disappear , 8000 ) ; if ( $ ( "#changeSafetyConceptPanelHeader" ) . isDisplayed ( ) ) { $ ( "closeChangeSafetyConcept" ) . click ( ) ; } } @ AfterClass public static void tearDownClass ( ) { } }

Fix:
Configuration . browser = Property_Loader . loadProperty ( "browser.name" ) ;
Buggy code:
public class CodeSnippetQualifiedNameReference extends QualifiedNameReference implements InvocationSite , ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetQualifiedNameReference ( char [ ] [ ] sources , int sourceStart , int sourceEnd , EvaluationContext evaluationContext ) { } public TypeBinding checkFieldAccess ( BlockScope scope ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( ( constant ) != ( NotAConstant ) ) { if ( valueRequired ) { codeStream . generateConstant ( constant , implicitConversion ) ; } } else { generateReadSequence ( currentScope , codeStream , valueRequired ) ; if ( valueRequired ) { if ( ( lastFieldBinding . declaringClass ) == null ) { codeStream . arraylength ( ) ; codeStream . generateImplicitConversion ( implicitConversion ) ; } else { if ( ( lastFieldBinding . constant ) != ( NotAConstant ) ) { codeStream . generateConstant ( lastFieldBinding . constant , implicitConversion ) ; } else { if ( lastFieldBinding . canBeSeenBy ( getReceiverType ( currentScope ) , this , currentScope ) ) { if ( lastFieldBinding . isStatic ( ) ) { codeStream . getstatic ( lastFieldBinding ) ; } else { codeStream . getfield ( lastFieldBinding ) ; } } else { ( ( CodeSnippetCodeStream ) ( codeStream ) ) . generateEmulatedReadAccessForField ( lastFieldBinding ) ; } codeStream . generateImplicitConversion ( implicitConversion ) ; } } } } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void generateReadSequence ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateReceiver ( CodeStream codeStream ) { } public TypeBinding getOtherFieldBindings ( BlockScope scope ) { } public TypeBinding getReceiverType ( BlockScope currentScope ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope , FieldBinding fieldBinding , int index ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope , FieldBinding fieldBinding ) { } public TypeBinding reportError ( BlockScope scope ) { } public TypeBinding resolveTypeVisibility ( BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class SqrOsc implements SoundObject { PApplet parent ; private Engine m_engine ; private int [ ] m_nodeId = new int [ ] { - 1 , - 1 } ; private float m_freq = 440 ; private float m_amp = 0.5F ; private float m_add = 0 ; private float m_pos = 0 ; public SqrOsc ( PApplet theParent ) { } public void play ( ) { } public void play ( float freq , float amp , float add , float pos ) { } public void play ( float freq , float amp , float add ) { } public void play ( float freq , float amp ) { } public void play ( float freq ) { } private void set ( ) { if ( ( m_nodeId [ 0 ] ) != ( - 1 ) ) { <START_BUG> m_engine . sqrSet ( m_freq , m_amp , m_add , m_pos , m_nodeId ) ; <END_BUG> } } public void set ( float freq , float amp , float add , float pos ) { } public void freq ( float freq ) { } public void amp ( float amp ) { } public void add ( float add ) { } public void pan ( float pos ) { } public void stop ( ) { } public int [ ] returnId ( ) { } public void dispose ( ) { } }

Fix:
m_engine . sqrSet ( m_freq , m_amp , ( ( m_add ) - 1 ) , m_pos , m_nodeId ) ;
Buggy code:
public class ToursActivity extends BaseActivity implements BaseDialogListener { private List < PilotTour > pilotTours ; BaseInfoDialog noConectionDialog ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onBackPressed ( ) { } public void fillUp ( ) { } public void btlogOutClick ( View view ) { } public void btStartSyncClick ( View view ) { } private void logoutWorker ( ) { } private Boolean isDoneItemsPresent ( ) { <START_BUG> String doneItems = ConnectionAsyncTask . getDoneStr ( ) ; <END_BUG> if ( doneItems == "" ) return true ; BaseInfoDialog dialog = new BaseInfoDialog ( getString ( attention ) , getString ( dialog_do_sync ) ) ; dialog . show ( getSupportFragmentManager ( ) , "dialogDoSync" ) ; return false ; } private void logOut ( ) { } private void fillUpTitle ( ) { } private void reloadData ( ) { } private void saveSelectedTour ( PilotTour pilotTour ) { } private void clearPersonalOptions ( ) { } @ Override public void onDialogPositiveClick ( DialogFragment dialog ) { } @ Override public void onDialogNegativeClick ( DialogFragment dialog ) { } private void clearDatabase ( ) { } private void clearDB ( ) { } private boolean isMyServiceRunning ( Class < ? > serviceClass ) { } }

Fix:
String doneItems = ConnectionAsyncTask . getDoneStr ( false ) ;
Buggy code:
public class WebParsingDeploymentProcessor implements DeploymentUnitProcessor { private static final String WEB_XML = "WEB-INF//web.xml" ; public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; if ( ! ( WarDeploymentMarker . isWarDeployment ( deploymentUnit ) ) ) { return ; } final ResourceRoot deploymentRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) ; final VirtualFile webXml = deploymentRoot . getRoot ( ) . getChild ( WebParsingDeploymentProcessor . WEB_XML ) ; <START_BUG> WarMetaData warMetaData = deploymentRoot . getAttachment ( ATTACHMENT_KEY ) ; <END_BUG> assert warMetaData != null ; if ( webXml . exists ( ) ) { InputStream is = null ; try { is = webXml . openStream ( ) ; final XMLInputFactory inputFactory = XMLInputFactory . newInstance ( ) ; inputFactory . setXMLResolver ( NoopXmlResolver . create ( ) ) ; XMLStreamReader xmlReader = inputFactory . createXMLStreamReader ( is ) ; warMetaData . setWebMetaData ( WebMetaDataParser . parse ( xmlReader ) ) ; } catch ( Exception e ) { throw new DeploymentUnitProcessingException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>" + webXml ) , e ) ; } finally { try { if ( is != null ) { is . close ( ) ; } } catch ( IOException e ) { } } } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
WarMetaData warMetaData = deploymentUnit . getAttachment ( ATTACHMENT_KEY ) ;
Buggy code:
public class ServiceMBeanSupport extends NotificationBroadcasterSupport implements MBeanRegistration , ServiceMBean { protected Logger log ; protected MBeanServer server ; protected ObjectName serviceName ; private int state = UNREGISTERED ; private final AtomicLong sequenceNumber = new AtomicLong ( 0 ) ; private boolean createIgnored = false ; private boolean startIgnored = false ; private boolean stopIgnored = false ; private boolean destroyIgnored = false ; private boolean unregisterIgnored = false ; public ServiceMBeanSupport ( ) { } public ServiceMBeanSupport ( final Class < ? > type ) { } public ServiceMBeanSupport ( final String category ) { } public ServiceMBeanSupport ( final Logger log ) { } public String getName ( ) { } public ObjectName getServiceName ( ) { } public MBeanServer getServer ( ) { } public int getState ( ) { } public String getStateString ( ) { } public Logger getLog ( ) { } public void create ( ) throws Exception { } public void start ( ) throws Exception { } public void stop ( ) { } public void destroy ( ) { } protected String jbossInternalDescription ( ) { } public void jbossInternalLifecycle ( String method ) throws Exception { } protected void jbossInternalCreate ( ) throws Exception { } protected void jbossInternalStart ( ) throws Exception { } protected void jbossInternalStop ( ) { } protected void jbossInternalDestroy ( ) { } public ObjectName preRegister ( MBeanServer server , ObjectName name ) throws Exception { } public void postRegister ( Boolean registrationDone ) { if ( ! ( registrationDone . booleanValue ( ) ) ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "Registration<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>done<seq2seq4repair_space>-><seq2seq4repair_space>stop" ) ; } stop ( ) ; } else { state = REGISTERED ; if ( createIgnored ) { try { create ( ) ; } catch ( Exception e ) { <START_BUG> log . error ( ROOT_LOGGER . postRegisterInitializationFailed ( ) , e ) ; <END_BUG> } } } } public void preDeregister ( ) throws Exception { } public void postDeregister ( ) { } protected ObjectName getObjectName ( MBeanServer server , ObjectName name ) throws MalformedObjectNameException { } protected void createService ( ) throws Exception { } protected void startService ( ) throws Exception { } protected void stopService ( ) throws Exception { } protected void destroyService ( ) throws Exception { } public long nextNotificationSequenceNumber ( ) { } protected long getNextNotificationSequenceNumber ( ) { } private void sendStateChangeNotification ( int oldState , int newState , String msg , Throwable t ) { } }

Fix:
log . error ( e ) ;
Buggy code:
@ JawrSpringTestConfigFiles ( webXml = "net//jawr//web//standard//config//web-without-img-servlet.xml" , jawrConfig = "net//jawr//web//standard//config//jawr-without-img-servlet.properties" , dispatcherServletConfig = "net//jawr//web//standard//config//dispatcherWithOutImgServlet-servlet.xml" ) public class PageOnlyJsCssJawrServletTest extends AbstractSpringPageTest { protected String getPageUrl ( ) { } @ Test public void testPageLoad ( ) throws Exception { } @ Test public void checkGeneratedJsLinks ( ) { } @ Test public void testJsBundleContent ( ) throws Exception { } @ Test public void checkGeneratedCssLinks ( ) { final List < ? > styleSheets = getHtmlLinkTags ( ) ; assertEquals ( 1 , styleSheets . size ( ) ) ; final HtmlLink css = ( ( HtmlLink ) ( styleSheets . get ( 0 ) ) ) ; <START_BUG> assertEquals ( ( ( getUrlPrefix ( ) ) + "//spring//jawr//N762509788//fwk//core//component.css" ) , css . getHrefAttribute ( ) ) ; <END_BUG> } @ Test public void testCssBundleContent ( ) throws Exception { } }

Fix:
assertEquals ( ( ( getUrlPrefix ( ) ) + "//spring//jawr//N1529412158//fwk//core//component.css" ) , css . getHrefAttribute ( ) ) ;
Buggy code:
class RepositoryContext { private final File gitDirectory ; private boolean disposed ; Repository repository ; RepositoryContext ( File gitDirectory ) { } Repository getRepository ( ) { checkState ( ) ; <START_BUG> if ( ( repository ) == null ) { <END_BUG> create ( ) ; } return repository ; } void dispose ( ) { } boolean isDisposed ( ) { } private void create ( ) { } private void checkState ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( ( repository ) == null ) && ( ( gitDirectory ) != null ) ) {
Buggy code:
public class AccessAuthorizationDomainSlaveConfigHandler implements OperationStepHandler { public static final String OPERATION_NAME = "configure-from-domain" ; public static final OperationDefinition DEFINITION = new org . jboss . as . controller . SimpleOperationDefinitionBuilder ( AccessAuthorizationDomainSlaveConfigHandler . OPERATION_NAME , DomainManagementResolver . getResolver ( "core.access-control" ) ) . withFlag ( HOST_CONTROLLER_ONLY ) . setPrivateEntry ( ) . build ( ) ; private final DelegatingConfigurableAuthorizer configurableAuthorizer ; AccessAuthorizationDomainSlaveConfigHandler ( DelegatingConfigurableAuthorizer configurableAuthorizer ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { final ModelNode model = context . readResourceForUpdate ( EMPTY_ADDRESS ) . getModel ( ) ; <START_BUG> for ( AttributeDefinition ad : AccessAuthorizationResourceDefinition . ATTRIBUTES ) { <END_BUG> ad . validateAndSet ( operation , model ) ; } context . addStep ( new OperationStepHandler ( ) { @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { WritableAuthorizerConfiguration authorizerConfiguration = configurableAuthorizer . getWritableAuthorizerConfiguration ( ) ; ModelNode provider = PROVIDER . resolveModelAttribute ( context , model ) ; AccessAuthorizationProviderWriteAttributeHander . updateAuthorizer ( provider , configurableAuthorizer ) ; ModelNode combinationPolicy = PERMISSION_COMBINATION_POLICY . resolveModelAttribute ( context , model ) ; AccessAuthorizationCombinationPolicyWriteAttributeHandler . updateAuthorizer ( combinationPolicy , authorizerConfiguration ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } } , RUNTIME ) ; context . stepCompleted ( ) ; } }

Fix:
for ( AttributeDefinition ad : AccessAuthorizationResourceDefinition . CONFIG_ATTRIBUTES ) {
Buggy code:
public interface ProjectMapper { List < ProjectInterface > getProjects ( ) { } <START_BUG> Integer insertProject ( ProjectDetailsInterface project ) ; <END_BUG> ProjectDetailsInterface getProjectDetails ( Integer id ) { } void deleteProject ( Integer id ) { } }

Fix:
void insertProject ( ProjectDetailsInterface project ) ;
Buggy code:
public class MainActivity extends Activity { public static final String ARTICLE_LIST = "com.syw.hongyunhonghe.ARTICLE_LIST" ; private GridLayout magazinesLL ; private LinearLayout loadingBar ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void refreshMagazines ( ) { magazinesLL . removeAllViews ( ) ; loadingBar . setVisibility ( VISIBLE ) ; final DataModel dm = DataModel . getInstance ( getBaseContext ( ) ) ; dm . getMagazines ( new com . syw . hongyunhonghe . model . DataFoundListener < java . util . ArrayList < MagazineInfo > > ( ) { @ Override public void onSuccess ( java . util . ArrayList < MagazineInfo > magazineList ) { for ( final MagazineInfo magazineInfo : magazineList ) { LayoutInflater layoutInflater = getLayoutInflater ( ) ; LinearLayout mgzIconButton = ( ( LinearLayout ) ( layoutInflater . inflate ( image_button_with_text , magazinesLL , false ) ) ) ; TextView magazineTitleTextView = ( ( TextView ) ( mgzIconButton . findViewById ( label_text ) ) ) ; magazineTitleTextView . setText ( magazineInfo . getTitle ( ) ) ; magazineTitleTextView . setOnClickListener ( new MainActivity . MagazineOnClickListener ( magazineInfo ) ) ; final ImageButton coverImageButton = ( ( ImageButton ) ( mgzIconButton . findViewById ( image_button ) ) ) ; coverImageButton . setLayoutParams ( new LinearLayout . LayoutParams ( LayoutParams . WRAP_CONTENT , LayoutParams . WRAP_CONTENT ) ) ; coverImageButton . setOnClickListener ( new MainActivity . MagazineOnClickListener ( magazineInfo ) ) ; loadingBar . setVisibility ( GONE ) ; magazinesLL . addView ( mgzIconButton ) ; magazineInfo . getCover ( dm , new com . syw . hongyunhonghe . model . DataFoundListener < BmobFile > ( ) { @ Override public void onSuccess ( BmobFile imgFile ) { <START_BUG> imgFile . loadImage ( getBaseContext ( ) , coverImageButton ) ; <END_BUG> } @ Override public void onFail ( BmobFile object ) { } } ) ; } } @ Override public void onFail ( java . util . ArrayList < MagazineInfo > object ) { } } ) ; } private class MagazineOnClickListener implements View . OnClickListener { private MagazineInfo magazineInfo ; public MagazineOnClickListener ( MagazineInfo magazineInfo ) { } @ Override public void onClick ( View v ) { } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
imgFile . loadImageThumbnail ( getBaseContext ( ) , coverImageButton , 189 , 239 ) ;
Buggy code:
public class TestClassRunner extends Runner implements Filterable , Sortable { protected final Runner fEnclosedRunner ; private final Class < ? > fTestClass ; public TestClassRunner ( Class < ? > klass ) throws InitializationError { } public TestClassRunner ( Class < ? > klass , Runner runner ) throws InitializationError { } protected void validate ( MethodValidator methodValidator ) { <START_BUG> methodValidator . validateAllMethods ( ) ; <END_BUG> } @ Override public void run ( final RunNotifier notifier ) { } @ Override public Description getDescription ( ) { } public void filter ( Filter filter ) throws NoTestsRemainException { } public void sort ( Sorter sorter ) { } protected Class < ? > getTestClass ( ) { } }

Fix:
methodValidator . validateMethodsForDefaultRunner ( ) ;
Buggy code:
@ Retention ( RetentionPolicy . RUNTIME ) @ Target ( ElementType . TYPE ) public @ interface ServerSetup { <START_BUG> Class < ? extends ServerSetupTask > value ( ) ; <END_BUG> }

Fix:
Class < ? extends ServerSetupTask > [ ] value ( ) ;
Buggy code:
public class Translation { private int id = - 1 ; private Sentence source ; private String translation ; private List < Double > modelScores = null ; private double score ; private HyperGraph hypergraph ; private List < FeatureFunction > featureFunctions ; public Translation ( Sentence source , HyperGraph hypergraph , List < FeatureFunction > featureFunctions ) { } public HyperGraph hypergraph ( ) { } public Sentence getSourceSentence ( ) { } public int id ( ) { } public String translation ( ) { } public void print ( ) { if ( ( hypergraph ) != null ) { KBestExtractor kBestExtractor = new KBestExtractor ( JoshuaDecoder . symbolTable , JoshuaConfiguration . use_unique_nbest , JoshuaConfiguration . use_tree_nbest , JoshuaConfiguration . include_align_index , JoshuaConfiguration . add_combined_cost , false , true ) ; try { kBestExtractor . lazyKBestExtractOnHG ( hypergraph , this . featureFunctions , topN , id ( ) , ( ( BufferedWriter ) ( null ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } else { System . out . print ( ( ( ( ( id ( ) ) + "<seq2seq4repair_space>|||<seq2seq4repair_space>" ) + ( getSourceSentence ( ) . sentence ( ) ) ) + "<seq2seq4repair_space>|||<seq2seq4repair_space>" ) ) ; for ( FeatureFunction ff : featureFunctions ) System . out . print ( "<seq2seq4repair_space>0" ) ; <START_BUG> System . out . println ( "<seq2seq4repair_space>|||<seq2seq4repair_space>0.0\n" ) ; <END_BUG> } System . out . flush ( ) ; } public String toString ( ) { } }

Fix:
System . out . println ( "<seq2seq4repair_space>|||<seq2seq4repair_space>0.0" ) ;
Buggy code:
public class RandomUtils { @ SuppressWarnings ( "unused" ) private static final String TAG = RandomUtils . class . getSimpleName ( ) ; private static final Random mRandom ; private RandomUtils ( ) { } public static int randomInt ( int maximum ) { } public static int randomInt ( int minimum , int maximum ) { } public static long randomLong ( long maximum ) { <START_BUG> return ( ( long ) ( RandomUtils . mRandom . nextFloat ( ) ) ) * maximum ; <END_BUG> } public static long randomLong ( long minimum , long maximum ) { } public static float randomFloat ( float maximum ) { } public static float randomFloat ( float minimum , float maximum ) { } public static double randomDouble ( double maximum ) { } public static double randomDouble ( double minimum , double maximum ) { } No newline ; at end ; of file ; }

Fix:
return ( ( long ) ( ( RandomUtils . mRandom . nextDouble ( ) ) * maximum ) ) ;
Buggy code:
public class GoInteractionMessages implements TreeModelPrereqs { public String toString ( ) { <START_BUG> return Localizer . localize ( "Tree" , "Interaction->Messages" ) ; <END_BUG> } public Object getRoot ( ) { } public void setRoot ( Object r ) { } public Object getChild ( Object parent , int index ) { } public int getChildCount ( Object parent ) { } public int getIndexOfChild ( Object parent , Object child ) { } public Vector getChildren ( Object parent ) { } public boolean isLeaf ( Object node ) { } public void valueForPathChanged ( TreePath path , Object newValue ) { } public void addTreeModelListener ( TreeModelListener l ) { } public void removeTreeModelListener ( TreeModelListener l ) { } public Vector getPrereqs ( ) { } public Vector getProvidedTypes ( ) { } }

Fix:
return Localizer . localize ( "Tree" , "misc.interaction.messages" ) ;
Buggy code:
public class ContactGenerator { private static ContactGenerator instance = new ContactGenerator ( ) ; private static long nextId = 1 ; public static ContactGenerator getInstance ( ) { } private String [ ] firstNames = new String [ ] { "Jacob" , "Emily" , "Michael" , "Sarah" , "Matthew" , "Brianna" , "Nicholas" , "Samantha" , "Christopher" , "Hailey" , "Abner" , "Abby" , "Joshua" , "Douglas" , "Jack" , "Keith" , "Gerald" , "Samuel" , "Willie" , "Larry" , "Jose" , "Timothy" , "Sandra" , "Kathleen" , "Pamela" , "Virginia" , "Debra" , "Maria" , "Linda" } ; private String [ ] lastNames = new String [ ] { "Smiith" , "Johnson" , "Williams" , "Jones" , "Brown" , "Donahue" , "Bailey" , "Rose" , "Allen" , "Black" , "Davis" , "Clark" , "Hall" , "Lee" , "Baker" , "Gonzalez" , "Nelson" , "Moore" , "Wilson" , "Graham" , "Fisher" , "Cruz" , "Ortiz" , "Gomez" , "Murray" } ; private ContactGenerator ( ) { } public synchronized long generateId ( ) { } public Contact generate ( ) { } public void generate ( Collection collection , int count ) { } private String generatePhoneNumber ( ) { <START_BUG> return new StringBuffer ( ) . append ( rint ( 2 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( "-555-" ) . append ( rint ( 1 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . toString ( ) ; <END_BUG> } private int rint ( int min , int max ) { } private String randomString ( String [ ] choices ) { } }

Fix:
return new StringBuilder ( ) . append ( rint ( 2 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( "-555-" ) . append ( rint ( 1 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . append ( rint ( 0 , 9 ) ) . toString ( ) ;
Buggy code:
public abstract class EmbedValueHandler extends AbstractValueHandler { private static final Localizer _loc = Localizer . forPackage ( EmbedValueHandler . class ) ; protected void map ( ValueMapping vm , String name , ColumnIO io , boolean adapt , List cols , List args ) { } protected Object toDataStoreValue ( OpenJPAStateManager em , ValueMapping vm , JDBCStore store , Column [ ] cols , Object rval , int idx ) { } protected int toDataStoreValue1 ( OpenJPAStateManager em , ValueMapping vm , JDBCStore store , Column [ ] cols , List rvals , int idx ) { } protected void toObjectValue ( OpenJPAStateManager em , ValueMapping vm , Object val , JDBCStore store , JDBCFetchConfiguration fetch , Column [ ] cols , int idx ) throws SQLException { } protected int toObjectValue1 ( OpenJPAStateManager em , ValueMapping vm , Object val , JDBCStore store , JDBCFetchConfiguration fetch , Column [ ] cols , int idx ) throws SQLException { } private Column [ ] getColumns ( FieldMapping fm ) { } public static void getEmbeddedIdCols ( FieldMapping fmd , List cols ) { ClassMapping embed = fmd . getEmbeddedMapping ( ) ; FieldMapping [ ] fmds = embed . getFieldMappings ( ) ; for ( int i = 0 ; i < ( fmds . length ) ; i ++ ) { if ( ( fmds [ i ] . getValue ( ) . getEmbeddedMetaData ( ) ) == null ) { EmbedValueHandler . getIdColumns ( fmds [ i ] , cols ) ; } else { <START_BUG> EmbedValueHandler . getEmbeddedIdCols ( fmd , cols ) ; <END_BUG> } } } public static void getIdColumns ( FieldMapping fmd , List cols ) { } }

Fix:
EmbedValueHandler . getEmbeddedIdCols ( fmds [ i ] , cols ) ;
Buggy code:
public class TreeNodeWrapperView extends LinearLayout { private LinearLayout nodeItemsContainer ; private ViewGroup nodeContainer ; private final int containerStyle ; public TreeNodeWrapperView ( Context context , int containerStyle ) { } private void init ( ) { setOrientation ( VERTICAL ) ; nodeContainer = new android . widget . RelativeLayout ( getContext ( ) ) ; nodeContainer . setLayoutParams ( new LayoutParams ( LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ) ; nodeContainer . setId ( node_header ) ; ContextThemeWrapper newContext = new ContextThemeWrapper ( getContext ( ) , containerStyle ) ; <START_BUG> nodeItemsContainer = new LinearLayout ( newContext ) ; <END_BUG> nodeItemsContainer . setLayoutParams ( new LayoutParams ( LayoutParams . MATCH_PARENT , LayoutParams . WRAP_CONTENT ) ) ; nodeItemsContainer . setId ( node_items ) ; nodeItemsContainer . setOrientation ( VERTICAL ) ; nodeItemsContainer . setVisibility ( GONE ) ; addView ( nodeContainer ) ; addView ( nodeItemsContainer ) ; } public void insertNodeView ( View nodeView ) { } }

Fix:
nodeItemsContainer = new LinearLayout ( newContext , null , containerStyle ) ;
Buggy code:
public class ParallelFPGrowthMapper extends Mapper < LongWritable , TransactionTree , LongWritable , TransactionTree > { private final OpenIntLongHashMap gListInt = new OpenIntLongHashMap ( ) ; @ Override protected void map ( LongWritable offset , TransactionTree input , Context context ) throws IOException , InterruptedException { } @ Override protected void setup ( Context context ) throws IOException , InterruptedException { super . setup ( context ) ; <START_BUG> Parameters params = Parameters . fromString ( context . getConfiguration ( ) . get ( PFP_PARAMETERS , "" ) ) ; <END_BUG> OpenObjectIntHashMap < String > fMap = new OpenObjectIntHashMap < String > ( ) ; int i = 0 ; for ( Pair < String , Long > e : PFPGrowth . deserializeList ( params , F_LIST , context . getConfiguration ( ) ) ) { fMap . put ( e . getFirst ( ) , ( i ++ ) ) ; } for ( Map . Entry < String , Long > e : PFPGrowth . deserializeMap ( params , G_LIST , context . getConfiguration ( ) ) . entrySet ( ) ) { gListInt . put ( fMap . get ( e . getKey ( ) ) , e . getValue ( ) ) ; } } }

Fix:
Parameters params = new Parameters ( context . getConfiguration ( ) . get ( PFP_PARAMETERS , "" ) ) ;