nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ActivityAttributeTypeRule extends BaseRule { public ActivityAttributeTypeRule ( Digester digester , String state ) { } public void body ( String text ) throws Exception { log ( ) . debug ( ( ( ( "(" + ( getState ( ) ) ) + ")<seq2seq4repair_space>activity<seq2seq4repair_space>attribute<seq2seq4repair_space>type<seq2seq4repair_space>body:<seq2seq4repair_space>" ) + text ) ) ; <START_BUG> AttributeType issueType = AttributeType . getInstance ( attributeTypeName ) ; <END_BUG> ActivityInfo activityInfo = ( ( ActivityInfo ) ( digester . pop ( ) ) ) ; activityInfo . setType ( issueType ) ; digester . push ( activityInfo ) ; } }

Fix:
AttributeType issueType = AttributeType . getInstance ( text ) ;
Buggy code:
public class MainActivity extends AppCompatActivity { private Toolbar toolbar ; private String [ ] titles = new String [ ] { "Campus<seq2seq4repair_space>Johanneberg" , "Campus<seq2seq4repair_space>Lindholmen" , "Sannegården" , "Inställningar" , "Hjälp<seq2seq4repair_space>och<seq2seq4repair_space>feedback" } ; private int [ ] icons = new int [ ] { mipmap . ic_launcher , mipmap . ic_launcher , mipmap . ic_launcher , mipmap . ic_launcher , mipmap . ic_launcher } ; RecyclerView mRecyclerView ; Adapter mAdapter ; LayoutManager mLayoutManager ; DrawerLayout drawer ; ActionBarDrawerToggle mDrawerToggle ; String appName ; String tagLine ; int appIcon = mipmap . ic_launcher ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private class RssTask extends AsyncTask < String , Void , List < RssItem > > { private Context context ; public RssTask ( Context c ) { } @ Override protected void onPreExecute ( ) { } @ Override protected List < RssItem > doInBackground ( String ... urls ) { try { RssReader rssReader = new RssReader ( urls [ 0 ] ) ; rssReader . readRss ( ) ; return rssReader . getItems ( ) ; } catch ( IOException e ) { <START_BUG> Toast . makeText ( context , e . getMessage ( ) , LENGTH_SHORT ) ; <END_BUG> } return null ; } @ Override protected void onPostExecute ( List < RssItem > rssItems ) { } } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void startLoadingAnimation ( ) { } private void dismissLoadingAnimation ( ) { } private void loadFoodMenu ( List < RssItem > rssItems ) { } }

Fix:
Toast . makeText ( context , context . getResources ( ) . getString ( menu_error ) , LENGTH_SHORT ) ;
Buggy code:
public class TestPredicatedSet < E > extends AbstractTestSet < E > { public TestPredicatedSet ( String testName ) { } protected Predicate < E > truePredicate = org . apache . commons . collections . functors . TruePredicate . < E > truePredicate ( ) ; protected PredicatedSet < E > decorateSet ( Set < E > set , Predicate < ? super E > predicate ) { <START_BUG> return ( ( PredicatedSet < E > ) ( PredicatedSet . decorate ( set , predicate ) ) ) ; <END_BUG> } @ Override public PredicatedSet < E > makeObject ( ) { } @ Override @ SuppressWarnings ( "unchecked" ) public E [ ] getFullElements ( ) { } protected Predicate < E > testPredicate = new Predicate < E > ( ) { public boolean evaluate ( E o ) { } } ; protected PredicatedSet < E > makeTestSet ( ) { } public void testGetSet ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIllegalAdd ( ) { } @ SuppressWarnings ( "unchecked" ) public void testIllegalAddAll ( ) { } @ Override public String getCompatibilityVersion ( ) { } }

Fix:
return ( ( PredicatedSet < E > ) ( PredicatedSet . predicatedSet ( set , predicate ) ) ) ;
Buggy code:
public class MSVSSGET extends MSVSS { private String m_LocalPath = null ; private boolean m_Recursive = false ; private boolean m_Writable = false ; private String m_Version = null ; private String m_Date = null ; private String m_Label = null ; private String m_AutoResponse = null ; private boolean m_Quiet = false ; public void execute ( ) throws BuildException { } public void setLocalpath ( Path localPath ) { } public void getLocalpathCommand ( Commandline cmd ) { if ( ( m_LocalPath ) == null ) { return ; } else { File dir = project . resolveFile ( m_LocalPath ) ; if ( ! ( dir . exists ( ) ) ) { boolean done = dir . mkdirs ( ) ; <START_BUG> if ( done == false ) { <END_BUG> String msg = ( ( "Directory<seq2seq4repair_space>" + ( m_LocalPath ) ) + "<seq2seq4repair_space>creation<seq2seq4repair_space>was<seq2seq4repair_space>not<seq2seq4repair_space>" ) + "successful<seq2seq4repair_space>for<seq2seq4repair_space>an<seq2seq4repair_space>unknown<seq2seq4repair_space>reason" ; throw new BuildException ( msg , location ) ; } project . log ( ( "Created<seq2seq4repair_space>dir:<seq2seq4repair_space>" + ( dir . getAbsolutePath ( ) ) ) ) ; } cmd . createArgument ( ) . setValue ( ( ( FLAG_OVERRIDE_WORKING_DIR ) + ( m_LocalPath ) ) ) ; } } public void setRecursive ( boolean recursive ) { } public void getRecursiveCommand ( Commandline cmd ) { } public final void setQuiet ( boolean quiet ) { } public void getQuietCommand ( Commandline cmd ) { } public final void setWritable ( boolean argWritable ) { } public void getWritableCommand ( Commandline cmd ) { } public void setVersion ( String version ) { } public void setDate ( String date ) { } public void setLabel ( String label ) { } public void getVersionCommand ( Commandline cmd ) { } public void setAutoresponse ( String response ) { } public void getAutoresponse ( Commandline cmd ) { } }

Fix:
if ( ! done ) {
Buggy code:
public class ShortConverter extends AbstractIntegerConverter < Short > { private static final long serialVersionUID = 1L ; public static final IConverter < Short > INSTANCE = new ShortConverter ( ) ; <START_BUG> public Short convertToObject ( final String value , Locale locale ) { <END_BUG> final Number number = parse ( value , Short . MIN_VALUE , Short . MAX_VALUE , locale ) ; if ( number == null ) { return null ; } return number . shortValue ( ) ; } @ Override protected Class < Short > getTargetType ( ) { } }

Fix:
public Short convertToObject ( final String value , final Locale locale ) {
Buggy code:
public class RequestResponseBodyMethodProcessor extends AbstractMessageConverterMethodProcessor { public RequestResponseBodyMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters ) { } public RequestResponseBodyMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters , ContentNegotiationManager contentNegotiationManager ) { } public RequestResponseBodyMethodProcessor ( List < HttpMessageConverter < ? > > messageConverters , ContentNegotiationManager contentNegotiationManager , List < Object > responseBodyAdvice ) { } @ Override public boolean supportsParameter ( MethodParameter parameter ) { } @ Override public boolean supportsReturnType ( MethodParameter returnType ) { } @ Override public Object resolveArgument ( MethodParameter parameter , ModelAndViewContainer mavContainer , NativeWebRequest webRequest , WebDataBinderFactory binderFactory ) throws Exception { } private void validate ( WebDataBinder binder , MethodParameter parameter ) throws Exception , MethodArgumentNotValidException { } private boolean isBindExceptionRequired ( WebDataBinder binder , MethodParameter parameter ) { } @ Override protected < T > Object readWithMessageConverters ( NativeWebRequest webRequest , MethodParameter methodParam , Type paramType ) throws IOException , HttpMediaTypeNotSupportedException { } private Object handleEmptyBody ( MethodParameter param ) { } @ Override public void handleReturnValue ( Object returnValue , MethodParameter returnType , ModelAndViewContainer mavContainer , NativeWebRequest webRequest ) throws IOException , HttpMediaTypeNotAcceptableException { mavContainer . setRequestHandled ( true ) ; <START_BUG> if ( returnValue != null ) { <END_BUG> writeWithMessageConverters ( returnValue , returnType , webRequest ) ; } } }

Fix:
if ( ( returnValue != null ) || ( getAdviceChain ( ) . hasAdvice ( ) ) ) {
Buggy code:
public final class LookupInjectionSource extends InjectionSource { private final String lookupName ; public LookupInjectionSource ( final String lookupName ) { } public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) { final String applicationName = resolutionContext . getApplicationName ( ) ; final String moduleName = resolutionContext . getModuleName ( ) ; final String componentName = resolutionContext . getComponentName ( ) ; final boolean compUsesModule = resolutionContext . isCompUsesModule ( ) ; final String lookupName ; if ( ! ( this . lookupName . startsWith ( "java:" ) ) ) { <START_BUG> if ( componentName != null ) { <END_BUG> lookupName = "java:comp//env//" + ( this . lookupName ) ; } else if ( compUsesModule ) { lookupName = "java:module//env//" + ( this . lookupName ) ; } else { lookupName = "java:jboss//env" + ( this . lookupName ) ; } } else if ( ( this . lookupName . startsWith ( "java:comp//" ) ) && compUsesModule ) { lookupName = "java:module//" + ( this . lookupName . substring ( 10 ) ) ; } else { lookupName = this . lookupName ; } final ServiceName serviceName = ContextNames . serviceNameOfContext ( applicationName , moduleName , componentName , lookupName ) ; serviceBuilder . addDependency ( serviceName , ManagedReferenceFactory . class , injector ) ; } public boolean equals ( final Object obj ) { } private boolean equals ( LookupInjectionSource configuration ) { } public int hashCode ( ) { } }

Fix:
if ( ( componentName != null ) && ( ! compUsesModule ) ) {
Buggy code:
public class PartialBuilder extends Builder { private static final Logger log = LoggerFactory . getLogger ( PartialBuilder . class ) ; protected static boolean isStep2 ( Configuration conf ) { } protected static void setStep2 ( Configuration conf , boolean value ) { } public PartialBuilder ( TreeBuilder treeBuilder , Path dataPath , Path datasetPath , Long seed ) { } public PartialBuilder ( TreeBuilder treeBuilder , Path dataPath , Path datasetPath , Long seed , Configuration conf ) { } @ Override protected void configureJob ( JobConf job , int nbTrees , boolean oobEstimate ) throws IOException { } @ Override protected DecisionForest parseOutput ( JobConf job , PredictionCallback callback ) throws IOException { } protected static void processOutput ( JobConf job , Path outputPath , int [ ] firstIds , TreeID [ ] keys , Node [ ] trees , PredictionCallback callback ) throws IOException { FileSystem fs = outputPath . getFileSystem ( job ) ; Path [ ] outfiles = DFUtils . listOutputFiles ( fs , outputPath ) ; TreeID key = new TreeID ( ) ; MapredOutput value = new MapredOutput ( ) ; int index = 0 ; for ( Path path : outfiles ) { Reader reader = new Reader ( fs , path , job ) ; try { while ( reader . next ( key , value ) ) { if ( keys != null ) { keys [ index ] = key . clone ( ) ; } if ( trees != null ) { trees [ index ] = value . getTree ( ) ; } PartialBuilder . processOutput ( firstIds , key , value , callback ) ; index ++ ; } } finally { reader . close ( ) ; } } <START_BUG> if ( index != ( keys . length ) ) { <END_BUG> throw new IllegalStateException ( ) ; } } private static void processOutput ( int [ ] firstIds , TreeID key , MapredOutput value , PredictionCallback callback ) { } }

Fix:
if ( ( keys != null ) && ( index != ( keys . length ) ) ) {
Buggy code:
public class DeferredCDATASectionImpl extends CDATASectionImpl implements DeferredNode { static final long serialVersionUID = 1983580632355645726L ; protected transient int fNodeIndex ; DeferredCDATASectionImpl ( DeferredDocumentImpl ownerDocument , int nodeIndex ) { } public int getNodeIndex ( ) { } protected void synchronizeData ( ) { syncData ( false ) ; DeferredDocumentImpl ownerDocument = ( ( DeferredDocumentImpl ) ( this . ownerDocument ( ) ) ) ; data = ownerDocument . getNodeValueString ( fNodeIndex ) ; <START_BUG> ignorableWhitespace ( ( ( ownerDocument . getFirstChild ( fNodeIndex ) ) == 1 ) ) ; <END_BUG> } }

Fix:
ignorableWhitespace ( ( ( ownerDocument . getLastChild ( fNodeIndex ) ) == 1 ) ) ;
Buggy code:
@ WebServlet ( name = "ControllerServlet" , urlPatterns = { "//controller" } ) public class ControllerServlet extends HttpServlet { private static final Logger log = Logger . getLogger ( ControllerServlet . class ) ; public void init ( ServletConfig config ) throws ServletException { try { final KeyStore keyStore = KeyStore . getInstance ( KeyStore . getDefaultType ( ) ) ; final InputStream in = new BufferedInputStream ( new FileInputStream ( "..//jcetest.keystore" ) ) ; try { keyStore . load ( in , null ) ; } finally { in . close ( ) ; } final X509Certificate testCertificate = ( ( X509Certificate ) ( keyStore . getCertificate ( "test" ) ) ) ; final Object validator = ControllerServlet . get ( "javax.crypto.JarVerifier" , "providerValidator" , Object . class ) ; ControllerServlet . get ( validator , "trustedX500Principals" , Map . class ) . put ( testCertificate . getIssuerX500Principal ( ) , Arrays . asList ( testCertificate ) ) ; } catch ( ClassNotFoundException e ) { throw new ServletException ( "This<seq2seq4repair_space>requires<seq2seq4repair_space>being<seq2seq4repair_space>run<seq2seq4repair_space>on<seq2seq4repair_space>Oracle<seq2seq4repair_space>JDK<seq2seq4repair_space>7." , e ) ; } catch ( Exception e ) { <START_BUG> throw new ServletException ( "Cannot<seq2seq4repair_space>install<seq2seq4repair_space>the<seq2seq4repair_space>a<seq2seq4repair_space>certificate<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>validator." , e ) ; <END_BUG> } Security . addProvider ( new DummyProvider ( ) ) ; } private static < T > T get ( final Object obj , final String fieldName , Class < T > type ) throws IllegalAccessException , NoSuchFieldException { } private static < T > T get ( final String className , final String fieldName , Class < T > type ) throws ClassNotFoundException , IllegalAccessException , NoSuchFieldException { } private static void set ( final Object obj , final String fieldName , final Object value ) throws IllegalAccessException , NoSuchFieldException { } protected void service ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } }

Fix:
throw new ServletException ( "Cannot<seq2seq4repair_space>install<seq2seq4repair_space>the<seq2seq4repair_space>certificate<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>validator." , e ) ;
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 { <START_BUG> binding = new LocalVariableBinding ( this , tb , modifiers ) ; <END_BUG> 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 ) { if ( ( ( initialization . isConstantValueOfTypeAssignableToType ( initTb , tb ) ) || ( ( tb . isBaseType ( ) ) && ( BaseTypeBinding . isWidening ( tb . id , initTb . id ) ) ) ) || ( scope . areTypesCompatible ( initTb , tb ) ) ) 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:
binding = new LocalVariableBinding ( this , tb , modifiers , false ) ;
Buggy code:
public interface IRequestTargetMounter { <START_BUG> void mount ( String path , IRequestTargetUrlCodingStrategy urlCodingStrategy ) ; <END_BUG> void unmount ( String path ) { } IRequestTargetUrlCodingStrategy urlCodingStrategyForPath ( String path ) { } CharSequence pathForTarget ( IRequestTarget requestTarget ) { } IRequestTarget targetForRequest ( RequestParameters requestParameters ) { } }

Fix:
void mount ( IRequestTargetUrlCodingStrategy urlCodingStrategy ) ;
Buggy code:
public abstract class RefreshingView extends RepeatingView { private static final long serialVersionUID = 1L ; private IItemReuseStrategy itemReuseStrategy ; public RefreshingView ( MarkupContainer parent , final String id ) { } public RefreshingView ( MarkupContainer parent , final String id , IModel model ) { } @ Override protected void internalOnAttach ( ) { } protected abstract Iterator getItemModels ( ) { } protected abstract void populateItem ( final Item item ) { } protected Item newItem ( final String id , int index , final IModel model ) { } public Iterator getItems ( ) { } protected void addItems ( Iterator items ) { while ( items . hasNext ( ) ) { <START_BUG> add ( ( ( Item ) ( items . next ( ) ) ) ) ; <END_BUG> } } public IItemReuseStrategy getItemReuseStrategy ( ) { } public RefreshingView setItemReuseStrategy ( IItemReuseStrategy strategy ) { } }

Fix:
( ( Item ) ( items . next ( ) ) ) . reattach ( ) ;
Buggy code:
class WebSite extends OleControlSite { COMObject iDocHostUIHandler ; COMObject iDocHostShowUI ; COMObject iServiceProvider ; COMObject iInternetSecurityManager ; COMObject iOleCommandTarget ; static final int OLECMDID_SHOWSCRIPTERROR = 40 ; static final String CONSUME_KEY = "org.eclipse.swt.OleFrame.ConsumeKey" ; public WebSite ( Composite parent , int style , String progId ) { } protected void createCOMInterfaces ( ) { } protected void disposeCOMInterfaces ( ) { } protected int AddRef ( ) { } protected int QueryInterface ( int riid , int ppvObject ) { } int EnableModeless ( int EnableModeless ) { } int FilterDataObject ( int pDO , int ppDORet ) { } int GetDropTarget ( int pDropTarget , int ppDropTarget ) { } int GetExternal ( int ppDispatch ) { } int GetHostInfo ( int pInfo ) { } int GetOptionKeyPath ( int pchKey , int dw ) { } int HideUI ( ) { } int OnDocWindowActivate ( int fActivate ) { } int OnFrameWindowActivate ( int fActivate ) { } protected int Release ( ) { } int ResizeBorder ( int prcBorder , int pUIWindow , int fFrameWindow ) { } int ShowContextMenu ( int dwID , int ppt , int pcmdtReserved , int pdispReserved ) { } int ShowUI ( int dwID , int pActiveObject , int pCommandTarget , int pFrame , int pDoc ) { <START_BUG> return COM . E_NOTIMPL ; <END_BUG> } int TranslateAccelerator ( int lpMsg , int pguidCmdGroup , int nCmdID ) { } int TranslateUrl ( int dwTranslate , int pchURLIn , int ppchURLOut ) { } int UpdateUI ( ) { } int ShowMessage ( int hwnd , int lpstrText , int lpstrCaption , int dwType , int lpstrHelpFile , int dwHelpContext , int plResult ) { } int ShowHelp ( int hwnd , int pszHelpFile , int uCommand , int dwData , int ptMouse_x , int ptMouse_y , int pDispatchObjectHit ) { } int QueryService ( int guidService , int riid , int ppvObject ) { } int SetSecuritySite ( int pSite ) { } int GetSecuritySite ( int ppSite ) { } int MapUrlToZone ( int pwszUrl , int pdwZone , int dwFlags ) { } int GetSecurityId ( int pwszUrl , int pbSecurityId , int pcbSecurityId , int dwReserved ) { } int ProcessUrlAction ( int pwszUrl , int dwAction , int pPolicy , int cbPolicy , int pContext , int cbContext , int dwFlags , int dwReserved ) { } int QueryCustomPolicy ( int pwszUrl , int guidKey , int ppPolicy , int pcbPolicy , int pContext , int cbContext , int dwReserved ) { } int SetZoneMapping ( int dwZone , int lpszPattern , int dwFlags ) { } int GetZoneMappings ( int dwZone , int ppenumString , int dwFlags ) { } int QueryStatus ( int pguidCmdGroup , int cCmds , int prgCmds , int pCmdText ) { } int Exec ( int pguidCmdGroup , int nCmdID , int nCmdExecOpt , int pvaIn , int pvaOut ) { } }

Fix:
return COM . S_FALSE ;
Buggy code:
public class Manager extends DiagramListener implements ActionListener , ChangeListener { private boolean inDebug = true ; public static final String PROGRAM_NAME = "UML2Java" ; private MainFrame window ; private Canvas canvas ; private MenuBar menuBar ; private SideBar sideBar ; private StatusBar status ; private ToolBar toolBar ; private DocumentModel document ; private boolean edited = false ; private TextLabel currentEdited ; public Manager ( ) { } public ArrayList < DocumentElement > getDrawableElements ( ) { } @ Override public void mouseClicked ( MouseEvent e ) { } @ Override protected void enableLabelEdit ( TextLabel label ) { } @ Override public void mouseEntered ( MouseEvent e ) { } @ Override public void mouseExited ( MouseEvent e ) { } @ Override public void mousePressed ( MouseEvent e ) { } @ Override public void mouseReleased ( MouseEvent e ) { } @ Override public void mouseDragged ( MouseEvent e ) { } @ Override public void mouseMoved ( MouseEvent e ) { } @ Override public void keyPressed ( KeyEvent e ) { } @ Override public void keyReleased ( KeyEvent e ) { } @ Override public void keyTyped ( KeyEvent e ) { } @ Override public void stateChanged ( ChangeEvent e ) { } @ Override public void actionPerformed ( ActionEvent e ) { } private void openNewDocument ( ) { } private void addNewClass ( Point p ) { } private void addNewLabel ( Point p ) { } private void openAboutWindow ( ) { } private void save ( ) { } private void saveAs ( ) { } private void serialise ( String fileName ) { document . cleanUp ( ) ; try { FileOutputStream fos = new FileOutputStream ( fileName ) ; ObjectOutputStream out = new ObjectOutputStream ( fos ) ; out . writeObject ( this . document ) ; out . close ( ) ; status . setText ( "Document<seq2seq4repair_space>saved<seq2seq4repair_space>successfully" ) ; } catch ( Exception e ) { status . setText ( "Could<seq2seq4repair_space>not<seq2seq4repair_space>write<seq2seq4repair_space>your<seq2seq4repair_space>document<seq2seq4repair_space>into<seq2seq4repair_space>the<seq2seq4repair_space>file.<seq2seq4repair_space>Sorry!" ) ; <START_BUG> System . out . println ( e . getStackTrace ( ) ) ; <END_BUG> } } private void openExisting ( ) { } private void changeFont ( ) { } private void changeZoom ( double zoom ) { } public void setWaitCursor ( boolean value ) { } public void exit ( ) { } }

Fix:
e . printStackTrace ( ) ;
Buggy code:
public class SettingsActivity extends Activity { private Spinner spBTName ; private EditText txtHistLen ; private TextView tvBTNameInfo ; private ArrayAdapter < String > adapterBTName ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } private void initBTName ( ) { this . tvBTNameInfo = ( ( TextView ) ( findViewById ( tvNameOfDevice ) ) ) ; this . spBTName = ( ( Spinner ) ( findViewById ( txtNameOfDevice ) ) ) ; this . spBTName . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > adapterView , View view , int i , long l ) { if ( ( spBTName . getItemAtPosition ( i ) ) != null ) { Settings . GET_INSTANCE ( ) . setBTDeviceName ( spBTName . getItemAtPosition ( i ) . toString ( ) ) ; } } @ Override public void onNothingSelected ( AdapterView < ? > adapterView ) { } } ) ; adapterBTName = new ArrayAdapter < String > ( this , layout . spinner_item ) ; boolean error = false ; int c = 0 ; try { BluetoothAdapter btAdapter = BluetoothAdapter . getDefaultAdapter ( ) ; if ( btAdapter != null ) { for ( BluetoothDevice device : btAdapter . getBondedDevices ( ) ) { adapterBTName . add ( device . getName ( ) ) ; c ++ ; } } else { error = true ; } } catch ( Exception ex ) { Log . e ( "Settings" , "Error<seq2seq4repair_space>retrieving<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>bluetooth<seq2seq4repair_space>devices!!!" ) ; error = true ; } if ( error || ( c == 0 ) ) { this . spBTName . setEnabled ( false ) ; this . tvBTNameInfo . setText ( txt_settings_btdevice_error ) ; } else { String currentValue = Settings . GET_INSTANCE ( ) . getBTDeviceName ( ) ; int idx = this . adapterBTName . getPosition ( currentValue ) ; <START_BUG> if ( idx > ( - 1 ) ) <END_BUG> idx = 0 ; this . spBTName . setAdapter ( adapterBTName ) ; this . spBTName . setSelection ( idx ) ; } } private void initHistoryLength ( ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void btnResetDatabase_Click ( View view ) { } }

Fix:
if ( idx < 0 )
Buggy code:
public class Target { private double [ ] [ ] homMatrix ; private double [ ] position ; private double [ ] [ ] rotation ; public static void main ( String [ ] args ) { } public Target ( ) { } public Target ( double [ ] [ ] T ) { } public Target ( double [ ] pos , double [ ] [ ] rot ) { } public double [ ] [ ] getHomMatrix ( ) { } public double [ ] [ ] getInvHomMatrix ( ) { } public double [ ] getPosition ( ) { } public double [ ] [ ] getRotation ( ) { } public double [ ] [ ] getInvRotation ( ) { } public void setHomMatrix ( double [ ] [ ] H ) { } public void translateTarget ( double [ ] vector ) { for ( int i = 0 ; i < ( this . position . length ) ; i ++ ) { this . position [ i ] += vector [ i ] ; <START_BUG> this . homMatrix [ i ] [ 3 ] = vector [ i ] ; <END_BUG> } } private double [ ] [ ] identityMatr ( ) { } }

Fix:
this . homMatrix [ i ] [ 3 ] += vector [ i ] ;
Buggy code:
public class SIG0Signer { private static final short VALIDITY = 300 ; private int algorithm ; private PrivateKey privateKey ; private Name name ; private int footprint ; public SIG0Signer ( int algorithm , PrivateKey privateKey , Name name , int keyFootprint ) { } public SIG0Signer ( int algorithm , PrivateKey privateKey , Name name , PublicKey publicKey ) { } public void apply ( Message m , byte [ ] old ) throws IOException , InvalidKeyException , NoSuchAlgorithmException , SignatureException { int validity = Options . intValue ( "sig0validity" ) ; if ( validity < 0 ) validity = SIG0Signer . VALIDITY ; long now = System . currentTimeMillis ( ) ; Date timeSigned = new Date ( now ) ; Date timeExpires = new Date ( ( now + ( validity * 1000 ) ) ) ; String algorithmName ; if ( ( algorithm ) == ( DNSSEC . DSA ) ) { algorithmName = "SHA1withDSA" ; } else if ( ( algorithm ) == ( DNSSEC . RSAMD5 ) ) { algorithmName = "MD5withRSA" ; } else if ( ( algorithm ) == ( DNSSEC . RSASHA1 ) ) { algorithmName = "SHA1withRSA" ; } else { throw new NoSuchAlgorithmException ( "Unknown<seq2seq4repair_space>algorithm" ) ; } SIGRecord tmpsig = new SIGRecord ( Name . root , DClass . ANY , 0 , 0 , algorithm , 0 , timeExpires , timeSigned , footprint , name , null ) ; byte [ ] outBytes = DNSSEC . digestMessage ( tmpsig , m , old ) ; Signature signer = Signature . getInstance ( algorithmName ) ; signer . initSign ( privateKey ) ; signer . update ( outBytes ) ; byte [ ] signature = signer . sign ( ) ; if ( ( algorithm ) == ( DNSSEC . DSA ) ) { DSAKey dsakey = ( ( DSAKey ) ( privateKey ) ) ; <START_BUG> signature = DSASignature . create ( dsakey . getParams ( ) , signature ) ; <END_BUG> } SIGRecord sig = new SIGRecord ( Name . root , DClass . ANY , 0 , 0 , algorithm , 0 , timeExpires , timeSigned , footprint , name , signature ) ; m . addRecord ( sig , ADDITIONAL ) ; } }

Fix:
signature = DSASignature . toDNS ( dsakey . getParams ( ) , signature ) ;
Buggy code:
public class YearDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { try { <START_BUG> return parse ( content ) ; <END_BUG> } catch ( Exception ex ) { throw new InvalidDatatypeValueException ( "cvc-datatype-valid.1.2.1" , new Object [ ] { content , "gYear" } ) ; } } protected int [ ] parse ( String str ) throws SchemaDateTimeException { } protected String dateToString ( int [ ] date ) { } }

Fix:
return new DateTimeData ( parse ( content ) , this ) ;
Buggy code:
public final class ContainerMetaDataDeploymentAspect extends AbstractDeploymentAspect { private final MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE ( ) ; private final MetaDataBuilderEJB3 metaDataBuilderEJB3 = new MetaDataBuilderEJB3 ( ) ; public ContainerMetaDataDeploymentAspect ( ) { } @ Override public void start ( final Deployment dep ) { if ( WSHelper . isJseDeployment ( dep ) ) { this . log . debug ( ( "Creating<seq2seq4repair_space>JBoss<seq2seq4repair_space>agnostic<seq2seq4repair_space>JSE<seq2seq4repair_space>meta<seq2seq4repair_space>data<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( dep . getSimpleName ( ) ) ) ) ; if ( WSHelper . hasAttachment ( dep , JBossWebMetaData . class ) ) { final JSEArchiveMetaData jseMetaData = this . metaDataBuilderJSE . create ( dep ) ; dep . addAttachment ( JSEArchiveMetaData . class , jseMetaData ) ; } <START_BUG> } else <END_BUG> if ( WSHelper . isJaxwsEjbDeployment ( dep ) ) { this . log . debug ( ( "Creating<seq2seq4repair_space>JBoss<seq2seq4repair_space>agnostic<seq2seq4repair_space>EJB3<seq2seq4repair_space>meta<seq2seq4repair_space>data<seq2seq4repair_space>for<seq2seq4repair_space>deployment:<seq2seq4repair_space>" + ( dep . getSimpleName ( ) ) ) ) ; final EJBArchiveMetaData ejbMetaData = this . metaDataBuilderEJB3 . create ( dep ) ; dep . addAttachment ( EJBArchiveMetaData . class , ejbMetaData ) ; } } }

Fix:
}
Buggy code:
public class ResetCacheValve extends AbstractValve { private static final Category log = Category . getInstance ( ResetCacheValve . class ) ; private static final String KEY = ( ResetCacheValve . class . getName ( ) ) + ".start" ; public void invoke ( RunData data , ValveContext context ) throws IOException , TurbineException { Long start = ( ( Long ) ( data . getRequest ( ) . getAttribute ( ResetCacheValve . KEY ) ) ) ; if ( start == null ) { data . getRequest ( ) . setAttribute ( ResetCacheValve . KEY , new Long ( System . currentTimeMillis ( ) ) ) ; } else { String s = ( ( ( ( ( "Action=" + ( data . getAction ( ) ) ) + "<seq2seq4repair_space>and<seq2seq4repair_space>template=" ) + ( data . getTarget ( ) ) ) + "<seq2seq4repair_space>took:<seq2seq4repair_space>" ) + ( ( System . currentTimeMillis ( ) ) - ( start . longValue ( ) ) ) ) + "<seq2seq4repair_space>ms" ; ResetCacheValve . log . debug ( s ) ; } <START_BUG> ScarabCache . removeMap ( ) ; <END_BUG> context . invokeNext ( data ) ; } }

Fix:
ScarabCache . clear ( ) ;
Buggy code:
public class TestMaxTermFrequency extends LuceneTestCase { Directory dir ; IndexReader reader ; ArrayList < Integer > expected = new ArrayList < Integer > ( ) ; @ Override public void setUp ( ) throws Exception { } @ Override public void tearDown ( ) throws Exception { } public void test ( ) throws Exception { <START_BUG> NumericDocValues fooNorms = MultiSimpleDocValues . simpleNormValues ( reader , "foo" ) ; <END_BUG> for ( int i = 0 ; i < ( reader . maxDoc ( ) ) ; i ++ ) { assertEquals ( expected . get ( i ) . intValue ( ) , ( ( fooNorms . get ( i ) ) & 255 ) ) ; } } private String addValue ( ) { } class TestSimilarity extends DefaultSimilarity { @ Override public byte encodeNormValue ( float f ) { } @ Override public float decodeNormValue ( byte b ) { } @ Override public float lengthNorm ( FieldInvertState state ) { } } }

Fix:
NumericDocValues fooNorms = MultiDocValues . getNormValues ( reader , "foo" ) ;
Buggy code:
public final class BasicAuthenticationServiceImpl extends AuthenticationServiceBase implements UserAuthenticator { public boolean canSupport ( Properties properties ) { } public void boot ( boolean create , Properties properties ) throws StandardException { } public boolean authenticateUser ( String userName , String userPassword , String databaseName , Properties info ) { String clientSecurityMechanism = null ; int secMec = 0 ; if ( userName == null ) return false ; String definedUserPassword = null ; String passedUserPassword = null ; <START_BUG> if ( ( clientSecurityMechanism = info . getProperty ( CLIENT_SECURITY_MECHANISM ) ) != null ) { <END_BUG> secMec = Integer . parseInt ( clientSecurityMechanism ) ; } String userNameProperty = USER_PROPERTY_PREFIX . concat ( userName ) ; definedUserPassword = getDatabaseProperty ( userNameProperty ) ; if ( definedUserPassword != null ) { if ( secMec != ( SECMEC_USRSSBPWD ) ) { passedUserPassword = encryptPassword ( userPassword ) ; } else { definedUserPassword = substitutePassword ( userName , definedUserPassword , info , true ) ; passedUserPassword = userPassword ; } } else { definedUserPassword = getSystemProperty ( userNameProperty ) ; passedUserPassword = userPassword ; if ( ( definedUserPassword != null ) && ( secMec == ( SECMEC_USRSSBPWD ) ) ) { definedUserPassword = substitutePassword ( userName , definedUserPassword , info , false ) ; } } if ( definedUserPassword == null ) return false ; if ( ! ( definedUserPassword . equals ( passedUserPassword ) ) ) return false ; return true ; } }

Fix:
if ( ( clientSecurityMechanism = info . getProperty ( DRDA_SECMEC ) ) != null ) {
Buggy code:
@ DatabaseTable ( tableName = "PEOPLE" ) public class User { public static final String ID = "ID" ; public static final String NAME = "NAME" ; public static final String PASSWORD = "APPPASSWORD" ; public static final String ROLE = "ROLE" ; public static final String VISIBLE = "VISIBLE" ; @ DatabaseField ( generatedId = true , columnName = User . ID ) private UUID id ; @ DatabaseField ( columnName = User . NAME , unique = true ) private String name ; @ DatabaseField ( columnName = User . PASSWORD ) private String password ; private String card ; @ DatabaseField ( columnName = User . ROLE ) private String role ; @ DatabaseField ( columnName = User . VISIBLE , defaultValue = "true" ) private Boolean visible ; public UUID getId ( ) { } public void setId ( UUID id ) { } public String getName ( ) { } public void setName ( String name ) { } public String getCard ( ) { } public void setCard ( String card ) { } public String getRole ( ) { } public void setRole ( String role ) { } public Boolean getVisible ( ) { } public void setVisible ( Boolean visible ) { } public String getPassword ( ) { } public void setPassword ( String password ) throws UnsupportedEncodingException , NoSuchAlgorithmException { } public boolean isAuthentication ( String password ) throws UnsupportedEncodingException , NoSuchAlgorithmException { <START_BUG> return Hashcypher . authenticate ( this . password , password ) ; <END_BUG> } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object other ) { } }

Fix:
return Hashcypher . authenticate ( password , this . password ) ;
Buggy code:
public class OpenWithAttachmentCommand extends FolderCommand { MimePart part ; File tempFile ; public OpenWithAttachmentCommand ( DefaultCommandReference [ ] references ) { } public void updateGUI ( ) throws Exception { } public void execute ( Worker worker ) throws Exception { FolderCommandReference [ ] r = ( ( FolderCommandReference [ ] ) ( getReferences ( ) ) ) ; Folder folder = ( ( Folder ) ( r [ 0 ] . getFolder ( ) ) ) ; Object [ ] uids = r [ 0 ] . getUids ( ) ; Integer [ ] address = r [ 0 ] . getAddress ( ) ; <START_BUG> part = folder . getMimePart ( uids [ 0 ] , address , worker ) ; <END_BUG> Decoder decoder ; MimeHeader header ; tempFile = null ; header = part . getHeader ( ) ; try { String filename = part . getHeader ( ) . getFileName ( ) ; if ( filename != null ) { tempFile = TempFileStore . createTempFile ( filename ) ; } else tempFile = TempFileStore . createTempFile ( ) ; decoder = CoderRouter . getDecoder ( header . contentTransferEncoding ) ; decoder . decode ( new ByteArrayInputStream ( part . getBody ( ) . getBytes ( "ISO_8859_1" ) ) , new FileOutputStream ( tempFile ) ) ; } catch ( Exception ex ) { ex . printStackTrace ( ) ; } } }

Fix:
part = folder . getMimePart ( uids [ 0 ] , address ) ;
Buggy code:
class Aggregate extends AbstractVal implements Val { private final JDBCAggregateListener _listener ; private final Val _arg ; private final ClassMapping _candidate ; private Joins _joins = null ; private ClassMetaData _meta = null ; private Class _cast = null ; public Aggregate ( JDBCAggregateListener listener , Val arg , ClassMapping candidate ) { } public ClassMetaData getMetaData ( ) { } public void setMetaData ( ClassMetaData meta ) { } public boolean isVariable ( ) { } public Class getType ( ) { } private Class [ ] getArgTypes ( ) { } public void setImplicitType ( Class type ) { } public void initialize ( Select sel , JDBCStore store , boolean nullTest ) { } public Joins getJoins ( ) { } public Object toDataStoreValue ( Object val , JDBCStore store ) { } public void select ( Select sel , JDBCStore store , Object [ ] params , boolean pks , JDBCFetchConfiguration fetch ) { } public void selectColumns ( Select sel , JDBCStore store , Object [ ] params , boolean pks , JDBCFetchConfiguration fetch ) { } public void groupBy ( Select sel , JDBCStore store , Object [ ] params , JDBCFetchConfiguration fetch ) { <START_BUG> sel . groupBy ( newSQLBuffer ( sel , store , params , fetch ) , false ) ; <END_BUG> } public void orderBy ( Select sel , JDBCStore store , Object [ ] params , boolean asc , JDBCFetchConfiguration fetch ) { } private SQLBuffer newSQLBuffer ( Select sel , JDBCStore store , Object [ ] params , JDBCFetchConfiguration fetch ) { } public Object load ( Result res , JDBCStore store , JDBCFetchConfiguration fetch ) throws SQLException { } public boolean hasVariable ( Variable var ) { } public void calculateValue ( Select sel , JDBCStore store , Object [ ] params , Val other , JDBCFetchConfiguration fetch ) { } public void clearParameters ( ) { } public int length ( ) { } public void appendTo ( SQLBuffer sql , int index , Select sel , JDBCStore store , Object [ ] params , JDBCFetchConfiguration fetch ) { } private FilterValue [ ] getArgs ( Select sel , JDBCStore store , Object [ ] params , JDBCFetchConfiguration fetch ) { } }

Fix:
sel . groupBy ( newSQLBuffer ( sel , store , params , fetch ) ) ;
Buggy code:
public class TaskerCommands { public static ArrayList < TaskerCommand > taskerCommands ; public TaskerCommands ( ) { } private static void load ( Context context ) { } public static ArrayList < TaskerCommand > getTaskerCommands ( Context context ) { } public static ArrayList < String > getCommandPhrasesList ( Context context ) { } public static void save ( Context context ) { } public static ArrayList < String > getCommandListFromTasker ( Context context ) { } public static boolean execute ( final Context context , String interceptedCommand ) { } public static boolean execute ( final Context context , String interceptedCommand , boolean dontResetGoogleNow ) { if ( ( TaskerCommands . taskerCommands ) == null ) { TaskerCommands . load ( context ) ; } boolean commandExecuted = false ; if ( TaskerIntent . testStatus ( context ) . equals ( OK ) ) { if ( ( TaskerCommands . taskerCommands ) != null ) { for ( final TaskerCommand cmd : TaskerCommands . taskerCommands ) { String [ ] activationPhrases = cmd . activationName . toLowerCase ( ) . split ( "," ) ; for ( String activationPhrase : activationPhrases ) { boolean commandFound = true ; for ( String activationPhrasePart : activationPhrase . split ( "&" ) ) { <START_BUG> if ( ! ( activationPhrase . toLowerCase ( ) . trim ( ) . contains ( activationPhrasePart . toLowerCase ( ) . trim ( ) ) ) ) { <END_BUG> commandFound = false ; break ; } } if ( commandFound && ( cmd . isEnabled ) ) { if ( ! dontResetGoogleNow ) { GoogleNowUtil . resetGoogleNow ( context ) ; } Handler handler = new Handler ( new Handler . Callback ( ) { @ Override public boolean handleMessage ( Message message ) { cmd . execute ( context , "" ) ; return true ; } } ) ; handler . sendEmptyMessageDelayed ( 0 , 2000 ) ; commandExecuted = true ; } } } } } else if ( TaskerIntent . testStatus ( context ) . equals ( NoPermission ) ) { Toast . makeText ( context , context . getString ( reinstall_commandr ) , LENGTH_LONG ) . show ( ) ; } return commandExecuted ; } }

Fix:
if ( ! ( interceptedCommand . toLowerCase ( ) . trim ( ) . contains ( activationPhrasePart . toLowerCase ( ) . trim ( ) ) ) ) {
Buggy code:
public class MainActivity extends ActionBarActivity implements View . OnClickListener { private static final String TWITTER_KEY = "TtVaQegijoQY8zOHSgAX0kvEv" ; private static final String TWITTER_SECRET = "RcSbTspCQY3atAkXFYmqRoOOZrJK7ZBiBEhpMsroVbJXrwM70G" ; Button buttonSinglePlayer ; MediaPlayer mediaPlayer ; @ Override public void onCreate ( Bundle savedInstanceState ) { } private void singlePlayerClick ( ) { <START_BUG> startActivity ( new Intent ( this , SinglePlayer . class ) ) ; <END_BUG> finish ( ) ; } public void onClick ( View v ) { } }

Fix:
startActivity ( new Intent ( this , GameTest . class ) ) ;
Buggy code:
public class EchoWorker implements Worker , Runnable { private static final Logger LOGGER = LoggerFactory . getLogger ( EchoWorker . class ) ; private static final int QUEUE_SIZE = 1000000 ; private BlockingQueue < ServerDataEvent > queue = new ArrayBlockingQueue < > ( EchoWorker . QUEUE_SIZE , false ) ; @ Override public void processData ( NIOServer server , SocketChannel socket , byte [ ] data , int count ) { byte [ ] dataCopy = new byte [ count ] ; System . arraycopy ( data , 0 , dataCopy , 0 , count ) ; <START_BUG> queue . add ( new ServerDataEvent ( server , socket , data ) ) ; <END_BUG> } public void run ( ) { } }

Fix:
queue . add ( new ServerDataEvent ( server , socket , dataCopy ) ) ;
Buggy code:
public class BundleInstallService implements Service < BundleInstallService > { private static final Logger log = Logger . getLogger ( "org.jboss.as.osgi" ) ; public static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "osgi" , "deployment" ) ; private final Deployment deployment ; private InjectedValue < BundleManagerService > injectedBundleManager = new InjectedValue < BundleManagerService > ( ) ; private InjectedValue < BundleStartTracker > injectedStartTracker = new InjectedValue < BundleStartTracker > ( ) ; private ServiceName installedBundleName ; private BundleInstallService ( Deployment deployment ) { } public static void addService ( DeploymentPhaseContext phaseContext , Deployment deployment ) { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final BundleInstallService service = new BundleInstallService ( deployment ) ; final String contextName = deploymentUnit . getName ( ) ; final ServiceName serviceName = BundleInstallService . getServiceName ( contextName ) ; final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; ServiceBuilder < BundleInstallService > builder = serviceTarget . addService ( serviceName , service ) ; builder . addDependency ( BUNDLE_MANAGER , BundleManagerService . class , service . injectedBundleManager ) ; builder . addDependency ( SERVICE_NAME , BundleStartTracker . class , service . injectedStartTracker ) ; builder . addDependency ( deploymentUnitName ( contextName ) ) ; <START_BUG> builder . addDependency ( FRAMEWORK_INIT ) ; <END_BUG> builder . install ( ) ; } public static void removeService ( DeploymentUnit context ) { } public static ServiceName getServiceName ( String contextName ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { } @ Override public BundleInstallService getValue ( ) throws IllegalStateException { } public ServiceName getInstalledBundleName ( ) { } }

Fix:
builder . addDependency ( FRAMEWORK_ACTIVE ) ;
Buggy code:
public class InputClueDialog extends JFrame { private SingleClue clue ; private final InputCSPJFrame cspMainFrame ; public InputClueDialog ( InputCSPJFrame cspMainFrame ) { } public SingleClue getClue ( ) { } @ SuppressWarnings ( "unchecked" ) private void initComponents ( ) { } private void suffixTFActionPerformed ( ActionEvent evt ) { } private void addBtnActionPerformed ( ActionEvent evt ) { if ( ! ( valueTF . getText ( ) . equals ( "" ) ) ) { SingleClue clue = new SingleClue ( ) ; clue . setDstVar ( dstVarCB . getSelectedItem ( ) . toString ( ) ) ; clue . setRelationship ( relationshipCB . getSelectedItem ( ) . toString ( ) ) ; <START_BUG> clue . setValue ( valueTF . getText ( ) ) ; <END_BUG> cspMainFrame . addClue ( clue ) ; cspMainFrame . updateCluesList ( ) ; this . setVisible ( false ) ; } } private JButton addBtn ; private JComboBox dstVarCB ; private JComboBox relationshipCB ; private JTextField valueTF ; }

Fix:
clue . setValue ( Integer . parseInt ( valueTF . getText ( ) ) ) ;
Buggy code:
public class CheckBox extends FormComponent < Boolean > implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckBox ( final String id ) { } public CheckBox ( final String id , IModel < Boolean > model ) { } public void onSelectionChanged ( ) { convertInput ( ) ; updateModel ( ) ; <START_BUG> onSelectionChanged ( getModelObject ( ) ) ; <END_BUG> } protected void onSelectionChanged ( Object newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } @ Override protected boolean getStatelessHint ( ) { } @ Override public < X > IConverter < X > getConverter ( Class < X > type ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { } @ Override protected final boolean supportsPersistence ( ) { } @ Override protected Boolean convertValue ( String [ ] value ) { } }

Fix:
onSelectionChanged ( getDefaultModelObject ( ) ) ;
Buggy code:
public class ProgressRegion { ProgressViewer viewer ; AnimationItem item ; Composite region ; WorkbenchWindow workbenchWindow ; public ProgressRegion ( ) { } public Control createContents ( Composite parent , WorkbenchWindow window ) { } public AnimationItem getAnimationItem ( ) { } public Control getControl ( ) { } public void processDoubleClick ( ) { boolean userMode = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) . getBoolean ( SHOW_USER_JOBS_IN_DIALOG ) ; if ( userMode ) { Object [ ] items = viewer . displayedItems ; if ( ( ( items . length ) > 0 ) && ( ( items [ 0 ] ) instanceof JobInfo ) ) { JobInfo info = ( ( JobInfo ) ( items [ 0 ] ) ) ; if ( info . getJob ( ) . isUser ( ) ) { <START_BUG> workbenchWindow . getWorkbench ( ) . getProgressService ( ) . runInDialog ( workbenchWindow . getShell ( ) , info . getJob ( ) , true ) ; <END_BUG> return ; } } } ProgressManagerUtil . openProgressView ( workbenchWindow ) ; } }

Fix:
workbenchWindow . getWorkbench ( ) . getProgressService ( ) . showInDialog ( workbenchWindow . getShell ( ) , info . getJob ( ) , true ) ;