nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class SignInPanel extends Panel { private boolean includeRememberMe = true ; private PasswordTextField password ; private boolean rememberMe = true ; private TextField username ; public final class SignInForm extends Form { private final ValueMap properties = new ValueMap ( ) ; public SignInForm ( final String id ) { } public final void onSubmit ( ) { if ( signIn ( getUsername ( ) , getPassword ( ) ) ) { if ( ! ( getPage ( ) . continueToOriginalDestination ( ) ) ) { <START_BUG> setResponsePage ( getApplication ( ) . getSessionSettings ( ) . getPageFactory ( ) . newPage ( getApplicationPages ( ) . getHomePage ( ) , ( ( PageParameters ) ( null ) ) ) ) ; <END_BUG> } } else { final String errmsg = getLocalizer ( ) . getString ( "loginError" , this , "Unable<seq2seq4repair_space>to<seq2seq4repair_space>sign<seq2seq4repair_space>you<seq2seq4repair_space>in" ) ; error ( errmsg ) ; } } } public SignInPanel ( final String id ) { } public SignInPanel ( final String id , final boolean includeRememberMe ) { } public final void forgetMe ( ) { } public String getPassword ( ) { } public boolean getRememberMe ( ) { } public String getUsername ( ) { } public void setPersistent ( boolean enable ) { } public void setRememberMe ( boolean rememberMe ) { } public abstract boolean signIn ( final String username , final String password ) { } }

Fix:
setResponsePage ( getApplication ( ) . getSessionSettings ( ) . getPageFactory ( ) . newPage ( getApplication ( ) . getHomePage ( ) , ( ( PageParameters ) ( null ) ) ) ) ;
Buggy code:
class ScopedContext { private List < Object > stack ; public ScopedContext ( Object dataDictionary ) { } public Object pushSection ( String sectionName ) { } public void pop ( ) { } public Object getCursorValue ( ) { } public boolean isEmptyContext ( Object cursorPosition ) { if ( cursorPosition == null ) { return true ; } if ( cursorPosition instanceof Boolean ) { <START_BUG> return ( ( Boolean ) ( cursorPosition ) ) . booleanValue ( ) ; <END_BUG> } if ( cursorPosition instanceof Collection ) { return ( ( ( Collection ) ( cursorPosition ) ) . size ( ) ) == 0 ; } return false ; } public Object lookup ( String name ) { } private static Object lookup ( Object context , String name ) { } private static boolean isNonLookupable ( Object context ) { } void pushObject ( Object item ) { } }

Fix:
return ! ( ( ( Boolean ) ( cursorPosition ) ) . booleanValue ( ) ) ;
Buggy code:
public class BayesDriver implements BayesJob { private static final Logger log = LoggerFactory . getLogger ( BayesDriver . class ) ; @ Override public void runJob ( Path input , Path output , BayesParameters params ) throws IOException { HadoopUtil . overwriteOutput ( output ) ; BayesDriver . log . info ( "Reading<seq2seq4repair_space>features..." ) ; BayesFeatureDriver feature = new BayesFeatureDriver ( ) ; feature . runJob ( input , output , params ) ; BayesDriver . log . info ( "Calculating<seq2seq4repair_space>Tf-Idf..." ) ; BayesTfIdfDriver tfidf = new BayesTfIdfDriver ( ) ; tfidf . runJob ( input , output , params ) ; BayesDriver . log . info ( "Calculating<seq2seq4repair_space>weight<seq2seq4repair_space>sums<seq2seq4repair_space>for<seq2seq4repair_space>labels<seq2seq4repair_space>and<seq2seq4repair_space>features..." ) ; BayesWeightSummerDriver summer = new BayesWeightSummerDriver ( ) ; summer . runJob ( input , output , params ) ; BayesDriver . log . info ( "Calculating<seq2seq4repair_space>the<seq2seq4repair_space>weight<seq2seq4repair_space>Normalisation<seq2seq4repair_space>factor<seq2seq4repair_space>for<seq2seq4repair_space>each<seq2seq4repair_space>class..." ) ; BayesThetaNormalizerDriver normalizer = new BayesThetaNormalizerDriver ( ) ; normalizer . runJob ( input , output , params ) ; <START_BUG> if ( Boolean . parseBoolean ( params . get ( "skipCleanup" ) ) ) { <END_BUG> return ; } Path docCountOutPath = new Path ( output , "trainer-docCount" ) ; HadoopUtil . overwriteOutput ( docCountOutPath ) ; Path termDocCountOutPath = new Path ( output , "trainer-termDocCount" ) ; HadoopUtil . overwriteOutput ( termDocCountOutPath ) ; Path featureCountOutPath = new Path ( output , "trainer-featureCount" ) ; HadoopUtil . overwriteOutput ( featureCountOutPath ) ; Path wordFreqOutPath = new Path ( output , "trainer-wordFreq" ) ; HadoopUtil . overwriteOutput ( wordFreqOutPath ) ; Path vocabCountPath = new Path ( output , "trainer-tfIdf//trainer-vocabCount" ) ; HadoopUtil . overwriteOutput ( vocabCountPath ) ; Path vocabCountOutPath = new Path ( output , "trainer-vocabCount" ) ; HadoopUtil . overwriteOutput ( vocabCountOutPath ) ; } }

Fix:
if ( params . isSkipCleanup ( ) ) {
Buggy code:
public class PerspectiveBarManager extends ToolBarManager { public static final String SMALL_FONT = "org.eclipse.ui.smallFont" ; public PerspectiveBarManager ( int style ) { } public ToolBar createControl ( Composite parent ) { } public PerspectiveBarManager ( ToolBar toolbar ) { } private CoolBar coolBar ; private Menu popup ; public void handleChevron ( SelectionEvent event ) { if ( ( popup ) != null ) { popup . dispose ( ) ; popup = null ; return ; } CoolItem item = ( ( CoolItem ) ( event . widget ) ) ; Control control = getControl ( ) ; if ( ! ( control instanceof ToolBar ) ) return ; Rectangle itemBounds = item . getBounds ( ) ; Point pt = coolBar . toDisplay ( new Point ( itemBounds . x , itemBounds . y ) ) ; itemBounds . x = pt . x ; itemBounds . y = pt . y ; ToolBar toolBar = ( ( ToolBar ) ( control ) ) ; ToolItem [ ] tools = toolBar . getItems ( ) ; int toolCount = tools . length ; int i = 0 ; while ( i < toolCount ) { Rectangle toolBounds = tools [ i ] . getBounds ( ) ; pt = toolBar . toDisplay ( new Point ( toolBounds . x , toolBounds . y ) ) ; toolBounds . x = pt . x ; toolBounds . y = pt . y ; Rectangle intersection = itemBounds . intersection ( toolBounds ) ; if ( ! ( intersection . equals ( toolBounds ) ) ) break ; i ++ ; } popup = new Menu ( coolBar ) ; for ( int j = i ; j < toolCount ; j ++ ) { ToolItem tool = tools [ j ] ; MenuItem menuItem = new MenuItem ( popup , SWT . NONE ) ; if ( tool . getSelection ( ) ) menuItem . setEnabled ( false ) ; menuItem . setText ( tool . getText ( ) ) ; menuItem . setImage ( tool . getImage ( ) ) ; menuItem . setData ( "IContributionItem" , tool . getData ( ) ) ; menuItem . addSelectionListener ( new SelectionAdapter ( ) { public void widgetSelected ( SelectionEvent e ) { MenuItem menuItem = ( ( MenuItem ) ( e . widget ) ) ; Object item = menuItem . getData ( "IContributionItem" ) ; if ( item instanceof PerspectiveBarContributionItem ) { PerspectiveBarContributionItem contribItem = ( ( PerspectiveBarContributionItem ) ( item ) ) ; update ( false ) ; contribItem . select ( ) ; } } } ) ; } pt = coolBar . toDisplay ( new Point ( event . x , event . y ) ) ; popup . setLocation ( pt . x , pt . y ) ; popup . setVisible ( true ) ; Display display = coolBar . getDisplay ( ) ; <START_BUG> while ( ( ( popup ) != null ) && ( popup . isVisible ( ) ) ) { <END_BUG> if ( ! ( display . readAndDispatch ( ) ) ) display . sleep ( ) ; } if ( ( popup ) != null ) { popup . dispose ( ) ; popup = null ; } } protected void relayout ( ToolBar toolBar , int oldCount , int newCount ) { } void setParent ( CoolBar cool ) { } private Font getFont ( ) { } void select ( PerspectiveBarContributionItem contribItem ) { } public void addItem ( PerspectiveBarContributionItem item ) { } public void removeItem ( PerspectiveBarContributionItem item ) { } private void ensureVisible ( PerspectiveBarContributionItem contribItem ) { } private boolean isItemVisible ( ToolItem toolItem ) { } public void arrangeToolbar ( ) { } }

Fix:
while ( ( ( ( popup ) != null ) && ( ! ( popup . isDisposed ( ) ) ) ) && ( popup . isVisible ( ) ) ) {
Buggy code:
public class StringUtils { public static boolean isEmpty ( String str ) { } public static boolean isNotEmpty ( String str ) { } private static String elegibleChars = "ABDEFGHJKLMRSTUVWXYabdefhjkmnrstuvwxy23456789" ; public static String generateRandomString ( int stringLength ) { char [ ] chars = StringUtils . elegibleChars . toCharArray ( ) ; <START_BUG> StringBuffer finalString = new StringBuffer ( ) ; <END_BUG> for ( int i = 0 ; i < stringLength ; i ++ ) { double randomValue = Math . random ( ) ; int randomIndex = ( ( int ) ( Math . round ( ( randomValue * ( ( chars . length ) - 1 ) ) ) ) ) ; char characterToShow = chars [ randomIndex ] ; finalString . append ( characterToShow ) ; } return finalString . toString ( ) ; } public static String getTrimmedString ( String text , int lengthToTrim ) { } }

Fix:
final StringBuffer finalString = new StringBuffer ( ) ;
Buggy code:
public class GenericLanguageConnectionFactory implements CacheableFactory , ModuleControl , ModuleSupportable , PropertySetCallback , LanguageConnectionFactory { protected DataDictionary dd ; private ExecutionFactory ef ; private OptimizerFactory of ; private TypeCompilerFactory tcf ; private DataValueFactory dvf ; private UUIDFactory uuidFactory ; private JavaFactory javaFactory ; private ClassFactory classFactory ; private NodeFactory nodeFactory ; private AccessFactory af ; private PropertyFactory pf ; private int nextLCCInstanceNumber ; private int cacheSize = Property . STATEMENT_CACHE_SIZE_DEFAULT ; private CacheManager singleStatementCache ; public GenericLanguageConnectionFactory ( ) { } public Statement getStatement ( SchemaDescriptor compilationSchema , String statementText , boolean forReadOnly ) { } public LanguageConnectionContext newLanguageConnectionContext ( ContextManager cm , TransactionController tc , LanguageFactory lf , Database db , String userName , String drdaID , String dbname ) throws StandardException { } public Cacheable newCacheable ( CacheManager cm ) { } public UUIDFactory getUUIDFactory ( ) { } public ClassFactory getClassFactory ( ) { } public JavaFactory getJavaFactory ( ) { } public NodeFactory getNodeFactory ( ) { } public ExecutionFactory getExecutionFactory ( ) { } public AccessFactory getAccessFactory ( ) { } public PropertyFactory getPropertyFactory ( ) { } public OptimizerFactory getOptimizerFactory ( ) { } public TypeCompilerFactory getTypeCompilerFactory ( ) { } public DataValueFactory getDataValueFactory ( ) { } protected void pushDataDictionaryContext ( ContextManager cm ) { <START_BUG> dd . pushDataDictionaryContext ( cm , false ) ; <END_BUG> } public boolean canSupport ( Properties startParams ) { } private int statementCacheSize ( Properties startParams ) { } public void boot ( boolean create , Properties startParams ) throws StandardException { } protected void bootDataDictionary ( boolean create , Properties startParams ) throws StandardException { } public CacheManager getStatementCache ( ) { } public void stop ( ) { } public void init ( boolean dbOnly , Dictionary p ) { } public boolean validate ( String key , Serializable value , Dictionary p ) throws StandardException { } public Serviceable apply ( String key , Serializable value , Dictionary p ) { } public Serializable map ( String key , Serializable value , Dictionary p ) { } protected void setValidation ( ) throws StandardException { } protected void setStore ( ) throws StandardException { } public Parser newParser ( CompilerContext cc ) { } protected synchronized int getNextLCCInstanceNumber ( ) { } }

Fix:
dd . pushDataDictionaryContext ( cm ) ;
Buggy code:
public class TextRenderer { public static final int WIDTH = 435 ; public static final int PADDING = 10 ; public static final int STRING_HEIGHT = 20 ; public static final int STRING_LENGTH = 59 ; public void render ( String text , File file ) throws IOException { } private RenderedImage render ( String text ) { } private String [ ] cut ( String text ) { } private List < String > wrap ( String string ) { } private class Region implements Comparable < TextRenderer . Region > { private final int start ; private final int end ; private final boolean punct ; private Region ( int start , int end , boolean punct ) { } public int getStart ( ) { } public int getEnd ( ) { } public boolean isPunct ( ) { } @ Override public int compareTo ( TextRenderer . Region o ) { <START_BUG> return ( this . start ) - ( o . start ) ; <END_BUG> } @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
return ( o . start ) - ( this . start ) ;
Buggy code:
@ Controller @ RequestMapping ( "//owners//new" ) @ SessionAttributes ( types = Owner . class ) public class AddOwnerForm { private final Clinic clinic ; @ Autowired public AddOwnerForm ( Clinic clinic ) { } @ InitBinder public void setAllowedFields ( WebDataBinder dataBinder ) { <START_BUG> dataBinder . setDisallowedFields ( new String [ ] { "id" } ) ; <END_BUG> } @ RequestMapping ( method = RequestMethod . GET ) public String setupForm ( Model model ) { } @ RequestMapping ( method = RequestMethod . POST ) public String processSubmit ( @ ModelAttribute Owner owner , BindingResult result , SessionStatus status ) { } }

Fix:
dataBinder . setDisallowedFields ( "id" ) ;
Buggy code:
public class CookieTest extends TestCase { private static Log log = LogFactory . getLog ( CookieTest . class ) ; private MockWebApplication application ; private SignInPanel panel ; private Form form ; private Cookie cookieUsername ; private Cookie cookiePassword ; private Cookie [ ] cookies ; private WebPage page ; private WebRequestCycle cycle ; public CookieTest ( String name ) { } protected void setUp ( ) throws Exception { super . setUp ( ) ; application = new MockWebApplication ( null ) ; <START_BUG> application . getRequiredPageSettings ( ) . setHomePage ( MockPage . class ) ; <END_BUG> application . setupRequestAndResponse ( ) ; final ISecuritySettings settings = application . getSecuritySettings ( ) ; settings . setCryptFactory ( new NoCryptFactory ( ) ) ; this . panel = new SignInPanel ( "panel" ) { public boolean signIn ( final String username , final String password ) { return true ; } } ; this . panel . setPersistent ( true ) ; this . form = ( ( Form ) ( panel . get ( "signInForm" ) ) ) ; final ICrypt crypt = application . getSecuritySettings ( ) . getCryptFactory ( ) . newCrypt ( ) ; final String encryptedPassword = crypt . encrypt ( "test" ) ; assertNotNull ( encryptedPassword ) ; this . cookieUsername = new Cookie ( "panel:signInForm:username" , "juergen" ) ; this . cookiePassword = new Cookie ( "panel:signInForm:password" , encryptedPassword ) ; this . cookies = new Cookie [ ] { cookieUsername , cookiePassword } ; application . getServletRequest ( ) . setCookies ( cookies ) ; cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; this . page = new MockPage ( null ) ; page . add ( this . panel ) ; WebRequestCycle cycle = new WebRequestCycle ( application . getWicketSession ( ) , application . getWicketRequest ( ) , application . getWicketResponse ( ) ) ; } public void testSetCookieOnForm ( ) throws IOException , ServletException { } public void testPersistCookieWithPersistenceDisabled ( ) throws IOException , ServletException { } public void testPersistCookie ( ) throws IOException , ServletException { } public void testRemoveFromPage ( ) throws IOException , ServletException { } }

Fix:
application . setHomePage ( MockPage . class ) ;
Buggy code:
public class ActionAddExistingNode extends UMLAction implements GraphFactory { protected String _tabName ; protected Object _object ; public ActionAddExistingNode ( String tabName ) { } public ActionAddExistingNode ( String tabName , Object o ) { } public boolean shouldBeEnabled ( ) { } public void actionPerformed ( ActionEvent ae ) { Editor ce = Globals . curEditor ( ) ; GraphModel gm = ce . getGraphModel ( ) ; if ( ! ( gm instanceof MutableGraphModel ) ) return ; String instructions = null ; if ( ( _object ) != null ) { <START_BUG> instructions = ( Localizer . localize ( "Tree" , "Click<seq2seq4repair_space>on<seq2seq4repair_space>diagram<seq2seq4repair_space>to<seq2seq4repair_space>add<seq2seq4repair_space>" ) ) + ( _object . toString ( ) ) ; <END_BUG> Globals . showStatus ( instructions ) ; } ModePlace placeMode = new ModePlace ( this , instructions ) ; placeMode . setAddRelatedEdges ( true ) ; Globals . mode ( placeMode , false ) ; } public GraphModel makeGraphModel ( ) { } public Object makeEdge ( ) { } public Object makeNode ( ) { } }

Fix:
instructions = ( Localizer . localize ( "Tree" , "misc.message.click-on-diagram-to-add" ) ) + ( _object . toString ( ) ) ;
Buggy code:
public class Toc { private final List < Toc . Header > headers = new ArrayList < > ( ) ; public Toc ( List < Toc . Header > headers ) { } public void add ( Toc toc ) { } public String toHtml ( Path path ) { StringBuilder sb = new StringBuilder ( ) ; int lvl = 0 ; int opened = 0 ; for ( Toc . Header h : headers ) { if ( ( h . level ) > lvl ) { opened ++ ; sb . append ( "<ol>" ) ; lvl = h . level ; } else if ( ( h . level ) < lvl ) { sb . append ( "<//ol>" ) ; opened -- ; lvl = h . level ; } <START_BUG> sb . append ( "<li>" ) . append ( "<a<seq2seq4repair_space>href=\"" ) . append ( PathUtils . relativePathTo ( h . outputPath , path ) ) . append ( "#" ) . append ( h . id ) . append ( "\">" ) . append ( h . name ) . append ( "<//a>" ) . append ( "<//li>" ) ; <END_BUG> } for ( int i = 0 ; i < opened ; i ++ ) { sb . append ( "<//ol>" ) ; } return sb . toString ( ) ; } static class Header { final int level ; final String name ; final String id ; final Path outputPath ; Header ( int level , String name , String id , Path outputPath ) { } } }

Fix:
sb . append ( "<li>" ) . append ( "<a<seq2seq4repair_space>href=\"" ) . append ( PathUtils . relativePathTo ( h . outputPath , path ) ) . append ( "#" ) . append ( h . id ) . append ( "\">" ) . append ( h . name ) . append ( "<//a>" ) ;
Buggy code:
public class OLPoint extends OLGeometry < OLCoordinate > { public OLPoint ( OLCoordinate coordinate ) { } public OLPoint ( double longitude , double latitude ) { } public Double getX ( ) { } public Double getY ( ) { } public void setX ( double x ) { } public void setY ( double y ) { } public Double getLongitude ( ) { } public Double getLatitude ( ) { OLCoordinate coordinate = this . getElements ( ) . get ( 0 ) ; <START_BUG> return coordinate . x ; <END_BUG> } public void setLongitude ( double longitude ) { } public void setLatitude ( double latitude ) { } }

Fix:
return coordinate . y ;
Buggy code:
@ Controller public class FormController extends BasePageController { private static final Logger LOG = LoggerFactory . getLogger ( FormController . class ) ; public FormController ( ) { } <START_BUG> @ RequestMapping ( value = RequestMappingConstants . GET_FORM_PAGE , method = RequestMethod . GET ) <END_BUG> public String getDemoFormPage ( Model model ) { FormController . LOG . info ( "Display<seq2seq4repair_space>the<seq2seq4repair_space>demos<seq2seq4repair_space>form<seq2seq4repair_space>page" ) ; ContactUsModel contactUsModel = new ContactUsModel ( ) ; contactUsModel . setForward ( GET_FORM_PAGE ) ; model . addAttribute ( "contactUsModel" , contactUsModel ) ; LoginModel loginModel = new LoginModel ( ) ; loginModel . setRedirect ( GET_FORM_PAGE ) ; model . addAttribute ( "loginModel" , loginModel ) ; return RequestMappingConstants . FORM_PAGE ; } @ RequestMapping ( value = RequestMappingConstants . GET_AJAXFORM_PAGE , method = RequestMethod . GET ) public String getAjaxDemoFormPage ( Model model ) { } }

Fix:
@ RequestMapping ( RequestMappingConstants . GET_FORM_PAGE )
Buggy code:
public class LinearPipe < IN , OUT > { Function < IN , Object > [ ] features ; LinearClassifier < OUT , String > classifier ; public BiConsumer < IN , BufferedWriter > debugErrorContext ; @ SuppressWarnings ( "unchecked" ) public LinearPipe ( List < Function < IN , Object > > features , BiConsumer < IN , BufferedWriter > debugErrorContext ) { } private Counter < String > featurize ( IN in ) { } private RVFDatum < OUT , String > toDatum ( IN in , OUT out ) { } public void train ( List < Pair < IN , OUT > > data ) { } public OUT predict ( IN in ) { } public void analyze ( List < Pair < IN , OUT > > train , List < Pair < IN , OUT > > test , String directory ) throws IOException { } private void analyze ( List < Pair < IN , OUT > > data , String directory ) throws IOException { } private void writeAccuracy ( List < Triple < IN , OUT , OUT > > predictions , String path ) throws IOException { } private Pair < List < OUT > , int [ ] [ ] > getConfusionMatrix ( List < Triple < IN , OUT , OUT > > predictions ) { List < OUT > tagTypes = new ArrayList < > ( ) ; for ( Triple < IN , OUT , OUT > prediction : predictions ) { if ( ! ( tagTypes . contains ( prediction . second ) ) ) tagTypes . add ( prediction . second ) ; } int [ ] [ ] counts = new int [ tagTypes . size ( ) ] [ tagTypes . size ( ) ] ; for ( Triple < IN , OUT , OUT > prediction : predictions ) { int target = tagTypes . indexOf ( prediction . second ) ; int guess = tagTypes . indexOf ( prediction . third ) ; <START_BUG> if ( ( target > 0 ) || ( guess > 0 ) ) <END_BUG> continue ; ( counts [ target ] [ guess ] ) ++ ; } return new Pair ( tagTypes , counts ) ; } private void writeConfusionMatrix ( List < Triple < IN , OUT , OUT > > predictions , String path ) throws IOException { } private List < Triple < IN , OUT , OUT > > sortByConfusion ( List < Triple < IN , OUT , OUT > > predictions ) { } private void writeErrors ( List < Triple < IN , OUT , OUT > > predictions , String path ) throws IOException { } }

Fix:
if ( ( target < 0 ) || ( guess < 0 ) )
Buggy code:
public class SettingsDialog extends JDialog { private final JPanel contentPanel = new JPanel ( ) ; private JTextField fldExportSize ; private boolean modalResult = false ; private final ActionListener buttonActionListener = new ActionListener ( ) { @ Override public void actionPerformed ( ActionEvent e ) { } } ; private Settings settings = null ; private JTextField fldRandomAreaSize ; private JTextField fldRandomFillPercent ; private JCheckBox chckbxAntiAliasExport ; public static void main ( String [ ] args ) { } protected void readValues ( ) throws Exception { try { settings . exportImageSize = Integer . parseInt ( fldExportSize . getText ( ) ) ; settings . exportAntiAlias = chckbxAntiAliasExport . isEnabled ( ) ; settings . randomFieldRadius = Integer . parseInt ( fldRandomAreaSize . getText ( ) ) ; if ( ( settings . randomFieldRadius ) < 0 ) throw new Exception ( "Size<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space><<seq2seq4repair_space>0" ) ; if ( ( settings . randomFieldRadius ) > 20 ) throw new Exception ( "Size<seq2seq4repair_space>can<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>><seq2seq4repair_space>20" ) ; <START_BUG> settings . randomFillPercent = Math . min ( 100 , Math . max ( 0 , Integer . parseInt ( fldRandomFillPercent . getText ( ) ) ) ) ; <END_BUG> } catch ( NumberFormatException e ) { throw new Exception ( "Bd<seq2seq4repair_space>number<seq2seq4repair_space>format<seq2seq4repair_space>in<seq2seq4repair_space>export<seq2seq4repair_space>image<seq2seq4repair_space>size" ) ; } if ( ( settings . exportImageSize ) <= 0 ) throw new Exception ( "Image<seq2seq4repair_space>size<seq2seq4repair_space>too<seq2seq4repair_space>small" ) ; if ( ( settings . exportImageSize ) >= 4096 ) throw new Exception ( "Image<seq2seq4repair_space>size<seq2seq4repair_space>too<seq2seq4repair_space>big" ) ; } protected void writeValues ( ) { } public SettingsDialog ( Settings s ) { } public boolean showDialog ( ) { } }

Fix:
settings . randomFillPercent = 0.01 * ( Math . min ( 100 , Math . max ( 0 , Integer . parseInt ( fldRandomFillPercent . getText ( ) ) ) ) ) ;
Buggy code:
class ClasspathJar extends ClasspathLocation { String zipFilename ; ZipFile zipFile ; LookupTable directoryCache ; ClasspathJar ( String zipFilename ) { } void buildDirectoryStructure ( ) { } void clear ( ) { } public boolean equals ( Object o ) { } boolean isPackage ( char [ ] [ ] compoundName , char [ ] packageName ) { } NameEnvironmentAnswer findClass ( char [ ] className , char [ ] [ ] packageName ) { } public String toString ( ) { <START_BUG> return "Classpath<seq2seq4repair_space>for<seq2seq4repair_space>jar<seq2seq4repair_space>file<seq2seq4repair_space>" + ( zipFile ) ; <END_BUG> } }

Fix:
return "Classpath<seq2seq4repair_space>jar<seq2seq4repair_space>file<seq2seq4repair_space>" + ( zipFilename ) ;
Buggy code:
public class PackageDeclaration extends SourceRefElement implements IPackageDeclaration { String name ; protected PackageDeclaration ( CompilationUnit parent , String name ) { } public boolean equals ( Object o ) { } public String getElementName ( ) { } public int getElementType ( ) { } protected char getHandleMementoDelimiter ( ) { } public IJavaElement getPrimaryElement ( boolean checkOwner ) { } protected void toStringInfo ( int tab , StringBuffer buffer , Object info , boolean showResolvedInfo ) { <START_BUG> buffer . append ( this . tabString ( tab ) ) ; <END_BUG> buffer . append ( "package<seq2seq4repair_space>" ) ; toStringName ( buffer ) ; if ( info == null ) { buffer . append ( "<seq2seq4repair_space>(not<seq2seq4repair_space>open)" ) ; } } }

Fix:
buffer . append ( tabString ( tab ) ) ;
Buggy code:
public class BooleanProperty extends AbstractProperty { private boolean value ; private transient boolean savedValue ; public BooleanProperty ( String name , boolean v ) { } public BooleanProperty ( ) { } public void setObjectValue ( Object v ) { } public String getStringValue ( ) { } public Object getObjectValue ( ) { <START_BUG> return JOrphanUtils . valueOf ( value ) ; <END_BUG> } public Object clone ( ) { } public boolean getBooleanValue ( ) { } public void setRunningVersion ( boolean runningVersion ) { } public void recoverRunningVersion ( TestElement owner ) { } }

Fix:
return Boolean . valueOf ( value ) ;
Buggy code:
public class Checker extends ShadowMunger { private String msg ; private boolean isError ; public Checker ( DeclareErrorOrWarning deow ) { } public ShadowMunger concretize ( ResolvedTypeX fromType , World world , PerClause clause ) { <START_BUG> pointcut = pointcut . concretize ( fromType , 0 ) ; <END_BUG> return this ; } public void specializeOn ( Shadow shadow ) { } public void implementOn ( Shadow shadow ) { } public boolean match ( Shadow shadow , World world ) { } public int compareTo ( Object other ) { } }

Fix:
pointcut = pointcut . concretize ( fromType , 0 , this ) ;
Buggy code:
public class FunctionalLinkedList extends LinkedList implements FunctionalList { @ Override public ReturnObject head ( ) { if ( isEmpty ( ) ) { return new ReturnObjectImpl ( ErrorMessage . EMPTY_STRUCTURE ) ; } else { <START_BUG> return new ReturnObjectImpl ( this . get ( 0 ) ) ; <END_BUG> } } @ Override public FunctionalList rest ( ) { } }

Fix:
return this . get ( 0 ) ;
Buggy code:
class BufferedDeletesStream { private final List < FrozenBufferedDeletes > deletes = new ArrayList < FrozenBufferedDeletes > ( ) ; private long nextGen = 1 ; private Term lastDeleteTerm ; private final InfoStream infoStream ; private final AtomicLong bytesUsed = new AtomicLong ( ) ; private final AtomicInteger numTerms = new AtomicInteger ( ) ; public BufferedDeletesStream ( InfoStream infoStream ) { } public synchronized long push ( FrozenBufferedDeletes packet ) { } public synchronized void clear ( ) { } public boolean any ( ) { } public int numTerms ( ) { } public long bytesUsed ( ) { } public static class ApplyDeletesResult { public final boolean anyDeletes ; public final long gen ; public final List < SegmentInfo > allDeleted ; ApplyDeletesResult ( boolean anyDeletes , long gen , List < SegmentInfo > allDeleted ) { } } private static final Comparator < SegmentInfo > sortSegInfoByDelGen = new Comparator < SegmentInfo > ( ) { @ Override public int compare ( SegmentInfo si1 , SegmentInfo si2 ) { } } ; public synchronized BufferedDeletesStream . ApplyDeletesResult applyDeletes ( IndexWriter . ReaderPool readerPool , List < SegmentInfo > infos ) throws IOException { } synchronized long getNextGen ( ) { } public synchronized void prune ( SegmentInfos segmentInfos ) { } private synchronized void prune ( int count ) { } private synchronized long applyTermDeletes ( Iterable < Term > termsIter , SegmentReader reader ) throws IOException { } public static class QueryAndLimit { public final Query query ; public final int limit ; public QueryAndLimit ( Query query , int limit ) { } } private static long applyQueryDeletes ( Iterable < BufferedDeletesStream . QueryAndLimit > queriesIter , SegmentReader reader ) throws IOException { } private boolean checkDeleteTerm ( Term term ) { if ( term != null ) { assert ( ( lastDeleteTerm ) == null ) || ( ( term . compareTo ( lastDeleteTerm ) ) > 0 ) : ( ( "lastTerm=" + ( lastDeleteTerm ) ) + "<seq2seq4repair_space>vs<seq2seq4repair_space>term=" ) + term ; } <START_BUG> lastDeleteTerm = ( term == null ) ? null : new Term ( term . field ( ) , new org . apache . lucene . util . BytesRef ( term . bytes ) ) ; <END_BUG> return true ; } private boolean checkDeleteStats ( ) { } }

Fix:
lastDeleteTerm = ( term == null ) ? null : new Term ( term . field ( ) , BytesRef . deepCopyOf ( term . bytes ) ) ;
Buggy code:
public abstract class MockPredicateTestBase < T > { private List < Predicate < ? super T > > mockPredicatesToVerify ; private final T testValue ; protected MockPredicateTestBase ( final T testValue ) { } @ Before public final void createVerifyList ( ) { } @ After public final void verifyPredicates ( ) { } protected final T getTestValue ( ) { } <START_BUG> @ SuppressWarnings ( { "unchecked" } ) <END_BUG> protected final Predicate < T > createMockPredicate ( final Boolean returnValue ) { final Predicate < T > mockPredicate = EasyMock . createMock ( Predicate . class ) ; if ( returnValue != null ) { EasyMock . expect ( mockPredicate . evaluate ( testValue ) ) . andReturn ( returnValue ) ; } replay ( mockPredicate ) ; mockPredicatesToVerify . add ( mockPredicate ) ; return mockPredicate ; } }

Fix:
@ SuppressWarnings ( { "unchecked" , "boxing" } )
Buggy code:
public class AjcTest extends RunSpecIterator { public static AjcTest . Spec unwrapSpec ( IRunStatus status ) { } public static CompilerRun . Spec unwrapCompilerRunSpec ( AjcTest . Spec spec ) { } public AjcTest ( AjcTest . Spec spec , Sandbox sandbox , Validator validator ) { } public void iterationCompleted ( ) { } public static class Spec extends AbstractRunSpec { public static final String XMLNAME = "ajc-test" ; private static final XMLNames NAMES = new XMLNames ( XMLNames . DEFAULT , "title" , null , null , null , "" , null , true , false , false ) ; private static final String OPTION_PREFIX = "-ajctest" ; private static final String [ ] VALID_OPTIONS = new String [ ] { AjcTest . Spec . OPTION_PREFIX } ; private static final String REQUIRE_KEYWORDS = "RequireKeywords=" ; private static final String SKIP_KEYWORDS = "SkipKeywords=" ; private static final String PICK_PR = "PR=" ; private static final List VALID_SUFFIXES = Collections . unmodifiableList ( Arrays . asList ( new String [ ] { AjcTest . Spec . REQUIRE_KEYWORDS , AjcTest . Spec . SKIP_KEYWORDS , AjcTest . Spec . PICK_PR } ) ) ; private File suiteDir ; String testDirOffset ; private int bugId ; public Spec ( ) { } public void setSuiteDir ( File suiteDir ) { } public File getSuiteDir ( ) { } public void setBugId ( int bugId ) { <START_BUG> LangUtil . throwIaxIfFalse ( ( ( bugId > 10 ) && ( bugId < 10000 ) ) , ( "bad<seq2seq4repair_space>bug<seq2seq4repair_space>id:<seq2seq4repair_space>" + bugId ) ) ; <END_BUG> this . bugId = bugId ; } public int getBugId ( ) { } public void setTestDirOffset ( String testDirOffset ) { } public String getTestDirOffset ( ) { } public IRunIterator makeRunIterator ( Sandbox sandbox , Validator validator ) { } public void writeXml ( XMLWriter out ) { } protected boolean doAdoptParentValues ( RT parentRuntime , IMessageHandler handler ) { } } public static class Suite extends RunSpecIterator { final AjcTest . Suite . Spec spec ; public Suite ( AjcTest . Suite . Spec spec , Sandbox sandbox , Validator validator ) { } protected Sandbox makeSandbox ( IRunSpec child , Validator validator ) { } public static class Spec extends AbstractRunSpec { public static final String XMLNAME = "suite" ; private static final XMLNames NAMES = new XMLNames ( XMLNames . DEFAULT , null , null , null , null , "" , null , true , true , false ) ; File suiteDir ; public Spec ( ) { } public void setSuiteDir ( String suiteDirPath ) { } public void setSuiteDirFile ( File suiteDir ) { } public File getSuiteDirFile ( ) { } public IRunIterator makeRunIterator ( Sandbox sandbox , Validator validator ) { } public String toString ( ) { } } } }

Fix:
LangUtil . throwIaxIfFalse ( ( ( bugId > 10 ) && ( bugId < 1000000 ) ) , ( "bad<seq2seq4repair_space>bug<seq2seq4repair_space>id:<seq2seq4repair_space>" + bugId ) ) ;
Buggy code:
public class DomainFinalResultHandler implements OperationStepHandler { private final DomainOperationContext domainOperationContext ; public DomainFinalResultHandler ( DomainOperationContext domainOperationContext ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { } private boolean collectDomainFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectContextFailure ( OperationContext context , final boolean isDomain ) { } private boolean collectHostFailures ( final OperationContext context , final boolean isDomain ) { } private ModelNode getSingleHostResult ( ) { } private void populateServerGroupResults ( final OperationContext context , final ModelNode result ) { final Set < String > groupNames = new TreeSet < String > ( ) ; final Map < String , Set < DomainFinalResultHandler . HostServer > > groupToServerMap = new HashMap < String , Set < DomainFinalResultHandler . HostServer > > ( ) ; for ( Map . Entry < ServerIdentity , ModelNode > entry : domainOperationContext . getServerResults ( ) . entrySet ( ) ) { final String serverGroup = entry . getKey ( ) . getServerGroupName ( ) ; groupNames . add ( serverGroup ) ; final String hostName = entry . getKey ( ) . getHostName ( ) ; final String serverName = entry . getKey ( ) . getServerName ( ) ; if ( ! ( groupToServerMap . containsKey ( serverGroup ) ) ) { groupToServerMap . put ( serverGroup , new TreeSet < DomainFinalResultHandler . HostServer > ( ) ) ; } groupToServerMap . get ( serverGroup ) . add ( new DomainFinalResultHandler . HostServer ( hostName , serverName , entry . getValue ( ) ) ) ; } boolean serverGroupSuccess = false ; for ( String groupName : groupNames ) { final ModelNode groupNode = new ModelNode ( ) ; if ( domainOperationContext . isServerGroupRollback ( groupName ) ) { } else { serverGroupSuccess = true ; } for ( DomainFinalResultHandler . HostServer hostServer : groupToServerMap . get ( groupName ) ) { final ModelNode serverNode = new ModelNode ( ) ; serverNode . get ( HOST ) . set ( hostServer . hostName ) ; serverNode . get ( RESPONSE ) . set ( hostServer . result ) ; groupNode . get ( hostServer . serverName ) . set ( serverNode ) ; } <START_BUG> result . get ( SERVER_GROUPS ) . add ( groupName , groupNode ) ; <END_BUG> } if ( ! serverGroupSuccess ) { context . getFailureDescription ( ) . set ( "Operation<seq2seq4repair_space>failed<seq2seq4repair_space>or<seq2seq4repair_space>was<seq2seq4repair_space>rolled<seq2seq4repair_space>back<seq2seq4repair_space>on<seq2seq4repair_space>all<seq2seq4repair_space>servers." ) ; } } private boolean isDomainOperation ( final ModelNode operation ) { } private class HostServer implements Comparable < DomainFinalResultHandler . HostServer > { private final String hostName ; private final String serverName ; private final ModelNode result ; private HostServer ( String hostName , String serverName , ModelNode result ) { } public int compareTo ( DomainFinalResultHandler . HostServer hostServer ) { } } }

Fix:
result . get ( SERVER_GROUPS , groupName ) . set ( groupNode ) ;
Buggy code:
public class CategoryWrapper { Category c ; static String FQCN = CategoryWrapper . class . getName ( ) ; CategoryWrapper ( String name ) { } public static void main ( String [ ] argv ) { Layout layout = new PatternLayout ( "%p<seq2seq4repair_space>[%t]<seq2seq4repair_space>%C<seq2seq4repair_space>%F<seq2seq4repair_space>-<seq2seq4repair_space>%m\n" ) ; <START_BUG> Appender out = new FileAppender ( layout , System . out ) ; <END_BUG> CategoryWrapper w1 = new CategoryWrapper ( "c1" ) ; w1 . addAppender ( out ) ; w1 . print ( "hello" ) ; } public void addAppender ( Appender appender ) { } public void print ( String msg ) { } static void Usage ( String msg ) { } }

Fix:
Appender out = new ConsoleAppender ( layout , ConsoleAppender . SYSTEM_OUT ) ;
Buggy code:
public class RGBDSLAM implements LCMSubscriber { LCM lcm = LCM . getSingleton ( ) ; RGBDSLAM . KinectThread kt ; RGBDSLAM . RenderThread rt ; RGBDSLAM . RGBDThread rgbd ; double DEFAULT_RES = 0.01 ; double currRes = DEFAULT_RES ; VoxelArray globalVoxelFrame = new VoxelArray ( DEFAULT_RES ) ; boolean loadedFromFile = false ; Object rbtLock = new Object ( ) ; ArrayList < double [ ] > trajectory = new ArrayList < double [ ] > ( ) ; double [ ] [ ] Grbt = Matrix . identity ( 4 , 4 ) . copyArray ( ) ; ExpiringMessageCache < gamepad_t > lgp = new ExpiringMessageCache < gamepad_t > ( 0.25 ) ; GetOpt opts ; public RGBDSLAM ( GetOpt opts ) { } public void messageReceived ( LCM lcm , String channel , LCMDataInputStream ins ) { } class KinectThread extends Thread { int pollRate = 5 ; boolean closeSignal = false ; boolean closed = true ; public void run ( ) { } public synchronized void close ( ) { } public synchronized boolean isClosed ( ) { } public synchronized void setPollRate ( int pr ) { } } class RenderThread extends Thread { int fps = 5 ; VisWorld vw ; VisLayer vl ; VisCanvas vc ; ParameterGUI pg ; boolean turbo = false ; double vel = - 1.0 ; double theta_vel = - ( Math . toRadians ( 15 ) ) ; public RenderThread ( ) { } public synchronized void run ( ) { } public void updateFPS ( ) { } private double [ ] getCameraXYZRPY ( double dt ) { gamepad_t gp = lgp . get ( ) ; if ( gp == null ) return new double [ 6 ] ; if ( ( ( ( gp . buttons ) & 240 ) > 1 ) && ( ! ( turbo ) ) ) { vel = - 4.0 ; theta_vel = - ( Math . toRadians ( 36 ) ) ; turbo = true ; } else if ( ( ( ( gp . buttons ) & 240 ) == 0 ) && ( turbo ) ) { vel = - 1.0 ; theta_vel = - ( Math . toRadians ( 15 ) ) ; turbo = false ; } <START_BUG> return new double [ ] { ( ( gp . axes [ 0 ] ) * ( - ( vel ) ) ) * dt , ( ( gp . axes [ 5 ] ) * ( vel ) ) * dt , ( ( gp . axes [ 1 ] ) * ( vel ) ) * dt , ( ( gp . axes [ 4 ] ) * ( theta_vel ) ) * dt , ( ( gp . axes [ 5 ] ) * ( theta_vel ) ) * dt , ( ( gp . axes [ 2 ] ) * ( theta_vel ) ) * dt } ; <END_BUG> } } class RGBDThread extends Thread { Frame currFrame = null ; Frame lastFrame = null ; ArrayList < ImageFeature > featuresL ; ColorPointCloud lastFullPtCloud ; ColorPointCloud lastDecimatedPtCloud ; public synchronized void run ( ) { } public synchronized void handleFrame ( Kinect . Frame frame ) { } } public static void main ( String [ ] args ) { } }

Fix:
return new double [ ] { ( ( gp . axes [ 0 ] ) * ( - ( vel ) ) ) * dt , ( ( gp . axes [ 5 ] ) * ( vel ) ) * dt , ( ( gp . axes [ 1 ] ) * ( vel ) ) * dt , ( ( gp . axes [ 4 ] ) * ( theta_vel ) ) * dt , ( ( gp . axes [ 3 ] ) * ( theta_vel ) ) * dt , ( ( gp . axes [ 2 ] ) * ( theta_vel ) ) * dt } ;
Buggy code:
public class FieldSortedHitQueue extends PriorityQueue { public FieldSortedHitQueue ( IndexReader reader , SortField [ ] fields , int size ) throws IOException { } protected ScoreDocComparator [ ] comparators ; protected SortField [ ] fields ; protected float maxscore = Float . NEGATIVE_INFINITY ; public float getMaxScore ( ) { } private final void updateMaxScore ( FieldDoc fdoc ) { } public boolean insert ( FieldDoc fdoc ) { } public boolean insert ( Object fdoc ) { } public Object insertWithOverflow ( Object element ) { } protected boolean lessThan ( final Object a , final Object b ) { } FieldDoc fillFields ( final FieldDoc doc ) { } SortField [ ] getFields ( ) { } static ScoreDocComparator getCachedComparator ( IndexReader reader , String field , int type , Locale locale , SortComparatorSource factory ) throws IOException { } static final Cache Comparators = new FieldCacheImpl . Cache ( ) { protected Object createValue ( IndexReader reader , Object entryKey ) throws IOException { } } ; static ScoreDocComparator comparatorInt ( final IndexReader reader , final String fieldname ) throws IOException { } static ScoreDocComparator comparatorLong ( final IndexReader reader , final String fieldname ) throws IOException { } static ScoreDocComparator comparatorFloat ( final IndexReader reader , final String fieldname ) throws IOException { } static ScoreDocComparator comparatorDouble ( final IndexReader reader , final String fieldname ) throws IOException { } static ScoreDocComparator comparatorString ( final IndexReader reader , final String fieldname ) throws IOException { } static ScoreDocComparator comparatorStringLocale ( final IndexReader reader , final String fieldname , final Locale locale ) throws IOException { } static ScoreDocComparator comparatorAuto ( final IndexReader reader , final String fieldname ) throws IOException { final String field = fieldname . intern ( ) ; <START_BUG> Object lookupArray = DEFAULT . getAuto ( reader , field ) ; <END_BUG> if ( lookupArray instanceof FieldCache . StringIndex ) { return FieldSortedHitQueue . comparatorString ( reader , field ) ; } else if ( lookupArray instanceof int [ ] ) { return FieldSortedHitQueue . comparatorInt ( reader , field ) ; } else if ( lookupArray instanceof long [ ] ) { return FieldSortedHitQueue . comparatorLong ( reader , field ) ; } else if ( lookupArray instanceof float [ ] ) { return FieldSortedHitQueue . comparatorFloat ( reader , field ) ; } else if ( lookupArray instanceof String [ ] ) { return FieldSortedHitQueue . comparatorString ( reader , field ) ; } else { throw new RuntimeException ( ( ( "unknown<seq2seq4repair_space>data<seq2seq4repair_space>type<seq2seq4repair_space>in<seq2seq4repair_space>field<seq2seq4repair_space>'" + field ) + "'" ) ) ; } } }

Fix:
Object lookupArray = EXT_DEFAULT . getAuto ( reader , field ) ;
Buggy code:
public class Objects2 { private Objects2 ( ) { } public static Object byteArrayToObject ( final byte [ ] data ) { } <START_BUG> public static byte [ ] objectToByteArray ( Object object ) { <END_BUG> try { final ByteArrayOutputStream out = new ByteArrayOutputStream ( ) ; try { new ObjectOutputStream ( out ) . writeObject ( object ) ; } finally { out . close ( ) ; } return out . toByteArray ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; return null ; } } }

Fix:
public static byte [ ] objectToByteArray ( final Object object ) {
Buggy code:
public class B2ProcessManager { private static final Map < String , B2Process > B2_PROCESS_HOLDER = new HashMap < > ( ) ; private static final Map < String , Options > B2_PROPERTIES_HOLDER = new HashMap < > ( ) ; private static B2Process createAndPersistBuilderProcess ( IProject project ) { } public static B2Process getBuilderProcess ( IProject project ) { } public static Options getBuildProperties ( IProject project ) { <START_BUG> IPath location = project . getLocation ( ) ; <END_BUG> String locationStr = location . toOSString ( ) ; if ( B2ProcessManager . B2_PROPERTIES_HOLDER . containsKey ( locationStr ) ) return B2ProcessManager . B2_PROPERTIES_HOLDER . get ( locationStr ) ; B2Process process = B2ProcessManager . getBuilderProcess ( project ) ; Response response = process . invokeRequest ( new Request ( Request . REQUEST_TYPE_GET , null , null , "properties" ) ) ; if ( response != null ) { List < Map < String , Object > > properties = response . getResponse ( ) ; Options opts = new Options ( properties ) ; B2ProcessManager . B2_PROPERTIES_HOLDER . put ( locationStr , opts ) ; return opts ; } return null ; } }

Fix:
IPath location = project . getFullPath ( ) ;
Buggy code:
public class GapInfo { private String id ; private List < String > answers = new ArrayList < String > ( ) ; private List < String > checkAnswers = new ArrayList < String > ( ) ; private int value ; private int maxLength ; private boolean isCaseSensitive = false ; private boolean isIgnorePunctuation ; private String placeHolder = "" ; public GapInfo ( String id , int value , boolean isCaseSensitive , boolean isIgnorePunctuation , int maxLength ) { } public void addAnswer ( String answer ) { answer = StringUtils . unescapeXML ( answer ) ; answer = answer . replaceAll ( "&nbsp;" , "<seq2seq4repair_space>" ) ; <START_BUG> answers . add ( ( isCaseSensitive ? answer : answer . toLowerCase ( ) ) ) ; <END_BUG> if ( isIgnorePunctuation ) { answer = GapInfo . removePunctuation ( answer ) ; } checkAnswers . add ( ( isCaseSensitive ? answer : answer . toLowerCase ( ) ) ) ; } public static boolean isLetter ( char c ) { } public static boolean isDigit ( int d ) { } public static boolean inRange ( int value , int min , int max ) { } private static String removePunctuation ( String text ) { } public boolean isCorrect ( String text ) { } public String getId ( ) { } public int getValue ( ) { } public int getMaxLength ( ) { } public void setPlaceHolder ( String placeHolder ) { } public String getPlaceHolder ( ) { } public Iterator < String > getAnswers ( ) { } }

Fix:
answers . add ( answer ) ;
Buggy code:
public class StickyProtection extends JavaPlugin implements Listener { StickyLocks stickyLocks ; Database database ; @ Override public void onEnable ( ) { } @ Override public void onDisable ( ) { } boolean checkProtection ( Block block , Player player ) { } boolean checkProtection ( Block block ) { } private boolean accessDenied ( Block block , Player player ) { } private boolean accessDenied ( Block block ) { } @ EventHandler public void onBlockBreak ( BlockBreakEvent event ) { if ( event . isCancelled ( ) ) { return ; } if ( checkProtection ( event . getBlock ( ) , event . getPlayer ( ) ) ) { <START_BUG> if ( ! ( event . getPlayer ( ) . hasPermission ( "stickylocks.ghost" ) ) ) { <END_BUG> event . setCancelled ( true ) ; stickyLocks . sendMessage ( event . getPlayer ( ) , "This<seq2seq4repair_space>block<seq2seq4repair_space>is<seq2seq4repair_space>protected<seq2seq4repair_space>from<seq2seq4repair_space>destruction" , false ) ; } } } @ EventHandler public void onBlockPistonExtend ( BlockPistonExtendEvent event ) { } @ EventHandler public void onBlockPistonRetract ( BlockPistonRetractEvent event ) { } @ EventHandler public void onBlockBurn ( BlockBurnEvent event ) { } }

Fix:
if ( ( ( event . getPlayer ( ) ) != null ) && ( ! ( event . getPlayer ( ) . hasPermission ( "stickylocks.ghost" ) ) ) ) {
Buggy code:
public class UnsubscribeFolderCommand extends Command { private IMAPRootFolder root ; private IMAPServer store ; public UnsubscribeFolderCommand ( SubscribeCommandReference reference ) { } public void execute ( WorkerStatusController worker ) throws Exception { SubscribeCommandReference subscribeReference = ( ( SubscribeCommandReference ) ( getReference ( ) ) ) ; <START_BUG> root = ( ( IMAPRootFolder ) ( subscribeReference . getFolder ( ) ) ) ; <END_BUG> store = root . getServer ( ) ; store . unsubscribeFolder ( subscribeReference . getMailbox ( ) ) ; } public void updateGUI ( ) throws Exception { } }

Fix:
root = ( ( IMAPRootFolder ) ( subscribeReference . getSourceFolder ( ) ) ) ;