nus-yam/ex-repair huggingface dataset:
Buggy code:
public class MachineInformationClientScreenModule implements ClientScreenModule { private String line = "" ; private int labcolor = 16777215 ; private int txtcolor = 16777215 ; protected int dim = 0 ; protected Coordinate coordinate = Coordinate . INVALID ; @ Override public TransformMode getTransformMode ( ) { } @ Override public int getHeight ( ) { } @ Override public void render ( FontRenderer fontRenderer , int currenty , Object [ ] screenData , float factor ) { GL11 . glDisable ( GL_LIGHTING ) ; int xoffset ; if ( ! ( line . isEmpty ( ) ) ) { fontRenderer . drawString ( line , 7 , currenty , labcolor ) ; xoffset = 7 + 40 ; } else { xoffset = 7 ; } <START_BUG> if ( ( ( coordinate . isValid ( ) ) && ( screenData != null ) ) && ( ( screenData . length ) >= 1 ) ) { <END_BUG> fontRenderer . drawString ( ( ( String ) ( screenData [ 0 ] ) ) , xoffset , currenty , txtcolor ) ; } else { fontRenderer . drawString ( "<invalid>" , xoffset , currenty , 16711680 ) ; } } @ Override public void mouseClick ( World world , int x , int y , boolean clicked ) { } @ Override public Panel createGui ( Minecraft mc , Gui gui , final NBTTagCompound currentData , final ModuleGuiChanged moduleGuiChanged ) { } private void addOptionPanel ( Minecraft mc , Gui gui , final NBTTagCompound currentData , final ModuleGuiChanged moduleGuiChanged , Panel panel ) { } private void addMonitorPanel ( Minecraft mc , Gui gui , final NBTTagCompound currentData , Panel panel ) { } private void addColorPanel ( Minecraft mc , Gui gui , final NBTTagCompound currentData , final ModuleGuiChanged moduleGuiChanged , Panel panel ) { } private ColorChoiceLabel addColorSelector ( Minecraft mc , Gui gui , final NBTTagCompound currentData , final ModuleGuiChanged moduleGuiChanged , final String tagName ) { } @ Override public void setupFromNBT ( NBTTagCompound tagCompound , int dim , int x , int y , int z ) { } protected void setupCoordinateFromNBT ( NBTTagCompound tagCompound , int dim , int x , int y , int z ) { } @ Override public boolean needsServerData ( ) { } }

Fix:
if ( ( ( ( coordinate . isValid ( ) ) && ( screenData != null ) ) && ( ( screenData . length ) >= 1 ) ) && ( ( screenData [ 0 ] ) instanceof String ) ) {
Buggy code:
public class RuleTest extends JFrame { Rule rule ; FilterModel filterModel ; public RuleTest ( String inFixText ) { } public static void main ( String [ ] args ) { <START_BUG> RuleTest test = new RuleTest ( "(<seq2seq4repair_space>level<seq2seq4repair_space>~=<seq2seq4repair_space>deb<seq2seq4repair_space>)<seq2seq4repair_space>&&<seq2seq4repair_space>(<seq2seq4repair_space>logger<seq2seq4repair_space>like<seq2seq4repair_space>logger[1-2]<seq2seq4repair_space>||<seq2seq4repair_space>MDC.entry1<seq2seq4repair_space>>=<seq2seq4repair_space>234<seq2seq4repair_space>)" ) ; <END_BUG> test . pack ( ) ; test . setVisible ( true ) ; } }

Fix:
RuleTest test = new RuleTest ( "(<seq2seq4repair_space>level<seq2seq4repair_space>~=<seq2seq4repair_space>deb<seq2seq4repair_space>)<seq2seq4repair_space>&&<seq2seq4repair_space>(<seq2seq4repair_space>logger<seq2seq4repair_space>like<seq2seq4repair_space>logger[1-2]<seq2seq4repair_space>||<seq2seq4repair_space>PROP.entry1<seq2seq4repair_space>>=<seq2seq4repair_space>234<seq2seq4repair_space>)" ) ;
Buggy code:
public class AttributeModifier extends AbstractBehavior implements Serializable { public static final String VALUELESS_ATTRIBUTE_ADD = "VA_ADD" ; public static final String VALUELESS_ATTRIBUTE_REMOVE = "VA_REMOVE" ; private static final long serialVersionUID = 1L ; private final boolean addAttributeIfNotPresent ; private final String attribute ; private boolean enabled ; private final String pattern ; private final IModel < ? extends CharSequence > replaceModel ; public AttributeModifier ( final String attribute , final boolean addAttributeIfNotPresent , final IModel < ? extends CharSequence > replaceModel ) { } public AttributeModifier ( final String attribute , final IModel < ? extends CharSequence > replaceModel ) { } public AttributeModifier ( final String attribute , final String pattern , final boolean addAttributeIfNotPresent , final IModel < ? extends CharSequence > replaceModel ) { } public AttributeModifier ( final String attribute , final String pattern , final IModel < ? extends CharSequence > replaceModel ) { } @ Override public final void detachModel ( Component component ) { } public boolean isEnabled ( ) { } @ Override public final void onComponentTag ( Component component , ComponentTag tag ) { } public final void replaceAttibuteValue ( final Component component , final ComponentTag tag ) { } public final void setEnabled ( final boolean enabled ) { } @ Override public String toString ( ) { } protected final IModel < ? extends CharSequence > getReplaceModel ( ) { } protected String newValue ( final String currentValue , final String replacementValue ) { } private CharSequence getReplacementOrNull ( final Component component ) { <START_BUG> return ( replaceModel ) != null ? replaceModel . getObject ( component ) : null ; <END_BUG> } private String toStringOrNull ( final Object replacementValue ) { } }

Fix:
return ( replaceModel ) != null ? replaceModel . getObject ( ) : null ;
Buggy code:
public class W2uiGridExample extends W2uiGridData implements Servlet { private static final long serialVersionUID = 7163093252884618719L ; protected static JSONArray dbUsers = new JSONArray ( ) ; public W2uiGridExample ( ) { } @ Override protected void logException ( Exception ex ) { } @ Override protected JSONArray processGetRecords ( JSONObject reqParams ) throws Exception { } @ Override protected JSONObject processGetRecord ( JSONObject reqParams ) throws Exception { } protected void updateRecord ( int recid , JSONObject change ) throws Exception { } protected void processSaveRecords ( JSONObject reqParams ) throws Exception { <START_BUG> JSONArray changed = reqParams . getJSONArray ( "changed" ) ; <END_BUG> for ( int cnt = 0 ; cnt < ( changed . length ( ) ) ; cnt ++ ) { JSONObject change = changed . getJSONObject ( cnt ) ; int recid = change . getInt ( "recid" ) ; updateRecord ( recid , change ) ; } } protected void processSaveRecord ( JSONObject reqParams ) throws Exception { } protected void processDeleteRecords ( int [ ] ids ) throws Exception { } }

Fix:
JSONArray changed = reqParams . getJSONArray ( "changes" ) ;
Buggy code:
public class CountFilter implements IFilter { private long countLimit_ ; private boolean isDone_ ; private int offset_ ; CountFilter ( int countLimit ) { } CountFilter ( int countLimit , int offset ) { } public ColumnFamily filter ( String cfNameParam , ColumnFamily columnFamily ) { String [ ] values = RowMutation . getColumnAndColumnFamily ( cfNameParam ) ; if ( columnFamily == null ) return columnFamily ; ColumnFamily filteredCf = new ColumnFamily ( columnFamily . name ( ) , columnFamily . type ( ) ) ; if ( ( countLimit_ ) <= 0 ) { isDone_ = true ; return filteredCf ; } if ( ( values . length ) == 1 ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; for ( IColumn column : columns ) { if ( ( offset_ ) <= 0 ) { filteredCf . addColumn ( column ) ; ( countLimit_ ) -- ; } else ( offset_ ) -- ; if ( ( countLimit_ ) <= 0 ) { isDone_ = true ; return filteredCf ; } } } else if ( ( ( values . length ) == 2 ) && ( columnFamily . isSuper ( ) ) ) { Collection < IColumn > columns = columnFamily . getAllColumns ( ) ; for ( IColumn column : columns ) { SuperColumn superColumn = ( ( SuperColumn ) ( column ) ) ; SuperColumn filteredSuperColumn = new SuperColumn ( superColumn . name ( ) ) ; filteredCf . addColumn ( filteredSuperColumn ) ; Collection < IColumn > subColumns = superColumn . getSubColumns ( ) ; for ( IColumn subColumn : subColumns ) { if ( ( offset_ ) <= 0 ) { <START_BUG> filteredSuperColumn . addColumn ( subColumn . name ( ) , subColumn ) ; <END_BUG> ( countLimit_ ) -- ; } else ( offset_ ) -- ; if ( ( countLimit_ ) <= 0 ) { isDone_ = true ; return filteredCf ; } } } } else { throw new UnsupportedOperationException ( ) ; } return filteredCf ; } public IColumn filter ( IColumn column , DataInputStream dis ) throws IOException { } public boolean isDone ( ) { } public void setDone ( ) { } public DataInputBuffer next ( String key , String cf , SSTable ssTable ) throws IOException { } }

Fix:
filteredSuperColumn . addColumn ( subColumn ) ;
Buggy code:
public class CreateInvSQL implements Listener { private int animals ; private int ores ; private int fuel ; private ResultSet rs ; private main plugin ; public CreateInvSQL ( main main ) { } private static void setItemM ( ItemStack item , String name , String lore ) { } public static void load ( int oresB , int animalsB , Inventory inv ) { } @ EventHandler public void join ( PlayerJoinEvent e ) { } @ EventHandler public void interact ( InventoryClickEvent e ) { } @ EventHandler public void openInv ( InventoryOpenEvent e ) { Player p = ( ( Player ) ( e . getPlayer ( ) ) ) ; if ( p . hasPermission ( "backpacks.furnaceBackPack" ) ) { UUID id = p . getUniqueId ( ) ; if ( e . getInventory ( ) . equals ( furnaceB . get ( id ) ) ) { String trimmedID = id . toString ( ) . replace ( "-" , "" ) ; Inventory inv = e . getInventory ( ) ; try { rs = main . getResult ( ( "select<seq2seq4repair_space>*<seq2seq4repair_space>from<seq2seq4repair_space>furnaceBP_" + trimmedID ) ) ; assert ( rs ) != null ; if ( rs . next ( ) ) { <START_BUG> CreateInvSQL . load ( rs . getInt ( 1 ) , rs . getInt ( 2 ) , inv ) ; <END_BUG> int fuel = ( rs . getInt ( 3 ) ) // 64 ; if ( fuel <= 9 ) { for ( int i = 0 ; i < fuel ; i ++ ) { int per = i + 1 ; ItemStack g = new ItemStack ( Material . STAINED_GLASS_PANE , 1 , ( ( byte ) ( 5 ) ) ) ; ItemMeta gMeta = g . getItemMeta ( ) ; gMeta . setDisplayName ( ( ( ( ( ( ChatColor . GREEN ) + "" ) + per ) + per ) + "%" ) ) ; g . setItemMeta ( gMeta ) ; inv . setItem ( ( ( 26 + 1 ) + i ) , g ) ; } } else { fuel = 9 ; for ( int i = 0 ; i < fuel ; i ++ ) { int per = i + 1 ; ItemStack g = new ItemStack ( Material . STAINED_GLASS_PANE , 1 , ( ( byte ) ( 5 ) ) ) ; ItemMeta gMeta = g . getItemMeta ( ) ; gMeta . setDisplayName ( ( ( ( ( ( ChatColor . GREEN ) + "" ) + per ) + per ) + "%" ) ) ; g . setItemMeta ( gMeta ) ; inv . setItem ( ( ( 26 + 1 ) + i ) , g ) ; } } } } catch ( SQLException e1 ) { e1 . printStackTrace ( ) ; } } } } @ EventHandler public void close ( InventoryCloseEvent e ) { } }

Fix:
CreateInvSQL . load ( rs . getInt ( 2 ) , rs . getInt ( 1 ) , inv ) ;
Buggy code:
public class SQLServerQuerySQLBuilder extends DBQuerySQLBuilder { public SQLServerQuerySQLBuilder ( Format output ) { } @ Override protected String generatePageSQL ( Format table , String fields , String strWhere , String strOrderBy , String strGroupBy ) { } @ Override public String generatePageSQL ( String SQL , int start , int page ) { <START_BUG> return String . format ( SQL , ( ( start + page ) - 1 ) , start ) ; <END_BUG> } }

Fix:
return String . format ( SQL , ( start + page ) , start ) ;
Buggy code:
public class ProtocolStackRemove extends AbstractRemoveStepHandler implements DescriptionProvider { @ Override public ModelNode getModelDescription ( Locale locale ) { <START_BUG> return LocalDescriptions . getProtocolStackRemoveDescription ( locale ) ; <END_BUG> } protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) { } protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) { } }

Fix:
return JGroupsDescriptions . getProtocolStackRemoveDescription ( locale ) ;
Buggy code:
public class SendTest extends AbstractSendTestCase { File inputFile = null ; URL outputFile = null ; protected void setUp ( ) throws Exception { super . setUp ( ) ; inputFile = new File ( "test.txt" ) ; <START_BUG> outputFile = new URL ( "efs:file:////c://ECFtest.txt" ) ; <END_BUG> } protected void tearDown ( ) throws Exception { } public void testSend ( ) throws Exception { } }

Fix:
outputFile = File . createTempFile ( "ECFTest" , "" ) . toURL ( ) ;
Buggy code:
public class BcelCflowStackFieldAdder extends BcelTypeMunger { private ResolvedMember cflowStackField ; public BcelCflowStackFieldAdder ( ResolvedMember cflowStackField ) { } public boolean munge ( BcelClassWeaver weaver ) { LazyClassGen gen = weaver . getLazyClassGen ( ) ; if ( ! ( gen . getType ( ) . equals ( cflowStackField . getDeclaringType ( ) ) ) ) return false ; Field f = new org . apache . bcel . generic . FieldGen ( cflowStackField . getModifiers ( ) , BcelWorld . makeBcelType ( cflowStackField . getReturnType ( ) ) , cflowStackField . getName ( ) , gen . getConstantPoolGen ( ) ) . getField ( ) ; gen . addField ( f ) ; <START_BUG> LazyMethodGen clinit = gen . getAjcClinit ( ) ; <END_BUG> InstructionList setup = new InstructionList ( ) ; InstructionFactory fact = gen . getFactory ( ) ; setup . append ( fact . createNew ( new ObjectType ( NameMangler . CFLOW_STACK_TYPE ) ) ) ; setup . append ( fact . createDup ( 1 ) ) ; setup . append ( fact . createInvoke ( CFLOW_STACK_TYPE , "<init>" , VOID , new Type [ 0 ] , INVOKESPECIAL ) ) ; setup . append ( Utility . createSet ( fact , cflowStackField ) ) ; clinit . getBody ( ) . insert ( setup ) ; return true ; } public ResolvedMember getMatchingSyntheticMember ( Member member ) { } public ResolvedMember getSignature ( ) { } public boolean matches ( ResolvedTypeX onType ) { } }

Fix:
LazyMethodGen clinit = gen . getAjcPreClinit ( ) ;
Buggy code:
public class RedPenTest { @ Before public void setUp ( ) { } @ Test public void testEmptyValidator ( ) throws RedPenException { } @ Test public void testSentenceValidatorWithSimpleDocument ( ) throws RedPenException { } @ Test public void testSectionValidatorWithSimpleDocument ( ) throws RedPenException { List < Document > documents = new ArrayList < > ( ) ; documents . add ( Document . builder ( ) . setFileName ( "tested<seq2seq4repair_space>file" ) . addSection ( 0 ) . addSectionHeader ( "foobar" ) . addParagraph ( ) . addSentence ( new Sentence ( "it<seq2seq4repair_space>is<seq2seq4repair_space>a<seq2seq4repair_space>piece<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>cake." , 1 ) ) . addSentence ( new Sentence ( "that<seq2seq4repair_space>is<seq2seq4repair_space>also<seq2seq4repair_space>a<seq2seq4repair_space>piece<seq2seq4repair_space>of<seq2seq4repair_space>a<seq2seq4repair_space>cake." , 2 ) ) . build ( ) ) ; RedPen redPen = getRedPenWithSectionValidator ( ) ; List < ValidationError > errors = redPen . validate ( documents ) . get ( documents . get ( 0 ) ) ; assertEquals ( 1 , errors . size ( ) ) ; for ( ValidationError error : errors ) { assertThat ( error . getValidatorName ( ) , is ( "SectionLength" ) ) ; <START_BUG> assertThat ( error . getMessage ( ) , containsString ( "The<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>characters<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>section<seq2seq4repair_space>exceeds<seq2seq4repair_space>the<seq2seq4repair_space>maximum<seq2seq4repair_space>of" ) ) ; <END_BUG> } } @ Test public void testDocumentWithHeader ( ) throws RedPenException { } @ Test public void testDocumentWithList ( ) throws RedPenException { } @ Test public void testDocumentWithoutContent ( ) throws RedPenException { } private RedPen getRedPenWithSentenceValidator ( ) throws RedPenException { } private RedPen getRedPenWithSectionValidator ( ) throws RedPenException { } }

Fix:
assertThat ( error . getMessage ( ) , containsString ( "The<seq2seq4repair_space>number<seq2seq4repair_space>of<seq2seq4repair_space>characters<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>section<seq2seq4repair_space>(55)<seq2seq4repair_space>exceeds<seq2seq4repair_space>the<seq2seq4repair_space>maximum<seq2seq4repair_space>of<seq2seq4repair_space>5" ) ) ;
Buggy code:
@ Repository public class FinancialYearHibernateDAO extends GenericHibernateDAO implements FinancialYearDAO { @ PersistenceContext private EntityManager entityManager ; @ Override public Session getCurrentSession ( ) { } private final Logger logger = Logger . getLogger ( getClass ( ) . getName ( ) ) ; public FinancialYearHibernateDAO ( Class persistentClass , Session session ) { } public FinancialYearHibernateDAO ( ) { } public String getCurrYearFiscalId ( ) { } public String getCurrYearStartDate ( ) { } public String getPrevYearFiscalId ( ) { } @ Deprecated public String getFinancialYearId ( String estDate ) { } public CFinancialYear getFinancialYearByFinYearRange ( String finYearRange ) { } public List < CFinancialYear > getAllActiveFinancialYearList ( ) { } public List < CFinancialYear > getAllActivePostingFinancialYear ( ) { <START_BUG> Query query = HibernateUtil . getCurrentSession ( ) . createQuery ( "from<seq2seq4repair_space>CFinancialYear<seq2seq4repair_space>cfinancialyear<seq2seq4repair_space>where<seq2seq4repair_space>isActive=1<seq2seq4repair_space>and<seq2seq4repair_space>isActiveForPosting=1<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>id<seq2seq4repair_space>desc" ) ; <END_BUG> return query . list ( ) ; } public CFinancialYear getFinancialYearById ( Long id ) { } public boolean isFinancialYearActiveForPosting ( Date fromDate , Date toDate ) { } public CFinancialYear getFinancialYearByDate ( Date date ) { } public CFinancialYear getFinYearByDate ( Date date ) { } public CFinancialYear getTwoPreviousYearByDate ( Date date ) { } public CFinancialYear getNextFinancialYearByDate ( Date date ) { } public CFinancialYear getPreviousFinancialYearByDate ( Date date ) { } public boolean isSameFinancialYear ( Date fromDate , Date toDate ) { } }

Fix:
Query query = HibernateUtil . getCurrentSession ( ) . createQuery ( "from<seq2seq4repair_space>CFinancialYear<seq2seq4repair_space>cfinancialyear<seq2seq4repair_space>where<seq2seq4repair_space>isActive=1<seq2seq4repair_space>and<seq2seq4repair_space>isActiveForPosting=1<seq2seq4repair_space>order<seq2seq4repair_space>by<seq2seq4repair_space>startingDate<seq2seq4repair_space>desc" ) ;
Buggy code:
public class QueryAutoStopWordAnalyzerTest extends BaseTokenStreamTestCase { String [ ] variedFieldValues = new String [ ] { "the" , "quick" , "brown" , "fox" , "jumped" , "over" , "the" , "lazy" , "boring" , "dog" } ; String [ ] repetitiveFieldValues = new String [ ] { "boring" , "boring" , "vaguelyboring" } ; RAMDirectory dir ; Analyzer appAnalyzer ; IndexReader reader ; QueryAutoStopWordAnalyzer protectedAnalyzer ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = new RAMDirectory ( ) ; appAnalyzer = new MockAnalyzer ( random ( ) , MockTokenizer . WHITESPACE , false ) ; IndexWriter writer = new IndexWriter ( dir , new org . apache . lucene . index . IndexWriterConfig ( TEST_VERSION_CURRENT , appAnalyzer ) ) ; int numDocs = 200 ; for ( int i = 0 ; i < numDocs ; i ++ ) { Document doc = new Document ( ) ; String variedFieldValue = variedFieldValues [ ( i % ( variedFieldValues . length ) ) ] ; String repetitiveFieldValue = repetitiveFieldValues [ ( i % ( repetitiveFieldValues . length ) ) ] ; doc . add ( new org . apache . lucene . document . TextField ( "variedField" , variedFieldValue , Store . YES ) ) ; doc . add ( new org . apache . lucene . document . TextField ( "repetitiveField" , repetitiveFieldValue , Store . YES ) ) ; writer . addDocument ( doc ) ; } <START_BUG> writer . close ( ) ; <END_BUG> reader = DirectoryReader . open ( dir ) ; } @ Override public void tearDown ( ) throws Exception { } public void testNoStopwords ( ) throws Exception { } public void testDefaultStopwordsAllFields ( ) throws Exception { } public void testStopwordsAllFieldsMaxPercentDocs ( ) throws Exception { } public void testStopwordsPerFieldMaxPercentDocs ( ) throws Exception { } public void testStopwordsPerFieldMaxDocFreq ( ) throws Exception { } public void testNoFieldNamePollution ( ) throws Exception { } public void testTokenStream ( ) throws Exception { } }

Fix:
writer . shutdown ( ) ;
Buggy code:
public class UndertowConnectorTestCase { private final AbstractListenerService < ? > listener = mock ( AbstractListenerService . class ) ; private final Connector connector = new UndertowConnector ( this . listener ) ; @ Test public void getType ( ) { assertSame ( AJP , new UndertowConnector ( new org . wildfly . extension . undertow . AjpListenerService ( "" , "" , 0 ) ) . getType ( ) ) ; <START_BUG> assertSame ( HTTP , new UndertowConnector ( new org . wildfly . extension . undertow . HttpListenerService ( "" , "" , 0 ) ) . getType ( ) ) ; <END_BUG> assertSame ( HTTPS , new UndertowConnector ( new org . wildfly . extension . undertow . HttpsListenerService ( "" , "" , 0 ) ) . getType ( ) ) ; } @ Test public void getAddress ( ) throws UnknownHostException { } @ Test public void getPort ( ) throws UnknownHostException { } @ Test public void setAddress ( ) throws UnknownHostException { } }

Fix:
assertSame ( HTTP , new UndertowConnector ( new org . wildfly . extension . undertow . HttpListenerService ( "" , "" , 0 , false ) ) . getType ( ) ) ;
Buggy code:
public class ServerTimeFilter implements IResponseFilter { private static final Logger log = LoggerFactory . getLogger ( ServerTimeFilter . class ) ; public AppendingStringBuffer filter ( AppendingStringBuffer responseBuffer ) { int index = responseBuffer . indexOf ( "<head>" ) ; long timeTaken = ( System . currentTimeMillis ( ) ) - ( RequestCycle . get ( ) . getStartTime ( ) ) ; if ( index != ( - 1 ) ) { AppendingStringBuffer script = new AppendingStringBuffer ( 75 ) ; script . append ( "\n" ) ; script . append ( SCRIPT_OPEN_TAG ) ; script . append ( "\nwindow.defaultStatus=\'Server<seq2seq4repair_space>time:<seq2seq4repair_space>" ) ; script . append ( ( ( ( double ) ( timeTaken ) ) // 1000 ) ) ; script . append ( "s\';\n" ) ; script . append ( SCRIPT_CLOSE_TAG ) ; script . append ( "\n" ) ; responseBuffer . insert ( ( index + 6 ) , script ) ; } <START_BUG> ServerTimeFilter . log . info ( ( ( ( ( timeTaken + "ms<seq2seq4repair_space>server<seq2seq4repair_space>time<seq2seq4repair_space>taken<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" ) + ( RequestCycle . get ( ) . getRequest ( ) . getURL ( ) ) ) + "<seq2seq4repair_space>response<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( responseBuffer . length ( ) ) ) ) ; <END_BUG> return responseBuffer ; } }

Fix:
ServerTimeFilter . log . info ( ( ( ( ( timeTaken + "ms<seq2seq4repair_space>server<seq2seq4repair_space>time<seq2seq4repair_space>taken<seq2seq4repair_space>for<seq2seq4repair_space>request<seq2seq4repair_space>" ) + ( RequestCycle . get ( ) . getRequest ( ) . getUrl ( ) ) ) + "<seq2seq4repair_space>response<seq2seq4repair_space>size:<seq2seq4repair_space>" ) + ( responseBuffer . length ( ) ) ) ) ;
Buggy code:
public class TargetHandler extends ModelElementHandler { public static final String NAME_ATTR = "name" ; public static final String DEPENDS_ATTR = "depends" ; public static final String DESC_ATTR = "description" ; public static final String IF_ATTR = "if" ; public static final String UNLESS_ATTR = "unless" ; private Target target ; public Target getTarget ( ) { } public void processElement ( String elementName ) throws SAXParseException { target = new Target ( getLocation ( ) , getAttribute ( TargetHandler . NAME_ATTR ) ) ; setModelElement ( target ) ; target . setDescription ( getAttribute ( TargetHandler . DESC_ATTR ) ) ; <START_BUG> target . setAspects ( getAspects ( ) ) ; <END_BUG> String depends = getAttribute ( TargetHandler . DEPENDS_ATTR ) ; if ( depends != null ) { StringTokenizer tokenizer = new StringTokenizer ( depends , "," ) ; while ( tokenizer . hasMoreTokens ( ) ) { String dependency = tokenizer . nextToken ( ) . trim ( ) ; target . addDependency ( dependency ) ; } } target . setIfCondition ( getAttribute ( TargetHandler . IF_ATTR ) ) ; target . setUnlessCondition ( getAttribute ( TargetHandler . UNLESS_ATTR ) ) ; } public void startElement ( String uri , String localName , String qualifiedName , Attributes attributes ) throws SAXParseException { } protected void validateAttribute ( String attributeName , String attributeValue ) throws SAXParseException { } }

Fix:
target . addAspectAttributes ( getAspectAttributes ( ) ) ;
Buggy code:
public final class CommandStateProxy extends PersistentState { private IConfigurationElement configurationElement ; private String preferenceKey ; private IPreferenceStore preferenceStore ; private State state = null ; private final String stateAttributeName ; public CommandStateProxy ( final IConfigurationElement configurationElement , final String stateAttributeName , final IPreferenceStore preferenceStore , final String preferenceKey ) { } public final void addListener ( final IStateListener listener ) { } public final void dispose ( ) { } public final Object getValue ( ) { } public final void load ( final IPreferenceStore store , final String preferenceKey ) { } private final boolean loadState ( ) { } public final void removeListener ( final IStateListener listener ) { } public final void save ( final IPreferenceStore store , final String preferenceKey ) { if ( ( loadState ( ) ) && ( ( state ) instanceof PersistentState ) ) { <START_BUG> ( ( PersistentState ) ( state ) ) . load ( store , preferenceKey ) ; <END_BUG> } } public final void setId ( final String id ) { } public final void setShouldPersist ( final boolean persisted ) { } public final void setValue ( final Object value ) { } public final boolean shouldPersist ( ) { } public final String toString ( ) { } }

Fix:
( ( PersistentState ) ( state ) ) . save ( store , preferenceKey ) ;
Buggy code:
public class UrlBridge extends Bridge { public final BridgeContext context ; public final String url ; public final int url_id ; public static int url_count = 0 ; public UrlBridge ( BridgeContext context , String url ) { } public String toString ( ) { <START_BUG> return String . format ( "UrlBridge:\n[id]%d,\n[context]%s,\n[url]%s\n[bridgePath](J)(ARGS)%s<seq2seq4repair_space>--><seq2seq4repair_space>(H)(CODE)%s" , this . url_id , this . context , this . url , this . context . getInvokedMethod ( ) , this . url ) ; <END_BUG> } @ Override public void export2app ( ) { } @ Override public void export2web ( ) { } }

Fix:
return String . format ( "UrlBridge:\n[id]%d,\n[context]%s,\n[url]%s\n[bridgePath](J)(ARGS)%s<seq2seq4repair_space>--><seq2seq4repair_space>(H)(CODE)%s\n" , this . url_id , this . context , this . url , this . context . getInvokedMethod ( ) , this . url ) ;
Buggy code:
public class PersistentUniqueList < E > extends AbstractList < E > implements Serializable , PVector < E > { private static final PersistentUniqueList EMPTY = new PersistentUniqueList ( TreePVector . empty ( ) , HashTreePSet . empty ( ) ) ; @ SuppressWarnings ( "unchecked" ) public static < E > PersistentUniqueList < E > empty ( ) { } public static < E > PersistentUniqueList < E > singleton ( E e ) { } public static < E > PersistentUniqueList < E > from ( Collection < E > collection ) { } private final PVector < E > contents ; private final PSet < E > mark ; private PersistentUniqueList ( PVector < E > contents , PSet < E > mark ) { } @ Override public E get ( int index ) { } @ Override public int size ( ) { } @ Override public PersistentUniqueList < E > plus ( E e ) { } @ Override public PersistentUniqueList < E > minus ( Object o ) { } @ Override public PersistentUniqueList < E > plusAll ( Collection < ? extends E > collection ) { } @ Override public PersistentUniqueList < E > minusAll ( Collection < ? > collection ) { } @ Override public PersistentUniqueList < E > plus ( int i , E e ) { } @ Override public PersistentUniqueList < E > minus ( int i ) { } @ Override public PersistentUniqueList < E > with ( int i , E e ) { } @ Override public PersistentUniqueList < E > plusAll ( int i , Collection < ? extends E > collection ) { PersistentUniqueList < E > result = this ; for ( E e : collection ) { <START_BUG> result = result . plus ( ( i ++ ) , e ) ; <END_BUG> } return result ; } @ Override public PersistentUniqueList < E > subList ( int start , int end ) { } private void writeObject ( final ObjectOutputStream out ) throws IOException { } @ SuppressWarnings ( "unchecked" ) private void readObject ( final ObjectInputStream in ) throws IOException , ClassNotFoundException { } private void readObjectNoData ( ) throws ObjectStreamException { } }

Fix:
result = result . plus ( ( ( i + ( result . size ( ) ) ) - ( size ( ) ) ) , e ) ;
Buggy code:
public class DockerAffinityRuleStrategy implements AffinityRuleExtension { private static final Logger LOG = LoggerFactory . getLogger ( DockerAffinityRuleStrategy . class ) ; private final ManagementContext managementContext ; private final DockerLocation location ; public DockerAffinityRuleStrategy ( ManagementContext managementContext , DockerLocation location ) { } @ Override public List < Location > filterLocations ( Entity entity ) { List < Location > hosts = location . getExtension ( AvailabilityZoneExtension . class ) . getAllSubLocations ( ) ; List < DockerHostLocation > available = Lists . newArrayList ( ) ; for ( DockerHostLocation machine : Iterables . filter ( hosts , DockerHostLocation . class ) ) { Optional < String > entityRules = Optional . fromNullable ( entity . getConfig ( DOCKER_HOST_AFFINITY_RULES ) ) ; Optional < String > hostRules = Optional . fromNullable ( machine . getOwner ( ) . getConfig ( DOCKER_HOST_AFFINITY_RULES ) ) ; Optional < String > infrastructureRules = Optional . fromNullable ( machine . getOwner ( ) . getInfrastructure ( ) . getConfig ( DOCKER_HOST_AFFINITY_RULES ) ) ; String combined = Joiner . on ( '\n' ) . join ( Optional . presentInstances ( ImmutableList . of ( entityRules , hostRules , infrastructureRules ) ) ) ; <START_BUG> AffinityRules rules = AffinityRules . rules ( combined ) ; <END_BUG> Iterable < Entity > entities = managementContext . getEntityManager ( ) . findEntities ( EntityPredicates . withLocation ( machine ) ) ; if ( Iterables . isEmpty ( entities ) ) { if ( rules . allowEmptyLocations ( ) ) { available . add ( machine ) ; } } else { Iterable < Entity > filtered = Iterables . filter ( entities , rules ) ; if ( ( Iterables . size ( filtered ) ) == ( Iterables . size ( entities ) ) ) { available . add ( machine ) ; } } } if ( DockerAffinityRuleStrategy . LOG . isDebugEnabled ( ) ) { DockerAffinityRuleStrategy . LOG . debug ( "Available<seq2seq4repair_space>Docker<seq2seq4repair_space>hosts:<seq2seq4repair_space>{}" , Iterables . toString ( available ) ) ; } return ImmutableList . < Location > copyOf ( available ) ; } }

Fix:
AffinityRules rules = AffinityRules . rulesFor ( entity ) . parse ( combined ) ;
Buggy code:
public class LoopController extends GenericController implements Serializable { private static final String LOOPS = "LoopController.loops" ; private static final String CONTINUE_FOREVER = "LoopController.continue_forever" ; private transient int loopCount = 0 ; public LoopController ( ) { } public void setLoops ( int loops ) { } public void setLoops ( String loopValue ) { } public int getLoops ( ) { } public String getLoopString ( ) { } public void setContinueForever ( boolean forever ) { } public boolean getContinueForever ( ) { } public boolean isDone ( ) { } private boolean endOfLoop ( ) { } protected Sampler nextIsNull ( ) throws NextIsNullException { reInitialize ( ) ; if ( endOfLoop ( ) ) { if ( ! ( getContinueForever ( ) ) ) { setDone ( true ) ; } else { resetLoopCount ( ) ; } return null ; } else { <START_BUG> return doNext ( ) ; <END_BUG> } } protected void incrementLoopCount ( ) { } protected void resetLoopCount ( ) { } protected int getIterCount ( ) { } protected void reInitialize ( ) { } public static class Test extends JMeterTestCase { public Test ( String name ) { } public void testProcessing ( ) throws Exception { } public void testLoopZeroTimes ( ) throws Exception { } public void testInfiniteLoop ( ) throws Exception { } } }

Fix:
return next ( ) ;
Buggy code:
public class DashedShader extends Shader { interface Resources extends DefaultResources { DashedShader . Resources INSTANCE = GWT . create ( DashedShader . Resources . class ) ; @ Source ( "source//dashed.vs" ) TextResource getVertexShader ( ) { } @ Source ( "source//dashed.fs" ) TextResource getFragmentShader ( ) { } } public DashedShader ( ) { } @ Override protected void initUniforms ( ) { } @ Override protected void updateVertexSource ( String src ) { List < String > vars = Arrays . asList ( COLOR_PARS , LOGDEPTHBUF_PAR ) ; List < String > main1 = Arrays . asList ( COLOR ) ; List < String > main2 = Arrays . asList ( LOGDEPTHBUF ) ; <START_BUG> super . updateFragmentSource ( Shader . updateShaderSource ( src , vars , main1 , main2 ) ) ; <END_BUG> } @ Override protected void updateFragmentSource ( String src ) { } }

Fix:
super . updateVertexSource ( Shader . updateShaderSource ( src , vars , main1 , main2 ) ) ;
Buggy code:
public class MyExprTest { static Logger log = Logger . getLogger ( MyExprTest . class ) ; private static final String OUTPUT_DIR = "src//main//resources//output//" ; private static final String DOMAIN_CONFIG_PATH = "src//main//resources//domain_config//" ; public static void main ( String [ ] args ) throws Exception { String inputFile = null ; if ( ( args . length ) > 0 ) inputFile = args [ 0 ] ; String query ; if ( inputFile != null ) { InputStream is = new FileInputStream ( inputFile ) ; query = is . toString ( ) ; } else { Scanner in = new Scanner ( System . in ) ; System . out . println ( "Enter<seq2seq4repair_space>your<seq2seq4repair_space>query:<seq2seq4repair_space>" ) ; query = in . nextLine ( ) ; } <START_BUG> String domain = "sample_domain" ; <END_BUG> Integer totalData = 100 ; MyExprTest . executeQuery ( query , domain , totalData ) ; } public static List < Path > executeQuery ( String query , String domain , Integer totalData ) throws Exception { } private static void deleteAllFilesFromOutputDirectory ( ) { } No newline ; at end ; of file ; }

Fix:
String domain = "newDomain" ;
Buggy code:
public class IsSet extends ProjectComponent implements Condition { private String property ; public void setProperty ( String p ) { } public boolean eval ( ) throws TaskException { if ( ( property ) == null ) { throw new TaskException ( "No<seq2seq4repair_space>property<seq2seq4repair_space>specified<seq2seq4repair_space>for<seq2seq4repair_space>isset<seq2seq4repair_space>condition" ) ; } <START_BUG> return ( getProject ( ) . getProperty ( property ) ) != null ; <END_BUG> } }

Fix:
return ( getProperty ( property ) ) != null ;
Buggy code:
public class ColumnFamilyStoreTest extends CleanupHelper { static byte [ ] bytes1 ; static byte [ ] bytes2 ; @ Test public void testGetColumnWithWrongBF ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testEmptyRow ( ) throws Exception { } @ Test public void testSkipStartKey ( ) throws IOException , InterruptedException , ExecutionException { } @ Test public void testIndexScan ( ) throws IOException { } @ Test public void testIndexDeletions ( ) throws IOException { } @ Test public void testIndexUpdate ( ) throws IOException { } @ Test public void testIndexCreate ( ) throws IOException , InterruptedException , ConfigurationException { Table table = Table . open ( "Keyspace1" ) ; RowMutation rm ; rm = new RowMutation ( "Keyspace1" , ByteBufferUtil . bytes ( "k1" ) ) ; rm . add ( new QueryPath ( "Indexed2" , null , ByteBufferUtil . bytes ( "birthdate" ) ) , FBUtilities . toByteBuffer ( 1L ) , 1 ) ; rm . apply ( ) ; ColumnFamilyStore cfs = table . getColumnFamilyStore ( "Indexed2" ) ; <START_BUG> ColumnDefinition old = cfs . metadata . column_metadata . get ( ByteBufferUtil . bytes ( "birthdate" ) ) ; <END_BUG> ColumnDefinition cd = new ColumnDefinition ( old . name , old . validator . getClass ( ) . getName ( ) , IndexType . KEYS , "birthdate_index" ) ; cfs . addIndex ( cd ) ; while ( ! ( SystemTable . isIndexBuilt ( "Keyspace1" , cfs . getIndexedColumnFamilyStore ( ByteBufferUtil . bytes ( "birthdate" ) ) . columnFamily ) ) ) TimeUnit . MILLISECONDS . sleep ( 100 ) ; IndexExpression expr = new IndexExpression ( ByteBufferUtil . bytes ( "birthdate" ) , IndexOperator . EQ , FBUtilities . toByteBuffer ( 1L ) ) ; IndexClause clause = new IndexClause ( Arrays . asList ( expr ) , FBUtilities . EMPTY_BYTE_BUFFER , 100 ) ; IFilter filter = new IdentityQueryFilter ( ) ; IPartitioner p = StorageService . getPartitioner ( ) ; Range range = new Range ( p . getMinimumToken ( ) , p . getMinimumToken ( ) ) ; List < Row > rows = table . getColumnFamilyStore ( "Indexed2" ) . scan ( clause , range , filter ) ; assert ( rows . size ( ) ) == 1 : StringUtils . join ( rows , "," ) ; String key = new String ( rows . get ( 0 ) . key . key . array ( ) , rows . get ( 0 ) . key . key . position ( ) , rows . get ( 0 ) . key . key . remaining ( ) ) ; assert "k1" . equals ( key ) ; } private ColumnFamilyStore insertKey1Key2 ( ) throws IOException , InterruptedException , ExecutionException { } }

Fix:
ColumnDefinition old = cfs . metadata . getColumn_metadata ( ) . get ( ByteBufferUtil . bytes ( "birthdate" ) ) ;
Buggy code:
public class Snow extends SpongeMechanic { @ Subscribe public void onBlockTick ( BlockRandomTickEvent event ) { } public void increaseSnow ( Location location ) { } public void decreaseSnow ( Location location ) { Optional < LayeredData > dataOptional = location . getData ( LayeredData . class ) ; if ( dataOptional . isPresent ( ) ) { LayeredData data = dataOptional . get ( ) ; int currentHeight = data . getValue ( ) ; currentHeight -- ; if ( currentHeight < ( data . getMinValue ( ) ) ) location . replaceWith ( AIR ) ; else { data . setValue ( currentHeight ) ; location . offer ( data ) ; } } else { location . replaceWith ( SNOW_LAYER ) ; <START_BUG> dataOptional = location . getData ( LayeredData . class ) ; <END_BUG> LayeredData data = dataOptional . get ( ) ; data . setValue ( data . getMaxValue ( ) ) ; location . offer ( data ) ; } } @ Subscribe public void onBlockUpdate ( BlockUpdateEvent event ) { } @ Override public String getName ( ) { } @ Override public void onInitialize ( ) throws CraftBookException { } }

Fix:
dataOptional = location . getOrCreate ( LayeredData . class ) ;
Buggy code:
public class StatelessApplication extends WicketExampleApplication { public StatelessApplication ( ) { } @ Override public Class < ? extends Page > getHomePage ( ) { } @ Override protected void init ( ) { super . init ( ) ; mountBookmarkablePage ( "//statefull" , StatefulPage . class ) ; mountBookmarkablePage ( "//query" , StatelessPage1 . class ) ; mountBookmarkablePage ( "//mixed" , StatelessPage2 . class ) ; <START_BUG> mountBookmarkablePage ( "//indexed" , StatelessPage3 . class ) ; <END_BUG> } }

Fix:
mountBookmarkablePage ( "//state-in-url" , StatelessPage3 . class ) ;
Buggy code:
public class FixedWindowRollingPolicy extends RollingPolicyBase { static final String FNP_NOT_SET = "The<seq2seq4repair_space>FileNamePattern<seq2seq4repair_space>option<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>set<seq2seq4repair_space>before<seq2seq4repair_space>using<seq2seq4repair_space>FixedWindowRollingPolicy.<seq2seq4repair_space>" ; static final String SEE_FNP_NOT_SET = "See<seq2seq4repair_space>also<seq2seq4repair_space>http:////logging.apache.org//log4j//codes.html#tbr_fnp_not_set" ; int maxIndex ; int minIndex ; Util util = new Util ( ) ; Compress compress = new Compress ( ) ; private static int MAX_WINDOW_SIZE = 12 ; public FixedWindowRollingPolicy ( ) { } public void activateOptions ( ) { } public void rollover ( ) throws RolloverFailure { if ( ( maxIndex ) >= 0 ) { File file = new File ( fileNamePattern . convert ( maxIndex ) ) ; if ( file . exists ( ) ) { file . delete ( ) ; } for ( int i = ( maxIndex ) - 1 ; i >= ( minIndex ) ; i -- ) { String toRenameStr = fileNamePattern . convert ( i ) ; File toRename = new File ( toRenameStr ) ; if ( toRename . exists ( ) ) { util . rename ( toRenameStr , fileNamePattern . convert ( ( i + 1 ) ) ) ; } else { <START_BUG> getLogger ( ) . info ( "Skipping<seq2seq4repair_space>rollover<seq2seq4repair_space>for<seq2seq4repair_space>inexistent<seq2seq4repair_space>file<seq2seq4repair_space>{}" , toRenameStr ) ; <END_BUG> } } switch ( compressionMode ) { case Compress . NONE : util . rename ( activeFileName , fileNamePattern . convert ( minIndex ) ) ; break ; case Compress . GZ : compress . GZCompress ( activeFileName , fileNamePattern . convert ( minIndex ) ) ; break ; case Compress . ZIP : compress . ZIPCompress ( activeFileName , fileNamePattern . convert ( minIndex ) ) ; break ; } } } public String getActiveFileName ( ) { } public int getMaxIndex ( ) { } public int getMinIndex ( ) { } public void setMaxIndex ( int maxIndex ) { } public void setMinIndex ( int minIndex ) { } }

Fix:
getLogger ( ) . info ( "Skipping<seq2seq4repair_space>rollover<seq2seq4repair_space>for<seq2seq4repair_space>non-existent<seq2seq4repair_space>file<seq2seq4repair_space>{}" , toRenameStr ) ;
Buggy code:
public final class EEDefaultPermissionsProcessor implements DeploymentUnitProcessor { private static final Permissions DEFAULT_PERMISSIONS ; public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> final ModuleSpecification attachment = phaseContext . getAttachment ( MODULE_SPECIFICATION ) ; <END_BUG> if ( attachment == null ) { return ; } final List < PermissionFactory > permissions = attachment . getPermissionFactories ( ) ; final Enumeration < Permission > e = EEDefaultPermissionsProcessor . DEFAULT_PERMISSIONS . elements ( ) ; while ( e . hasMoreElements ( ) ) { permissions . add ( new ImmediatePermissionFactory ( e . nextElement ( ) ) ) ; } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
final ModuleSpecification attachment = phaseContext . getDeploymentUnit ( ) . getAttachment ( MODULE_SPECIFICATION ) ;
Buggy code:
public class Main { private static final String ARRIVEDERCI = "GRAZIE<seq2seq4repair_space>PER<seq2seq4repair_space>AVER<seq2seq4repair_space>GIOCATO" ; private static final String FINE_PARTITA = "La<seq2seq4repair_space>partita<seq2seq4repair_space>e'<seq2seq4repair_space>finita!<seq2seq4repair_space>Un'altra?<seq2seq4repair_space>" ; private static final String TITOLO_INIZIALE = "Benvenuti<seq2seq4repair_space>nel<seq2seq4repair_space>gioco<seq2seq4repair_space>del<seq2seq4repair_space>Monopoleh!" ; private static final String VOCE_INIZIALE01 = "Nuova<seq2seq4repair_space>partita" ; private static final String VOCE_INIZIALE02 = "Riprendi<seq2seq4repair_space>partita" ; private static final String [ ] VOCI_MENU_INIZIALE = new String [ ] { Main . VOCE_INIZIALE01 , Main . VOCE_INIZIALE02 } ; private static final MyMenu menuIniziale = new MyMenu ( Main . TITOLO_INIZIALE , Main . VOCI_MENU_INIZIALE ) ; private static Gioco gioco = new Gioco ( ) ; public static void main ( String [ ] args ) { } private static int finePartita ( ) { int scelta = ( MyUtil . yesOrNo ( Main . FINE_PARTITA ) ) ? 1 : 0 ; if ( scelta == 1 ) <START_BUG> tabellone . setTurniAttuali ( 1 ) ; <END_BUG> return scelta ; } }

Fix:
Main . gioco = new Gioco ( ) ;
Buggy code:
public class AddressbookMain extends DefaultMain { public void handleCommandLineParameters ( String [ ] args ) { } public void initConfiguration ( ) { } public void initGui ( ) { <START_BUG> MainInterface . addressbookTreeModel = new org . columba . addressbook . gui . tree . AddressbookTreeModel ( AddressbookConfig . get ( "tree" ) . getElement ( "//tree" ) ) ; <END_BUG> } public void initPlugins ( ) { } }

Fix:
AddressbookInterface . addressbookTreeModel = new org . columba . addressbook . gui . tree . AddressbookTreeModel ( AddressbookConfig . get ( "tree" ) . getElement ( "//tree" ) ) ;
Buggy code:
class CComboTab extends Tab { CCombo combo1 ; Group comboGroup ; Button flatButton ; Button readOnlyButton ; static String [ ] ListData = new String [ ] { ControlExample . getResourceString ( "ListData1_0" ) , ControlExample . getResourceString ( "ListData1_1" ) , ControlExample . getResourceString ( "ListData1_2" ) , ControlExample . getResourceString ( "ListData1_3" ) , ControlExample . getResourceString ( "ListData1_4" ) , ControlExample . getResourceString ( "ListData1_5" ) , ControlExample . getResourceString ( "ListData1_6" ) , ControlExample . getResourceString ( "ListData1_7" ) , ControlExample . getResourceString ( "ListData1_8" ) } ; CComboTab ( ControlExample instance ) { } void createExampleGroup ( ) { } void createExampleWidgets ( ) { } void createStyleGroup ( ) { } Control [ ] getExampleWidgets ( ) { } String [ ] getMethodNames ( ) { <START_BUG> return new String [ ] { "Editable" , "Items" , "Selection" , "Text" , "TextLimit" , "VisibleItemCount" } ; <END_BUG> } String getTabText ( ) { } void setExampleWidgetState ( ) { } }

Fix:
return new String [ ] { "Editable" , "Items" , "Selection" , "Text" , "TextLimit" , "ToolTipText" , "VisibleItemCount" } ;
Buggy code:
public class FolderController { private ArrayList < FolderListener > listeners = new ArrayList < > ( ) ; private FolderDTO folderContent ; private Gson JSONParser ; private int currentFileScanned = 0 ; private int totalFiles ; private boolean orderBySongName = true ; private boolean orderByArtists = false ; private Stage stage ; public FolderController ( Stage stage ) { } public void openFile ( ) { } public void addListener ( FolderListener listener ) { } public Response createFolder ( Folder folder ) { } public void createFolderTracks ( FolderCreationDTO folderTracks ) { } public Response createFolderOptimized ( FolderCreationDTO folder ) { } public void getFolderContentById ( String JSONFolderCriteria ) { Gson JSONParser = new Gson ( ) ; FolderCriteria criteria = JSONParser . fromJson ( JSONFolderCriteria , FolderCriteria . class ) ; criteria . setLibrary ( LIBRARY_ID ) ; AsyncCompletionHandler < Void > responseHandler = new AsyncCompletionHandler < Void > ( ) { @ Override public Void onCompleted ( Response response ) throws Exception { if ( ( response . getStatusCode ( ) ) == 200 ) { folderContent = JSONParser . fromJson ( response . getResponseBody ( ) , FolderDTO . class ) ; SessionConstants . PARENT_FOLDER_ID = folderContent . getParentFolder ( ) ; new FolderController . FolderWorker ( Events . ON_CONTENT_FETCHED ) . execute ( ) ; } else { SessionConstants . PARENT_FOLDER_ID = - 1 ; } return null ; } } ; HTTPService . HTTPGet ( ( ( ( "//folder//getFolderContentById?id=" + ( criteria . getId ( ) ) ) + "&library=" ) + ( criteria . getLibrary ( ) ) ) , responseHandler ) ; for ( FolderListener listener : listeners ) { <START_BUG> listener . fetchingContent ( ) ; <END_BUG> } } public void drawFolder ( ) { } public void buildFolder ( File [ ] files ) { } public void buildFolderHierarchy ( File [ ] files ) { } public void orderTracksBySongName ( ) { } public void orderTracksByArtistName ( ) { } public void search ( String text ) { } private void buildFolderOptimized ( File folder , int parentId ) { } private Folder createFolderByLimit ( FolderCreationDTO folder , int trackLimit ) { } private void countFiles ( File selectedFile ) { } private class FolderWorker extends SwingWorker < Void , Void > { private Events event ; private File [ ] files ; private String matchingCriteria ; public FolderWorker ( Events event ) { } public FolderWorker ( Events event , File [ ] files ) { } public FolderWorker ( Events event , String matchingCriteria ) { } @ Override protected Void doInBackground ( ) throws Exception { } @ Override protected void done ( ) { } } }

Fix:
listener . OnLoading ( ) ;