nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BeanListUnivariateImpl extends ListUnivariateImpl implements Serializable { static final long serialVersionUID = - 6428201899045406285L ; private String propertyName ; public BeanListUnivariateImpl ( ) { } public BeanListUnivariateImpl ( List list ) { } public BeanListUnivariateImpl ( List list , String propertyName ) { } public String getPropertyName ( ) { } public void setPropertyName ( String propertyName ) { } public void addValue ( double v ) { DynaProperty [ ] props = new DynaProperty [ ] { new DynaProperty ( propertyName , Double . class ) } ; BasicDynaClass dynaClass = new BasicDynaClass ( null , null , props ) ; DynaBean dynaBean = null ; try { dynaBean = dynaClass . newInstance ( ) ; } catch ( Exception ex ) { throw new RuntimeException ( ex ) ; } <START_BUG> dynaBean . set ( propertyName , Double . valueOf ( v ) ) ; <END_BUG> addObject ( dynaBean ) ; } public void addObject ( Object bean ) { } }

Fix:
dynaBean . set ( propertyName , new Double ( v ) ) ;
Buggy code:
public class FuzzyValueCombinationTest { static final TableDesc table = new TableDesc ( ) ; static final TblColRef col1 = FuzzyValueCombinationTest . col ( 1 , FuzzyValueCombinationTest . table ) ; static final TblColRef col2 = FuzzyValueCombinationTest . col ( 2 , FuzzyValueCombinationTest . table ) ; static final TblColRef col3 = FuzzyValueCombinationTest . col ( 3 , FuzzyValueCombinationTest . table ) ; @ Test public void testBasics ( ) { } @ Test public void testSomeNull ( ) { } @ Test public void testAllNulls ( ) { } @ Test public void testCap ( ) { System . out . println ( "test<seq2seq4repair_space>cap<seq2seq4repair_space>============================================================================" ) ; Map < TblColRef , Set < String > > values = Maps . newHashMap ( ) ; values . put ( FuzzyValueCombinationTest . col1 , set ( "1" , "2" , "3" , "4" ) ) ; values . put ( FuzzyValueCombinationTest . col2 , set ( "a" , "b" , "c" ) ) ; values . put ( FuzzyValueCombinationTest . col3 , set ( "x" , "y" , "z" ) ) ; List < Map < TblColRef , String > > result = FuzzyValueCombination . calculate ( values , 10 ) ; for ( Map < TblColRef , String > item : result ) { System . out . println ( item ) ; } <START_BUG> assertEquals ( 9 , result . size ( ) ) ; <END_BUG> } private static TblColRef col ( int i , TableDesc t ) { } private Set < String > set ( String ... values ) { } }

Fix:
assertEquals ( 0 , result . size ( ) ) ;
Buggy code:
public class Composite extends Scrollable { Layout layout ; Control [ ] tabList ; int layoutCount ; int backgroundMode ; Composite ( ) { } public Composite ( Composite parent , int style ) { } Control [ ] _getChildren ( ) { } Control [ ] _getTabList ( ) { } boolean acceptsFirstResponder ( int id , int sel ) { } int accessibilityAttributeNames ( int id , int sel ) { } boolean accessibilityIsIgnored ( int id , int sel ) { } public void changed ( Control [ ] changed ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } protected void checkSubclass ( ) { } Control [ ] computeTabList ( ) { } void createHandle ( ) { } void drawBackground ( int id , NSGraphicsContext context , NSRect rect ) { } Composite findDeferredControl ( ) { } Menu [ ] findMenus ( Control control ) { } void fixChildren ( Shell newShell , Shell oldShell , Decorations newDecorations , Decorations oldDecorations , Menu [ ] menus ) { } void fixTabList ( Control control ) { } public int getBackgroundMode ( ) { } public Control [ ] getChildren ( ) { } public Layout getLayout ( ) { } public boolean getLayoutDeferred ( ) { } public Control [ ] getTabList ( ) { } boolean hooksKeys ( ) { } void invalidateChildrenVisibleRegion ( ) { } public boolean isLayoutDeferred ( ) { } boolean isOpaque ( int id , int sel ) { if ( ( ( state ) & ( CANVAS ) ) != 0 ) { if ( id == ( view . id ) ) { <START_BUG> if ( ( ( ( region ) == null ) && ( ( background ) != null ) ) && ( ( background . handle [ 3 ] ) == 1 ) ) { <END_BUG> return true ; } } } return super . isOpaque ( id , sel ) ; } boolean isTabGroup ( ) { } void keyDown ( int id , int sel , int theEvent ) { } public void layout ( ) { } public void layout ( boolean changed ) { } public void layout ( boolean changed , boolean all ) { } public void layout ( Control [ ] changed ) { } void markLayout ( boolean changed , boolean all ) { } Point minimumSize ( int wHint , int Hint , boolean changed ) { } boolean mouseEvent ( int id , int sel , int theEvent , int type ) { } void pageDown ( int id , int sel , int sender ) { } void pageUp ( int id , int sel , int sender ) { } void reflectScrolledClipView ( int id , int sel , int aClipView ) { } void releaseChildren ( boolean destroy ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } void resized ( ) { } void scrollWheel ( int id , int sel , int theEvent ) { } public void setBackgroundMode ( int mode ) { } public boolean setFocus ( ) { } public void setLayout ( Layout layout ) { } public void setLayoutDeferred ( boolean defer ) { } boolean setScrollBarVisible ( ScrollBar bar , boolean visible ) { } boolean setTabGroupFocus ( ) { } public void setTabList ( Control [ ] tabList ) { } int traversalCode ( int key , NSEvent theEvent ) { } void updateBackgroundMode ( ) { } void updateCursorRects ( boolean enabled ) { } void updateLayout ( boolean all ) { } }

Fix:
if ( ( ( ( region ) == null ) && ( ( background ) != null ) ) && ( ( background [ 3 ] ) == 1 ) ) {
Buggy code:
public class ExperimentMethods { private Connection conn ; private FilePathGenerator fpg ; private AnnotationMethods annoMethods ; public ExperimentMethods ( Connection connection , FilePathGenerator filePG , AnnotationMethods annoM ) { } public Experiment getExperiment ( String expID ) throws SQLException { } public int addExperiment ( String expID ) throws IOException , SQLException { } public int deleteExperiment ( String expId ) throws IOException , SQLException { } private int removeHiddenFilesFromExperiment ( String expId ) throws IOException , SQLException { } @ Deprecated public int updateExperiment ( String expID , String label , String value ) throws IOException , SQLException { } public int updateExperiment ( String expID , HashMap < String , String > annotations ) throws IOException , SQLException { for ( Map . Entry < String , String > e : annotations . entrySet ( ) ) { String key = e . getKey ( ) ; String value = e . getValue ( ) ; <START_BUG> validateAnnotation ( key , value ) ; <END_BUG> } String query = "UPDATE<seq2seq4repair_space>Annotated_With<seq2seq4repair_space>SET<seq2seq4repair_space>Value<seq2seq4repair_space>=<seq2seq4repair_space>?" + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>(Label<seq2seq4repair_space>~~*<seq2seq4repair_space>?)<seq2seq4repair_space>AND<seq2seq4repair_space>(ExpID<seq2seq4repair_space>~~*<seq2seq4repair_space>?)" ; int rs = 0 ; try ( PreparedStatement stmt = conn . prepareStatement ( query ) ) { conn . setAutoCommit ( false ) ; for ( Map . Entry < String , String > e : annotations . entrySet ( ) ) { String key = e . getKey ( ) ; String value = e . getValue ( ) ; stmt . setString ( 1 , value ) ; stmt . setString ( 2 , key ) ; stmt . setString ( 3 , expID ) ; stmt . addBatch ( ) ; } int [ ] arr = stmt . executeBatch ( ) ; for ( int i = 0 ; i < ( arr . length ) ; i ++ ) { rs += arr [ i ] ; } conn . commit ( ) ; } catch ( SQLException e ) { conn . rollback ( ) ; throw e ; } finally { conn . setAutoCommit ( true ) ; } return rs ; } public int annotateExperiment ( String expID , String label , String value ) throws IOException , SQLException { } public int removeExperimentAnnotation ( String expID , String label ) throws SQLException { } public Experiment fillFiles ( Experiment e ) throws SQLException { } public Experiment fillAnnotations ( Experiment e ) throws SQLException { } private String validateAnnotation ( String label , String value ) throws IOException , SQLException { } private String matchChoice ( String value , List < String > choices ) { } private static boolean recursiveDelete ( File folder ) { } }

Fix:
e . setValue ( validateAnnotation ( key , value ) ) ;
Buggy code:
public class Asteroid extends SpaceObject implements Loopable , Renderable { private final float [ ] vertices ; private final Polygon asteroid ; private int npunti ; private static Sound esplosione ; private float dimmin ; private float vardim ; private float orbita ; public Asteroid ( float x , float y , float dimmin , float vardim ) { } public Asteroid ( float x , float y ) { } public void overScreen ( ) { } private float [ ] genera ( float dimmin , float vardim ) { } public void move ( ) { } public void rotate ( ) { } public boolean containsxy ( float x , float y ) { } public void splitAsteroid ( float xb , float yb ) { Asteroid . esplosione . play ( 0.5F ) ; <START_BUG> if ( ( dimmin ) > 14 ) { <END_BUG> new Asteroid ( xb , yb , ( ( dimmin ) // 2 ) , ( ( vardim ) // 2 ) ) ; new Asteroid ( xb , yb , ( ( dimmin ) // 2 ) , ( ( vardim ) // 2 ) ) ; } scoreSize ( ) ; delete ( ) ; } public int scoreSize ( ) { } @ Override public void loop ( ) { } @ Override public void render ( ShapeRenderer sr ) { } @ Override public void delete ( ) { } }

Fix:
if ( ( dimmin ) > 15 ) {
Buggy code:
public class BootstrapInitiateMessage implements Serializable { private static ICompactSerializer < BootstrapInitiateMessage > serializer_ ; public static ICompactSerializer < BootstrapInitiateMessage > serializer ( ) { } public static Message makeBootstrapInitiateMessage ( BootstrapInitiateMessage biMessage ) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream ( ) ; DataOutputStream dos = new DataOutputStream ( bos ) ; BootstrapInitiateMessage . serializer ( ) . serialize ( biMessage , dos ) ; <START_BUG> return new Message ( StorageService . getLocalStorageEndPoint ( ) , "" , StorageService . bootStrapInitiateVerbHandler_ , new Object [ ] { bos . toByteArray ( ) } ) ; <END_BUG> } protected StreamContext [ ] streamContexts_ = new StreamContextManager . StreamContext [ 0 ] ; public BootstrapInitiateMessage ( StreamContextManager [ ] streamContexts ) { } public StreamContext [ ] getStreamContext ( ) { } }

Fix:
return new Message ( StorageService . getLocalStorageEndPoint ( ) , "" , StorageService . bootStrapInitiateVerbHandler_ , bos . toByteArray ( ) ) ;
Buggy code:
public class MvcNamespaceTests { private GenericWebApplicationContext container ; @ Before public void setUp ( ) { } @ Test public void testDefaultConfig ( ) throws Exception { } @ Controller public static class TestController { @ RequestMapping public void testBind ( @ RequestParam <START_BUG> @ DateTimeFormat ( dateStyle = Style . MEDIUM ) <END_BUG> Date date ) { System . out . println ( date ) ; } } }

Fix:
@ DateTimeFormat ( dateStyle = ISO . MEDIUM )
Buggy code:
public interface SimpleDeterministicAutomaton < S , I > extends SimpleAutomaton < S , I > , SimpleDTS < S , I > { public static interface IntAbstraction { public static final int INVALID_STATE = - 1 ; public int size ( ) { } public int getIntInitialState ( ) { } public static class DefaultAbstraction < S , A extends SimpleDeterministicAutomaton < S , ? > > implements SimpleDeterministicAutomaton . IntAbstraction { protected final A automaton ; protected final StateIDs < S > stateIds ; public DefaultAbstraction ( A automaton ) { } @ Override public int size ( ) { } @ Override public int getIntInitialState ( ) { } protected final int stateToInt ( S state ) { } protected final S intToState ( int stateId ) { <START_BUG> return stateId < 0 ? stateIds . getState ( stateId ) : null ; <END_BUG> } } } public static interface StateIntAbstraction < I > extends SimpleDeterministicAutomaton . IntAbstraction { public int getSuccessor ( int state , I input ) { } public static class DefaultAbstraction < S , I , A extends SimpleDeterministicAutomaton < S , I > > extends SimpleDeterministicAutomaton . IntAbstraction . DefaultAbstraction < S , A > implements SimpleDeterministicAutomaton . StateIntAbstraction < I > { public DefaultAbstraction ( A automaton ) { } @ Override public int getSuccessor ( int state , I input ) { } } } public static interface FullIntAbstraction extends SimpleDeterministicAutomaton . IntAbstraction { public int getSuccessor ( int state , int input ) { } public int numInputs ( ) { } public static class DefaultAbstraction < I , A extends SimpleDeterministicAutomaton . StateIntAbstraction < I > > implements SimpleDeterministicAutomaton . FullIntAbstraction { protected final A stateAbstraction ; protected final int numInputs ; protected final IntFunction < ? extends I > symMapping ; public DefaultAbstraction ( A stateAbstraction , int numInputs , IntFunction < ? extends I > symMapping ) { } @ Override public int getSuccessor ( int state , int input ) { } @ Override public int numInputs ( ) { } @ Override public int size ( ) { } @ Override public int getIntInitialState ( ) { } protected final I intToSym ( int input ) { } } } public default SimpleDeterministicAutomaton . StateIntAbstraction < I > stateIntAbstraction ( ) { } public default SimpleDeterministicAutomaton . FullIntAbstraction fullIntAbstraction ( int numInputs , IntFunction < ? extends I > symMapping ) { } public default SimpleDeterministicAutomaton . FullIntAbstraction fullIntAbstraction ( Alphabet < I > alphabet ) { } }

Fix:
return stateId >= 0 ? stateIds . getState ( stateId ) : null ;
Buggy code:
public class VersionCommand implements CommandExecutor { private final Vanilla vanillaPlugin ; public VersionCommand ( Vanilla vanillaPlugin ) { } public boolean onCommand ( CommandSender sender , Command cmd , String commandLabel , String [ ] args ) { if ( ( args . length ) == 0 ) { sender . sendMessage ( ( ( ( ( ( ( "This<seq2seq4repair_space>server<seq2seq4repair_space>is<seq2seq4repair_space>running<seq2seq4repair_space>" + ( Bukkit . getName ( ) ) ) + "<seq2seq4repair_space>version<seq2seq4repair_space>" ) + ( Bukkit . getVersion ( ) ) ) + "<seq2seq4repair_space>(Implementing<seq2seq4repair_space>API<seq2seq4repair_space>version<seq2seq4repair_space>" ) + ( Bukkit . getBukkitVersion ( ) ) ) + ")" ) ) ; } else { StringBuilder name = new StringBuilder ( ) ; for ( String arg : args ) { if ( ( name . length ( ) ) > 0 ) { name . append ( '<seq2seq4repair_space>' ) ; } name . append ( arg ) ; } Plugin plugin = Bukkit . getPluginManager ( ) . getPlugin ( name . toString ( ) ) ; <START_BUG> if ( ( plugin == null ) || ( vanillaPlugin . getConfigHandler ( ) . getHiddenPlugins ( ) . contains ( plugin . getDescription ( ) . getName ( ) ) ) ) { <END_BUG> sender . sendMessage ( "This<seq2seq4repair_space>server<seq2seq4repair_space>is<seq2seq4repair_space>not<seq2seq4repair_space>running<seq2seq4repair_space>any<seq2seq4repair_space>plugin<seq2seq4repair_space>by<seq2seq4repair_space>that<seq2seq4repair_space>name." ) ; sender . sendMessage ( "Use<seq2seq4repair_space>//plugins<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>a<seq2seq4repair_space>list<seq2seq4repair_space>of<seq2seq4repair_space>plugins." ) ; } else { PluginDescriptionFile desc = plugin . getDescription ( ) ; sender . sendMessage ( ( ( ( ( ( ( ChatColor . GREEN ) + ( desc . getName ( ) ) ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>version<seq2seq4repair_space>" ) + ( ChatColor . GREEN ) ) + ( desc . getVersion ( ) ) ) ) ; if ( ( desc . getDescription ( ) ) != null ) { sender . sendMessage ( desc . getDescription ( ) ) ; } if ( ( desc . getWebsite ( ) ) != null ) { sender . sendMessage ( ( ( "Website:<seq2seq4repair_space>" + ( ChatColor . GREEN ) ) + ( desc . getWebsite ( ) ) ) ) ; } if ( ! ( desc . getAuthors ( ) . isEmpty ( ) ) ) { if ( ( desc . getAuthors ( ) . size ( ) ) == 1 ) { sender . sendMessage ( ( "Author:<seq2seq4repair_space>" + ( getAuthors ( desc ) ) ) ) ; } else { sender . sendMessage ( ( "Authors:<seq2seq4repair_space>" + ( getAuthors ( desc ) ) ) ) ; } } } } return true ; } private String getAuthors ( final PluginDescriptionFile desc ) { } }

Fix:
if ( ( plugin == null ) || ( vanillaPlugin . getConfigHandler ( ) . getHiddenPlugins ( ) . contains ( plugin . getDescription ( ) . getName ( ) . toLowerCase ( ) ) ) ) {
Buggy code:
public class WicketParamTest extends TestCase { private static Log log = LogFactory . getLog ( WicketParamTest . class ) ; private MockWebApplication application ; public WicketParamTest ( String name ) { } public void testRenderHomePage_1 ( ) throws Exception { } public void testRenderHomePage_2 ( ) throws Exception { } public void testRenderHomePage_3 ( ) throws Exception { } public void executeTest ( final Class pageClass , final String filename ) throws Exception { System . out . println ( ( ( "===<seq2seq4repair_space>" + ( pageClass . getName ( ) ) ) + "<seq2seq4repair_space>===" ) ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getRequiredPageSettings ( ) . setHomePage ( pageClass ) ; <END_BUG> application . setupRequestAndResponse ( ) ; application . processRequestCycle ( ) ; String document = application . getServletResponse ( ) . getDocument ( ) ; assertTrue ( DiffUtil . validatePage ( document , this . getClass ( ) , filename ) ) ; } }

Fix:
application . setHomePage ( pageClass ) ;
Buggy code:
public class Sha512CryptTest { @ Test public void testSha512CryptStrings ( ) { } @ Test public void testSha512CryptBytes ( ) { } @ Test public void testSha512CryptExplicitCall ( ) { } @ Test ( expected = NullPointerException . class ) public void testSha512CryptNullData ( ) { } @ Ignore public void testSha512CryptNullSalt ( ) { } @ Test public void testSha2CryptRounds ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testSha2CryptWrongSalt ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testSha512CryptWithEmptySalt ( ) { } @ Test public void testSha256LargetThanBlocksize ( ) { <START_BUG> byte [ ] buffer = new byte [ 200 ] ; <END_BUG> Arrays . fill ( buffer , 0 , 200 , ( ( byte ) ( 'A' ) ) ) ; assertEquals ( "$6$abc$oP//h8PRhCKIA66KSTjGwNsQMSLLZnuFOTjOhrqNrDkKgjTlpePSqibB0qtmDapMbP//zN1cUEYSeHFrpgqZ.GG1" , Sha2Crypt . sha512Crypt ( buffer , "$6$abc" ) ) ; } }

Fix:
final byte [ ] buffer = new byte [ 200 ] ;
Buggy code:
public class BoldFormatAction extends CheckBoxAction implements ContainerListener , Observer { public BoldFormatAction ( FrameMediator frameMediator ) { } public void update ( Observable arg0 , Object arg1 ) { } public void actionPerformed ( ActionEvent evt ) { } public void componentAdded ( ContainerEvent e ) { <START_BUG> log . debug ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ; <END_BUG> ( ( org . columba . mail . gui . composer . ComposerController ) ( getFrameMediator ( ) ) ) . getEditorController ( ) . addObserver ( this ) ; } public void componentRemoved ( ContainerEvent e ) { } }

Fix:
log . info ( "Re-registering<seq2seq4repair_space>as<seq2seq4repair_space>observer<seq2seq4repair_space>on<seq2seq4repair_space>editor<seq2seq4repair_space>controller" ) ;
Buggy code:
public class CollapseEstimate { public static double calcMass ( Star input ) { double solMass = 1.989E30 ; double mass = - 1 ; if ( ( input . getType ( ) . length ( ) ) >= 2 ) { <START_BUG> String sequence = input . getType ( ) . substring ( 1 , ( ( input . getType ( ) . length ( ) ) - 1 ) ) ; <END_BUG> if ( ( ( sequence . equals ( SUPERGIANT . toString ( ) ) ) || ( sequence . equals ( BRIGHT_GIANT . toString ( ) ) ) ) || ( sequence . equals ( GIANT . toString ( ) ) ) ) { mass = ( solMass * ( input . getLuminosity ( ) ) ) // 3200 ; } else if ( ( ( sequence . equals ( SUBDWARF . toString ( ) ) ) || ( sequence . equals ( DWARF . toString ( ) ) ) ) || ( sequence . equals ( SUBGIANT . toString ( ) ) ) ) { mass = solMass * ( Math . pow ( ( ( 2 * ( input . getLuminosity ( ) ) ) // 3 ) , ( 2.0 // 7.0 ) ) ) ; } else { mass = solMass * ( Math . pow ( ( ( input . getLuminosity ( ) ) // 0.23 ) , ( 10 // 23 ) ) ) ; } } return mass ; } public static String collapseResult ( Star input ) { } }

Fix:
String sequence = input . getType ( ) . substring ( 1 , input . getType ( ) . length ( ) ) ;
Buggy code:
public class RAttributeAttributeGroup extends org . tigris . scarab . om . BaseRAttributeAttributeGroup implements Persistent { public void delete ( ScarabUser user ) throws Exception { ModuleEntity module = getAttributeGroup ( ) . getModule ( ) ; <START_BUG> if ( user . hasPermission ( ITEM__APPROVE , module ) ) { <END_BUG> Criteria c = new Criteria ( ) . add ( GROUP_ID , getGroupId ( ) ) . add ( ATTRIBUTE_ID , getAttributeId ( ) ) ; RAttributeAttributeGroupPeer . doDelete ( c ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } }

Fix:
if ( user . hasPermission ( MODULE__EDIT , module ) ) {
Buggy code:
public class TimeFormatter { private static SimpleDateFormat dateFormat = TimeFormatter . init ( ) ; private static SimpleDateFormat init ( ) { } private static final long DAY = ( ( 24 * 60 ) * 60 ) * 1000 ; public static String format ( long ms ) { String day = "" ; <START_BUG> if ( ms > ( TimeFormatter . DAY ) ) { <END_BUG> day = ( Math . round ( ( ms // ( TimeFormatter . DAY ) ) ) ) + "<seq2seq4repair_space>" ; } String sign = ( ms < 0 ) ? "-" : "" ; return ( sign + day ) + ( TimeFormatter . dateFormat . format ( new Date ( Math . abs ( ms ) ) ) ) ; } public static String format ( double ms ) { } public static long parse ( String time ) { } No newline ; at end ; of file ; }

Fix:
if ( ms >= ( TimeFormatter . DAY ) ) {
Buggy code:
final class ConfigurationClassMethod { private final MethodMetadata metadata ; private final ConfigurationClass declaringClass ; public ConfigurationClassMethod ( MethodMetadata metadata , ConfigurationClass declaringClass ) { } public MethodMetadata getMetadata ( ) { } public ConfigurationClass getDeclaringClass ( ) { } public Location getResourceLocation ( ) { } public void validate ( ProblemReporter problemReporter ) { <START_BUG> if ( ( this . declaringClass . getMetadata ( ) . hasAnnotation ( Configuration . class . getName ( ) ) ) && ( ! ( getMetadata ( ) . isOverridable ( ) ) ) ) { <END_BUG> problemReporter . error ( new ConfigurationClassMethod . NonOverridableMethodError ( ) ) ; } } private class NonOverridableMethodError extends Problem { public NonOverridableMethodError ( ) { } } }

Fix:
if ( ( this . declaringClass . getMetadata ( ) . isAnnotated ( Configuration . class . getName ( ) ) ) && ( ! ( getMetadata ( ) . isOverridable ( ) ) ) ) {
Buggy code:
public class NativeStackPresentation extends StackPresentation { private Composite composite ; private TabFolder tabFolder ; private IStackPresentationSite site ; private IPresentablePart current ; private MenuManager systemMenuManager = new MenuManager ( ) ; private IPreferenceStore preferenceStore = WorkbenchPlugin . getDefault ( ) . getPreferenceStore ( ) ; private static final String TAB_DATA = ( NativeStackPresentation . class . getName ( ) ) + ".partId" ; private MouseListener mouseListener = new MouseAdapter ( ) { public void mouseDown ( MouseEvent e ) { } } ; private Listener menuListener = new Listener ( ) { public void handleEvent ( Event event ) { } } ; private Listener selectionListener = new Listener ( ) { public void handleEvent ( Event e ) { } } ; private Listener resizeListener = new Listener ( ) { public void handleEvent ( Event e ) { } } ; private IPropertyListener childPropertyChangeListener = new IPropertyListener ( ) { public void propertyChanged ( Object source , int property ) { } } ; public NativeStackPresentation ( Composite parent , IStackPresentationSite stackSite , int flags ) { } private final int indexOf ( IPresentablePart part ) { } protected final TabItem getTab ( IPresentablePart part ) { } protected void childPropertyChanged ( IPresentablePart part , int property ) { } protected final IPresentablePart getPartForTab ( TabItem item ) { } protected TabFolder getTabFolder ( ) { } public boolean isDisposed ( ) { } private void setControlSize ( ) { } public static Rectangle calculatePageBounds ( TabFolder folder ) { } public void dispose ( ) { } public void setActive ( boolean isActive ) { } private TabItem createPartTab ( IPresentablePart part , int tabIndex ) { } protected void initTab ( TabItem tabItem , IPresentablePart part ) { tabItem . setText ( part . getName ( ) ) ; <START_BUG> tabItem . setToolTipText ( part . getTitleToolTip ( ) ) ; <END_BUG> Image tabImage = part . getTitleImage ( ) ; if ( tabImage != ( tabItem . getImage ( ) ) ) { tabItem . setImage ( tabImage ) ; } } public void addPart ( IPresentablePart newPart , IPresentablePart position ) { } public void removePart ( IPresentablePart oldPart ) { } public void selectPart ( IPresentablePart toSelect ) { } public void setBounds ( Rectangle bounds ) { } public Point computeMinimumSize ( ) { } public void setVisible ( boolean isVisible ) { } public void setState ( int state ) { } public IMenuManager getSystemMenuManager ( ) { } protected void showPaneMenu ( IPresentablePart part , Point point ) { } public Control getControl ( ) { } public StackDropResult dragOver ( Control currentControl , Point location ) { } }

Fix:
tabItem . setToolTipText ( part . getTitleToolTipText ( ) ) ;
Buggy code:
public class DelegatingSmartContextLoader implements SmartContextLoader { private static final Log logger = LogFactory . getLog ( DelegatingSmartContextLoader . class ) ; private final List < ? extends SmartContextLoader > candidates = Arrays . asList ( new GenericXmlContextLoader ( ) , new AnnotationConfigContextLoader ( ) ) ; public boolean generatesDefaults ( ) { } public void processContextConfiguration ( ContextConfigurationAttributes configAttributes ) { final boolean originallyHadResources = configAttributes . hasResources ( ) ; for ( SmartContextLoader loader : candidates ) { if ( DelegatingSmartContextLoader . logger . isDebugEnabled ( ) ) { DelegatingSmartContextLoader . logger . debug ( String . format ( "Potentially<seq2seq4repair_space>delegating<seq2seq4repair_space>to<seq2seq4repair_space>%s<seq2seq4repair_space>to<seq2seq4repair_space>process<seq2seq4repair_space>context<seq2seq4repair_space>configuration<seq2seq4repair_space>[%s]." , loader . getClass ( ) . getName ( ) , configAttributes ) ) ; } if ( originallyHadResources ) { loader . processContextConfiguration ( configAttributes ) ; } else if ( loader . generatesDefaults ( ) ) { loader . processContextConfiguration ( configAttributes ) ; if ( ( configAttributes . hasResources ( ) ) && ( DelegatingSmartContextLoader . logger . isInfoEnabled ( ) ) ) { DelegatingSmartContextLoader . logger . info ( String . format ( ( "SmartContextLoader<seq2seq4repair_space>candidate<seq2seq4repair_space>%s<seq2seq4repair_space>" + "generated<seq2seq4repair_space>defaults<seq2seq4repair_space>for<seq2seq4repair_space>context<seq2seq4repair_space>configuration<seq2seq4repair_space>[%s]." ) , loader , configAttributes ) ) ; } } } <START_BUG> if ( ( originallyHadResources && ( generatesDefaults ( ) ) ) && ( ! ( configAttributes . hasResources ( ) ) ) ) { <END_BUG> throw new IllegalStateException ( String . format ( ( "None<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>SmartContextLoader<seq2seq4repair_space>candidates<seq2seq4repair_space>%s<seq2seq4repair_space>" + "was<seq2seq4repair_space>able<seq2seq4repair_space>to<seq2seq4repair_space>generate<seq2seq4repair_space>defaults<seq2seq4repair_space>for<seq2seq4repair_space>context<seq2seq4repair_space>configuration<seq2seq4repair_space>[%s]." ) , candidates , configAttributes ) ) ; } } public boolean supports ( MergedContextConfiguration mergedConfig ) { } public ApplicationContext loadContext ( MergedContextConfiguration mergedConfig ) throws Exception { } public String [ ] processLocations ( Class < ? > clazz , String ... locations ) { } public ApplicationContext loadContext ( String ... locations ) throws Exception { } }

Fix:
if ( ( ( generatesDefaults ( ) ) && ( ! originallyHadResources ) ) && ( ! ( configAttributes . hasResources ( ) ) ) ) {
Buggy code:
public class OSGiAttachmentsDeploymentProcessor implements DeploymentUnitProcessor { private ServiceRegistry serviceRegistry ; public OSGiAttachmentsDeploymentProcessor ( ServiceRegistry serviceRegistry ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnitContext = phaseContext . getDeploymentUnit ( ) ; Deployment deployment = OSGiDeploymentAttachment . getAttachment ( deploymentUnitContext ) ; String location = InstallBundleInitiatorService . getLocation ( serviceRegistry , deploymentUnitContext . getName ( ) ) ; VirtualFile virtualFile = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; BundleInfo info = BundleInfoAttachment . getBundleInfoAttachment ( deploymentUnitContext ) ; if ( ( deployment == null ) && ( info != null ) ) { deployment = DeploymentFactory . createDeployment ( info ) ; deployment . addAttachment ( BundleInfo . class , info ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnitContext , deployment ) ; } OSGiMetaData metadata = OSGiMetaDataAttachment . getOSGiMetaDataAttachment ( deploymentUnitContext ) ; if ( ( deployment == null ) && ( metadata != null ) ) { String symbolicName = metadata . getBundleSymbolicName ( ) ; Version version = metadata . getBundleVersion ( ) ; deployment = DeploymentFactory . createDeployment ( AbstractVFS . adapt ( virtualFile ) , location , symbolicName , version ) ; deployment . addAttachment ( OSGiMetaData . class , metadata ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnitContext , deployment ) ; } XModule resModule = XModuleAttachment . getXModuleAttachment ( deploymentUnitContext ) ; if ( ( deployment == null ) && ( resModule != null ) ) { String symbolicName = resModule . getName ( ) ; Version version = resModule . getVersion ( ) ; deployment = DeploymentFactory . createDeployment ( AbstractVFS . adapt ( virtualFile ) , location , symbolicName , version ) ; deployment . addAttachment ( XModule . class , resModule ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnitContext , deployment ) ; } if ( deployment != null ) { <START_BUG> MountHandle mount = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT_MOUNT_HANDLE ) ; <END_BUG> deployment . addAttachment ( MountHandle . class , mount ) ; deployment . setAutoStart ( true ) ; OSGiDeploymentService . addService ( phaseContext ) ; } } public void undeploy ( DeploymentUnit context ) { } }

Fix:
MountHandle mount = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getMountHandle ( ) ;
Buggy code:
public class InterceptorBean { private final Logger log = Logger . getLogger ( InterceptorBean . class ) ; @ AroundInvoke public Object intercept ( InvocationContext context ) throws Exception { log . info ( ( ( ( ( "-----><seq2seq4repair_space>Intercepting<seq2seq4repair_space>call<seq2seq4repair_space>to<seq2seq4repair_space>" + ( context . getMethod ( ) . getDeclaringClass ( ) ) ) + "." ) + ( context . getMethod ( ) . getName ( ) ) ) + "()" ) ) ; <START_BUG> return context . proceed ( ) ; <END_BUG> } }

Fix:
return "#InterceptorBean#" + ( context . proceed ( ) ) ;
Buggy code:
public class Group { private final List < Position > positions ; private final Operator operator ; private final int expectedResult ; public static Group of ( Operator operator , int result , Position ... positions ) { } public Group ( Operator operator , int result , Position ... positions ) { } public Group ( Operator operator , int result , List < Position > positions ) { } public List < Position > getPositions ( ) { } public Operator getOperator ( ) { } public int getResult ( ) { } public boolean isCorrect ( Board board ) { } public boolean isCorrect ( List < Integer > values ) { } public int getValue ( Board board ) { } <START_BUG> public int getValue ( List < Integer > values ) { <END_BUG> switch ( operator ) { case IDENTITY : return getValueIdentity ( values ) ; case PLUS : return getValuePlus ( values ) ; case MULTIPLY : return getValueMultiply ( values ) ; case DIVIDE : return getValueDivide ( values ) ; case MINUS : return getValueMinus ( values ) ; default : throw new IllegalStateException ( ) ; } } private int getValueMinus ( List < Integer > values ) { } private Integer getValueDivide ( List < Integer > values ) { } private int getValueMultiply ( List < Integer > values ) { } private int getValuePlus ( List < Integer > values ) { } private Integer getValueIdentity ( List < Integer > values ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } }

Fix:
public Integer getValue ( List < Integer > values ) {
Buggy code:
public class StringToClassConverter extends AbstractConverter { private static final Resources REZ = ResourceManager . getPackageResources ( StringToClassConverter . class ) ; public StringToClassConverter ( ) { } <START_BUG> public Object convert ( final Object object , final Context context ) throws ConverterException { <END_BUG> try { return Class . forName ( ( ( String ) ( object ) ) ) ; } catch ( final Exception e ) { final String message = StringToClassConverter . REZ . getString ( "convert.bad-class.error" , object ) ; throw new ConverterException ( message , e ) ; } } }

Fix:
public Object convert ( final Object object , final Object context ) throws ConverterException {
Buggy code:
public class Radio extends WebMarkupContainer { private static final long serialVersionUID = 1L ; public Radio ( String id ) { } public Radio ( String id , IModel model ) { } protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "radio" ) ; RadioGroup group = ( ( RadioGroup ) ( findParent ( RadioGroup . class ) ) ) ; String path = getPath ( ) ; if ( group == null ) { throw new WicketRuntimeException ( ( ( "Radio<seq2seq4repair_space>component<seq2seq4repair_space>[" + path ) + "]<seq2seq4repair_space>cannot<seq2seq4repair_space>find<seq2seq4repair_space>its<seq2seq4repair_space>parent<seq2seq4repair_space>RadioGroup.<seq2seq4repair_space>All<seq2seq4repair_space>Radio<seq2seq4repair_space>components<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>child<seq2seq4repair_space>of<seq2seq4repair_space>or<seq2seq4repair_space>below<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>hierarchy<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>RadioGroup<seq2seq4repair_space>component." ) ) ; } tag . put ( "name" , group . getInputName ( ) ) ; tag . put ( "value" , path ) ; String rawInput = group . getRawInput ( ) ; if ( rawInput != null ) { if ( rawInput . equals ( path ) ) { tag . put ( "checked" , "checked" ) ; } } else if ( Objects . equal ( group . getModelObject ( ) , getModelObject ( ) ) ) { tag . put ( "checked" , "checked" ) ; } if ( group . wantOnSelectionChangedNotifications ( ) ) { <START_BUG> final String url = group . urlFor ( INTERFACE ) ; <END_BUG> try { Form form = group . getForm ( ) ; tag . put ( "onClick" , form . getJsForInterfaceUrl ( url ) ) ; } catch ( WicketRuntimeException ex ) { tag . put ( "onClick" , ( ( ( ( "location.href='" + url ) + "&" ) + ( group . getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.value;" ) ) ; } } super . onComponentTag ( tag ) ; } }

Fix:
final CharSequence url = group . urlFor ( INTERFACE ) ;
Buggy code:
class EqualExpression extends CompareEqualExpression { public EqualExpression ( Val val1 , Val val2 ) { } public void appendTo ( Select sel , ExpContext ctx , BinaryOpExpState bstate , SQLBuffer buf , boolean val1Null , boolean val2Null ) { if ( val1Null && val2Null ) buf . append ( "1<seq2seq4repair_space>=<seq2seq4repair_space>1" ) ; else if ( val1Null || val2Null ) { Val val = ( val1Null ) ? getValue2 ( ) : getValue1 ( ) ; ExpState state = ( val1Null ) ? bstate . state2 : bstate . state1 ; if ( ! ( isDirectComparison ( ) ) ) { int len = val . length ( sel , ctx , state ) ; for ( int i = 0 ; i < len ; i ++ ) { if ( i > 0 ) buf . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) ; val . appendTo ( sel , ctx , state , buf , i ) ; buf . append ( "<seq2seq4repair_space>IS<seq2seq4repair_space>" ) . appendValue ( null ) ; } } else val . appendIsNull ( sel , ctx , state , buf ) ; } else { Val val1 = getValue1 ( ) ; Val val2 = getValue2 ( ) ; if ( ( ( val1 . length ( sel , ctx , bstate . state1 ) ) == 1 ) && ( ( val2 . length ( sel , ctx , bstate . state2 ) ) == 1 ) ) { ctx . store . getDBDictionary ( ) . comparison ( buf , "=" , new FilterValueImpl ( sel , ctx , bstate . state1 , val1 ) , new FilterValueImpl ( sel , ctx , bstate . state2 , val2 ) ) ; } else { <START_BUG> int len = Math . max ( val1 . length ( sel , ctx , bstate . state1 ) , val2 . length ( sel , ctx , bstate . state2 ) ) ; <END_BUG> for ( int i = 0 ; i < len ; i ++ ) { if ( i > 0 ) buf . append ( "<seq2seq4repair_space>AND<seq2seq4repair_space>" ) ; val1 . appendTo ( sel , ctx , bstate . state1 , buf , i ) ; buf . append ( "<seq2seq4repair_space>=<seq2seq4repair_space>" ) ; val2 . appendTo ( sel , ctx , bstate . state2 , buf , i ) ; } } } } }

Fix:
int len = Math . min ( val1 . length ( sel , ctx , bstate . state1 ) , val2 . length ( sel , ctx , bstate . state2 ) ) ;
Buggy code:
public class RankedBase extends Base { private int rank ; public RankedBase ( String nucleotide , int r ) { } public RankedBase ( char nucleotide , int r ) { } public RankedBase ( ) { } public int rank ( ) { } public String toString ( ) { <START_BUG> return ( super . toString ( ) ) + ( String . valueOf ( rank ) ) ; <END_BUG> } }

Fix:
return super . toString ( ) ;
Buggy code:
public interface IMailbox extends IMailFolder { <START_BUG> public MailboxInfo getMessageFolderInfo ( ) ; <END_BUG> public void expungeFolder ( ) throws Exception { } public boolean exists ( Object uid ) throws Exception { } public IHeaderList getHeaderList ( ) throws Exception { } public abstract void markMessage ( Object [ ] uids , int variant ) throws Exception { } public MimeTree getMimePartTree ( Object uid ) throws Exception { } public void innerCopy ( IMailbox destFolder , Object [ ] uids ) throws Exception { } public Object addMessage ( InputStream in ) throws Exception { } public Object addMessage ( InputStream in , Attributes attributes , Flags flags ) throws Exception { } public Header getHeaderFields ( Object uid , String [ ] keys ) throws Exception { } public InputStream getMimePartBodyStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMimePartSourceStream ( Object uid , Integer [ ] address ) throws Exception { } public InputStream getMessageSourceStream ( Object uid ) throws Exception { } public Flags getFlags ( Object uid ) throws Exception { } public Object getAttribute ( Object uid , String key ) throws Exception { } public Attributes getAttributes ( Object uid ) throws Exception { } public void setAttribute ( Object uid , String key , Object value ) throws Exception { } public Object [ ] getUids ( ) throws Exception { } public Header getAllHeaderFields ( Object uid ) throws Exception { } public Object [ ] searchMessages ( Filter filter ) throws Exception { } public Object [ ] searchMessages ( Filter filter , Object [ ] uids ) throws Exception { } public boolean isReadOnly ( ) { } IStatusObservable getObservable ( ) { } Object getLastSelection ( ) { } void setLastSelection ( Object lastSel ) { } FilterList getFilterList ( ) { } public File getDirectoryFile ( ) { } public boolean isInboxFolder ( ) { } public boolean isTrashFolder ( ) { } }

Fix:
public IMailboxInfo getMessageFolderInfo ( ) ;
Buggy code:
public class WindowedLinkConverter implements Converter , Generator , LinkTrace . Handler { private long _window ; private Bus < Link > expire_bus = new Bus < Link > ( ) ; private Bus < Link > update_bus = new Bus < Link > ( ) ; private Bus < Link > pop_bus = new Bus < Link > ( ) ; private Bus < Link > state_bus = new Bus < Link > ( ) ; private Bus < LinkEvent > bus = new Bus < LinkEvent > ( ) ; private Map < Link , LinkTimeline > link_timelines = new HashMap < Link , LinkTimeline > ( ) ; private StatefulWriter < WindowedLinkEvent , WindowedLink > windowed_writer ; private StatefulReader < LinkEvent , Link > link_reader ; private WindowedLinkTrace windowed_links ; private LinkTrace _links ; private long cur_time ; private Random rng = new Random ( ) ; public WindowedLinkConverter ( WindowedLinkTrace windowedLinks , LinkTrace links , long window ) { } @ Override public void convert ( ) throws IOException { } @ Override public Bus < ? > [ ] busses ( ) { } @ Override public int priority ( ) { } @ Override public void incr ( long time ) throws IOException { <START_BUG> windowed_writer . flush ( ( time - ( _window ) ) ) ; <END_BUG> cur_time += time ; } @ Override public void seek ( long time ) throws IOException { } @ Override public Listener < LinkEvent > linkEventListener ( ) { } @ Override public Listener < Link > linkListener ( ) { } public Listener < Link > updateListener ( ) { } public Listener < Link > popListener ( ) { } public Listener < Link > expireListener ( ) { } }

Fix:
windowed_writer . flush ( ( ( cur_time ) - ( _window ) ) ) ;
Buggy code:
public class ExampleRunner { public static void main ( String [ ] args ) throws Exception { DeploymentUtils utils = null ; try { utils = new DeploymentUtils ( ) ; <START_BUG> utils . addWarDeployment ( "ws-example.war" , EndpointImpl . class . getPackage ( ) , true ) ; <END_BUG> utils . deploy ( ) ; ExampleRunner . testWSDL ( ) ; ExampleRunner . testSOAPCall ( ) ; } finally { utils . undeploy ( ) ; safeClose ( utils ) ; } } private static void testWSDL ( ) throws Exception { } private static void testSOAPCall ( ) throws Exception { } }

Fix:
utils . addWarDeployment ( "ws-example.war" , true , EndpointImpl . class . getPackage ( ) ) ;
Buggy code:
public final class MemoryDiffStorage implements DiffStorage { private static final Logger log = LoggerFactory . getLogger ( MemoryDiffStorage . class ) ; private final DataModel dataModel ; private final boolean stdDevWeighted ; private final long maxEntries ; private final FastByIDMap < FastByIDMap < RunningAverage > > averageDiffs ; private final FastByIDMap < RunningAverage > averageItemPref ; private final FastIDSet allRecommendableItemIDs ; private final ReadWriteLock buildAverageDiffsLock ; private final RefreshHelper refreshHelper ; public MemoryDiffStorage ( DataModel dataModel , Weighting stdDevWeighted , long maxEntries ) throws TasteException { } @ Override public RunningAverage getDiff ( long itemID1 , long itemID2 ) { } @ Override public RunningAverage [ ] getDiffs ( long userID , long itemID , PreferenceArray prefs ) { } @ Override public RunningAverage getAverageItemPref ( long itemID ) { } @ Override public void addItemPref ( long userID , long itemIDA , float prefValue ) throws TasteException { } @ Override public void updateItemPref ( long itemID , float prefDelta ) { } @ Override public void removeItemPref ( long userID , long itemIDA , float prefValue ) throws TasteException { } @ Override public FastIDSet getRecommendableItemIDs ( long userID ) throws TasteException { } private void buildAverageDiffs ( ) throws TasteException { } private void pruneInconsequentialDiffs ( ) { } private void updateAllRecommendableItems ( ) throws TasteException { } private long processOneUser ( long averageCount , long userID ) throws TasteException { MemoryDiffStorage . log . debug ( "Processing<seq2seq4repair_space>prefs<seq2seq4repair_space>for<seq2seq4repair_space>user<seq2seq4repair_space>{}" , userID ) ; PreferenceArray userPreferences = dataModel . getPreferencesFromUser ( userID ) ; int length = userPreferences . length ( ) ; <START_BUG> for ( int i = 0 ; i < ( length - 1 ) ; i ++ ) { <END_BUG> float prefAValue = userPreferences . getValue ( i ) ; long itemIDA = userPreferences . getItemID ( i ) ; FastByIDMap < RunningAverage > aMap = averageDiffs . get ( itemIDA ) ; if ( aMap == null ) { aMap = new FastByIDMap < RunningAverage > ( ) ; averageDiffs . put ( itemIDA , aMap ) ; } for ( int j = i + 1 ; j < length ; j ++ ) { long itemIDB = userPreferences . getItemID ( j ) ; RunningAverage average = aMap . get ( itemIDB ) ; if ( ( average == null ) && ( averageCount < ( maxEntries ) ) ) { average = buildRunningAverage ( ) ; aMap . put ( itemIDB , average ) ; averageCount ++ ; } if ( average != null ) { average . addDatum ( ( ( userPreferences . getValue ( j ) ) - prefAValue ) ) ; } } RunningAverage itemAverage = averageItemPref . get ( itemIDA ) ; if ( itemAverage == null ) { itemAverage = buildRunningAverage ( ) ; averageItemPref . put ( itemIDA , itemAverage ) ; } itemAverage . addDatum ( prefAValue ) ; } return averageCount ; } private RunningAverage buildRunningAverage ( ) { } @ Override public void refresh ( Collection < Refreshable > alreadyRefreshed ) { } @ Override public String toString ( ) { } }

Fix:
for ( int i = 0 ; i < length ; i ++ ) {
Buggy code:
public class TheMovieDb { private MovieLibraryUpdateCallback callback ; private Context context ; private TMDbMovie movie ; private String LOCALE = "" ; private String filepath = "" ; private String language = "" ; private boolean localizedInfo = false ; private boolean isFromManualIdentify = false ; private File thumbsFolder ; private long rowId ; private SharedPreferences settings ; public TheMovieDb ( Context context , String filepath , boolean isFromManualIdentify , long rowId , String language , String tmdbId ) { } public TheMovieDb ( Context context , String filepath , MovieLibraryUpdateCallback callback ) { } private void setup ( ) { } private void download ( ) { } private void addToDatabase ( ) { DbAdapter dbHelper = MizuuApplication . getMovieAdapter ( ) ; if ( ! ( isFromManualIdentify ) ) dbHelper . createMovie ( filepath , movie . getCover ( ) , movie . getTitle ( ) , movie . getPlot ( ) , movie . getId ( ) , movie . getImdbId ( ) , movie . getRating ( ) , movie . getTagline ( ) , movie . getReleasedate ( ) , movie . getCertification ( ) , movie . getRuntime ( ) , movie . getTrailer ( ) , movie . getGenres ( ) , "0" , movie . getCast ( ) , movie . getCollectionTitle ( ) , movie . getCollectionId ( ) , "0" , "0" , String . valueOf ( System . currentTimeMillis ( ) ) ) ; else <START_BUG> dbHelper . updateMovie ( rowId , filepath , movie . getCover ( ) , movie . getTitle ( ) , movie . getPlot ( ) , movie . getId ( ) , movie . getImdbId ( ) , movie . getRating ( ) , movie . getTagline ( ) , movie . getReleasedate ( ) , movie . getCertification ( ) , movie . getRuntime ( ) , movie . getTrailer ( ) , movie . getGenres ( ) , "0" , movie . getCast ( ) , movie . getCollectionTitle ( ) , movie . getCollectionId ( ) , "0" , "0" , String . valueOf ( System . currentTimeMillis ( ) ) ) ; <END_BUG> updateNotification ( ) ; } private void updateNotification ( ) { } private void sendUpdateBroadcast ( Intent i ) { } private void updateWidgets ( ) { } No newline ; at end ; of file ; }

Fix:
dbHelper . updateMovie ( rowId , movie . getCover ( ) , movie . getTitle ( ) , movie . getPlot ( ) , movie . getId ( ) , movie . getImdbId ( ) , movie . getRating ( ) , movie . getTagline ( ) , movie . getReleasedate ( ) , movie . getCertification ( ) , movie . getRuntime ( ) , movie . getTrailer ( ) , movie . getGenres ( ) , "0" , movie . getCast ( ) , movie . getCollectionTitle ( ) , movie . getCollectionId ( ) , "0" , "0" , String . valueOf ( System . currentTimeMillis ( ) ) ) ;