nus-yam/ex-repair huggingface dataset:
Buggy code:
public final class NumericTokenStream extends TokenStream { public static final String TOKEN_TYPE_FULL_PREC = "fullPrecNumeric" ; public static final String TOKEN_TYPE_LOWER_PREC = "lowerPrecNumeric" ; public interface NumericTermAttribute extends Attribute { int getShift ( ) { } long getRawValue ( ) { } int getValueSize ( ) { } void init ( long value , int valSize , int precisionStep , int shift ) { } void setShift ( int shift ) { } int incShift ( ) { } } private static final class NumericAttributeFactory extends AttributeFactory { private final AttributeFactory delegate ; NumericAttributeFactory ( AttributeFactory delegate ) { } @ Override public AttributeImpl createAttributeInstance ( Class < ? extends Attribute > attClass ) { } } public static final class NumericTermAttributeImpl extends AttributeImpl implements NumericTokenStream . NumericTermAttribute , TermToBytesRefAttribute { private long value = 0L ; private int valueSize = 0 ; private int shift = 0 ; private int precisionStep = 0 ; private BytesRef bytes = new BytesRef ( ) ; public BytesRef getBytesRef ( ) { } public int fillBytesRef ( ) { } public int getShift ( ) { } public void setShift ( int shift ) { } public int incShift ( ) { } public long getRawValue ( ) { } public int getValueSize ( ) { } public void init ( long value , int valueSize , int precisionStep , int shift ) { } @ Override public void clear ( ) { } @ Override public void reflectWith ( AttributeReflector reflector ) { fillBytesRef ( ) ; <START_BUG> reflector . reflect ( TermToBytesRefAttribute . class , "bytes" , bytes ) ; <END_BUG> reflector . reflect ( NumericTokenStream . NumericTermAttribute . class , "shift" , shift ) ; reflector . reflect ( NumericTokenStream . NumericTermAttribute . class , "rawValue" , getRawValue ( ) ) ; reflector . reflect ( NumericTokenStream . NumericTermAttribute . class , "valueSize" , valueSize ) ; } @ Override public void copyTo ( AttributeImpl target ) { } } public NumericTokenStream ( ) { } public NumericTokenStream ( final int precisionStep ) { } public NumericTokenStream ( AttributeFactory factory , final int precisionStep ) { } public NumericTokenStream setLongValue ( final long value ) { } public NumericTokenStream setIntValue ( final int value ) { } public NumericTokenStream setDoubleValue ( final double value ) { } public NumericTokenStream setFloatValue ( final float value ) { } @ Override public void reset ( ) { } @ Override public boolean incrementToken ( ) { } public int getPrecisionStep ( ) { } private final NumericTokenStream . NumericTermAttribute numericAtt = addAttribute ( NumericTokenStream . NumericTermAttribute . class ) ; private final TypeAttribute typeAtt = addAttribute ( TypeAttribute . class ) ; private final PositionIncrementAttribute posIncrAtt = addAttribute ( PositionIncrementAttribute . class ) ; private int valSize = 0 ; private final int precisionStep ; }

Fix:
reflector . reflect ( TermToBytesRefAttribute . class , "bytes" , new BytesRef ( bytes ) ) ;
Buggy code:
public class HttpTestSampleGui2 extends HttpTestSampleGui { private static final long serialVersionUID = 240L ; private JLabeledTextField sourceIpAddr ; public HttpTestSampleGui2 ( ) { } @ Override public TestElement createTestElement ( ) { } @ Override public String getStaticLabel ( ) { } @ Override public String getDocAnchor ( ) { } @ Override protected JPanel createOptionalTasksPanel ( ) { JPanel optionalTasksPanel = super . createOptionalTasksPanel ( ) ; <START_BUG> sourceIpAddr = new JLabeledTextField ( JMeterUtils . getResString ( "web_testing2_source_ip" ) , 15 ) ; <END_BUG> optionalTasksPanel . add ( sourceIpAddr , BorderLayout . EAST ) ; return optionalTasksPanel ; } @ Override public void clearGui ( ) { } @ Override public void configure ( TestElement element ) { } @ Override public void modifyTestElement ( TestElement sampler ) { } }

Fix:
sourceIpAddr = new JLabeledTextField ( JMeterUtils . getResString ( "web_testing2_source_ip" ) ) ;
Buggy code:
class Dirent { private final int ino ; private final int parentIno ; private final int type ; private final String name ; Dirent ( int ino , int parentIno , int type , String name ) { } int getIno ( ) { } int getParentIno ( ) { } int getType ( ) { } String getName ( ) { } @ Override public String toString ( ) { <START_BUG> return String . format ( "[%d]:<seq2seq4repair_space>%s" , Integer . valueOf ( ino ) , name ) ; <END_BUG> } }

Fix:
return String . format ( "[%d]:<seq2seq4repair_space>%s" , ino , name ) ;
Buggy code:
public class Cvs extends AbstractTask { private String m_command = "checkout" ; private boolean m_quiet ; private boolean m_noexec ; private int m_port ; private File m_passwordFile ; private String m_cvsRoot ; private String m_cvsRsh ; private File m_dest ; private String m_module ; private String m_date ; private String m_tag ; public void setCommand ( final String command ) { } public void setCvsRoot ( final String cvsRoot ) { } public void setCvsRsh ( final String cvsRsh ) { } public void setDate ( final String date ) { } public void setDest ( final File dest ) { } public void setNoexec ( final boolean noexec ) { } public void setModule ( final String module ) { } public void setPassfile ( final File passwordFile ) { } public void setPort ( final int port ) { } public void setQuiet ( final boolean quiet ) { } public void setTag ( final String tag ) { } public void execute ( ) throws TaskException { final Commandline command = buildCommandline ( ) ; final Properties env = buildEnvironment ( ) ; final Execute2 exe = new Execute2 ( ) ; setupLogger ( exe ) ; if ( ( m_dest ) == null ) { m_dest = getBaseDirectory ( ) ; } exe . setWorkingDirectory ( m_dest ) ; <START_BUG> exe . setCommandline ( command . getCommandline ( ) ) ; <END_BUG> exe . setEnvironment ( env ) ; try { final int retCode = exe . execute ( ) ; if ( retCode != 0 ) { throw new TaskException ( ( "cvs<seq2seq4repair_space>exited<seq2seq4repair_space>with<seq2seq4repair_space>error<seq2seq4repair_space>code<seq2seq4repair_space>" + retCode ) ) ; } } catch ( IOException e ) { throw new TaskException ( e . toString ( ) , e ) ; } } private Properties buildEnvironment ( ) { } private Commandline buildCommandline ( ) throws TaskException { } private String getNonEmptyString ( final String value ) { } private boolean isEmpty ( final String value ) { } }

Fix:
exe . setCommandline ( command ) ;
Buggy code:
public class FormInputApplication extends WicketExampleApplication { public FormInputApplication ( ) { } public Class getHomePage ( ) { } protected void init ( ) { <START_BUG> getExceptionSettings ( ) . setThrowExceptionOnMissingResource ( false ) ; <END_BUG> Font font = new Font ( "SimSun" , Font . BOLD , 16 ) ; DefaultButtonImageResource imgSave = new DefaultButtonImageResource ( "保存" ) ; imgSave . setFont ( font ) ; DefaultButtonImageResource imgReset = new DefaultButtonImageResource ( "重置" ) ; imgReset . setFont ( font ) ; SharedResources sharedResources = getSharedResources ( ) ; sharedResources . add ( "save" , Locale . SIMPLIFIED_CHINESE , imgSave ) ; sharedResources . add ( "reset" , Locale . SIMPLIFIED_CHINESE , imgReset ) ; Font fontJa = new Font ( "Serif" , Font . BOLD , 16 ) ; DefaultButtonImageResource imgSaveJa = new DefaultButtonImageResource ( "保存" ) ; imgSaveJa . setFont ( fontJa ) ; DefaultButtonImageResource imgResetJa = new DefaultButtonImageResource ( "リセット" ) ; imgResetJa . setFont ( fontJa ) ; sharedResources . add ( "save" , Locale . JAPANESE , imgSaveJa ) ; sharedResources . add ( "reset" , Locale . JAPANESE , imgResetJa ) ; Font fontFa = new Font ( "Serif" , Font . BOLD , 16 ) ; Locale farsi = new Locale ( "fa" , "IR" ) ; DefaultButtonImageResource imgSaveFa = new DefaultButtonImageResource ( "ذخيره" ) ; imgSaveFa . setFont ( fontFa ) ; DefaultButtonImageResource imgResetFa = new DefaultButtonImageResource ( "بازنشاني" ) ; imgResetFa . setFont ( fontFa ) ; getSharedResources ( ) . add ( "save" , farsi , imgSaveFa ) ; getSharedResources ( ) . add ( "reset" , farsi , imgResetFa ) ; } }

Fix:
getResourceSettings ( ) . setThrowExceptionOnMissingResource ( false ) ;
Buggy code:
public class BooleanValidator extends AbstractFieldValidator { public BooleanValidator ( String matchField ) { } public BooleanValidator ( String matchField , String errorMessage , String prompt ) { } @ Override protected boolean customValidate ( ExcelCell excelCell ) { <START_BUG> return ( isValidTrue ( excelCell . getValue ( ) ) ) && ( isValidFalse ( excelCell . getValue ( ) ) ) ; <END_BUG> } }

Fix:
return ( isValidTrue ( excelCell . getValue ( ) ) ) || ( isValidFalse ( excelCell . getValue ( ) ) ) ;
Buggy code:
public class PlayerNumber extends PerPlayer { @ Override public void draw ( final GL2 gl , final RobotState player , final Camera camera ) { final SPLStandardMessage msg = player . getLastMessage ( ) ; <START_BUG> if ( ( msg != null ) && ( msg . playerNumValid ) ) { <END_BUG> gl . glPushMatrix ( ) ; if ( ( player . getPenalty ( ) ) != ( PlayerInfo . PENALTY_NONE ) ) { gl . glTranslatef ( ( - ( msg . playerNum ) ) , ( - 3.5F ) , 0.7F ) ; } else { gl . glTranslatef ( ( ( msg . pose [ 0 ] ) // 1000.0F ) , ( ( msg . pose [ 1 ] ) // 1000.0F ) , 0.7F ) ; } camera . turnTowardsCamera ( gl ) ; Text . drawText ( gl , ( "" + ( msg . playerNum ) ) , 0 , 0 , 0.25F ) ; gl . glPopMatrix ( ) ; } } @ Override public boolean hasAlpha ( ) { } @ Override public int getPriority ( ) { } }

Fix:
if ( ( ( msg != null ) && ( msg . playerNumValid ) ) && ( msg . poseValid ) ) {
Buggy code:
public class Job { private Job ( ) { } public static void main ( String [ ] args ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException { } public static void runJob ( String input , String output , String modelFactory , int numModels , int maxIterations , double alpha_0 , int numReducers ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException { JobConf conf = new JobConf ( DirichletJob . class ) ; Path outPath = new Path ( output ) ; <START_BUG> FileSystem fs = FileSystem . get ( conf ) ; <END_BUG> if ( fs . exists ( outPath ) ) { fs . delete ( outPath , true ) ; } fs . mkdirs ( outPath ) ; InputDriver . runJob ( input , ( output + "//data" ) ) ; DirichletDriver . runJob ( ( output + "//data" ) , ( output + "//state" ) , modelFactory , numModels , maxIterations , alpha_0 , numReducers ) ; Job . printResults ( ( output + "//state" ) , modelFactory , maxIterations , numModels , alpha_0 ) ; } public static void printResults ( String output , String modelDistribution , int numIterations , int numModels , double alpha_0 ) { } private static void printResults ( List < List < DirichletCluster < Vector > > > clusters , int significant ) { } }

Fix:
FileSystem fs = FileSystem . get ( outPath . toUri ( ) , conf ) ;
Buggy code:
public class LogRecordPanel extends JPanel { private LogRecord logRecord ; public LogRecordPanel ( LogRecord record ) { } private void initComponents ( ) { JPanel main = new JPanel ( ) ; FormLayout layout = new FormLayout ( "right:pref,<seq2seq4repair_space>3dlu,<seq2seq4repair_space>pref:grow,<seq2seq4repair_space>7dlu,<seq2seq4repair_space>right:pref,<seq2seq4repair_space>3dlu,<seq2seq4repair_space>pref:grow" , "" ) ; <START_BUG> DefaultFormBuilder builder = new DefaultFormBuilder ( main , layout ) ; <END_BUG> builder . appendSeparator ( "Details" ) ; String source ; if ( ( logRecord . getSourceClassName ( ) ) == null ) { source = "Unknown" ; } else { source = ( ( ( logRecord . getSourceClassName ( ) ) + "." ) + ( logRecord . getSourceMethodName ( ) ) ) + "()" ; } builder . append ( "Source:" , new JLabel ( source ) , 5 ) ; builder . append ( "Time:" , new JLabel ( Long . toString ( logRecord . getMillis ( ) ) ) ) ; builder . append ( "level:" , new JLabel ( logRecord . getLevel ( ) . toString ( ) ) ) ; builder . append ( "Thread:" , new JLabel ( Integer . toString ( logRecord . getThreadID ( ) ) ) ) ; builder . append ( "Seq<seq2seq4repair_space>nr:" , new JLabel ( Long . toString ( logRecord . getSequenceNumber ( ) ) ) ) ; builder . appendSeparator ( "Message" ) ; JTextArea area = new JTextArea ( logRecord . getMessage ( ) ) ; area . setLineWrap ( true ) ; area . setRows ( 5 ) ; area . setEditable ( false ) ; builder . append ( new JScrollPane ( area ) , 7 ) ; Throwable thrown = logRecord . getThrown ( ) ; if ( thrown != null ) { builder . appendSeparator ( "Exception" ) ; StringBuffer buffer = new StringBuffer ( ) ; StackTraceElement [ ] stackTrace = thrown . getStackTrace ( ) ; for ( int i = 0 ; i < ( stackTrace . length ) ; i ++ ) { buffer . append ( stackTrace [ i ] ) ; buffer . append ( "\n" ) ; } area = new JTextArea ( buffer . toString ( ) ) ; area . setLineWrap ( true ) ; area . setRows ( 5 ) ; area . setEditable ( false ) ; builder . append ( new JScrollPane ( area ) , 7 ) ; } setLayout ( new BorderLayout ( ) ) ; add ( main , BorderLayout . CENTER ) ; } public static void showRecord ( JFrame owner , LogRecord record ) { } }

Fix:
DefaultFormBuilder builder = new DefaultFormBuilder ( layout , main ) ;
Buggy code:
public class ScrollPopupShareUtil { static boolean device = BrowserAgent . isDevice ( ) ; static Widget widgetContainer ; public static void ScrollPopupUtilWidget ( Widget widget ) { } public static class ResizeEvent implements ResizeHandler { @ Override public void onResize ( com . google . gwt . event . logical . shared . ResizeEvent event ) { } } static void setAddTagesPopupOnResize ( ) { if ( ScrollPopupShareUtil . device ) { if ( ( ( Window . getClientHeight ( ) ) - 150 ) <= 564 ) { ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( ( ( Window . getClientHeight ( ) ) - 150 ) , PX ) ; ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflowY ( AUTO ) ; ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflowX ( AUTO ) ; } else { ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setHeight ( 500 , PX ) ; <START_BUG> ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflow ( AUTO ) ; <END_BUG> } } } }

Fix:
ScrollPopupShareUtil . widgetContainer . getElement ( ) . getStyle ( ) . setOverflowY ( AUTO ) ;
Buggy code:
@ NoTrace public class _ { public final _ instance = new _ ( ) ; public static final void NPE ( Object ... args ) { for ( Object o : args ) { <START_BUG> if ( null == args ) <END_BUG> throw new NullPointerException ( ) ; } } public static final void illegalState ( ) { } public static final void illegalState ( String message ) { } public static final String str ( Object o , boolean quoted ) { } public static final String str ( Object o ) { } public static final int hashCode ( Object property , int hashCode ) { } public static final int hc ( Object ... args ) { } No newline ; at end ; of file ; }

Fix:
if ( null == o )
Buggy code:
public class SourceFileScanner extends AbstractLogEnabled { public String [ ] restrict ( String [ ] files , File srcDir , File destDir , FileNameMapper mapper ) throws TaskException { long now = new Date ( ) . getTime ( ) ; StringBuffer targetList = new StringBuffer ( ) ; <START_BUG> if ( Os . isFamily ( "windows" ) ) { <END_BUG> now += 2000 ; } final ArrayList v = new ArrayList ( ) ; for ( int i = 0 ; i < ( files . length ) ; i ++ ) { final String [ ] targets = mapper . mapFileName ( files [ i ] ) ; if ( ( targets == null ) || ( ( targets . length ) == 0 ) ) { final String message = ( files [ i ] ) + "<seq2seq4repair_space>skipped<seq2seq4repair_space>-<seq2seq4repair_space>don\'t<seq2seq4repair_space>know<seq2seq4repair_space>how<seq2seq4repair_space>to<seq2seq4repair_space>handle<seq2seq4repair_space>it" ; getLogger ( ) . debug ( message ) ; continue ; } final File src = FileUtil . resolveFile ( srcDir , files [ i ] ) ; if ( ( src . lastModified ( ) ) > now ) { final String message = ( "Warning:<seq2seq4repair_space>" + ( files [ i ] ) ) + "<seq2seq4repair_space>modified<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>future." ; getLogger ( ) . warn ( message ) ; } boolean added = false ; targetList . setLength ( 0 ) ; for ( int j = 0 ; ( ! added ) && ( j < ( targets . length ) ) ; j ++ ) { File dest = FileUtil . resolveFile ( destDir , targets [ j ] ) ; if ( ! ( dest . exists ( ) ) ) { final String message = ( ( ( files [ i ] ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>doesn\'t<seq2seq4repair_space>exist." ; getLogger ( ) . debug ( message ) ; v . add ( files [ i ] ) ; added = true ; } else if ( ( src . lastModified ( ) ) > ( dest . lastModified ( ) ) ) { final String message = ( ( ( files [ i ] ) + "<seq2seq4repair_space>added<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( dest . getAbsolutePath ( ) ) ) + "<seq2seq4repair_space>is<seq2seq4repair_space>outdated." ; getLogger ( ) . debug ( message ) ; v . add ( files [ i ] ) ; added = true ; } else { if ( ( targetList . length ( ) ) > 0 ) { targetList . append ( ",<seq2seq4repair_space>" ) ; } targetList . append ( dest . getAbsolutePath ( ) ) ; } } if ( ! added ) { final String message = ( ( ( ( files [ i ] ) + "<seq2seq4repair_space>omitted<seq2seq4repair_space>as<seq2seq4repair_space>" ) + ( targetList . toString ( ) ) ) + ( ( targets . length ) == 1 ? "<seq2seq4repair_space>is" : "<seq2seq4repair_space>are<seq2seq4repair_space>" ) ) + "<seq2seq4repair_space>up<seq2seq4repair_space>to<seq2seq4repair_space>date." ; getLogger ( ) . debug ( message ) ; } } final String [ ] result = new String [ v . size ( ) ] ; return ( ( String [ ] ) ( v . toArray ( result ) ) ) ; } public File [ ] restrictAsFiles ( final String [ ] files , final File srcDir , final File destDir , final FileNameMapper mapper ) throws TaskException { } }

Fix:
if ( Os . isFamily ( OS_FAMILY_WINDOWS ) ) {
Buggy code:
@ Component public class RESTRoute extends RouteBuilder { private static final Logger LOGGER = Logger . getLogger ( RESTRoute . class ) ; private OrderProcessBean orderProcessBean ; @ Autowired public RESTRoute ( OrderProcessBean orderProcessBean ) { } public void configure ( ) { RESTRoute . LOGGER . debug ( "Starting<seq2seq4repair_space>Jetty<seq2seq4repair_space>server..." ) ; restConfiguration ( ) . component ( "jetty" ) . host ( "{{rest.jetty.host}}" ) . port ( "{{rest.jetty.port}}" ) . bindingMode ( auto ) ; RESTRoute . LOGGER . debug ( "Jetty<seq2seq4repair_space>server<seq2seq4repair_space>started<seq2seq4repair_space>succesfully." ) ; onException ( UnrecognizedPropertyException . class ) . handled ( true ) . setHeader ( HTTP_RESPONSE_CODE , constant ( 400 ) ) . setHeader ( CONTENT_TYPE , constant ( "text//plain" ) ) . setBody ( ) . constant ( "Invalid<seq2seq4repair_space>json<seq2seq4repair_space>data" ) ; onException ( DataModelException . class ) . handled ( true ) . setHeader ( HTTP_RESPONSE_CODE , constant ( 400 ) ) . setHeader ( CONTENT_TYPE , constant ( "text//plain" ) ) . setBody ( ) . simple ( "Invalid<seq2seq4repair_space>data<seq2seq4repair_space>values:\n${exception.message}" ) ; rest ( "//services//rest" ) . put ( "//simpleorder" ) . consumes ( "application//json" ) . type ( SimpleOrder . class ) . produces ( "text//html" ) . to ( "direct:order_put" ) ; <START_BUG> from ( "direct:order_put" ) . bean ( orderProcessBean ) . setHeader ( HTTP_RESPONSE_CODE , constant ( 201 ) ) . to ( "seda:confirmation-email.queue" ) . end ( ) ; <END_BUG> } }

Fix:
from ( "direct:order_put" ) . bean ( orderProcessBean ) . setHeader ( HTTP_RESPONSE_CODE , constant ( 201 ) ) . inOnly ( "seda:confirmation-email.queue" ) . end ( ) ;
Buggy code:
public class CompareToBuilder implements Builder < Integer > { private int comparison ; public CompareToBuilder ( ) { } public static int reflectionCompare ( Object lhs , Object rhs ) { } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients ) { } public static int reflectionCompare ( Object lhs , Object rhs , Collection < String > excludeFields ) { } public static int reflectionCompare ( Object lhs , Object rhs , String [ ] excludeFields ) { } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients , Class < ? > reflectUpToClass ) { <START_BUG> return CompareToBuilder . reflectionCompare ( lhs , rhs , false , reflectUpToClass , null ) ; <END_BUG> } public static int reflectionCompare ( Object lhs , Object rhs , boolean compareTransients , Class < ? > reflectUpToClass , String [ ] excludeFields ) { } private static void reflectionAppend ( Object lhs , Object rhs , Class < ? > clazz , CompareToBuilder builder , boolean useTransients , String [ ] excludeFields ) { } public CompareToBuilder appendSuper ( int superCompareTo ) { } public CompareToBuilder append ( Object lhs , Object rhs ) { } public CompareToBuilder append ( Object lhs , Object rhs , Comparator < ? > comparator ) { } public CompareToBuilder append ( long lhs , long rhs ) { } public CompareToBuilder append ( int lhs , int rhs ) { } public CompareToBuilder append ( short lhs , short rhs ) { } public CompareToBuilder append ( char lhs , char rhs ) { } public CompareToBuilder append ( byte lhs , byte rhs ) { } public CompareToBuilder append ( double lhs , double rhs ) { } public CompareToBuilder append ( float lhs , float rhs ) { } public CompareToBuilder append ( boolean lhs , boolean rhs ) { } public CompareToBuilder append ( Object [ ] lhs , Object [ ] rhs ) { } public CompareToBuilder append ( Object [ ] lhs , Object [ ] rhs , Comparator < ? > comparator ) { } public CompareToBuilder append ( long [ ] lhs , long [ ] rhs ) { } public CompareToBuilder append ( int [ ] lhs , int [ ] rhs ) { } public CompareToBuilder append ( short [ ] lhs , short [ ] rhs ) { } public CompareToBuilder append ( char [ ] lhs , char [ ] rhs ) { } public CompareToBuilder append ( byte [ ] lhs , byte [ ] rhs ) { } public CompareToBuilder append ( double [ ] lhs , double [ ] rhs ) { } public CompareToBuilder append ( float [ ] lhs , float [ ] rhs ) { } public CompareToBuilder append ( boolean [ ] lhs , boolean [ ] rhs ) { } public int toComparison ( ) { } public Integer build ( ) { } }

Fix:
return CompareToBuilder . reflectionCompare ( lhs , rhs , compareTransients , reflectUpToClass , null ) ;
Buggy code:
public class Attribute { @ JacksonXmlProperty ( isAttribute = true ) private String attributeClass ; @ JacksonXmlProperty ( isAttribute = true ) private String value ; public Attribute ( ) { } public Attribute ( String attributeClass , String value ) { } public String getAttributeClass ( ) { } public void setAttributeClass ( String attributeClass ) { } public String getValue ( ) { } public void setValue ( String value ) { } public static List < Attribute > createCollectionFromVertex ( Vertex vertex , OntologyRepository ontologyRepository ) { List < Attribute > collection = new ArrayList < Attribute > ( ) ; for ( Property property : vertex . getProperties ( ) ) { OntologyProperty ontologyProperty = ontologyRepository . getPropertyByIRI ( property . getName ( ) ) ; <START_BUG> if ( ontologyProperty . getUserVisible ( ) ) { <END_BUG> String name = ontologyProperty . getTitle ( ) ; Map < String , String > possibleValues = ontologyProperty . getPossibleValues ( ) ; String value = property . getValue ( ) . toString ( ) ; if ( ( ( possibleValues != null ) && ( ( possibleValues . size ( ) ) > 0 ) ) && ( possibleValues . containsKey ( value ) ) ) { value = possibleValues . get ( value ) ; } Attribute attribute = new Attribute ( name , value ) ; collection . add ( attribute ) ; } } return collection ; } }

Fix:
if ( ( ontologyProperty != null ) && ( ontologyProperty . getUserVisible ( ) ) ) {
Buggy code:
public class ArenaSelector implements Listener { Core core ; public Inventory arenaSelectorMenu = Bukkit . createInventory ( null , 27 , "§4§lLASERTAG!<seq2seq4repair_space>§8Pick<seq2seq4repair_space>an<seq2seq4repair_space>Arena" ) ; public ArenaSelector ( Core core ) { } public void displayArenas ( ) { } @ EventHandler public void onArenaInteract ( ArenaInteractEvent e ) { } @ EventHandler public void onArenaClick ( InventoryClickEvent e ) { if ( ( e . getWhoClicked ( ) ) instanceof Player ) { Player player = ( ( Player ) ( e . getWhoClicked ( ) ) ) ; if ( ( Arena . getArena ( core , player ) ) == null ) { ItemStack item = e . getCurrentItem ( ) ; <START_BUG> if ( ( item . getType ( ) ) == ( Material . SUGAR ) ) { <END_BUG> Bukkit . dispatchCommand ( player , ( "lasertag<seq2seq4repair_space>join<seq2seq4repair_space>" + ( ChatColor . stripColor ( item . getItemMeta ( ) . getDisplayName ( ) ) ) ) ) ; e . setCancelled ( true ) ; } } } } @ EventHandler public void onRightClick ( PlayerInteractEntityEvent e ) { } }

Fix:
if ( ( item != null ) && ( ( item . getType ( ) ) == ( Material . SUGAR ) ) ) {
Buggy code:
public class FreeableMemory extends Memory { AtomicInteger references = new AtomicInteger ( 0 ) ; public FreeableMemory ( long size ) { } public boolean reference ( ) { } public void unreference ( ) { } private void free ( ) { } @ Override protected void finalize ( ) { <START_BUG> assert ( references . get ( ) ) == 0 ; <END_BUG> assert ( peer ) == 0 ; } public byte getValidByte ( long offset ) { } }

Fix:
assert ( references . get ( ) ) <= 0 ;
Buggy code:
public class JarEntryFile extends JarEntryResource { private static final IJarEntryResource [ ] NO_CHILDREN = new IJarEntryResource [ 0 ] ; public JarEntryFile ( String simpleName ) { } public JarEntryResource clone ( Object newParent ) { <START_BUG> JarEntryFile file = new JarEntryFile ( simpleName ) ; <END_BUG> file . setParent ( newParent ) ; return file ; } public InputStream getContents ( ) throws CoreException { } public IJarEntryResource [ ] getChildren ( ) { } public boolean isFile ( ) { } public String toString ( ) { } }

Fix:
JarEntryFile file = new JarEntryFile ( this . simpleName ) ;
Buggy code:
public class MyDBHandler extends SQLiteOpenHelper { private static final int DATABASE_VERSION = 1 ; private static final String DATABASE_NAME = "shopingLists.db" ; public static final String TABLE_ITEMS = "items" ; public static final String COLUMN_ID = "_id" ; public static final String COLUMN_ITEM_NAME = "name" ; public static final String COLUMN_ITEM_TOTAL_PRICE = "price" ; public static final String COLUMN_ITEM_POUNDS = "pounds" ; public static final String COLUMN_ITEM_PENNIES = "pennies" ; public static final String COLUMN_ITEM_QUANTITY = "quantity" ; public static final String TABLE_LISTS = "lists" ; public static final String COLUMN_LIST_NAME = "name" ; public MyDBHandler ( Context context , String name , SQLiteDatabase . CursorFactory factory , int version ) { } @ Override public void onCreate ( SQLiteDatabase db ) { } @ Override public void onUpgrade ( SQLiteDatabase db , int oldVersion , int newVersion ) { } public void addItem ( item item ) { ContentValues values = new ContentValues ( ) ; values . put ( MyDBHandler . COLUMN_ITEM_NAME , item . getName ( ) ) ; values . put ( MyDBHandler . COLUMN_ITEM_QUANTITY , item . getQuantity ( ) ) ; values . put ( MyDBHandler . COLUMN_ITEM_TOTAL_PRICE , item . getTotalPrice ( ) ) ; values . put ( MyDBHandler . COLUMN_ITEM_POUNDS , item . getPounds ( ) ) ; values . put ( MyDBHandler . COLUMN_ITEM_PENNIES , item . getPennies ( ) ) ; <START_BUG> SQLiteDatabase db = super . getWritableDatabase ( ) ; <END_BUG> db . insert ( MyDBHandler . TABLE_ITEMS , null , values ) ; db . close ( ) ; } public void addList ( itemList itemList ) { } public void deleteItem ( String itemName ) { } public void deleteItem ( int id ) { } public void deleteList ( String listName ) { } public void deleteList ( int id ) { } public item getItem ( int id ) { } public itemList getList ( int id ) { } public String databaseToString ( ) { } }

Fix:
SQLiteDatabase db = getWritableDatabase ( ) ;
Buggy code:
public class CallableCommandWrapper < T extends Serializable > implements Callable < T > { private Context context ; private BaseCommand < T > executable ; public CallableCommandWrapper ( Context context , BaseCommand < T > executable ) { } @ Override public T call ( ) throws Exception { Log . d ( "Test" , "execute<seq2seq4repair_space>command" ) ; <START_BUG> Thread . sleep ( 500 ) ; <END_BUG> return executable . execute ( context ) ; } }

Fix:
Thread . sleep ( 1000 ) ;
Buggy code:
public abstract class AbstractPageableView extends RefreshingView implements IPageable { private int itemsPerPage = Integer . MAX_VALUE ; private int currentPage ; private int cachedItemCount ; public AbstractPageableView ( String id , IModel model ) { } public AbstractPageableView ( String id ) { } protected Iterator getItemModels ( ) { } protected void internalOnDetach ( ) { } protected abstract Iterator getItemModels ( int offset , int size ) { } private void clearCachedItemCount ( ) { } private void setCachedItemCount ( int itemCount ) { } private int getCachedItemCount ( ) { } private boolean isItemCountCached ( ) { } protected final int internalGetRowsPerPage ( ) { } protected final void internalSetRowsPerPage ( int items ) { } protected abstract int internalGetItemCount ( ) { } public final int getRowCount ( ) { } public final int getCurrentPage ( ) { int page = currentPage ; if ( page >= ( getPageCount ( ) ) ) { <START_BUG> page = Math . max ( ( page - 1 ) , 0 ) ; <END_BUG> setCurrentPage ( page ) ; return page ; } return page ; } public final void setCurrentPage ( int page ) { } public final int getPageCount ( ) { } protected int getViewOffset ( ) { } protected int getViewSize ( ) { } private static class CappedIteratorAdapter implements Iterator { private int max ; private int index ; private Iterator delegate ; public CappedIteratorAdapter ( Iterator delegate , int max ) { } public void remove ( ) { } public boolean hasNext ( ) { } public Object next ( ) { } } }

Fix:
page = Math . max ( ( ( getPageCount ( ) ) - 1 ) , 0 ) ;
Buggy code:
@ RunWith ( SpringJUnit4ClassRunner . class ) @ ContextConfiguration ( classes = { CHPLTestConfig . class } ) @ TestExecutionListeners ( { DependencyInjectionTestExecutionListener . class , DirtiesContextTestExecutionListener . class , TransactionalTestExecutionListener . class , DbUnitTestExecutionListener . class } ) @ DatabaseSetup ( "classpath:data//testData.xml" ) public class CQMResultDetailsDaoTest { @ Autowired CQMResultDetailsDAO cqmResultDetailsDAO ; @ Test public void testGetCQMResultDetailsByCertifiedProductId ( ) throws EntityRetrievalException { List < CQMResultDetailsDTO > dtos = cqmResultDetailsDAO . getCQMResultDetailsByCertifiedProductId ( 1L ) ; assertEquals ( dtos . size ( ) , 3 ) ; <START_BUG> assertEquals ( dtos . get ( 0 ) . getNumber ( ) , "NQF<seq2seq4repair_space>0001(A)" ) ; <END_BUG> assertEquals ( dtos . get ( 0 ) . getSuccess ( ) , false ) ; assertEquals ( dtos . get ( 0 ) . getVersion ( ) , null ) ; } }

Fix:
assertEquals ( "0001" , dtos . get ( 0 ) . getNqfNumber ( ) ) ;
Buggy code:
public class LoginActivity extends Activity { public static final String USERID = "ca.ualberta.cmput301w15t13.username" ; public static final String ISCLAIMANT = "ca.ualberta.cmput301w15t13.isclaimant" ; public String getLoginCredentials ( ) throws InterruptedException , ExecutionException { } public void approverLogin ( View v ) throws InterruptedException , ExecutionException { } public void claimantLogin ( View v ) throws InterruptedException , ExecutionException { } public void startClaimActivity ( String username , boolean isClaimant ) { ClaimListSingleton . getClaimList ( ) . clearListeners ( ) ; <START_BUG> DataManager . setOnlineMode ( ) ; <END_BUG> Toast . makeText ( getApplicationContext ( ) , "synchronizing<seq2seq4repair_space>with<seq2seq4repair_space>server" , LENGTH_SHORT ) . show ( ) ; DataManager . loadClaimsByUserName ( username ) ; Intent intent = new Intent ( this , ClaimActivity . class ) ; intent . putExtra ( LoginActivity . USERID , username ) ; intent . putExtra ( LoginActivity . ISCLAIMANT , isClaimant ) ; startActivity ( intent ) ; } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onResume ( ) { } }

Fix:
DataManager . setOfflineMode ( ) ;
Buggy code:
public abstract class AbstractSubmitLink extends AbstractLink implements IFormSubmittingComponent { private static final long serialVersionUID = 1L ; private Form < ? > form ; private boolean defaultFormProcessing = true ; public AbstractSubmitLink ( String id , IModel < ? > model ) { } public AbstractSubmitLink ( String id ) { } public AbstractSubmitLink ( String id , IModel < ? > model , Form < ? > form ) { } public AbstractSubmitLink ( String id , Form < ? > form ) { } public final AbstractSubmitLink setDefaultFormProcessing ( boolean defaultFormProcessing ) { } public boolean getDefaultFormProcessing ( ) { } public Form < ? > getForm ( ) { } public String getInputName ( ) { String id = getId ( ) ; final PrependingStringBuffer inputName = new PrependingStringBuffer ( id . length ( ) ) ; Component c = this ; while ( true ) { inputName . prepend ( id ) ; c = c . getParent ( ) ; if ( ( ( c == null ) || ( ( c instanceof Form ) && ( ( ( Form < ? > ) ( c ) ) . isRootForm ( ) ) ) ) || ( c instanceof Page ) ) { break ; } inputName . prepend ( PATH_SEPARATOR ) ; id = c . getId ( ) ; } <START_BUG> if ( inputName . equals ( "submit" ) ) { <END_BUG> inputName . prepend ( PATH_SEPARATOR ) ; } return inputName . toString ( ) ; } }

Fix:
if ( "submit" . equals ( inputName . toString ( ) ) ) {
Buggy code:
public class WebContainer { private static Logger logger = Logger . getLogger ( WebContainer . class ) ; public static WebappContext createWebContext ( ) { WebContainer . logger . debug ( "Creating<seq2seq4repair_space>Web<seq2seq4repair_space>Context..." ) ; WebappContext webappContext = new WebappContext ( "Wonghetto<seq2seq4repair_space>Server<seq2seq4repair_space>Web<seq2seq4repair_space>Context" ) ; webappContext . addContextInitParameter ( "contextClass" , "org.springframework.web.context.support.XmlWebApplicationContext" ) ; <START_BUG> webappContext . addContextInitParameter ( "contextConfigLocation" , "classpath*:spring-context.xml" ) ; <END_BUG> webappContext . addListener ( "org.springframework.web.context.ContextLoaderListener" ) ; WebContainer . logger . debug ( "Web<seq2seq4repair_space>Context<seq2seq4repair_space>created" ) ; return webappContext ; } public static void registerServlet ( WebappContext webappContext ) { } }

Fix:
webappContext . addContextInitParameter ( "contextConfigLocation" , "classpath*:application-context.xml" ) ;
Buggy code:
class JavaProjectElementInfo extends OpenableElementInfo { static final IPackageFragmentRoot [ ] NO_ROOTS = new IPackageFragmentRoot [ 0 ] ; static class ProjectCache { ProjectCache ( IPackageFragmentRoot [ ] allPkgFragmentRootsCache , Map rootToResolvedEntries , Map pkgFragmentsCaches ) { } public IPackageFragmentRoot [ ] allPkgFragmentRootsCache ; public HashtableOfArrayToObject allPkgFragmentsCache ; public Map pkgFragmentsCaches ; public Map rootToResolvedEntries ; } private Object [ ] nonJavaResources ; JavaProjectElementInfo . ProjectCache projectCache ; static void addSuperPackageNames ( String [ ] pkgName , HashtableOfArrayToObject packageFragments ) { } public JavaProjectElementInfo ( ) { } private Object [ ] computeNonJavaResources ( JavaProject project ) { } JavaProjectElementInfo . ProjectCache getProjectCache ( JavaProject project ) { } Object [ ] getNonJavaResources ( JavaProject project ) { } private void initializePackageNames ( IPackageFragmentRoot root , HashSetOfArray fragmentsCache ) { IJavaElement [ ] frags = null ; try { if ( ! ( root . isOpen ( ) ) ) { PackageFragmentRootInfo info = ( root . isArchive ( ) ) ? new JarPackageFragmentRootInfo ( ) : new PackageFragmentRootInfo ( ) ; <START_BUG> ( ( PackageFragmentRoot ) ( root ) ) . computeChildren ( info ) ; <END_BUG> frags = info . children ; } else frags = root . getChildren ( ) ; } catch ( JavaModelException e ) { return ; } for ( int j = 0 , length = frags . length ; j < length ; j ++ ) { fragmentsCache . add ( ( ( PackageFragment ) ( frags [ j ] ) ) . names ) ; } } private boolean isClasspathEntryOrOutputLocation ( IPath path , IClasspathEntry [ ] resolvedClasspath , IPath projectOutput ) { } NameLookup newNameLookup ( JavaProject project , ICompilationUnit [ ] workingCopies ) { } void resetCaches ( ) { } void setNonJavaResources ( Object [ ] resources ) { } }

Fix:
( ( PackageFragmentRoot ) ( root ) ) . computeChildren ( info , ( ( JavaElement ) ( root ) ) . resource ( ) ) ;
Buggy code:
public class RetailAPIClient extends AbstractClient { public RetailAPIClient ( ) { } public String balanceEnquiry ( String accNo ) { } public String accountSummary ( String accNo , String custId ) { } public String miniStatement ( String accNo ) { } public String transactionHistoryNDays ( String accNo , int days ) { <START_BUG> Response response = queryClientToken ( getWebTarget ( ) ) . path ( TRANSACTION_HISTORY_N_DAYS_STR ) . queryParam ( ACCOUNT_NUMBER_STR , String . valueOf ( accNo ) ) . queryParam ( NUMBER_OF_DAYS , Integer . valueOf ( days ) ) . request ( ) . accept ( APPLICATION_JSON_TYPE ) . get ( ) ; <END_BUG> return getDummyResponseArray ( DummyReponses . getTransactionSummaryNDays ( ) ) ; } public String transactionHistoryInterval ( String accNo , String fromDate , String toDate ) throws JsonParseException , JsonMappingException , IOException { } public String behaviourScore ( String accNo ) { } public String branchAtmLocator ( String lat , String lng ) { } public String listPayee ( String cust_id ) { } public String transferFunds ( String srcAccNo , String destAccNo , double amt , String payeeDesc , int payeeId , String type ) { } public static void main ( String [ ] args ) throws JsonParseException , JsonMappingException , IOException { } }

Fix:
queryClientToken ( getWebTarget ( ) ) . path ( TRANSACTION_HISTORY_N_DAYS_STR ) . queryParam ( ACCOUNT_NUMBER_STR , String . valueOf ( accNo ) ) . queryParam ( NUMBER_OF_DAYS , Integer . valueOf ( days ) ) . request ( ) . accept ( APPLICATION_JSON_TYPE ) . get ( ) ;
Buggy code:
public class ListMultipleChoice extends AbstractChoice { private static final long serialVersionUID = - 1000324612688307682L ; public ListMultipleChoice ( final String componentName , final Serializable model , final String expression , final Collection values ) { } public ListMultipleChoice ( final String componentName , final Serializable model , final Collection values ) { } public final String getValue ( ) { } public final void setValue ( final String value ) { } public final void updateModel ( ) { Collection selectedValues = ( ( Collection ) ( getModelObject ( ) ) ) ; if ( selectedValues != null ) { selectedValues . clear ( ) ; } else { selectedValues = new ArrayList ( ) ; setModelObject ( selectedValues ) ; } <START_BUG> final String [ ] indicesOrIds = getRequestStrings ( ) ; <END_BUG> if ( ( ( indicesOrIds != null ) && ( ( indicesOrIds . length ) > 0 ) ) && ( ! ( Strings . isEmpty ( indicesOrIds [ 0 ] ) ) ) ) { final List list = getValues ( ) ; for ( int i = 0 ; i < ( indicesOrIds . length ) ; i ++ ) { if ( list instanceof IDetachableChoiceList ) { selectedValues . add ( ( ( IDetachableChoiceList ) ( list ) ) . objectForId ( indicesOrIds [ i ] ) ) ; } else { final int index = Integer . parseInt ( indicesOrIds [ i ] ) ; selectedValues . add ( list . get ( index ) ) ; } } } } protected final void onComponentTag ( final ComponentTag tag ) { } protected final boolean isSelected ( Object currentValue ) { } }

Fix:
final String [ ] indicesOrIds = inputAsStringArray ( ) ;
Buggy code:
public class PageableListViewNavigationIncrementLink extends PageLink { private final int increment ; private final PageableListView pageableListView ; public PageableListViewNavigationIncrementLink ( final String id , final PageableListView pageableListView , final int increment ) { } public void onClick ( ) { <START_BUG> getRequestCycle ( ) . setRedirect ( false ) ; <END_BUG> super . onClick ( ) ; } public boolean isFirst ( ) { } public boolean isLast ( ) { } public boolean linksTo ( final Page page ) { } }

Fix:
setRedirect ( false ) ;
Buggy code:
public class ModuleAccessesOSGiServiceTestCase extends AbstractOSGiSubsystemTest { private OSGiSubsystemSupport support ; private String apiArchiveName ; @ Before public void setUp ( ) throws Exception { } @ After public void tearDown ( ) { } @ Override protected OSGiSubsystemSupport getSubsystemSupport ( ) { } @ Test public void testBundleTargetService ( ) throws Exception { } @ Test public void testModuleInvokesTargetBundleService ( ) throws Exception { } private void registerClientService ( final ModuleIdentifier moduleId ) throws Exception { BatchedWork work = new BatchedWork ( ) { @ Override public void execute ( BatchBuilder batchBuilder ) throws Exception { Object service = loadClass ( moduleId , EchoInvokerService . class . getName ( ) ) . newInstance ( ) ; BatchServiceBuilder < ? > serviceBuilder = batchBuilder . addService ( SERVICE_NAME , ( ( Service < ? > ) ( service ) ) ) ; serviceBuilder . addDependency ( FrameworkService . SERVICE_NAME ) ; <START_BUG> serviceBuilder . setInitialMode ( IMMEDIATE ) ; <END_BUG> } } ; runWithLatchedBatch ( work ) ; } private String invokeClientService ( final ModuleIdentifier moduleId , final String message ) throws Exception { } private String invokeTargetService ( final Bundle bundle , final String message ) throws Exception { } private JavaArchive getAPIModuleArchive ( ) throws Exception { } private JavaArchive getTargetBundleArchive ( ) throws Exception { } private JavaArchive getClientModuleArchive ( ) throws Exception { } }

Fix:
serviceBuilder . setInitialMode ( ACTIVE ) ;
Buggy code:
public class FilterByKeyword extends FilterDecorator { private String myKeyword ; public FilterByKeyword ( String keyword ) { } @ Override public void filter ( List < Event > list ) { List < Event > decoratedList = decoratedFilterWork ( list ) ; for ( Event entry : decoratedList ) { try { <START_BUG> if ( entry . containsKeyword ( entry . get ( "title" ) , myKeyword ) ) { <END_BUG> myFilteredList . add ( entry ) ; } } catch ( TivooEventKeywordNotFound e ) { myFilteredList . add ( entry ) ; } } } }

Fix:
if ( entry . containsKeyword ( "title" , myKeyword ) ) {
Buggy code:
public class ClusterConnectionAdd extends AbstractAddStepHandler implements DescriptionProvider { public static ModelNode getAddOperation ( final ModelNode address , ModelNode subModel ) { } public static final ClusterConnectionAdd INSTANCE = new ClusterConnectionAdd ( ) ; private ClusterConnectionAdd ( ) { } @ Override protected void populateModel ( ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > newControllers ) throws OperationFailedException { } @ Override public ModelNode getModelDescription ( Locale locale ) { } static void addClusterConnectionConfigs ( final OperationContext context , final Configuration configuration , final ModelNode model ) throws OperationFailedException { } static ClusterConnectionConfiguration createClusterConnectionConfiguration ( final OperationContext context , final String name , final ModelNode model ) throws OperationFailedException { final String address = CLUSTER_CONNECTION_ADDRESS . resolveModelAttribute ( context , model ) . asString ( ) ; final String connectorName = CONNECTOR_REF . resolveModelAttribute ( context , model ) . asString ( ) ; final long retryInterval = CLUSTER_CONNECTION_RETRY_INTERVAL . resolveModelAttribute ( context , model ) . asLong ( ) ; final boolean duplicateDetection = CLUSTER_CONNECTION_USE_DUPLICATE_DETECTION . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final boolean forwardWhenNoConsumers = FORWARD_WHEN_NO_CONSUMERS . resolveModelAttribute ( context , model ) . asBoolean ( ) ; final int maxHops = MAX_HOPS . resolveModelAttribute ( context , model ) . asInt ( ) ; <START_BUG> final int confirmationWindowSize = CONFIRMATION_WINDOW_SIZE . resolveModelAttribute ( context , model ) . asInt ( ) ; <END_BUG> final ModelNode discoveryNode = DISCOVERY_GROUP_NAME . resolveModelAttribute ( context , model ) ; final String discoveryGroupName = ( discoveryNode . isDefined ( ) ) ? discoveryNode . asString ( ) : null ; final List < String > staticConnectors = ( discoveryGroupName == null ) ? ClusterConnectionAdd . getStaticConnectors ( model ) : null ; final boolean allowDirectOnly = ALLOW_DIRECT_CONNECTIONS_ONLY . resolveModelAttribute ( context , model ) . asBoolean ( ) ; if ( discoveryGroupName != null ) { return new ClusterConnectionConfiguration ( name , address , connectorName , retryInterval , duplicateDetection , forwardWhenNoConsumers , maxHops , confirmationWindowSize , discoveryGroupName ) ; } else { return new ClusterConnectionConfiguration ( name , address , connectorName , retryInterval , duplicateDetection , forwardWhenNoConsumers , maxHops , confirmationWindowSize , staticConnectors , allowDirectOnly ) ; } } private static List < String > getStaticConnectors ( ModelNode model ) { } }

Fix:
final int confirmationWindowSize = BRIDGE_CONFIRMATION_WINDOW_SIZE . resolveModelAttribute ( context , model ) . asInt ( ) ;
Buggy code:
class JarPackageFragment extends PackageFragment { protected JarPackageFragment ( IPackageFragmentRoot root , String name ) { } protected boolean computeChildren ( OpenableElementInfo info ) { } void computeNonJavaResources ( String [ ] resNames , JarPackageFragmentInfo info , String zipName ) { } public boolean containsJavaResources ( ) throws JavaModelException { } public ICompilationUnit createCompilationUnit ( String name , String contents , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected OpenableElementInfo createElementInfo ( ) { } public IClassFile [ ] getClassFiles ( ) throws JavaModelException { } public ICompilationUnit [ ] getCompilationUnits ( ) throws JavaModelException { } public IResource getCorrespondingResource ( ) throws JavaModelException { } public Object [ ] getNonJavaResources ( ) throws JavaModelException { } public boolean isReadOnly ( ) { } <START_BUG> protected void openWhenClosed ( IProgressMonitor pm , IBuffer buffer ) throws JavaModelException { <END_BUG> getOpenableParent ( ) . open ( pm ) ; } public void refreshChildren ( ) { } public IJavaElement rootedAt ( IJavaProject project ) { } protected Object [ ] storedNonJavaResources ( ) throws JavaModelException { } }

Fix:
protected void openWhenClosed ( IProgressMonitor pm ) throws JavaModelException {