nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ModClusterExtension implements XMLStreamConstants , Extension { public static final String SUBSYSTEM_NAME = "modcluster" ; private static final int MANAGEMENT_API_MAJOR_VERSION = 1 ; private static final int MANAGEMENT_API_MINOR_VERSION = 3 ; private static final int MANAGEMENT_API_MICRO_VERSION = 0 ; static final PathElement SUBSYSTEM_PATH = PathElement . pathElement ( SUBSYSTEM , ModClusterExtension . SUBSYSTEM_NAME ) ; static final PathElement CONFIGURATION_PATH = PathElement . pathElement ( MOD_CLUSTER_CONFIG , CONFIGURATION ) ; static final PathElement SSL_CONFIGURATION_PATH = PathElement . pathElement ( SSL , CONFIGURATION ) ; static final PathElement DYNAMIC_LOAD_PROVIDER_PATH = PathElement . pathElement ( DYNAMIC_LOAD_PROVIDER , CONFIGURATION ) ; static final PathElement LOAD_METRIC_PATH = PathElement . pathElement ( LOAD_METRIC ) ; static final PathElement CUSTOM_LOAD_METRIC_PATH = PathElement . pathElement ( CUSTOM_LOAD_METRIC ) ; private static final String RESOURCE_NAME = ( ModClusterExtension . class . getPackage ( ) . getName ( ) ) + ".LocalDescriptions" ; static StandardResourceDescriptionResolver getResourceDescriptionResolver ( final String ... keyPrefix ) { } @ Override public void initialize ( ExtensionContext context ) { } @ Override public void initializeParsers ( ExtensionParsingContext context ) { } private static void registerTransformers_1_2_0 ( SubsystemRegistration subsystem ) { } private static class ConvertCapacityTransformer implements OperationTransformer , ChainedResourceTransformerEntry { private static final ModClusterExtension . ConvertCapacityTransformer INSTANCE = new ModClusterExtension . ConvertCapacityTransformer ( ) ; @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { } @ Override public void transformResource ( ChainedResourceTransformationContext context , PathAddress address , Resource resource ) throws OperationFailedException { } private void transformProperties ( ModelNode model ) { } private TransformedOperation internalTransformOperation ( ModelNode operation ) { } private void transformCapacity ( ModelNode model ) { } private ModelNode internalTransform ( ModelNode model ) { } OperationTransformer getWriteAttributeTransformer ( ) { return new OperationTransformer ( ) { @ Override public TransformedOperation transformOperation ( TransformationContext context , PathAddress address , ModelNode operation ) throws OperationFailedException { ModelNode transformed = operation . get ( VALUE ) ; String name = operation . get ( NAME ) . asString ( ) ; if ( name . equals ( LoadMetricDefinition . PROPERTY . getName ( ) ) ) { transformProperties ( transformed ) ; } else if ( name . equals ( LoadMetricDefinition . CAPACITY . getName ( ) ) ) { transformCapacity ( transformed ) ; } <START_BUG> return new TransformedOperation ( transformed , OperationResultTransformer . ORIGINAL_RESULT ) ; <END_BUG> } } ; } } }

Fix:
return new TransformedOperation ( operation , OperationResultTransformer . ORIGINAL_RESULT ) ;
Buggy code:
public class Install extends ActionBase { public static void installPlugin ( String path_to_install , boolean debug ) { } protected static boolean isInstalled ( String name ) { } protected static void hasDependencies ( Pluginspecs plugin_specs ) throws PluginDependenciesNotPresentException { } private static void addPlugintoConfig ( Pluginspecs plugin_specs ) throws IOException { String formats = EMPTYSTRING ; for ( String ext : plugin_specs . extensions ( ) ) { if ( Objects . equals ( ext , EMPTYSTRING ) ) break ; if ( ( configString . length ) != 0 ) { for ( String config_line : configString ) { formats += SEPARATOR ; if ( config_line . contains ( ( ( SEPARATOR ) + ( ext . toLowerCase ( ) ) ) ) ) formats += ( DEFAULT ) + ( INTERSEPARATOR ) ; formats += ext ; } } else formats += ( ext . toLowerCase ( ) ) + ( SEPARATOR ) ; } <START_BUG> FileUtils . writeStringToFile ( config , ( ( ( ( ( ( ( ( PLUGIN ) + ( INTERSEPARATOR ) ) + ( plugin_specs . name ( ) . toUpperCase ( ) ) ) + ( INTERSEPARATOR ) ) + ( plugin_specs . version ( ) ) ) + ( SEPARATOR ) ) + formats ) + ( System . lineSeparator ( ) ) ) , true ) ; <END_BUG> } private static void copyPlugintoDirectory ( String plugin_name , File plugin_path ) throws IsNotJarException , IOException { } }

Fix:
FileUtils . writeStringToFile ( config , ( ( ( ( ( ( ( ( PLUGIN ) + ( INTERSEPARATOR ) ) + ( plugin_specs . name ( ) . toUpperCase ( ) ) ) + ( INTERSEPARATOR ) ) + ( plugin_specs . version ( ) ) ) + formats ) + ( SEPARATOR ) ) + ( System . lineSeparator ( ) ) ) , true ) ;
Buggy code:
public class TestNot extends LuceneTestCase { public TestNot ( String name ) { } public void testNot ( ) throws Exception { RAMDirectory store = new RAMDirectory ( ) ; IndexWriter writer = new IndexWriter ( store , new SimpleAnalyzer ( ) , true , MaxFieldLength . LIMITED ) ; Document d1 = new Document ( ) ; d1 . add ( new org . apache . lucene . document . Field ( "field" , "a<seq2seq4repair_space>b" , Store . YES , Index . ANALYZED ) ) ; writer . addDocument ( d1 ) ; writer . optimize ( ) ; writer . close ( ) ; Searcher searcher = new IndexSearcher ( store , true ) ; <START_BUG> QueryParser parser = new QueryParser ( Version . LUCENE_CURRENT , "field" , new SimpleAnalyzer ( ) ) ; <END_BUG> Query query = parser . parse ( "a<seq2seq4repair_space>NOT<seq2seq4repair_space>b" ) ; ScoreDoc [ ] hits = searcher . search ( query , null , 1000 ) . scoreDocs ; assertEquals ( 0 , hits . length ) ; } }

Fix:
QueryParser parser = new QueryParser ( TEST_VERSION_CURRENT , "field" , new SimpleAnalyzer ( ) ) ;
Buggy code:
public class RegisterTasklet extends AbstractTypeDefinition { protected void registerResource ( final String name , final String className , final File file ) throws TaskException { if ( null == className ) { try { <START_BUG> getDeployer ( ) . deployTask ( name , file ) ; <END_BUG> } catch ( final DeploymentException de ) { throw new TaskException ( ( ( ( "Failed<seq2seq4repair_space>deploying<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + file ) , de ) ; } } else { try { final URL url = file . toURL ( ) ; final DefaultTypeFactory factory = new DefaultTypeFactory ( new URL [ ] { url } ) ; factory . addNameClassMapping ( name , className ) ; getTypeManager ( ) . registerType ( ROLE , name , factory ) ; } catch ( final Exception e ) { throw new TaskException ( ( ( ( "Failed<seq2seq4repair_space>registering<seq2seq4repair_space>" + name ) + "<seq2seq4repair_space>from<seq2seq4repair_space>" ) + file ) , e ) ; } } } }

Fix:
getDeployer ( ) . deployType ( ROLE , name , file ) ;
Buggy code:
@ Entity @ Table ( name = "CUSTOMERS" ) public class Customer { private Long id ; private Set < Order > orders = Sets . newHashSet ( ) ; private String firstName ; private String surName ; private Address address ; private Customer ( ) { } public Customer ( String firstName , String surName , Address address ) { } @ Id @ SequenceGenerator ( name = "CUSTOMER_ID_GENERATOR" , sequenceName = "CUSTOMER_SEQ" ) @ GeneratedValue ( strategy = GenerationType . SEQUENCE , generator = "CUSTOMER_ID_GENERATOR" ) public Long getId ( ) { } public void setId ( Long id ) { } @ Column ( nullable = false ) @ OneToMany @ JoinColumn ( name = "CUSTOMER_ID" ) @ Cascade ( { CascadeType . ALL } ) public Set < Order > getOrders ( ) { } public void setOrders ( Set < Order > orders ) { } public Customer addOrder ( Order order ) { } @ Column ( nullable = false ) public String getFirstName ( ) { } public void setFirstName ( String firstName ) { } @ Column ( nullable = false ) public String getSurName ( ) { } public void setSurName ( String surName ) { } @ ManyToOne @ JoinColumn ( name = "ADDRESS_ID" ) <START_BUG> @ Cascade ( { CascadeType . ALL } ) <END_BUG> public Address getAddress ( ) { return address ; } public void setAddress ( Address address ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } }

Fix:
@ Cascade ( { CascadeType . SAVE_UPDATE } )
Buggy code:
public abstract class FeatureConsumer implements IFeatureConsumer { protected final int requiredDimension ; protected final int numberOfClusters ; protected List < double [ ] > data = new ArrayList < > ( ) ; protected double [ ] [ ] pcaMatrix ; public FeatureConsumer ( int dim , int numberOfClusters ) { } @ Override public void consume ( float [ ] arg1 , float [ ] arg2 ) { } private void constuctFeatureVector ( float [ ] energy , float [ ] mfcc ) { double [ ] mergedVector = new double [ ( energy . length ) + ( mfcc . length ) ] ; for ( int i = 0 ; i < ( energy . length ) ; i ++ ) { mergedVector [ i ] = energy [ i ] ; } for ( int i = energy . length ; i < ( ( energy . length ) + ( mfcc . length ) ) ; i ++ ) { <START_BUG> mergedVector [ i ] = energy [ i ] ; <END_BUG> } finishConstuction ( mergedVector ) ; } protected abstract void finishConstuction ( double [ ] vector ) { } @ Override public abstract void run ( ) { } }

Fix:
mergedVector [ i ] = mfcc [ ( i - ( energy . length ) ) ] ;
Buggy code:
@ WebServlet ( "//AppErrorHandler" ) public class AppErrorHandler extends HttpServlet { private static final long serialVersionUID = 1L ; @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void processError ( HttpServletRequest request , HttpServletResponse response ) throws IOException { Throwable throwable = ( ( Throwable ) ( request . getAttribute ( "javax.servlet.error.exception" ) ) ) ; Integer statusCode = ( ( Integer ) ( request . getAttribute ( "javax.servlet.error.status_code" ) ) ) ; String servletName = ( ( String ) ( request . getAttribute ( "javax.servlet.error.servlet_name" ) ) ) ; if ( servletName == null ) { servletName = "Unknown" ; } String requestUri = ( ( String ) ( request . getAttribute ( "javax.servlet.error.request_uri" ) ) ) ; if ( requestUri == null ) { requestUri = "Unknown" ; } response . setContentType ( "text//html" ) ; PrintWriter out = response . getWriter ( ) ; out . write ( "<html><head><title>Exception//Error<seq2seq4repair_space>Details<//title><//head><body>" ) ; if ( statusCode != 500 ) { out . write ( "<h3>Error<seq2seq4repair_space>Details<//h3>" ) ; out . write ( ( ( "<strong>Status<seq2seq4repair_space>Code<//strong>:" + statusCode ) + "<br>" ) ) ; out . write ( ( "<strong>Requested<seq2seq4repair_space>URI<//strong>:" + requestUri ) ) ; } else { out . write ( "<h3>Exception<seq2seq4repair_space>Details<//h3>" ) ; out . write ( ( ( "<ul><li>Servlet<seq2seq4repair_space>Name:" + servletName ) + "<//li>" ) ) ; out . write ( ( ( "<li>Exception<seq2seq4repair_space>Name:" + ( throwable . getClass ( ) . getName ( ) ) ) + "<//li>" ) ) ; out . write ( ( ( "<li>Requested<seq2seq4repair_space>URI:" + requestUri ) + "<//li>" ) ) ; out . write ( ( ( "<li>Exception<seq2seq4repair_space>Message:" + ( throwable . getMessage ( ) ) ) + "<//li>" ) ) ; out . write ( "<//ul>" ) ; } out . write ( "<br><br>" ) ; <START_BUG> out . write ( "<a<seq2seq4repair_space>href=\"homepage.jsp\">Login<seq2seq4repair_space>Page<//a>" ) ; <END_BUG> out . write ( "<//body><//html>" ) ; } }

Fix:
out . write ( "<a<seq2seq4repair_space>href=\"home.jsp\">Home<//a>" ) ;
Buggy code:
public class SamplingStatCalculator { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private final StatCalculatorLong calculator = new StatCalculatorLong ( ) ; private final List < Sample > storedValues = new Vector < Sample > ( ) ; private double maxThroughput ; private long firstTime ; private String label ; @ Deprecated public SamplingStatCalculator ( ) { } public SamplingStatCalculator ( String label ) { } public SamplingStatCalculator ( SamplingStatCalculator stat ) { } private void init ( ) { } public void addSamples ( SamplingStatCalculator ssc ) { } public synchronized void clear ( ) { } public Sample getCurrentSample ( ) { } public long getElapsed ( ) { } public double getRate ( ) { } public double getBytesPerSecond ( ) { } public double getKBPerSecond ( ) { } public double getAvgPageBytes ( ) { } public String getLabel ( ) { } public Sample addSample ( SampleResult res ) { } public List < Sample > getSamples ( ) { } public Sample getSample ( int index ) { } private long getEndTime ( SampleResult res ) { } private void setStartTime ( SampleResult res ) { } public double getErrorPercentage ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer mySB = new StringBuffer ( ) ; <END_BUG> mySB . append ( ( ( "Samples:<seq2seq4repair_space>" + ( this . getCount ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Avg:<seq2seq4repair_space>" + ( this . getMean ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Min:<seq2seq4repair_space>" + ( this . getMin ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Max:<seq2seq4repair_space>" + ( this . getMax ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( ( "Error<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( this . getErrorPercentage ( ) ) ) + "<seq2seq4repair_space>" ) ) ; mySB . append ( ( "Sample<seq2seq4repair_space>Rate:<seq2seq4repair_space>" + ( this . getRate ( ) ) ) ) ; return mySB . toString ( ) ; } public long getErrorCount ( ) { } public double getMaxThroughput ( ) { } public HashMap < Number , Number [ ] > getDistribution ( ) { } public Number getPercentPoint ( double percent ) { } public int getCount ( ) { } public Number getMax ( ) { } public double getMean ( ) { } public Number getMeanAsNumber ( ) { } public Number getMedian ( ) { } public Number getMin ( ) { } public Number getPercentPoint ( float percent ) { } public double getStandardDeviation ( ) { } }

Fix:
StringBuilder mySB = new StringBuilder ( ) ;
Buggy code:
public class SizeAssertionGui extends AbstractAssertionGui implements ActionListener , FocusListener { private JTextField size ; private JRadioButton equalButton ; private JRadioButton notequalButton ; private JRadioButton greaterthanButton ; private JRadioButton lessthanButton ; private JRadioButton greaterthanequalButton ; private JRadioButton lessthanequalButton ; private int execState ; public SizeAssertionGui ( ) { } public String getLabelResource ( ) { } public String getSizeAttributesTitle ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement el ) { } public void clear ( ) { } public void configure ( TestElement el ) { } public void setState ( int state ) { } public int getState ( ) { } private void init ( ) { <START_BUG> setLayout ( new VerticalLayout ( 5 , VerticalLayout . LEFT , VerticalLayout . TOP ) ) ; <END_BUG> setBorder ( makeBorder ( ) ) ; add ( makeTitlePanel ( ) ) ; JPanel sizePanel = new JPanel ( ) ; sizePanel . setBorder ( BorderFactory . createTitledBorder ( BorderFactory . createEtchedBorder ( ) , getSizeAttributesTitle ( ) ) ) ; sizePanel . add ( new JLabel ( JMeterUtils . getResString ( "size_assertion_label" ) ) ) ; size = new JTextField ( 5 ) ; size . addFocusListener ( this ) ; sizePanel . add ( size ) ; sizePanel . add ( createComparatorButtonPanel ( ) ) ; add ( sizePanel ) ; } private Box createComparatorButtonPanel ( ) { } private JRadioButton createComparatorButton ( String name , int value , ButtonGroup group ) { } public void focusLost ( FocusEvent e ) { } public void focusGained ( FocusEvent e ) { } public void actionPerformed ( ActionEvent e ) { } }

Fix:
setLayout ( new VerticalLayout ( 5 , VerticalLayout . BOTH , VerticalLayout . TOP ) ) ;
Buggy code:
public abstract class AbstractFrameController implements FrameMediator { protected StatusBar statusBar ; protected MouseAdapter mouseTooltipHandler ; protected ViewItem viewItem ; protected AbstractFrameView view ; protected SelectionManager selectionManager ; protected String id ; public AbstractFrameController ( String id , ViewItem viewItem ) { } protected void initActions ( ) { } protected XmlElement createDefaultConfiguration ( String id ) { } protected abstract void init ( ) { } public StatusBar getStatusBar ( ) { } public MouseAdapter getMouseTooltipHandler ( ) { } public void close ( ) { <START_BUG> log . info ( ( "Closing<seq2seq4repair_space>FrameController:<seq2seq4repair_space>" + ( this . getClass ( ) . getName ( ) ) ) ) ; <END_BUG> view . saveWindowPosition ( ) ; view . setVisible ( false ) ; FrameModel . close ( this ) ; } protected abstract AbstractFrameView createView ( ) { } public void openView ( ) { } public ViewItem getViewItem ( ) { } public void setViewItem ( ViewItem item ) { } public void enableToolbar ( String id , boolean enable ) { } public boolean isToolbarEnabled ( String id ) { } public AbstractFrameView getView ( ) { } public Menu getMenu ( ) { } public SelectionManager getSelectionManager ( ) { } public void setSelectionManager ( SelectionManager selectionManager ) { } }

Fix:
log . fine ( ( "Closing<seq2seq4repair_space>FrameController:<seq2seq4repair_space>" + ( this . getClass ( ) . getName ( ) ) ) ) ;
Buggy code:
public class ConnectionLogLoader { public SortedSet < ConnectionLog > load ( ) { TreeSet < ConnectionLog > connectionLogs = new TreeSet < ConnectionLog > ( ) ; File [ ] files = logDir . listFiles ( ) ; for ( File file : files ) { Scanner in = null ; try { <START_BUG> in = new Scanner ( file ) ; <END_BUG> in . nextLine ( ) ; while ( in . hasNext ( ) ) { String line = in . nextLine ( ) ; try { ConnectionLog connectionLog = parse ( line ) ; if ( connectionLog != null ) connectionLogs . add ( connectionLog ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { if ( in != null ) in . close ( ) ; } } return connectionLogs ; } private ConnectionLog parse ( String line ) { } }

Fix:
in = new Scanner ( file , "UTF-8" ) ;
Buggy code:
public class ApplicationTypeConfig { public static final ApplicationTypeConfig DEPLOYMENT = new ApplicationTypeConfig ( ModelDescriptionConstants . DEPLOYMENT , true ) ; private final boolean core ; private final String subsystem ; private final String name ; private final boolean application ; private volatile Boolean configuredApplication ; public ApplicationTypeConfig ( String subsystem , String name ) { } public ApplicationTypeConfig ( String subsystem , String name , boolean application ) { } private ApplicationTypeConfig ( String name , boolean application ) { } public boolean isCore ( ) { } public String getSubsystem ( ) { } public String getName ( ) { } public boolean isDefaultApplication ( ) { } public Boolean getConfiguredApplication ( ) { } public boolean isApplicationType ( ) { } <START_BUG> public void setConfiguredApplication ( boolean configuredApplication ) { <END_BUG> this . configuredApplication = configuredApplication ; } ApplicationTypeConfig . Key getKey ( ) { } boolean isCompatibleWith ( ApplicationTypeConfig other ) { } class Key { private final ApplicationTypeConfig typeConfig = ApplicationTypeConfig . this ; @ Override public boolean equals ( Object o ) { } @ Override public int hashCode ( ) { } } }

Fix:
public void setConfiguredApplication ( Boolean configuredApplication ) {
Buggy code:
public class StreamRequestVerbHandler implements IVerbHandler { private static Logger logger = LoggerFactory . getLogger ( StreamRequestVerbHandler . class ) ; public void doVerb ( Message message ) { if ( StreamRequestVerbHandler . logger . isDebugEnabled ( ) ) StreamRequestVerbHandler . logger . debug ( "Received<seq2seq4repair_space>a<seq2seq4repair_space>StreamRequestMessage<seq2seq4repair_space>from<seq2seq4repair_space>{}" , message . getFrom ( ) ) ; byte [ ] body = message . getMessageBody ( ) ; ByteArrayInputStream bufIn = new ByteArrayInputStream ( body ) ; try { StreamRequestMessage srm = StreamRequestMessage . serializer ( ) . deserialize ( new DataInputStream ( bufIn ) ) ; if ( StreamRequestVerbHandler . logger . isDebugEnabled ( ) ) StreamRequestVerbHandler . logger . debug ( srm . toString ( ) ) ; StreamOutSession session = StreamOutSession . create ( srm . table , message . getFrom ( ) , srm . sessionId ) ; <START_BUG> StreamOut . transferRangesForRequest ( session , srm . ranges ) ; <END_BUG> } catch ( IOException ex ) { throw new IOError ( ex ) ; } } }

Fix:
StreamOut . transferRangesForRequest ( session , srm . ranges , srm . type ) ;
Buggy code:
abstract class PatchAttributeReadHandler implements OperationStepHandler { @ Override public void execute ( final OperationContext context , final ModelNode operation ) throws OperationFailedException { final PatchInfoService service = ( ( PatchInfoService ) ( context . getServiceRegistry ( false ) . getRequiredService ( NAME ) . getValue ( ) ) ) ; <START_BUG> final PatchInfo info = service . getPatchInfo ( ) ; <END_BUG> final ModelNode result = context . getResult ( ) ; handle ( result , info ) ; context . completeStep ( NOOP_ROLLBACK_HANDLER ) ; } abstract void handle ( ModelNode result , PatchInfo info ) { } }

Fix:
final PatchInfo info = service . getValue ( ) ;
Buggy code:
public class ExpressionStatement extends Statement { public static final ChildPropertyDescriptor EXPRESSION_PROPERTY = new ChildPropertyDescriptor ( ExpressionStatement . class , "expression" , Expression . class , ASTNode . MANDATORY , ASTNode . CYCLE_RISK ) ; private static final List PROPERTY_DESCRIPTORS ; public static List propertyDescriptors ( int apiLevel ) { } private Expression expression = null ; ExpressionStatement ( AST ast ) { } final List internalStructuralPropertiesForType ( int apiLevel ) { } final ASTNode internalGetSetChildProperty ( ChildPropertyDescriptor property , boolean get , ASTNode child ) { } final int getNodeType0 ( ) { } ASTNode clone0 ( AST target ) { ExpressionStatement result = new ExpressionStatement ( target ) ; <START_BUG> result . setSourceRange ( this . getStartPosition ( ) , this . getLength ( ) ) ; <END_BUG> result . copyLeadingComment ( this ) ; result . setExpression ( ( ( Expression ) ( getExpression ( ) . clone ( target ) ) ) ) ; return result ; } final boolean subtreeMatch0 ( ASTMatcher matcher , Object other ) { } void accept0 ( ASTVisitor visitor ) { } public Expression getExpression ( ) { } public void setExpression ( Expression expression ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
result . setSourceRange ( getStartPosition ( ) , getLength ( ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class ListBookedRoomView extends JPanel implements Observer { private JPanel listBookableRoomPanel = new JPanel ( ) ; private JPanel buttonPanel = new JPanel ( ) ; private String [ ] colHeads = new String [ ] { "È¸ÀÇ½Ç<seq2seq4repair_space>ÀÌ¸§" , "½Ã" , "»ó¼¼ÁÖ¼Ò" , "ÃÖ´ë¼ö¿ëÀÎ¿ø" , "°¡°Ý" , "ºÎ´ë½Ã¼³" } ; private Object [ ] [ ] data ; private JTable table ; private JScrollPane jsp ; private DefaultTableModel model ; private JButton askButton = new JButton ( "Á¶È¸ÇÏ±â" ) ; private JButton cancelButton = new JButton ( "¿¹¾àÃë¼ÒÇÏ±â" ) ; public ListBookedRoomView ( ) { } @ Override public void update ( Observable arg0 , Object arg1 ) { <START_BUG> for ( int i = 0 ; i < ( model . getRowCount ( ) ) ; i ++ ) { <END_BUG> model . removeRow ( i ) ; } dataTranslation ( ( ( enterprise . listRoom . listRoomModel ) ( arg0 ) ) . getRL ( ) . getList ( ) ) ; for ( int i = 0 ; i < ( ( ( enterprise . listRoom . listRoomModel ) ( arg0 ) ) . getRL ( ) . getList ( ) . size ( ) ) ; i ++ ) { model . addRow ( data [ i ] ) ; } model . fireTableDataChanged ( ) ; } public void setListBookedRoomListener ( ActionListener listener ) { } void dataTranslation ( ArrayList < Room > rl ) { } public JTable getTable ( ) { } No newline ; at end ; of file ; }

Fix:
for ( int i = ( model . getRowCount ( ) ) - 1 ; i > ( - 1 ) ; i -- ) {
Buggy code:
public class GestureInterpreter implements Subscription { private final String TAG = getClass ( ) . getSimpleName ( ) ; private final Player player ; private final int lastPosition ; private final Seeker seeker ; private final CompositeSubscription subscriptions = new CompositeSubscription ( ) ; public GestureInterpreter ( Player player , int lastPosition ) throws IOException { } public Seeker getSeeker ( ) { } private void hold ( ) { } private void unholdIfHolding ( ) { } private void flingBack ( ) { <START_BUG> if ( ( player . getState ( ) ) != ( PlayerState . PAUSING ) ) <END_BUG> return ; moveToHead ( ) ; } private void moveToHead ( ) { } private void toggle ( ) { } private void pull ( float gradient ) { } public void start ( ) { } public void connectTo ( Observable < GestureEvent > gestures ) { } @ Override public void unsubscribe ( ) { } @ Override public boolean isUnsubscribed ( ) { } }

Fix:
if ( ( ( player . getState ( ) ) != ( PlayerState . PAUSING ) ) || ( seeker . isSeeking ( ) ) )
Buggy code:
public class BusinessLayer implements Runnable { private IConnectionCheck connectionCheck = new ConnectionCheck ( ) ; private Map < Integer , Integer > errorsDuringDay = new HashMap < Integer , Integer > ( ) ; public boolean execute = true ; public boolean error = false ; public Integer count = 0 ; public BusinessLayer ( ) { } private void initialize ( ) { <START_BUG> for ( int i = 1 ; i < 25 ; i ++ ) { <END_BUG> errorsDuringDay . put ( i , 0 ) ; } } public void run ( ) { } public Map < Integer , Integer > getErrorsDuringDay ( ) { } }

Fix:
for ( int i = 0 ; i < 24 ; i ++ ) {
Buggy code:
public class SpUtil { public static String getString ( String spName , String key ) { } public static void putString ( String spName , String key , String value ) { } public static int getInt ( String spName , String key ) { } public static void putInt ( String spName , String key , int value ) { } public static float getFloat ( String spName , String key ) { } public static void putFloat ( String spName , String key , float value ) { } public static long getLong ( String spName , String key ) { } public static void putLong ( String spName , String key , long value ) { } public static boolean getBoolean ( String spName , String key ) { } public static void putBoolean ( String spName , String key , boolean value ) { } public static void remove ( String spName , String key ) { } public static void removeAll ( String spName ) { } private static SharedPreferences getSharedPreferences ( String spName ) { <START_BUG> return com . category . base . BaseApplication . getApplicationBase ( ) . getSharedPreferences ( spName , Context . MODE_PRIVATE ) ; <END_BUG> } }

Fix:
return com . category . base . BaseApplication . getContext ( ) . getSharedPreferences ( spName , Context . MODE_PRIVATE ) ;
Buggy code:
public abstract class OpenLayersMap extends GenericPanel < Map > { private static final Logger logger = LoggerFactory . getLogger ( OpenLayersMap . class ) ; private java . util . Map < Layer , VectorFeatureDataLoadedListener > layerDataLoadedMap = new HashMap < Layer , VectorFeatureDataLoadedListener > ( ) ; private java . util . Map < Layer , VectorFeaturesLoadedListener > layerLoadedMap = new HashMap < Layer , VectorFeaturesLoadedListener > ( ) ; public OpenLayersMap ( final String id , final IModel < Map > model ) { } @ Override protected void onConfigure ( ) { } public void zoomToFeatureExtent ( AjaxRequestTarget target , Vector vector ) { } public void zoomToFeatureExtent ( AjaxRequestTarget target , Vector vector , Number buffer ) { } @ Override public abstract void renderHead ( final IHeaderResponse response ) { } public String renderBeforeConstructorJs ( ) { StringBuilder builder = new StringBuilder ( ) ; Map map = getModelObject ( ) ; if ( map != null ) { for ( Layer layer : map . getLayers ( ) ) { if ( ( ( layer . getSource ( ) ) != null ) && ( ( layer . getSource ( ) ) instanceof VectorSource ) ) { VectorSource vectorSource = ( ( VectorSource ) ( layer . getSource ( ) ) ) ; if ( ( vectorSource . getFeatures ( ) ) != null ) { for ( Feature feature : vectorSource . getFeatures ( ) ) { builder . append ( ( ( ( ( ( ( "var<seq2seq4repair_space>" + ( feature . getJsId ( ) ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>" ) + ( feature . getJsType ( ) ) ) + "(" ) + ( feature . renderJs ( ) ) ) + ");\n" ) ) ; } } } if ( ( ( layer . getSource ( ) ) != null ) && ( ( layer . getSource ( ) ) instanceof ServerVector ) ) { ServerVector vectorSource = ( ( ServerVector ) ( layer . getSource ( ) ) ) ; builder . append ( renderServerVectorJs ( vectorSource , layer ) ) ; } if ( ( ( layer . getSource ( ) ) != null ) && ( ( layer . getSource ( ) ) instanceof Cluster ) ) { Cluster source = ( ( Cluster ) ( layer . getSource ( ) ) ) ; if ( ( source . getSource ( ) ) instanceof ServerVector ) { ServerVector vectorSource = ( ( ServerVector ) ( source . getSource ( ) ) ) ; builder . append ( renderServerVectorJs ( vectorSource , layer ) ) ; } } <START_BUG> builder . append ( ( ( ( ( ( ( layer . getJsId ( ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>" ) + ( layer . getJsType ( ) ) ) + "(" ) + ( layer . renderJs ( ) ) ) + ");\n" ) ) ; <END_BUG> } } return builder . toString ( ) ; } private String renderServerVectorJs ( ServerVector vectorSource , Layer layer ) { } public String renderAfterConstructorJs ( ) { } public String renderJs ( ) { } private String renderClusterLoaderJs ( Map map , Layer layer ) { } }

Fix:
builder . append ( ( ( ( ( ( ( "var<seq2seq4repair_space>" + ( layer . getJsId ( ) ) ) + "<seq2seq4repair_space>=<seq2seq4repair_space>new<seq2seq4repair_space>" ) + ( layer . getJsType ( ) ) ) + "(" ) + ( layer . renderJs ( ) ) ) + ");\n" ) ) ;
Buggy code:
public class SockJsWebSocketHandler implements TextMessageHandler { private static final Log logger = LogFactory . getLog ( SockJsWebSocketHandler . class ) ; private final SockJsConfiguration sockJsConfig ; private final HandlerProvider < WebSocketHandler > handlerProvider ; private AbstractSockJsSession session ; private final ObjectMapper objectMapper = new ObjectMapper ( ) ; public SockJsWebSocketHandler ( SockJsConfiguration config , HandlerProvider < WebSocketHandler > handlerProvider ) { } protected SockJsConfiguration getSockJsConfig ( ) { } @ Override public void afterConnectionEstablished ( WebSocketSession wsSession ) throws Exception { } @ Override public void handleTextMessage ( TextMessage message , WebSocketSession wsSession ) throws Exception { } @ Override public void afterConnectionClosed ( CloseStatus status , WebSocketSession wsSession ) throws Exception { } @ Override public void handleError ( Throwable exception , WebSocketSession webSocketSession ) { } private static String getSockJsSessionId ( WebSocketSession wsSession ) { Assert . notNull ( wsSession , "wsSession<seq2seq4repair_space>is<seq2seq4repair_space>required" ) ; String path = wsSession . getURI ( ) . getPath ( ) ; String [ ] segments = StringUtils . tokenizeToStringArray ( path , "//" ) ; <START_BUG> Assert . isTrue ( ( ( segments . length ) > 3 ) , ( "SockJS<seq2seq4repair_space>request<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>3<seq2seq4repair_space>patgh<seq2seq4repair_space>segments:<seq2seq4repair_space>" + path ) ) ; <END_BUG> return segments [ ( ( segments . length ) - 2 ) ] ; } private class WebSocketServerSockJsSession extends AbstractServerSockJsSession { private final WebSocketSession wsSession ; public WebSocketServerSockJsSession ( WebSocketSession wsSession , SockJsConfiguration sockJsConfig ) throws Exception { } @ Override public boolean isActive ( ) { } @ Override public void sendMessageInternal ( String message ) throws Exception { } @ Override protected void writeFrameInternal ( SockJsFrame frame ) throws Exception { } @ Override protected void disconnect ( CloseStatus status ) throws Exception { } } }

Fix:
Assert . isTrue ( ( ( segments . length ) > 3 ) , ( "SockJS<seq2seq4repair_space>request<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>at<seq2seq4repair_space>least<seq2seq4repair_space>3<seq2seq4repair_space>path<seq2seq4repair_space>segments:<seq2seq4repair_space>" + path ) ) ;
Buggy code:
public final class JApptoolsPin { public static final String VERSION = "1.2.2" ; private Logger logger = Logger . getLogger ( this . getClass ( ) ) ; private Encryption encryption = null ; private ConfigFile configFile = null ; private Administrator administrator = null ; private Mailsender adminMailsender = null ; private static JApptoolsPin instance = null ; protected JApptoolsPin ( ) { } public static JApptoolsPin getInstance ( ) { } public String getKey ( int keyLength ) { } public String encrypt ( String str ) { } public boolean initConfig ( ) { } public boolean initConfig ( String confPath ) { } public boolean initConfig ( String confPath , String confFilename ) { } public boolean initConfig ( String confPath , String confFilename , String logFilename ) { } public boolean initLog ( ) { } public Hashtable < String , String > getParams ( ) { } public Administrator getAdministrator ( ) { } public Serverconf getServerconf ( String serverID ) { } public boolean sendMail ( String subject , ArrayList < String > body , String serverID ) { } public boolean sendAlert ( String subject , ArrayList < String > body ) { boolean rslt = false ; <START_BUG> if ( ! ( administrator . isSendAlert ( ) ) ) <END_BUG> return rslt ; if ( ! ( configFile . isConfigInitialized ( ) ) ) { if ( configFile . isLogInitialized ( ) ) logger . warn ( ResourcesMsg . getLog ( "SendmailNoinit" ) ) ; return rslt ; } if ( ( adminMailsender ) == null ) { Sendmailconf sendMailconf = configFile . getSendmailconf ( ) ; if ( sendMailconf != null ) adminMailsender = new Mailsender ( sendMailconf ) ; } if ( ( adminMailsender ) != null ) rslt = adminMailsender . sendMail ( subject , body , administrator ) ; return rslt ; } public boolean sendAlert ( String subject , String body ) { } }

Fix:
if ( ! ( getAdministrator ( ) . isSendAlert ( ) ) )
Buggy code:
public class ServiceNotification { private final Service service ; private final OrientationCalculator calculator ; public ServiceNotification ( Service service , OrientationCalculator calculator ) { } public void set ( ) { Intents intents = new Intents ( service ) ; <START_BUG> Notification . Builder builder = new Notification . Builder ( service ) . setSmallIcon ( mode ( ) . iconResourceId ( ) ) . setContentIntent ( intents . makePending ( intents . makeIntent ( ToggleRotationLockActivity . class ) ) ) . setContentTitle ( service . getText ( mode ( ) . summaryResourceId ( ) ) ) . setContentText ( service . getText ( mode ( ) . actionDescriptionResourceId ( ) ) ) ; <END_BUG> moveToTop ( builder ) ; hideTimestamp ( builder ) ; hideFromLockScreen ( builder ) ; if ( ( VERSION . SDK_INT ) >= 21 ) builder . setCategory ( CATEGORY_SERVICE ) ; @ SuppressWarnings ( "deprecation" ) Notification notification = builder . getNotification ( ) ; service . startForeground ( SERVICE , notification ) ; } private void hideFromLockScreen ( Notification . Builder builder ) { } private void moveToTop ( Notification . Builder builder ) { } private void hideTimestamp ( Notification . Builder builder ) { } public ServiceNotification . Mode mode ( ) { } public interface Mode { public int iconResourceId ( ) { } public int summaryResourceId ( ) { } public int actionDescriptionResourceId ( ) { } } private class LockedMode implements ServiceNotification . Mode { @ Override public int iconResourceId ( ) { } public boolean isPortrait ( ) { } @ Override public int summaryResourceId ( ) { } @ Override public int actionDescriptionResourceId ( ) { } } private class AutoRotationMode implements ServiceNotification . Mode { @ Override public int iconResourceId ( ) { } @ Override public int summaryResourceId ( ) { } @ Override public int actionDescriptionResourceId ( ) { } } }

Fix:
Notification . Builder builder = new Notification . Builder ( service ) . setSmallIcon ( mode ( ) . iconResourceId ( ) ) . setContentIntent ( intents . makePending ( intents . makeIntent ( ToggleRotationLockActivity . class ) , ACTIVITY ) ) . setContentTitle ( service . getText ( mode ( ) . summaryResourceId ( ) ) ) . setContentText ( service . getText ( mode ( ) . actionDescriptionResourceId ( ) ) ) ;
Buggy code:
public class PinController extends Controller { public static Result checkPin ( String email ) { User user = Session . getCurrentUser ( ctx ( ) ) ; DynamicForm form = Form . form ( ) . bindFromRequest ( ) ; String pin = form . data ( ) . get ( "pin" ) . toString ( ) ; if ( Pin . getPinCode ( user . id ) . equals ( pin ) ) { user . pin . validated = true ; user . update ( ) ; <START_BUG> flash ( "smsValidated" , "Sucess!" ) ; <END_BUG> return redirect ( ( "//user//" + ( user . email ) ) ) ; } flash ( "ErrorPin" , "Wrong<seq2seq4repair_space>PIN!<seq2seq4repair_space>Try<seq2seq4repair_space>again" ) ; return redirect ( "//" ) ; } No newline ; at end ; of file ; }

Fix:
flash ( "smsValidated" , "Your<seq2seq4repair_space>Phone<seq2seq4repair_space>number<seq2seq4repair_space>has<seq2seq4repair_space>now<seq2seq4repair_space>been<seq2seq4repair_space>successfully<seq2seq4repair_space>validated!" ) ;
Buggy code:
public class NamedEnumDescriptor < T extends INamedEnum > implements IDescriptor < T > { @ Override public String getDescription ( T item ) { <START_BUG> return item == null ? null : item . getName ( ) ; <END_BUG> } }

Fix:
return item == null ? "" : item . getName ( ) ;
Buggy code:
@ Beta public final class JSONCodecFactory { private static final Logger LOG = LoggerFactory . getLogger ( JSONCodecFactory . class ) ; private static final JSONCodec < Object > NULL_CODEC = new JSONCodec < Object > ( ) { @ Override public Object deserialize ( final String input ) { } @ Override public String serialize ( final Object input ) { } @ Override public boolean needQuotes ( ) { } @ Override public void serializeToWriter ( JsonWriter writer , Object value ) throws IOException { } } ; private final LoadingCache < DataSchemaNode , JSONCodec < Object > > codecs = CacheBuilder . newBuilder ( ) . softValues ( ) . build ( new CacheLoader < DataSchemaNode , JSONCodec < Object > > ( ) { @ Override public JSONCodec < Object > load ( final DataSchemaNode key ) throws Exception { } } ) ; private final SchemaContext schemaContext ; private final JSONCodec < ? > iidCodec ; private JSONCodecFactory ( final SchemaContext context ) { } public static JSONCodecFactory create ( final SchemaContext context ) { } private static TypeDefinition < ? > resolveBaseTypeFrom ( final TypeDefinition < ? > type ) { } @ SuppressWarnings ( "unchecked" ) private JSONCodec < Object > createCodec ( DataSchemaNode key , TypeDefinition < ? > type ) { } private JSONCodec < Object > createReferencedTypeCodec ( DataSchemaNode schema , LeafrefTypeDefinition type ) { TypeDefinition < ? > referencedType = SchemaContextUtil . getBaseTypeForLeafRef ( type , getSchemaContext ( ) , schema ) ; <START_BUG> return createFromSimpleType ( referencedType ) ; <END_BUG> } @ SuppressWarnings ( "unchecked" ) private JSONCodec < Object > createFromSimpleType ( TypeDefinition < ? > type ) { } SchemaContext getSchemaContext ( ) { } JSONCodec < Object > codecFor ( DataSchemaNode schema ) { } }

Fix:
return createCodec ( schema , referencedType ) ;
Buggy code:
public abstract class VertextTestBase extends TestBase { protected static final int NUM_DEFAULT_PROPERTIES = 2 ; protected static final List < String > PUBLIC_VISIBILITY = ImmutableList . of ( "" ) ; protected static final String PROPERTY_NAME = "http:////lumify.io//test#firstName" ; protected static final String PROPERTY_KEY_PREFIX = "key-firstName-" ; protected static final String PROPERTY_VALUE_PREFIX = "First<seq2seq4repair_space>Name<seq2seq4repair_space>" ; protected static final String EDGE_LABEL1 = "http:////lumify.io//test#worksFor" ; protected static final String EDGE_LABEL2 = "http:////lumify.io//test#sibling" ; protected LumifyApi setupLumifyApi ; protected VertexApi setupVertexApi ; protected EdgeApi setupEdgeApi ; @ Before public void setUp ( ) throws ApiException { } protected List < String > createVertices ( int numVertices , List < String > vertexVisibilities , int numPropertiesPerVertex , List < String > propertyVisibilities ) throws ApiException { LoopingIterator vertexVizIterator = new LoopingIterator ( vertexVisibilities ) ; LoopingIterator propertyVizIterator = new LoopingIterator ( propertyVisibilities ) ; List < String > vertexIds = new ArrayList < > ( ) ; for ( int i = 0 ; i < numVertices ; i ++ ) { <START_BUG> ClientApiElement vertex = setupVertexApi . create ( CONCEPT_TEST_PERSON , ( ( String ) ( vertexVizIterator . next ( ) ) ) ) ; <END_BUG> String vertexId = vertex . getId ( ) ; setVertexProperties ( numPropertiesPerVertex , propertyVizIterator , vertexId ) ; vertexIds . add ( vertexId ) ; } return vertexIds ; } protected List < String > createPublicVertices ( int numVertices , int numPropertiesPerVertex ) throws ApiException { } protected void setVertexProperties ( int numPropertiesPerVertex , LoopingIterator propertyAuthIterator , String vertexId ) throws ApiException { } protected void createEdge ( String sourceVertexId , String destVertexId , String edgeLabel ) throws ApiException { } protected void assertVertexIds ( Collection < String > expectedVertexIds , Collection < ClientApiVertex > actualVertices ) { } }

Fix:
ClientApiElement vertex = setupVertexApi . create ( CONCEPT_PERSON , ( ( String ) ( vertexVizIterator . next ( ) ) ) ) ;
Buggy code:
class ImageList { int handle ; int refCount ; Image [ ] images ; static final int CREATE_FLAGS ; public ImageList ( ) { } public int add ( Image image ) { } int addRef ( ) { } int copyBitmap ( int hImage , int width , int height ) { } int copyIcon ( int hImage , int width , int height ) { } int copyWithAlpha ( int hBitmap , int background , byte [ ] alphaData , int destWidth , int destHeight ) { } int createMask ( int hBitmap , int destWidth , int destHeight , int background , int transparentPixel ) { BITMAP bm = new BITMAP ( ) ; OS . GetObject ( hBitmap , sizeof , bm ) ; int srcWidth = bm . bmWidth ; int srcHeight = bm . bmHeight ; int hMask = OS . CreateBitmap ( destWidth , destHeight , 1 , 1 , null ) ; int hDC = OS . GetDC ( 0 ) ; int hdc1 = OS . CreateCompatibleDC ( hDC ) ; if ( background != ( - 1 ) ) { OS . SelectObject ( hdc1 , hBitmap ) ; boolean isDib = ( bm . bmBits ) != 0 ; byte [ ] originalColors = null ; <START_BUG> if ( ( ( transparentPixel != ( - 1 ) ) && isDib ) && ( ( bm . bmBitsPixel ) <= 8 ) ) { <END_BUG> int maxColors = 1 << ( bm . bmBitsPixel ) ; byte [ ] oldColors = new byte [ maxColors * 4 ] ; OS . GetDIBColorTable ( hdc1 , 0 , maxColors , oldColors ) ; int offset = transparentPixel * 4 ; byte [ ] newColors = new byte [ oldColors . length ] ; newColors [ offset ] = ( ( byte ) ( 255 ) ) ; newColors [ ( offset + 1 ) ] = ( ( byte ) ( 255 ) ) ; newColors [ ( offset + 2 ) ] = ( ( byte ) ( 255 ) ) ; OS . SetDIBColorTable ( hdc1 , 0 , maxColors , newColors ) ; originalColors = oldColors ; OS . SetBkColor ( hdc1 , 16777215 ) ; } else { OS . SetBkColor ( hdc1 , background ) ; } int hdc2 = OS . CreateCompatibleDC ( hDC ) ; OS . SelectObject ( hdc2 , hMask ) ; if ( ( destWidth != srcWidth ) || ( destHeight != srcHeight ) ) { if ( ! ( OS . IsWinCE ) ) OS . SetStretchBltMode ( hdc2 , COLORONCOLOR ) ; OS . StretchBlt ( hdc2 , 0 , 0 , destWidth , destHeight , hdc1 , 0 , 0 , srcWidth , srcHeight , SRCCOPY ) ; } else { OS . BitBlt ( hdc2 , 0 , 0 , destWidth , destHeight , hdc1 , 0 , 0 , SRCCOPY ) ; } OS . DeleteDC ( hdc2 ) ; if ( originalColors != null ) OS . SetDIBColorTable ( hdc1 , 0 , ( 1 << ( bm . bmBitsPixel ) ) , originalColors ) ; } else { int hOldBitmap = OS . SelectObject ( hdc1 , hMask ) ; OS . PatBlt ( hdc1 , 0 , 0 , destWidth , destHeight , BLACKNESS ) ; OS . SelectObject ( hdc1 , hOldBitmap ) ; } OS . ReleaseDC ( 0 , hDC ) ; OS . DeleteDC ( hdc1 ) ; return hMask ; } int createMaskFromAlpha ( ImageData data , int destWidth , int destHeight ) { } public void dispose ( ) { } public Image get ( int index ) { } public int getHandle ( ) { } public Point getImageSize ( ) { } public int indexOf ( Image image ) { } public void put ( int index , Image image ) { } public void remove ( int index ) { } int removeRef ( ) { } void set ( int index , Image image , int count ) { } public int size ( ) { } }

Fix:
if ( ( ( ( ! ( OS . IsWinCE ) ) && ( transparentPixel != ( - 1 ) ) ) && isDib ) && ( ( bm . bmBitsPixel ) <= 8 ) ) {
Buggy code:
public class HtmlProblemFinderTest extends TestCase { public void testProblemFinder ( ) { <START_BUG> final MarkupParser parser = new MarkupParser ( null , new XmlPullParser ( null ) ) { <END_BUG> public void initFilterChain ( ) { appendMarkupFilter ( new HtmlProblemFinder ( HtmlProblemFinder . ERR_THROW_EXCEPTION ) ) ; } } ; try { parser . parse ( "<img<seq2seq4repair_space>src=\"\"//>" ) ; assertTrue ( "Should<seq2seq4repair_space>have<seq2seq4repair_space>thrown<seq2seq4repair_space>an<seq2seq4repair_space>exception" , false ) ; } catch ( Exception ex ) { } } }

Fix:
final MarkupParser parser = new MarkupParser ( null , new XmlPullParser ( ) ) {
Buggy code:
public class DefineOrGetClassNode extends DefineOrGetModuleNode { @ Child private RubyNode superClass ; @ Child private CallDispatchHeadNode inheritedNode ; public DefineOrGetClassNode ( RubyContext context , SourceSection sourceSection , String name , RubyNode lexicalParent , RubyNode superClass ) { } private void callInherited ( VirtualFrame frame , RubyClass superClass , RubyClass subClass ) { } @ Override public Object execute ( VirtualFrame frame ) { notDesignedForCompilation ( ) ; final RubyContext context = getContext ( ) ; RubyModule lexicalParent = getLexicalParentModule ( frame ) ; <START_BUG> final RubyConstant constant = lookupForExistingModule ( frame , lexicalParent ) ; <END_BUG> RubyClass definingClass ; RubyClass superClassObject = getRubySuperClass ( frame , context ) ; if ( constant == null ) { definingClass = new RubyClass ( context , lexicalParent , superClassObject , name ) ; definingClass . setAllocator ( superClassObject . getAllocator ( ) ) ; callInherited ( frame , superClassObject , definingClass ) ; } else { if ( ( constant . getValue ( ) ) instanceof RubyClass ) { definingClass = ( ( RubyClass ) ( constant . getValue ( ) ) ) ; checkSuperClassCompatibility ( context , superClassObject , definingClass ) ; } else { throw new org . jruby . truffle . runtime . control . RaiseException ( context . getCoreLibrary ( ) . typeErrorIsNotA ( constant . getValue ( ) . toString ( ) , "class" , this ) ) ; } } return definingClass ; } private RubyClass getRubySuperClass ( VirtualFrame frame , RubyContext context ) { } private boolean isBlankOrRootClass ( RubyClass rubyClass ) { } private void checkSuperClassCompatibility ( RubyContext context , RubyClass superClassObject , RubyClass definingClass ) { } }

Fix:
final RubyConstant constant = lookupForExistingModule ( lexicalParent ) ;
Buggy code:
public class IterationCounter extends AbstractFunction implements Serializable { private static final List desc = new LinkedList ( ) ; private static final String KEY = "__counter" ; private Object [ ] variables ; private int [ ] counter ; public IterationCounter ( ) { } public Object clone ( ) { } public synchronized String execute ( SampleResult previousResult , Sampler currentSampler ) throws InvalidVariableException { } public void setParameters ( Collection parameters ) throws InvalidVariableException { variables = parameters . toArray ( ) ; if ( ( variables . length ) < 2 ) { <START_BUG> throw new InvalidVariableException ( ) ; <END_BUG> } } public String getReferenceKey ( ) { } public List getArgumentDesc ( ) { } }

Fix:
throw new InvalidVariableException ( "Fewer<seq2seq4repair_space>than<seq2seq4repair_space>2<seq2seq4repair_space>parameters" ) ;