nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CSVConfig { private boolean fixedWidth ; private List < CSVField > fields ; public static final int FILLNONE = 0 ; public static final int FILLLEFT = 1 ; public static final int FILLRIGHT = 2 ; private int fill ; private char fillChar = '<seq2seq4repair_space>' ; private char delimiter = ',' ; private String rowDelimiter = "\n" ; private boolean ignoreDelimiter = false ; private char valueDelimiter = '"' ; private boolean ignoreValueDelimiter = true ; private boolean fieldHeader = false ; private boolean endTrimmed = false ; public boolean isFixedWidth ( ) { } public void setFixedWidth ( boolean fixedWidth ) { } public void addField ( CSVField field ) { } public void setFields ( CSVField [ ] csvFields ) { } public void setFields ( Collection csvField ) { } public CSVField [ ] getFields ( ) { } public CSVField getField ( String name ) { } public int getFill ( ) { } public void setFill ( int fill ) { } public char getFillChar ( ) { } public void setFillChar ( char fillChar ) { } public char getDelimiter ( ) { } public void setDelimiter ( char delimiter ) { } public String getRowDelimiter ( ) { } public void setRowDelimiter ( String rowDelimiter ) { } public boolean isDelimiterIgnored ( ) { } public void setIgnoreDelimiter ( boolean ignoreDelimiter ) { } public char getValueDelimiter ( ) { } public void setValueDelimiter ( char valueDelimiter ) { } public boolean isValueDelimiterIgnored ( ) { } public void setIgnoreValueDelimiter ( boolean ignoreValueDelimiter ) { } public boolean isFieldHeader ( ) { } public void setFieldHeader ( boolean fieldHeader ) { } public boolean equals ( Object obj ) { <START_BUG> if ( ( obj == null ) && ( ! ( obj instanceof CSVConfig ) ) ) { <END_BUG> return false ; } return super . equals ( obj ) ; } public static CSVConfig guessConfig ( InputStream inputStream ) { } public boolean isEndTrimmed ( ) { } public void setEndTrimmed ( boolean endTrimmed ) { } }

Fix:
if ( ! ( obj instanceof CSVConfig ) ) {
Buggy code:
public class PositionPickerActivity extends MapActivity implements OnClickListener { private MapView mapView ; private int requestCode ; @ Override public void onCreate ( Bundle savedInstance ) { } @ Override protected boolean isRouteDisplayed ( ) { } @ Override protected void onResume ( ) { <START_BUG> if ( ! ( SessionHandler . getInstance ( this ) . hasSession ( ) ) ) { <END_BUG> Intent intent = new Intent ( this , LogInActivity . class ) ; this . startActivityForResult ( intent , LOG_IN ) ; } super . onResume ( ) ; } public void onClick ( View v ) { } @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public boolean onPrepareOptionsMenu ( Menu menu ) { } }

Fix:
if ( ( ( this . requestCode ) == ( Constants . ANNOTATION ) ) && ( ! ( SessionHandler . getInstance ( this ) . hasSession ( ) ) ) ) {
Buggy code:
public class MessageController implements MessageSelectionListener { private HeaderView messageHeader ; private Folder folder ; private Object uid ; private MessageMenu menu ; private MessageFocusListener focusListener ; private MessagePopupListener popupListener ; private JButton button ; private String activeCharset ; private MessageView view ; private MessageActionListener actionListener ; protected MailFrameController mailFrameController ; public MessageController ( MailFrameController mailFrameController ) { } public void messageSelectionChanged ( Object [ ] newUidList ) { } public MessageActionListener getActionListener ( ) { } public MessageView getView ( ) { } public JPopupMenu getPopupMenu ( ) { } public void createTextPane ( boolean b , boolean htmlViewer ) { } public void setViewerFont ( Font font ) { } public void resetRenderer ( ) { } public Object getUid ( ) { } public Folder getFolder ( ) { } public void setFolder ( Folder f ) { } public void setUid ( Object o ) { } public void showMessage ( MimePart bodyPart ) throws Exception { boolean htmlViewer = false ; String charset ; if ( activeCharset . equals ( "auto" ) ) charset = bodyPart . getHeader ( ) . getContentParameter ( "charset" ) ; else charset = activeCharset ; Decoder decoder = CoderRouter . getDecoder ( bodyPart . getHeader ( ) . contentTransferEncoding ) ; <START_BUG> htmlViewer = bodyPart . getHeader ( ) . contentSubtype . equals ( "html" ) ; <END_BUG> String decodedBody = null ; try { decodedBody = decoder . decode ( bodyPart . getBody ( ) , charset ) ; } catch ( UnsupportedEncodingException ex ) { try { decodedBody = decoder . decode ( bodyPart . getBody ( ) , null ) ; } catch ( UnsupportedEncodingException never ) { } } insertText ( decodedBody , htmlViewer ) ; } public void showMessageSource ( String rawText ) { } protected void insertText ( String s , boolean htmlView ) { } public MailFrameController getMailFrameController ( ) { } }

Fix:
htmlViewer = bodyPart . getHeader ( ) . contentSubtype . equalsIgnoreCase ( "html" ) ;
Buggy code:
public class RModuleIssueType extends org . tigris . scarab . om . BaseRModuleIssueType implements Persistent { public ScarabModule getScarabModule ( ) { } public void setScarabModule ( ScarabModule module ) { } public void setModule ( ModuleEntity me ) throws Exception { } public ModuleEntity getModule ( ) throws Exception { } public void delete ( ScarabUser user ) throws Exception { ModuleEntity module = getModule ( ) ; if ( user . hasPermission ( MODULE__EDIT , module ) ) { <START_BUG> List attGroups = getIssueType ( ) . getAttributeGroups ( ) ; <END_BUG> for ( int j = 0 ; j < ( attGroups . size ( ) ) ; j ++ ) { AttributeGroup attGroup = ( ( AttributeGroup ) ( attGroups . get ( j ) ) ) ; attGroup . delete ( user ) ; } Criteria c = new Criteria ( ) . add ( MODULE_ID , getModuleId ( ) ) . add ( ISSUE_TYPE_ID , getIssueTypeId ( ) ) ; RModuleIssueTypePeer . doDelete ( c ) ; save ( ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } public String getDisplayText ( ) throws Exception { } public RModuleIssueType copy ( ) throws Exception { } public void save ( DBConnection dbCon ) throws Exception { } }

Fix:
List attGroups = getIssueType ( ) . getAttributeGroups ( module ) ;
Buggy code:
public class RequestLogFilter implements Filter { @ Override public void destroy ( ) { } @ Override public void doFilter ( ServletRequest req , ServletResponse resp , FilterChain chain ) throws IOException , ServletException { RequestLogAccessor rla ; try { rla = new RequestLogAccessor ( ) ; } catch ( SQLException e ) { throw new RuntimeException ( "request<seq2seq4repair_space>logger<seq2seq4repair_space>creation<seq2seq4repair_space>failed" , e ) ; } HttpServletRequest hr = ( ( HttpServletRequest ) ( req ) ) ; String uri = hr . getPathInfo ( ) ; String json = null ; Date start = new Date ( ) ; <START_BUG> if ( req . getContentType ( ) . equals ( "application//json" ) ) { <END_BUG> ServletInputStream s = req . getInputStream ( ) ; json = IOUtils . toString ( s ) ; final String body = json ; req = new HttpServletRequestWrapper ( ( ( HttpServletRequest ) ( req ) ) ) { public ServletInputStream getInputStream ( ) throws IOException { return new ServletInputStream ( ) { InputStream in_ = IOUtils . toInputStream ( body ) ; @ Override public int read ( ) throws IOException { return in_ . read ( ) ; } } ; } } ; } if ( json != null ) chain . doFilter ( req , resp ) ; Date end = new Date ( ) ; try { rla . logRequest ( ( ( end . getTime ( ) ) - ( start . getTime ( ) ) ) , uri , json ) ; } catch ( SQLException e ) { e . printStackTrace ( System . err ) ; } } @ Override public void init ( FilterConfig arg0 ) throws ServletException { } }

Fix:
if ( ( ( req . getContentType ( ) ) != null ) && ( req . getContentType ( ) . equals ( "application//json" ) ) ) {
Buggy code:
public class Version1 { protected CensusData dat ; protected int x ; protected int y ; protected Rectangle bounds ; protected float height ; protected float width ; public Version1 ( CensusData info , int x , int y ) { } public int getTotalPop ( ) { } public int query ( int wst , int sth , int est , int nth ) { if ( ( ( ( ( ( ( ( wst < 1 ) || ( wst > ( x ) ) ) || ( sth < 1 ) ) || ( sth > ( y ) ) ) || ( est < wst ) ) || ( est > ( x ) ) ) || ( nth < sth ) ) || ( nth > ( y ) ) ) { throw new IllegalArgumentException ( ) ; } float n = ( nth * ( height ) ) + ( bounds . south ) ; float s = ( ( sth - 1 ) * ( height ) ) + ( bounds . south ) ; float e = ( est * ( width ) ) + ( bounds . west ) ; float w = ( ( wst - 1 ) * ( width ) ) + ( bounds . west ) ; <START_BUG> return PopulationProcessor . sequentialGetPop ( dat , new Rectangle ( n , s , e , w ) , 0 , dat . data_size ) ; <END_BUG> } }

Fix:
return PopulationProcessor . sequentialGetPop ( dat , new Rectangle ( w , e , n , s ) , 0 , dat . data_size ) ;
Buggy code:
public final class ResourceAdaptersAdd extends AbstractSubsystemAdd < ResourceAdaptersSubsystemElement > { private static final long serialVersionUID = - 874698675049495644L ; private ResourceAdapters resourceAdapters ; public ResourceAdapters getDatasources ( ) { } public void setResourceAdapters ( ResourceAdapters resourceAdapters ) { } protected ResourceAdaptersAdd ( ) { } protected < P > void applyUpdate ( UpdateContext updateContext , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { <START_BUG> final ServiceTarget serviceTarget = updateContext . getBatchBuilder ( ) ; <END_BUG> serviceTarget . addService ( RESOURCEADAPTERS_SERVICE , new ResourceAdaptersService ( resourceAdapters ) ) . setInitialMode ( ACTIVE ) . install ( ) ; } @ Override protected void applyUpdateBootAction ( final BootUpdateContext updateContext ) { } protected ResourceAdaptersSubsystemElement createSubsystemElement ( ) { } }

Fix:
final ServiceTarget serviceTarget = updateContext . getServiceTarget ( ) ;
Buggy code:
@ Repository public class CycleExpertEvaluatorAllocationDaoImpl extends AbstractBaseDaoImpl < CycleExpertEvaluatorAllocation > implements CycleExpertEvaluatorAllocationDao { @ Override public void deleteCycleExpertEvaluatorAllocation ( final Long cycleId ) { } @ Override public List < GdeUser > findAllExpertInCycle ( final Long cycleId ) throws UserRoleException { try { DetachedCriteria c = criteria ( ) ; c . createAlias ( "cycleMasterData" , "cycleMasterData" ) ; c . add ( Restrictions . eq ( "cycleMasterData.id" , cycleId ) ) ; <START_BUG> c . add ( Restrictions . eq ( "cycleMasterData.active" , true ) ) ; <END_BUG> ProjectionList columns = Projections . projectionList ( ) . add ( Projections . property ( "user" ) ) ; c . setProjection ( columns ) ; return find ( c ) ; } catch ( Exception e ) { logger . error ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>retriving<seq2seq4repair_space>Expert<seq2seq4repair_space>users<seq2seq4repair_space>in<seq2seq4repair_space>cycle<seq2seq4repair_space>" + cycleId ) , e ) ; throw new UserRoleException ( ( "Error<seq2seq4repair_space>while<seq2seq4repair_space>retriving<seq2seq4repair_space>Expert<seq2seq4repair_space>users<seq2seq4repair_space>in<seq2seq4repair_space>cycle<seq2seq4repair_space>" + cycleId ) , e ) ; } } }

Fix:
c . add ( Restrictions . eq ( "active" , true ) ) ;
Buggy code:
public class AspectJElementHierarchy implements IHierarchy { protected IProgramElement root = null ; protected String configFile = null ; private Map fileMap = null ; private Map handleMap = null ; private Map typeMap = null ; public IProgramElement getElement ( String handle ) { } public IProgramElement getRoot ( ) { } public void setRoot ( IProgramElement root ) { } public void addToFileMap ( Object key , Object value ) { } public void setFileMap ( HashMap fileMap ) { } public Object findInFileMap ( Object key ) { } public Set getFileMapEntrySet ( ) { } public boolean isValid ( ) { } public IProgramElement findElementForSignature ( IProgramElement parent , IProgramElement . Kind kind , String signature ) { } public IProgramElement findElementForLabel ( IProgramElement parent , IProgramElement . Kind kind , String label ) { } public IProgramElement findElementForType ( String packageName , String typeName ) { } private IProgramElement findClassInNodes ( Collection nodes , String name ) { } public IProgramElement findElementForSourceFile ( String sourceFile ) { } public IProgramElement findElementForSourceLine ( ISourceLocation location ) { } public IProgramElement findElementForSourceLine ( String sourceFilePath , int lineNumber ) { } private IProgramElement createFileStructureNode ( String sourceFilePath ) { } private IProgramElement findNodeForSourceLineHelper ( IProgramElement node , String sourceFilePath , int lineNumber ) { } private boolean matches ( IProgramElement node , String sourceFilePath , int lineNumber ) { <START_BUG> return ( ( ( node != null ) && ( ( node . getSourceLocation ( ) ) != null ) ) && ( node . getSourceLocation ( ) . getSourceFile ( ) . getAbsolutePath ( ) . equals ( sourceFilePath ) ) ) && ( ( ( ( node . getSourceLocation ( ) . getLine ( ) ) <= lineNumber ) && ( ( node . getSourceLocation ( ) . getEndLine ( ) ) >= lineNumber ) ) || ( ( lineNumber <= 1 ) && ( node . getKind ( ) . isSourceFileKind ( ) ) ) ) ; <END_BUG> } private boolean hasMoreSpecificChild ( IProgramElement node , String sourceFilePath , int lineNumber ) { } public String getConfigFile ( ) { } public void setConfigFile ( String configFile ) { } public IProgramElement findElementForHandle ( String handle ) { } protected void cache ( String handle , ProgramElement pe ) { } }

Fix:
return ( ( ( node != null ) && ( ( node . getSourceLocation ( ) ) != null ) ) && ( node . getSourceLocation ( ) . getSourceFile ( ) . getAbsolutePath ( ) . equals ( sourceFilePath ) ) ) && ( ( ( ( node . getSourceLocation ( ) . getLine ( ) ) <= lineNumber ) && ( ( node . getSourceLocation ( ) . getEndLine ( ) ) >= lineNumber ) ) || ( ( lineNumber <= 1 ) && ( node . getKind ( ) . isSourceFile ( ) ) ) ) ;
Buggy code:
public class ThumbnailImageResource extends DynamicImageResource { private static Log log = LogFactory . getLog ( ThumbnailImageResource . class ) ; private final WebResource unscaledImageResource ; private final int maxSize ; private int scaleHints = Image . SCALE_SMOOTH ; private transient byte [ ] thumbnail ; public ThumbnailImageResource ( WebResource unscaledImageResource , int maxSize ) { } protected byte [ ] getImageData ( ) { if ( ( thumbnail ) == null ) { final BufferedImage image = getScaledImageInstance ( ) ; thumbnail = toImageData ( image ) ; <START_BUG> lastModifiedTime = Time . now ( ) ; <END_BUG> } return thumbnail ; } protected final BufferedImage getScaledImageInstance ( ) { } public final void setScaleHints ( int scaleHints ) { } }

Fix:
setLastModifiedTime ( Time . now ( ) ) ;
Buggy code:
public class ClaimantClaimsListActivity extends Activity { private SessionController sessionController ; final Context context = this ; private ListView lv ; private ClaimantClaimLVAdapter adapter ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( claimant_claims_list ) ; sessionController = new SessionController ( ) ; adapter = new ClaimantClaimLVAdapter ( context , layout . claimant_claims_list_rows , sessionController . getClaims ( ) ) ; lv = ( ( ListView ) ( findViewById ( claimantClaimListView ) ) ) ; lv . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > parent , View view , int position , long id ) { Claim claim = sessionController . getClaims ( ) . get ( position ) ; sessionController . setClaim ( claim ) ; <START_BUG> Intent intent = new Intent ( getBaseContext ( ) , ClaimantExpenseListActivity . class ) ; <END_BUG> startActivity ( intent ) ; } } ) ; lv . setLongClickable ( true ) ; lv . setOnItemLongClickListener ( new AdapterView . OnItemLongClickListener ( ) { @ Override public boolean onItemLongClick ( AdapterView < ? > parent , View view , int position , long id ) { AlertDialog . Builder builder = new AlertDialog . Builder ( ClaimantClaimsListActivity . this ) ; builder . setMessage ( "Edit<seq2seq4repair_space>or<seq2seq4repair_space>Delete<seq2seq4repair_space>Claim?" ) ; builder . setPositiveButton ( "Edit" , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int id ) { Intent intent = new Intent ( ClaimantClaimsListActivity . this , ClaimEditActivity . class ) ; startActivity ( intent ) ; } } ) . setNegativeButton ( "Delete" , new DialogInterface . OnClickListener ( ) { @ Override public void onClick ( DialogInterface dialog , int id ) { } } ) ; AlertDialog alertDialog = builder . create ( ) ; alertDialog . show ( ) ; return false ; } } ) ; lv . setAdapter ( adapter ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override protected void onResume ( ) { } public void addClaimOption ( MenuItem menu ) { } public void filterByDate ( MenuItem menu ) { } public void switchToApproverOption ( MenuItem menu ) { } }

Fix:
Intent intent = new Intent ( ClaimantClaimsListActivity . this , ClaimantExpenseListActivity . class ) ;
Buggy code:
public class PropertiesFactory implements IPropertiesFactory { private static final Logger log = LoggerFactory . getLogger ( PropertiesFactory . class ) ; private final List < IPropertiesChangeListener > afterReloadListeners = new ArrayList < IPropertiesChangeListener > ( ) ; private final Map < String , Properties > propertiesCache = newPropertiesCache ( ) ; private final Application application ; private final List < IPropertiesLoader > propertiesLoader ; public PropertiesFactory ( final Application application ) { } public List < IPropertiesLoader > getPropertiesLoaders ( ) { } protected Map < String , Properties > newPropertiesCache ( ) { } public void addListener ( final IPropertiesChangeListener listener ) { } public final void clearCache ( ) { } public Properties load ( final Class < ? > clazz , final String path ) { Properties properties = null ; if ( ( propertiesCache ) != null ) { properties = propertiesCache . get ( path ) ; } if ( properties == null ) { <START_BUG> IResourceSettings resourceSettings = Application . get ( ) . getResourceSettings ( ) ; <END_BUG> Iterator < IPropertiesLoader > iter = propertiesLoader . iterator ( ) ; while ( ( properties == null ) && ( iter . hasNext ( ) ) ) { IPropertiesLoader loader = iter . next ( ) ; String fullPath = path + ( loader . getFileExtension ( ) ) ; IResourceStream resourceStream = resourceSettings . getResourceStreamLocator ( ) . locate ( clazz , fullPath ) ; if ( resourceStream == null ) { continue ; } final IModificationWatcher watcher = resourceSettings . getResourceWatcher ( true ) ; if ( watcher != null ) { addToWatcher ( path , resourceStream , watcher ) ; } ValueMap props = loadFromLoader ( loader , resourceStream ) ; if ( props != null ) { properties = new Properties ( path , props ) ; } } if ( ( propertiesCache ) != null ) { if ( properties == null ) { propertiesCache . put ( path , EMPTY_PROPERTIES ) ; } else { propertiesCache . put ( path , properties ) ; } } } if ( properties == ( Properties . EMPTY_PROPERTIES ) ) { properties = null ; } return properties ; } private ValueMap loadFromLoader ( final IPropertiesLoader loader , final IResourceStream resourceStream ) { } private void addToWatcher ( final String path , final IResourceStream resourceStream , final IModificationWatcher watcher ) { } protected final Map < String , Properties > getCache ( ) { } }

Fix:
IResourceSettings resourceSettings = application . getResourceSettings ( ) ;
Buggy code:
public class MainFrame { private JMenuBar menuBar ; private JMenu mnEdit ; private JMenu mnShelfManagement ; private JMenu mnSearch ; private JMenu mnUserManagement ; private JMenu mnHelp ; private JMenu mnExit ; private JMenu mnAbout ; private JMenuItem menuItem ; private JMenuItem mntUserDataBase ; private JMenuItem mntShelfRepository ; private JMenuItem mntmDVD ; private JMenuItem mntmCD ; private JSeparator separator_2 ; private ShelfRepository shelfRepository ; private UserRepository repository ; private ElementsRepository elementsRepository ; public MainFrame ( ) { } public JMenuBar createMenuBar ( ) { } public void createContentPanel ( JFrame frame , MainFrame demo ) throws IOException { } private static ImagePanel setBackGroundImage ( JFrame frame ) throws IOException { } private static void createAndShowGUI ( ) throws IOException { } private static BufferedImage resize ( BufferedImage image , int width , int height ) { } private class EventModelExecuter implements ActionListener { JFrame frame ; public EventModelExecuter ( JFrame frame ) { } public void actionPerformed ( ActionEvent e ) { class eventHandling extends SwingWorker { Login loginDlg ; Boolean flag = false ; @ Override protected Boolean doInBackground ( ) throws Exception { loginDlg = new Login ( frame ) ; loginDlg . setVisible ( true ) ; flag = loginDlg . isSucceeded ( ) ; System . out . println ( flag ) ; return flag ; } @ Override protected void done ( ) { try { if ( ( ( boolean ) ( get ( ) ) ) == true ) { menuBar . setEnabled ( true ) ; menuItem . setEnabled ( true ) ; mnEdit . setEnabled ( true ) ; } } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } catch ( ExecutionException e ) { e . printStackTrace ( ) ; } } } new eventHandling ( ) . execute ( ) ; } } private class EventPanel implements ActionListener { public void actionPerformed ( ActionEvent ev ) { if ( ev . getActionCommand ( ) . equals ( "UserList" ) ) { new UserRepositorySwing ( repository ) ; } else if ( ev . getActionCommand ( ) . equals ( "ShelfList" ) ) { new ShelfRepositorySwing ( repository , shelfRepository ) ; } else if ( ev . getActionCommand ( ) . equals ( "Book" ) ) { <START_BUG> new Book ( repository , shelfRepository , elementsRepository ) ; <END_BUG> } } } private class EventoJMenuSair implements MouseListener { public void mouseClicked ( MouseEvent ev ) { } public void mouseEntered ( MouseEvent ev ) { } public void mouseExited ( MouseEvent ev ) { } public void mouseReleased ( MouseEvent ev ) { } public void mousePressed ( MouseEvent ev ) { } } public static void main ( String [ ] args ) { } }

Fix:
new Book ( shelfRepository , elementsRepository ) ;
Buggy code:
public class ColorMessageFilterAction extends AbstractFilterAction { public Command getCommand ( FilterAction filterAction , IFolder srcFolder , Object [ ] uids ) throws Exception { <START_BUG> int rgb = filterAction . getInteger ( "rgb" , Color . black . getRGB ( ) ) ; <END_BUG> MailFolderCommandReference r = new MailFolderCommandReference ( srcFolder , uids ) ; r . setColorValue ( rgb ) ; return new org . columba . mail . folder . command . ColorMessageCommand ( r ) ; } }

Fix:
int rgb = filterAction . getIntegerWithDefault ( "rgb" , Color . black . getRGB ( ) ) ;
Buggy code:
public class DrugPanel extends JPanel { private static final long serialVersionUID = - 8054193195906106046L ; String [ ] drugName = new String [ ] { "Durg1" , "Durg2" , "Durg3" , "Durg4" } ; String [ ] unit = new String [ ] { "ml" , "mg" } ; UserInterface ui ; DefaultComboBoxModel < String > drugModel = new DefaultComboBoxModel < String > ( ) ; DefaultComboBoxModel < String > unitModel = new DefaultComboBoxModel < String > ( ) ; public DrugPanel ( UserInterface ui ) { } private void initialize ( ) { JComboBox < String > drugBox = new JComboBox < String > ( drugModel ) ; drugModel . addElement ( "TEST" ) ; drugBox . setBounds ( 100 , 30 , 110 , 50 ) ; drugBox . setBorder ( BorderFactory . createTitledBorder ( "Drug" ) ) ; this . add ( drugBox ) ; JLabel dosageLabel = new JLabel ( "Choose<seq2seq4repair_space>dosage:" ) ; dosageLabel . setBounds ( 110 , 70 , 200 , 50 ) ; this . add ( dosageLabel ) ; <START_BUG> SpinnerModel doseModel = new SpinnerNumberModel ( 9.9 , 1 , 15 , 0.1 ) ; <END_BUG> JSpinner doseSpinner = new JSpinner ( doseModel ) ; doseSpinner . setBounds ( 110 , 110 , 75 , 20 ) ; this . add ( doseSpinner ) ; unitModel . addElement ( "mL" ) ; JComboBox < String > unitBox = new JComboBox < String > ( unitModel ) ; unitBox . setBounds ( 185 , 100 , 70 , 43 ) ; this . add ( unitBox ) ; JButton EntryButton = new JButton ( "INJECT" ) ; EntryButton . setBounds ( 190 , 140 , 65 , 30 ) ; this . add ( EntryButton ) ; EntryButton . addMouseListener ( new MouseAdapter ( ) { @ Override public void mouseClicked ( MouseEvent e ) { String id = ( DrugPanel . serialVersionUID ) + "" ; double dose = ( ( double ) ( doseModel . getValue ( ) ) ) ; String drugUnit = ( ( String ) ( unitBox . getSelectedItem ( ) ) ) ; ui . useDrug ( id , dose , drugUnit ) ; } } ) ; } }

Fix:
final SpinnerModel doseModel = new SpinnerNumberModel ( 9.9 , 1 , 15 , 0.1 ) ;
Buggy code:
public class LocalDeclaration extends AbstractVariableDeclaration { public LocalVariableBinding binding ; public LocalDeclaration ( Expression expr , char [ ] name , int sourceStart , int sourceEnd ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void checkModifiers ( ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public String name ( ) { } public void resolve ( BlockScope scope ) { TypeBinding tb = type . resolveType ( scope ) ; checkModifiers ( ) ; if ( tb != null ) { if ( tb == ( VoidBinding ) ) { scope . problemReporter ( ) . variableTypeCannotBeVoid ( this ) ; return ; } if ( ( tb . isArrayType ( ) ) && ( ( ( ( ArrayBinding ) ( tb ) ) . leafComponentType ) == ( VoidBinding ) ) ) { scope . problemReporter ( ) . variableTypeCannotBeVoidArray ( this ) ; return ; } } if ( ( binding = scope . duplicateName ( name ) ) != null ) { scope . problemReporter ( ) . redefineLocal ( this ) ; } else { binding = new LocalVariableBinding ( this , tb , modifiers , false ) ; scope . addLocalVariable ( binding ) ; binding . constant = NotAConstant ; } if ( tb == null ) { if ( ( initialization ) != null ) initialization . resolveType ( scope ) ; return ; } if ( ( initialization ) != null ) { if ( ( initialization ) instanceof ArrayInitializer ) { TypeBinding initTb = initialization . resolveTypeExpecting ( scope , tb ) ; if ( initTb != null ) { ( ( ArrayInitializer ) ( initialization ) ) . binding = ( ( ArrayBinding ) ( initTb ) ) ; initialization . implicitWidening ( tb , initTb ) ; } } else { TypeBinding initTb = initialization . resolveType ( scope ) ; if ( initTb != null ) { <START_BUG> if ( ( ( initialization . isConstantValueOfTypeAssignableToType ( initTb , tb ) ) || ( ( tb . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( tb . id , initTb . id ) ) ) ) || ( scope . areTypesCompatible ( initTb , tb ) ) ) <END_BUG> initialization . implicitWidening ( tb , initTb ) ; else scope . problemReporter ( ) . typeMismatchError ( initTb , tb , this ) ; } } binding . constant = ( binding . isFinal ( ) ) ? initialization . constant . castTo ( ( ( ( tb . id ) << 4 ) + ( initialization . constant . typeID ( ) ) ) ) : NotAConstant ; } } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
if ( ( ( initialization . isConstantValueOfTypeAssignableToType ( initTb , tb ) ) || ( ( tb . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( tb . id , initTb . id ) ) ) ) || ( org . eclipse . jdt . internal . compiler . lookup . Scope . areTypesCompatible ( initTb , tb ) ) )
Buggy code:
public class DiffSyncClientHandler extends BroadcastReceiver { private final String TAG = DiffSyncClientHandler . class . getSimpleName ( ) ; private static ClientSyncEngine < ? > syncEngine ; public DiffSyncClientHandler ( final ClientSyncEngine < ? > syncEngine ) { } public DiffSyncClientHandler ( ) { } @ Override public void onReceive ( Context context , Intent intent ) { Intent serviceIntent = new Intent ( context , SyncService . class ) ; serviceIntent . putExtra ( MESSAGE_INTENT , intent ) ; <START_BUG> context . startService ( intent ) ; <END_BUG> Bundle extras = intent . getExtras ( ) ; if ( ! ( extras . isEmpty ( ) ) ) { Log . i ( TAG , ( "Received:<seq2seq4repair_space>" + ( extras . toString ( ) ) ) ) ; } } }

Fix:
context . startService ( serviceIntent ) ;
Buggy code:
public final class RuntimeStats { public static MetricStore metricStore ; private RuntimeStats ( ) { } public static void resetAll ( ) throws Exception { <START_BUG> RuntimeStats . metricStore . deleteBefore ( System . currentTimeMillis ( ) ) ; <END_BUG> } public static RuntimeMetrics getFlowletMetrics ( String applicationId , String flowId , String flowletId ) { } public static RuntimeMetrics getProcedureMetrics ( String applicationId , String procedureId ) { } public static RuntimeMetrics getServiceMetrics ( String applicationId , String serviceId ) { } public static long getSparkMetrics ( String applicationId , String sparkId , String metricName ) { } private static RuntimeMetrics getMetrics ( final Map < String , String > context , final String inputName , final String processedName , final String exceptionName ) { } private static long getTotalCounter ( Map < String , String > context , String metricName ) { } private static CubeQuery getTotalCounterQuery ( Map < String , String > context , String metricName ) { } public static void clearStats ( final String applicationId ) { } }

Fix:
RuntimeStats . metricStore . deleteBefore ( ( ( System . currentTimeMillis ( ) ) // 1000 ) ) ;
Buggy code:
public class LoLin1Application extends Application { private static LoLin1Application singleton ; private static Context mContext ; public static LoLin1Application getInstance ( ) { } @ Override public void onCreate ( ) { } public Context getContext ( ) { if ( ( LoLin1Application . mContext ) == null ) <START_BUG> throw new IllegalStateException ( "Context<seq2seq4repair_space>requested<seq2seq4repair_space>when<seq2seq4repair_space>it<seq2seq4repair_space>is<seq2seq4repair_space>null." ) ; <END_BUG> return LoLin1Application . mContext ; } public void setContext ( @ NonNull Context context ) { } }

Fix:
return getApplicationContext ( ) ;
Buggy code:
public class AccessResolver { public static IValue resolve ( List < Marker > markers , IContext context , IAccess access ) { LinkedList < IAccess > chain = AccessResolver . getCallChain ( markers , context , access ) ; ListIterator < IAccess > iterator = chain . listIterator ( ) ; IAccess prev = null ; IAccess curr = null ; IValue alternate = null ; boolean backwards = false ; while ( iterator . hasNext ( ) ) { prev = curr ; curr = iterator . next ( ) ; if ( alternate != null ) { curr . setValue ( alternate ) ; alternate = null ; } if ( ! ( curr . resolve ( context , markers ) ) ) { alternate = curr . resolve2 ( context ) ; if ( alternate instanceof IAccess ) { curr = ( ( IAccess ) ( alternate ) ) ; iterator . set ( curr ) ; } else if ( alternate != null ) { if ( ! ( iterator . hasNext ( ) ) ) { return alternate ; } else { iterator . remove ( ) ; iterator . next ( ) . setValue ( alternate ) ; iterator . previous ( ) ; } } else { backwards = true ; break ; } } } if ( ! backwards ) { return chain . getLast ( ) ; } else if ( ( chain . size ( ) ) == 1 ) { markers . add ( access . getResolveError ( ) ) ; return access ; } IAccess next = null ; curr = access ; prev = null ; while ( curr != null ) { IValue value = curr . getValue ( ) ; if ( value instanceof IAccess ) { prev = ( ( IAccess ) ( value ) ) ; } else { prev = null ; } <START_BUG> if ( ( next != null ) && ( ! ( curr . resolve ( context , markers ) ) ) ) { <END_BUG> next . setValue ( null ) ; if ( next . resolve ( context , markers ) ) { alternate = curr . resolve3 ( context , next ) ; if ( alternate instanceof IAccess ) { if ( ( next . getValue ( ) ) == curr ) { next . setValue ( alternate ) ; } next = ( ( IAccess ) ( alternate ) ) ; curr = prev ; iterator . next ( ) ; iterator . remove ( ) ; iterator . previous ( ) ; iterator . set ( next ) ; } else { next . setValue ( curr ) ; markers . add ( curr . getResolveError ( ) ) ; } } else { markers . add ( curr . getResolveError ( ) ) ; } } next = curr ; curr = prev ; } return chain . getLast ( ) ; } public static LinkedList < IAccess > getCallChain ( List < Marker > markers , IContext context , IAccess iaccess ) { } }

Fix:
if ( ( next != null ) && ( ! ( curr . isResolved ( ) ) ) ) {
Buggy code:
public class ZipOutputStream extends FilterOutputStream { private ZipEntry entry ; private String comment = "" ; private int level = Deflater . DEFAULT_COMPRESSION ; private boolean hasCompressionLevelChanged = false ; private int method = ZipOutputStream . DEFLATED ; private Vector entries = new Vector ( ) ; private CRC32 crc = new CRC32 ( ) ; private long written = 0 ; private long dataStart = 0 ; private long localDataStart = 0 ; private ZipLong cdOffset = new ZipLong ( 0 ) ; private ZipLong cdLength = new ZipLong ( 0 ) ; private static final byte [ ] ZERO = new byte [ ] { 0 , 0 } ; private static final byte [ ] LZERO = new byte [ ] { 0 , 0 , 0 , 0 } ; private Hashtable offsets = new Hashtable ( ) ; private String encoding = null ; protected Deflater def = new Deflater ( Deflater . DEFAULT_COMPRESSION , true ) ; protected byte [ ] buf = new byte [ 512 ] ; private RandomAccessFile raf = null ; public static final int DEFLATED = ZipEntry . DEFLATED ; public static final int STORED = ZipEntry . STORED ; public ZipOutputStream ( OutputStream out ) { } public ZipOutputStream ( File file ) throws IOException { } public boolean isSeekable ( ) { } public void setEncoding ( String encoding ) { } public String getEncoding ( ) { } public void finish ( ) throws IOException { } public void closeEntry ( ) throws IOException { } public void putNextEntry ( ZipEntry ze ) throws IOException { } public void setComment ( String comment ) { } public void setLevel ( int level ) { } public void setMethod ( int method ) { } public void write ( byte [ ] b , int offset , int length ) throws IOException { } public void write ( int b ) throws IOException { } public void close ( ) throws IOException { } public void flush ( ) throws IOException { <START_BUG> if ( ( out ) == null ) { <END_BUG> out . flush ( ) ; } } protected static final ZipLong LFH_SIG = new ZipLong ( 67324752L ) ; protected static final ZipLong DD_SIG = new ZipLong ( 134695760L ) ; protected static final ZipLong CFH_SIG = new ZipLong ( 33639248L ) ; protected static final ZipLong EOCD_SIG = new ZipLong ( 101010256L ) ; protected final void deflate ( ) throws IOException { } protected void writeLocalFileHeader ( ZipEntry ze ) throws IOException { } protected void writeDataDescriptor ( ZipEntry ze ) throws IOException { } protected void writeCentralFileHeader ( ZipEntry ze ) throws IOException { } protected void writeCentralDirectoryEnd ( ) throws IOException { } private static final ZipLong DOS_TIME_MIN = new ZipLong ( 8448L ) ; protected static ZipLong toDosTime ( Date time ) { } protected byte [ ] getBytes ( String name ) throws ZipException { } protected final void writeOut ( byte [ ] data ) throws IOException { } protected final void writeOut ( byte [ ] data , int offset , int length ) throws IOException { } }

Fix:
if ( ( out ) != null ) {
Buggy code:
public class ChargifyWrapper { private static Logger l = Logger . getLogger ( ChargifyWrapper . class ) ; private static final String HTTPS = "https:////" ; private static final String CHARGIFY_AUTH_REALM = "Chargify<seq2seq4repair_space>API" ; private static final String CHARGIFY_ENDPOINT = "chargify.com" ; private static final int PAGE_COUNT = 20 ; private String domain ; private String apiToken ; private HttpClient client ; public ChargifyWrapper ( String hostName , String apiToken ) { } public int getAllData ( String entity , String [ ] fields , String csvFile ) throws IOException , ParserConfigurationException , XPathExpressionException , SAXException { } public void getData ( String entity , int page , List < Map < String , String > > ret ) throws IOException , ParserConfigurationException , XPathExpressionException , SAXException { } private int executeHttpMethod ( HttpMethod method ) throws HttpMethodException { } private String readRespone ( HttpMethod m ) throws IOException { } private static GetMethod createGetMethod ( String path ) { } private static PostMethod createPostMethod ( String path ) { } private static DeleteMethod createDeleteMethod ( String path ) { } private static < T extends HttpMethod > T configureHttpMethod ( T request ) { request . setRequestHeader ( "Content-Type" , "text//xml" ) ; request . setRequestHeader ( "Accept" , "text//xml" ) ; <START_BUG> request . setRequestHeader ( "User-Agent" , "GoodData<seq2seq4repair_space>CL//1.2.41-BETA" ) ; <END_BUG> return request ; } public String getDomain ( ) { } public void setDomain ( String domain ) { } public String getApiToken ( ) { } public void setApiToken ( String apiToken ) { } }

Fix:
request . setRequestHeader ( "User-Agent" , "GoodData<seq2seq4repair_space>CL//1.2.42-BETA" ) ;
Buggy code:
public class TreeItem extends Item { Tree parent ; Image [ ] images ; int itemCount ; int stringList ; int imageList ; int foregroundList ; int backgroundList ; int fontList ; int checkState ; boolean checked ; boolean grayed ; boolean cached ; boolean ignoreNotify ; public TreeItem ( Tree parent , int style ) { } public TreeItem ( Tree parent , int style , int index ) { } public TreeItem ( TreeItem parentItem , int style ) { } public TreeItem ( TreeItem parentItem , int style , int index ) { } TreeItem ( Tree parent , TreeItem parentItem , int style , int index , int handle ) { } static Tree checkNull ( Tree tree ) { } static TreeItem checkNull ( TreeItem item ) { } protected void checkSubclass ( ) { } void clear ( ) { } public void clear ( int index , boolean all ) { } public void clearAll ( boolean all ) { } void columnAdded ( int index ) { } void columnRemoved ( int index ) { } void createHandle ( ) { } void deregister ( ) { } void destroyWidget ( ) { } int findContentPresenter ( int element , int column ) { } int findPart ( int column , String part ) { } public Color getBackground ( ) { } public Color getBackground ( int index ) { } public Rectangle getBounds ( ) { } public Rectangle getBounds ( int index ) { } public boolean getChecked ( ) { } public boolean getExpanded ( ) { } public Font getFont ( ) { } public Font getFont ( int index ) { } public Color getForeground ( ) { } public Color getForeground ( int index ) { } public boolean getGrayed ( ) { } public TreeItem getItem ( int index ) { } public int getItemCount ( ) { } public TreeItem [ ] getItems ( ) { } public Image getImage ( ) { checkWidget ( ) ; if ( ! ( parent . checkData ( this ) ) ) error ( ERROR_WIDGET_DISPOSED ) ; <START_BUG> return super . getImage ( ) ; <END_BUG> } public Image getImage ( int index ) { } public Rectangle getImageBounds ( int index ) { } public Tree getParent ( ) { } public TreeItem getParentItem ( ) { } public String getText ( ) { } public String getText ( int index ) { } Control getWidgetControl ( ) { } public int indexOf ( TreeItem item ) { } void register ( ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } public void removeAll ( ) { } public void setBackground ( Color color ) { } public void setBackground ( int index , Color color ) { } public void setChecked ( boolean checked ) { } public void setExpanded ( boolean expanded ) { } public void setFont ( Font font ) { } public void setFont ( int index , Font font ) { } public void setForeground ( Color color ) { } public void setForeground ( int index , Color color ) { } public void setGrayed ( boolean grayed ) { } public void setImage ( Image [ ] images ) { } public void setImage ( int index , Image image ) { } public void setImage ( Image image ) { } public void setItemCount ( int count ) { } public void setText ( String [ ] strings ) { } public void setText ( int index , String string ) { } public void setText ( String string ) { } void updateCheckState ( boolean notify ) { } }

Fix:
return getImage ( 0 ) ;
Buggy code:
public class HbaseServerKVIterator implements Closeable , Iterable < IIRow > { private RegionScanner innerScanner ; private Logger logger = LoggerFactory . getLogger ( HbaseServerKVIterator . class ) ; public HbaseServerKVIterator ( RegionScanner innerScanner ) { } @ Override public void close ( ) throws IOException { } private static class IIRowIterator implements Iterator < IIRow > { private final RegionScanner regionScanner ; private final IIRow row = new IIRow ( ) ; List < Cell > results = Lists . newArrayList ( ) ; private boolean hasMore ; IIRowIterator ( RegionScanner innerScanner ) { } @ Override public boolean hasNext ( ) { } @ Override public IIRow next ( ) { if ( ( results . size ( ) ) < 1 ) { throw new NoSuchElementException ( ) ; } for ( Cell c : results ) { row . updateWith ( c ) ; } results . clear ( ) ; try { if ( hasMore ) { <START_BUG> hasMore = regionScanner . next ( results ) ; <END_BUG> } } catch ( IOException e ) { throw new RuntimeException ( e ) ; } return row ; } @ Override public void remove ( ) { } } @ Override public Iterator < IIRow > iterator ( ) { } }

Fix:
hasMore = regionScanner . nextRaw ( results ) ;
Buggy code:
public class ColorSchemeService { private static final String LISTENER_KEY = "org.eclipse.ui.internal.ColorSchemeService" ; public static void setViewColors ( final Control control ) { } public static void setTabAttributes ( BasicStackPresentation presentation , final PaneFolder control ) { if ( presentation == null ) return ; ITheme theme = PlatformUI . getWorkbench ( ) . getThemeManager ( ) . getCurrentTheme ( ) ; if ( ( control . getControl ( ) . getData ( ColorSchemeService . LISTENER_KEY ) ) == null ) { final WeakReference ref = new WeakReference ( presentation ) ; final IPropertyChangeListener listener = new IPropertyChangeListener ( ) { public void propertyChange ( PropertyChangeEvent event ) { String property = event . getProperty ( ) ; if ( ( ( ( ( ( ( ( property . equals ( CHANGE_CURRENT_THEME ) ) || ( property . equals ( INACTIVE_TAB_BG_START ) ) ) || ( property . equals ( INACTIVE_TAB_BG_END ) ) ) || ( property . equals ( INACTIVE_TAB_TEXT_COLOR ) ) ) || ( property . equals ( ACTIVE_TAB_TEXT_COLOR ) ) ) || ( property . equals ( ACTIVE_TAB_BG_START ) ) ) || ( property . equals ( ACTIVE_TAB_BG_END ) ) ) || ( property . equals ( TAB_TEXT_FONT ) ) ) { ColorSchemeService . setTabAttributes ( ( ( BasicStackPresentation ) ( ref . get ( ) ) ) , control ) ; } } } ; control . getControl ( ) . setData ( ColorSchemeService . LISTENER_KEY , listener ) ; control . getControl ( ) . addDisposeListener ( new DisposeListener ( ) { public void widgetDisposed ( DisposeEvent e ) { PlatformUI . getWorkbench ( ) . getThemeManager ( ) . removePropertyChangeListener ( listener ) ; control . getControl ( ) . setData ( ColorSchemeService . LISTENER_KEY , null ) ; } } ) ; PlatformUI . getWorkbench ( ) . getThemeManager ( ) . addPropertyChangeListener ( listener ) ; } int [ ] percent = new int [ 1 ] ; boolean vertical ; ColorRegistry colorRegistry = theme . getColorRegistry ( ) ; control . getControl ( ) . setForeground ( colorRegistry . get ( INACTIVE_TAB_TEXT_COLOR ) ) ; Color [ ] c = new Color [ 2 ] ; c [ 0 ] = colorRegistry . get ( INACTIVE_TAB_BG_START ) ; c [ 1 ] = colorRegistry . get ( INACTIVE_TAB_BG_END ) ; percent [ 0 ] = theme . getInt ( INACTIVE_TAB_PERCENT ) ; vertical = theme . getBoolean ( INACTIVE_TAB_VERTICAL ) ; <START_BUG> presentation . setBackgroundColors ( c [ 0 ] , c [ 1 ] , c [ 1 ] ) ; <END_BUG> if ( presentation . isActive ( ) ) { control . setSelectionForeground ( colorRegistry . get ( ACTIVE_TAB_TEXT_COLOR ) ) ; c [ 0 ] = colorRegistry . get ( ACTIVE_TAB_BG_START ) ; c [ 1 ] = colorRegistry . get ( ACTIVE_TAB_BG_END ) ; percent [ 0 ] = theme . getInt ( ACTIVE_TAB_PERCENT ) ; vertical = theme . getBoolean ( ACTIVE_TAB_VERTICAL ) ; } control . setSelectionBackground ( c , percent , vertical ) ; CTabItem [ ] items = control . getItems ( ) ; Font tabFont = theme . getFontRegistry ( ) . get ( TAB_TEXT_FONT ) ; control . getControl ( ) . setFont ( tabFont ) ; for ( int i = 0 ; i < ( items . length ) ; i ++ ) { items [ i ] . setFont ( tabFont ) ; } } public static void setViewTitleFont ( BasicStackPresentation presentation , final Label control ) { } }

Fix:
presentation . setBackgroundColor ( c [ 1 ] ) ;
Buggy code:
public abstract class AbstractRemoveStepHandler implements OperationStepHandler { public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } protected void performRemove ( OperationContext context , final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected boolean requireNoChildResources ( ) { } protected void performRuntime ( final OperationContext context , final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected void recoverServices ( final OperationContext context , final ModelNode operation , final ModelNode model ) throws OperationFailedException { } protected boolean requiresRuntime ( OperationContext context ) { <START_BUG> return ( context . getType ( ) ) == ( Type . SERVER ) ; <END_BUG> } private List < PathElement > getChildren ( Resource resource ) { } }

Fix:
return context . isNormalServer ( ) ;
Buggy code:
public class MonthDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; date . year = YEAR ; date . day = DAY ; if ( ( ( str . charAt ( 0 ) ) != '-' ) || ( ( str . charAt ( 1 ) ) != '-' ) ) { throw new SchemaDateTimeException ( ( "Invalid<seq2seq4repair_space>format<seq2seq4repair_space>for<seq2seq4repair_space>gMonth:<seq2seq4repair_space>" + str ) ) ; } int stop = 4 ; date . month = parseInt ( str , 2 , stop ) ; if ( ( ( ( str . length ( ) ) >= ( stop + 2 ) ) && ( ( str . charAt ( stop ) ) == '-' ) ) && ( ( str . charAt ( ( stop + 1 ) ) ) == '-' ) ) { stop += 2 ; } if ( stop < len ) { int sign = findUTCSign ( str , stop , len ) ; if ( sign < 0 ) { throw new SchemaDateTimeException ( ( "Error<seq2seq4repair_space>in<seq2seq4repair_space>month<seq2seq4repair_space>parsing:<seq2seq4repair_space>" + str ) ) ; } else { getTimeZone ( str , date , sign , len ) ; } } validateDateTime ( date ) ; if ( ( ( date . utc ) != 0 ) && ( ( date . utc ) != 'Z' ) ) { normalize ( date ) ; } date . position = 1 ; return date ; } protected String dateToString ( DateTimeData date ) { } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class Java2WSValidateInputCommand extends AbstractDataModelOperation { private Java2WSDataModel model ; public Java2WSValidateInputCommand ( Java2WSDataModel model ) { } @ Override public IStatus execute ( IProgressMonitor monitor , IAdaptable info ) throws ExecutionException { IStatus status = Status . OK_STATUS ; IJavaProject javaProject = JDTUtils . getJavaProject ( model . getProjectName ( ) ) ; if ( javaProject != null ) { <START_BUG> IType type = JDTUtils . getType ( javaProject , model . getJavaStartingPoint ( ) ) ; <END_BUG> if ( ( type == null ) || ( ! ( type . exists ( ) ) ) ) { status = new Status ( IStatus . ERROR , CXFCreationCorePlugin . PLUGIN_ID , CXFCreationCoreMessages . bind ( JAVA2WS_SERVICE_IMPL_NOT_FOUND , new Object [ ] { model . getJavaStartingPoint ( ) , model . getProjectName ( ) } ) ) ; } if ( type . isBinary ( ) ) { status = new Status ( IStatus . ERROR , CXFCreationCorePlugin . PLUGIN_ID , CXFCreationCoreMessages . JAVA2WS_SERVICE_IMPL_NOT_BINARY ) ; } } return status ; } }

Fix:
IType type = JDTUtils . findType ( javaProject , model . getJavaStartingPoint ( ) ) ;
Buggy code:
public class PolymorphicResolverTest { @ Test public void testWithoutGuards ( ) { } private Collection < Function > getCandidates ( Object ... params ) { final FunctionDefContextImpl fdc = ( ( FunctionDefContextImpl ) ( createEmptyFdc ( new CompositeTypesystem ( ) ) ) ) ; <START_BUG> return new PolymorphicResolver ( "operatorPlus" ) . getBestFitCandidates ( fdc . findFunctionCandidates ( createEmptyExecutionContext ( ) , "operatorPlus" , Arrays . asList ( params ) ) ) ; <END_BUG> } }

Fix:
return new PolymorphicResolver ( "operatorPlus" ) . getBestFitCandidates ( fdc . findFunctionCandidates ( "operatorPlus" , fdc . typesForParameters ( createEmptyExecutionContext ( ) . getTypesystem ( ) , Arrays . asList ( params ) ) ) ) ;