nus-yam/ex-repair huggingface dataset:
Buggy code:
public class PointcutTestCase extends TestCase { public void testMatchJP ( ) { Pointcut p = new Pointcut ( ) { public Object accept ( PatternNodeVisitor visitor , Object data ) { return visitor . visit ( this , data ) ; } public Set couldMatchKinds ( ) { return null ; } public FuzzyBoolean fastMatch ( FastMatchInfo info ) { return null ; } public FuzzyBoolean fastMatch ( Class targetClass ) { return null ; } protected FuzzyBoolean matchInternal ( Shadow shadow ) { return null ; } protected void resolveBindings ( IScope scope , Bindings bindings ) { } protected void resolveBindingsFromRTTI ( ) { } <START_BUG> protected Pointcut concretize1 ( ResolvedType inAspect , IntMap bindings ) { <END_BUG> return null ; } public Pointcut parameterizeWith ( Map typeVariableMap ) { return null ; } protected Test findResidueInternal ( Shadow shadow , ExposedState state ) { return null ; } public void write ( DataOutputStream s ) throws IOException { } } ; Factory f = new Factory ( "PointcutTestCase.java" , PointcutTestCase . class ) ; Signature methodSig = f . makeMethodSig ( "void<seq2seq4repair_space>aMethod()" ) ; JoinPoint . StaticPart jpsp = f . makeSJP ( METHOD_EXECUTION , methodSig , 1 ) ; JoinPoint jp = Factory . makeJP ( jpsp , this , this ) ; try { p . match ( jp , null ) ; fail ( "Expected<seq2seq4repair_space>UnsupportedOperationException<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>thrown" ) ; } catch ( UnsupportedOperationException unEx ) { } try { p . match ( jpsp ) ; fail ( "Expected<seq2seq4repair_space>UnsupportedOperationException<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>thrown" ) ; } catch ( UnsupportedOperationException unEx ) { } } }

Fix:
protected Pointcut concretize1 ( ResolvedType inAspect , ResolvedType declaringType , IntMap bindings ) {
Buggy code:
public class UnaryArithmeticOperatorNode extends UnaryOperatorNode { private static final int UNARY_PLUS = 0 ; private static final int UNARY_MINUS = 1 ; private static final int SQRT = 2 ; private static final int ABSOLUTE = 3 ; private static final String [ ] UNARY_OPERATORS = new String [ ] { "+" , "-" , "SQRT" , "ABS//ABSVAL" } ; private static final String [ ] UNARY_METHODS = new String [ ] { "plus" , "minus" , "sqrt" , "absolute" } ; private int operatorType ; FromList localCopyFromList ; SubqueryList localCopySubqueryList ; Vector localAggregateVector ; public void init ( Object operand ) { } void bindParameter ( ) throws StandardException { } public ValueNode bindExpression ( FromList fromList , SubqueryList subqueryList , Vector aggregateVector ) throws StandardException { localCopyFromList = fromList ; localCopySubqueryList = subqueryList ; localAggregateVector = aggregateVector ; if ( ( ( operand . requiresTypeFromContext ( ) ) && ( ( ( operatorType ) == ( UnaryArithmeticOperatorNode . UNARY_PLUS ) ) || ( ( operatorType ) == ( UnaryArithmeticOperatorNode . UNARY_MINUS ) ) ) ) && ( ( operand . getTypeServices ( ) ) == null ) ) return this ; <START_BUG> super . bindExpression ( fromList , subqueryList , aggregateVector ) ; <END_BUG> if ( ( ( operatorType ) == ( UnaryArithmeticOperatorNode . SQRT ) ) || ( ( operatorType ) == ( UnaryArithmeticOperatorNode . ABSOLUTE ) ) ) { bindSQRTABS ( ) ; } else if ( ( ( operatorType ) == ( UnaryArithmeticOperatorNode . UNARY_PLUS ) ) || ( ( operatorType ) == ( UnaryArithmeticOperatorNode . UNARY_MINUS ) ) ) { TypeId operandType = operand . getTypeId ( ) ; if ( ! ( operandType . isNumericTypeId ( ) ) ) { throw StandardException . newException ( LANG_UNARY_ARITHMETIC_BAD_TYPE , ( ( operatorType ) == ( UnaryArithmeticOperatorNode . UNARY_PLUS ) ? "+" : "-" ) , operandType . getSQLTypeName ( ) ) ; } } super . setType ( operand . getTypeServices ( ) ) ; return this ; } public void generateExpression ( ExpressionClassBuilder acb , MethodBuilder mb ) throws StandardException { } private void bindSQRTABS ( ) throws StandardException { } public void setType ( DataTypeDescriptor descriptor ) throws StandardException { } }

Fix:
bindOperand ( fromList , subqueryList , aggregateVector ) ;
Buggy code:
public class Enemy extends Mobile { protected enum State { Wandering , Staring , Attacking ; } public double vision = 50 ; private Enemy . State _state = Enemy . State . Wandering ; private double player_stare_x = - 1 ; private double player_stare_y = - 1 ; private int player_stare_bc = - 1 ; private int _attack = - 1 ; private double _age = 0 ; protected double baseScore ; public Enemy ( ) { } private int _moveInterval ; public void tick ( long ticks ) { } protected void behave ( long ticks ) { } private void stareAt ( Player p ) { } protected void attack ( long ticks ) { } protected void attackPoint ( double x , double y , long ticks ) { } protected void postAttack ( Player p ) { } private void stare ( long ticks ) { } protected boolean canSee ( Entity e ) { } protected void wander ( long ticks ) { } public void die ( ) { } protected Item chooseItemToDrop ( ) { if ( ( random . nextInt ( 3 ) ) == 0 ) return new com . thomcc . nine . entity . item . HealthPackItem ( getX ( ) , getY ( ) ) ; else if ( ( random . nextInt ( 10 ) ) == 0 ) return new com . thomcc . nine . entity . item . ThreeGunItem ( getX ( ) , getY ( ) ) ; else if ( ( random . nextInt ( 15 ) ) == 0 ) { return new com . thomcc . nine . entity . item . OneUpItem ( getX ( ) , getY ( ) ) ; } else <START_BUG> if ( ( random . nextInt ( 50 ) ) == 0 ) { <END_BUG> return new com . thomcc . nine . entity . item . SuperItem ( getX ( ) , getY ( ) ) ; } else return null ; } public int getScoreValue ( ) { } protected void touched ( Entity e ) { } public boolean appearsOnMinimap ( ) { } public int getColor ( ) { } public void render ( Renderer r ) { } private void setState ( Enemy . State state ) { } }

Fix:
if ( ( random . nextInt ( 30 ) ) == 0 ) {
Buggy code:
public class RNGRendererSWE extends RNGRenderer implements RNGTagVisitor { protected static final String SWE_NS_1 = "http:////www.opengis.net//swe//1.0.1" ; protected static final String SWE_NS_2 = "http:////www.opengis.net//swe//2.0" ; public RNGRendererSWE ( ) { } @ Override public void visit ( RNGElement elt ) { } protected ISensorWidget getWidget ( final String name ) { if ( name . equals ( "Quantity" ) ) { return new SWESensorQuantityWidget ( ) ; } else if ( name . equals ( "Vector" ) ) { return new SWESensorVectorWidget ( ) ; } else if ( name . equals ( "coordinate" ) ) { return new SWESensorCoordinateWidget ( ) ; } else if ( name . equals ( "Time" ) ) { return new SWESensorTimeWidget ( ) ; } else if ( name . equals ( "QuantityRange" ) ) { return new SWESensorQuantityRangeWidget ( ) ; } else if ( name . equals ( "TimeRange" ) ) { return new SWESensorTimeRangeWidget ( ) ; } else if ( name . equals ( "Category" ) ) { return new SWESensorCategoryWidget ( ) ; } else if ( name . equals ( "DataArray" ) ) { return new SWESensorDataArrayWidget ( ) ; } else if ( name . equals ( "Curve" ) ) { return new SWESensorCurveWidget ( ) ; } else <START_BUG> if ( name . equals ( "DataRecord" ) ) { <END_BUG> return new SWESensorDataRecordWidget ( ) ; } else if ( name . equals ( "condition" ) ) { return new SWESensorCondtionWidget ( ) ; } else if ( name . equals ( "position" ) ) { return new SWESensorPositionWidget ( ) ; } else { return super . getWidget ( name ) ; } } No newline ; at end ; of file ; }

Fix:
if ( ( name . equals ( "DataRecord" ) ) || ( name . equals ( "Event" ) ) ) {
Buggy code:
public class Index { private Map < String , List < Resource > > index ; public Index ( ) { } public void add ( Resource res ) { } public List < Resource > getResources ( String keyword ) { if ( keyword == null ) { throw new NullPointerException ( ) ; } if ( keyword . equals ( "" ) ) { throw new IllegalArgumentException ( ) ; } if ( index . containsKey ( keyword ) ) { return index . get ( keyword ) ; } else { <START_BUG> return null ; <END_BUG> } } }

Fix:
return new ArrayList < Resource > ( ) ;
Buggy code:
public class User implements CalendarEventListener , GroupListener { private String givenName ; private String lastName ; private String username ; private String hashResult ; private String salt ; private final int employeeID ; private Calendar calendar ; private static final AtomicInteger count = new AtomicInteger ( 0 ) ; private ArrayList < Group > groups = new ArrayList < Group > ( ) ; Scanner scanner = new Scanner ( System . in ) ; public User ( String givenName , String lastName , String username , String password ) { } private void changeUser ( String newGivenName , String newLastName ) { } private void createGroup ( String name ) { } public String getSalt ( ) { } public String getHashResult ( ) { } public String getUsername ( ) { } public Calendar getCalendar ( ) { } public void setCalendar ( Calendar calendar ) { } public String getName ( ) { } public int getEmployeeID ( ) { } public ArrayList < Group > getGroups ( ) { } public boolean answerInvitation ( ) { } public void addToGroups ( Group group ) { } @ Override public void eventHasChanged ( CalendarEvent event ) { <START_BUG> System . out . println ( ( ( ( ( event . getEventName ( ) ) + "<seq2seq4repair_space>" ) + ( event . getStartDate ( ) ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>changed." ) ) ; <END_BUG> } @ Override public void groupHasChanged ( Group group ) { } }

Fix:
System . out . println ( ( ( ( ( ( ( ( ( ( ( event . getOldName ( ) ) + "<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>changed:<seq2seq4repair_space>" ) + "name:<seq2seq4repair_space>" ) + ( event . getEventName ( ) ) ) + ",<seq2seq4repair_space>start<seq2seq4repair_space>date:<seq2seq4repair_space>" ) + ( event . getStartDate ( ) ) ) + ",<seq2seq4repair_space>end<seq2seq4repair_space>date:<seq2seq4repair_space>" ) + ( event . getEndDate ( ) ) ) + ",<seq2seq4repair_space>room:<seq2seq4repair_space>" ) + ( event . getRoom ( ) . getName ( ) ) ) ) ;
Buggy code:
public class ExternalLink extends HtmlContainer { private final String href ; private final String label ; public ExternalLink ( final String componentName , final String href , final String label ) { } protected void handleComponentTag ( RequestCycle cycle , ComponentTag tag ) { if ( ( href ) != null ) { <START_BUG> tag . put ( "href" , href ) ; <END_BUG> } } protected void handleBody ( RequestCycle cycle , MarkupStream markupStream , ComponentTag openTag ) { } }

Fix:
tag . put ( "href" , href . replaceAll ( "&" , "&amp;" ) ) ;
Buggy code:
public class ConfigFrame extends JDialog implements ActionListener , ListSelectionListener { private FilterListTable listView ; private FilterList filterList ; private JTextField nameTextField = new JTextField ( ) ; private JButton addButton ; private JButton removeButton ; private JButton editButton ; private JButton moveupButton ; private JButton movedownButton ; private JButton importButton ; private JButton exportButton ; private IMailbox folder ; private IFrameMediator mediator ; public ConfigFrame ( IFrameMediator mediator , IMailbox messageFolder ) { } public Filter getSelected ( ) { } public void setSelected ( Filter f ) { } private void initComponents ( ) { } public void valueChanged ( ListSelectionEvent e ) { } public boolean showFilterDialog ( Filter filter ) { } public void actionPerformed ( ActionEvent e ) { String action = e . getActionCommand ( ) ; if ( action . equals ( "CLOSE" ) ) { setVisible ( false ) ; } else if ( action . equals ( "ADD" ) ) { <START_BUG> Filter filter = FilterList . createEmptyFilter ( ) ; <END_BUG> if ( showFilterDialog ( filter ) ) { filterList . add ( filter ) ; listView . update ( ) ; setSelected ( filter ) ; } } else if ( action . equals ( "REMOVE" ) ) { int [ ] selectedRows = listView . getSelectedRows ( ) ; for ( int i = ( selectedRows . length ) - 1 ; i >= 0 ; i -- ) { filterList . remove ( selectedRows [ i ] ) ; } listView . update ( ) ; } else if ( action . equals ( "EDIT" ) ) { editSelectedFilter ( ) ; } else if ( action . equals ( "MOVEUP" ) ) { int [ ] selectedRows = listView . getSelectedRows ( ) ; for ( int i = 0 ; i < ( selectedRows . length ) ; i ++ ) { filterList . move ( selectedRows [ i ] , ( - 1 ) ) ; ( selectedRows [ i ] ) -- ; } listView . setRowSelection ( selectedRows ) ; } else if ( action . equals ( "MOVEDOWN" ) ) { int [ ] selectedRows = listView . getSelectedRows ( ) ; for ( int i = ( selectedRows . length ) - 1 ; i >= 0 ; i -- ) { filterList . move ( selectedRows [ i ] , 1 ) ; ( selectedRows [ i ] ) ++ ; } listView . setRowSelection ( selectedRows ) ; } else if ( action . equals ( "EXPORT" ) ) { exportFilterList ( ) ; } else if ( action . equals ( "IMPORT" ) ) { importFilterList ( ) ; } } private void exportFilterList ( ) { } private void importFilterList ( ) { } private void editSelectedFilter ( ) { } private class MouseTableListener extends MouseAdapter { public void mouseClicked ( MouseEvent e ) { } } private class XmlFileFilter extends FileFilter { public boolean accept ( File f ) { } public String getDescription ( ) { } } }

Fix:
Filter filter = FilterList . createDefaultFilter ( ) ;
Buggy code:
public abstract class FormComponentsPanel extends FormComponent { private static Log log = LogFactory . getLog ( FormComponentsPanel . class ) ; private final Form form ; public FormComponentsPanel ( final String componentName , Form form ) { } public void updateModel ( final RequestCycle cycle ) { } protected List getFormComponents ( ) { } protected final void handleRender ( final RequestCycle cycle ) { final MarkupStream markupStream = findMarkupStream ( ) ; if ( ! ( markupStream . atOpenCloseTag ( ) ) ) { markupStream . throwMarkupException ( "A<seq2seq4repair_space>panel<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>referenced<seq2seq4repair_space>by<seq2seq4repair_space>an<seq2seq4repair_space>openclose<seq2seq4repair_space>tag." ) ; } renderTag ( cycle , markupStream ) ; <START_BUG> renderAssociatedMarkup ( cycle , "panel" , ( "Markup<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>panel<seq2seq4repair_space>component<seq2seq4repair_space>must<seq2seq4repair_space>begin<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>component" + "'<wicket:region<seq2seq4repair_space>name=panel>'" ) ) ; <END_BUG> } final class ChainedValidationDelegate implements IFormValidationDelegate { public FeedbackMessages validate ( Form form ) { } private final void validate ( HtmlContainer component , final FeedbackMessages messages ) { } } }

Fix:
renderAssociatedMarkup ( cycle , "panel" , ( "Markup<seq2seq4repair_space>for<seq2seq4repair_space>a<seq2seq4repair_space>panel<seq2seq4repair_space>component<seq2seq4repair_space>must<seq2seq4repair_space>begin<seq2seq4repair_space>with<seq2seq4repair_space>a<seq2seq4repair_space>component" + "'<wicket:panel>'" ) ) ;
Buggy code:
public class ZWaveBinarySwitchConverter extends ZWaveCommandClassConverter < ZWaveBinarySwitchCommandClass > { private static final Logger logger = LoggerFactory . getLogger ( ZWaveBinarySwitchConverter . class ) ; private static final int REFRESH_INTERVAL = 0 ; public ZWaveBinarySwitchConverter ( ZWaveController controller , EventPublisher eventPublisher ) { } @ Override public SerialMessage executeRefresh ( ZWaveNode node , ZWaveBinarySwitchCommandClass commandClass , int endpointId , Map < String , String > arguments ) { <START_BUG> ZWaveBinarySwitchConverter . logger . debug ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Generating<seq2seq4repair_space>poll<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>for<seq2seq4repair_space>node<seq2seq4repair_space>{}<seq2seq4repair_space>endpoint<seq2seq4repair_space>{}" , node . getNodeId ( ) , commandClass . getCommandClass ( ) . getLabel ( ) , endpointId ) ; <END_BUG> return node . encapsulate ( commandClass . getValueMessage ( ) , commandClass , endpointId ) ; } @ Override public void handleEvent ( ZWaveCommandClassValueEvent event , Item item , Map < String , String > arguments ) { } @ Override public void receiveCommand ( Item item , Command command , ZWaveNode node , ZWaveBinarySwitchCommandClass commandClass , int endpointId , Map < String , String > arguments ) { } @ Override int getRefreshInterval ( ) { } }

Fix:
ZWaveBinarySwitchConverter . logger . debug ( "NODE<seq2seq4repair_space>{}:<seq2seq4repair_space>Generating<seq2seq4repair_space>poll<seq2seq4repair_space>message<seq2seq4repair_space>for<seq2seq4repair_space>{},<seq2seq4repair_space>endpoint<seq2seq4repair_space>{}" , node . getNodeId ( ) , commandClass . getCommandClass ( ) . getLabel ( ) , endpointId ) ;
Buggy code:
public abstract class MatchingTask extends Task { protected boolean useDefaultExcludes = true ; protected FileSet fileset = new FileSet ( ) ; public void setDefaultexcludes ( boolean useDefaultExcludes ) { } public void setExcludes ( String excludes ) throws TaskException { } public void setExcludesfile ( File excludesfile ) throws TaskException { } public void setIncludes ( String includes ) throws TaskException { } public void setIncludesfile ( File includesfile ) throws TaskException { } public NameEntry createExclude ( ) throws TaskException { } public NameEntry createExcludesFile ( ) throws TaskException { } public NameEntry createInclude ( ) throws TaskException { } public NameEntry createIncludesFile ( ) throws TaskException { } public PatternSet createPatternSet ( ) throws TaskException { } protected DirectoryScanner getDirectoryScanner ( File baseDir ) throws TaskException { fileset . setDir ( baseDir ) ; fileset . setDefaultexcludes ( useDefaultExcludes ) ; <START_BUG> return fileset . getDirectoryScanner ( project ) ; <END_BUG> } }

Fix:
return fileset . getDirectoryScanner ( getProject ( ) ) ;
Buggy code:
public class MeasureRenderer implements ListitemRenderer < Measure > { @ Override public void render ( Listitem listitem , Measure measure , int index ) throws Exception { listitem . setValue ( measure ) ; Listcell listcell = new Listcell ( measure . getColumn ( ) ) ; listitem . setDraggable ( TRUE ) ; final Popup popup = new Popup ( ) ; popup . setWidth ( "100px" ) ; popup . setZclass ( STYLE_POPUP ) ; <START_BUG> final Button button = new Button ( "sum" ) ; <END_BUG> measure . setAggregation ( SUM ) ; button . setZclass ( "btn<seq2seq4repair_space>btn-xs" ) ; button . setPopup ( popup ) ; Listbox listbox = new Listbox ( ) ; listbox . setMultiple ( false ) ; List < AGGREGATION > list = new ArrayList < AGGREGATION > ( ) { private static final long serialVersionUID = 1L ; } ; listbox . setModel ( new org . zkoss . zul . ListModelList ( list ) ) ; ListitemRenderer < AGGREGATION > renderer = ( item , agg , ind ) -> { item . setLabel ( agg . toString ( ) ) ; } ; listbox . setItemRenderer ( renderer ) ; EventListener < SelectEvent < Component , AGGREGATION > > selectListener = ( event ) -> { AGGREGATION selectedItem = event . getSelectedObjects ( ) . iterator ( ) . next ( ) ; measure . setAggregation ( selectedItem ) ; button . setLabel ( selectedItem . toString ( ) ) ; popup . close ( ) ; } ; listbox . addEventListener ( ON_SELECT , selectListener ) ; popup . appendChild ( listbox ) ; popup . setParent ( listcell ) ; listcell . setParent ( listitem ) ; listcell . appendChild ( button ) ; } }

Fix:
final Button button = new Button ( "SUM" ) ;
Buggy code:
public class HttpTestSampleGui2 extends HttpTestSampleGui { public HttpTestSampleGui2 ( ) { } public TestElement createTestElement ( ) { } public String getStaticLabel ( ) { <START_BUG> return ( super . getStaticLabel ( ) ) + "<seq2seq4repair_space>HTTPCLient" ; <END_BUG> } }

Fix:
return ( super . getStaticLabel ( ) ) + "<seq2seq4repair_space>HTTPCLient<seq2seq4repair_space>(ALPHA)" ;
Buggy code:
public class Filter extends Task { private String token ; private String value ; private File filtersFile ; public void setToken ( String token ) { } public void setValue ( String value ) { } public void setFiltersfile ( File filtersFile ) { } public void execute ( ) throws BuildException { boolean isFiltersFromFile = ( ( ( filtersFile ) != null ) && ( ( token ) == null ) ) && ( ( value ) == null ) ; boolean isSingleFilter = ( ( ( filtersFile ) == null ) && ( ( token ) != null ) ) && ( ( value ) != null ) ; if ( ( ! isFiltersFromFile ) && ( ! isSingleFilter ) ) { <START_BUG> throw new BuildException ( ( "both<seq2seq4repair_space>token<seq2seq4repair_space>and<seq2seq4repair_space>value<seq2seq4repair_space>parameters,<seq2seq4repair_space>or<seq2seq4repair_space>" + ( "only<seq2seq4repair_space>a<seq2seq4repair_space>filtersFile<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>" + "required" ) ) , location ) ; <END_BUG> } if ( isSingleFilter ) { getProject ( ) . getGlobalFilterSet ( ) . addFilter ( token , value ) ; } if ( isFiltersFromFile ) { readFilters ( ) ; } } protected void readFilters ( ) throws BuildException { } }

Fix:
throw new BuildException ( ( "both<seq2seq4repair_space>token<seq2seq4repair_space>and<seq2seq4repair_space>value<seq2seq4repair_space>parameters,<seq2seq4repair_space>or<seq2seq4repair_space>" + ( "only<seq2seq4repair_space>a<seq2seq4repair_space>filtersFile<seq2seq4repair_space>parameter<seq2seq4repair_space>is<seq2seq4repair_space>" + "required" ) ) , getLocation ( ) ) ;
Buggy code:
class RemoveFolderFromIndex extends IndexRequest { String folderPath ; IPath indexPath ; IndexManager manager ; public RemoveFolderFromIndex ( String folderPath , IPath indexPath , IndexManager manager ) { } public boolean belongsTo ( String jobFamily ) { } public boolean execute ( IProgressMonitor progressMonitor ) { if ( ( progressMonitor != null ) && ( progressMonitor . isCanceled ( ) ) ) return true ; try { <START_BUG> IIndex index = manager . getIndex ( this . indexPath , true , true ) ; <END_BUG> if ( index == null ) return true ; ReadWriteMonitor monitor = manager . getMonitorFor ( index ) ; if ( monitor == null ) return true ; try { monitor . enterRead ( ) ; IQueryResult [ ] results = index . queryInDocumentNames ( this . folderPath ) ; for ( int i = 0 , max = ( results == null ) ? 0 : results . length ; i < max ; i ++ ) manager . remove ( results [ i ] . getPath ( ) , this . indexPath ) ; } finally { monitor . exitRead ( ) ; } } catch ( IOException e ) { if ( JobManager . VERBOSE ) { JobManager . verbose ( ( ( "-><seq2seq4repair_space>failed<seq2seq4repair_space>to<seq2seq4repair_space>remove<seq2seq4repair_space>" + ( this . folderPath ) ) + "<seq2seq4repair_space>from<seq2seq4repair_space>index<seq2seq4repair_space>because<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>following<seq2seq4repair_space>exception:" ) ) ; e . printStackTrace ( ) ; } return false ; } return true ; } public String toString ( ) { } }

Fix:
IIndex index = manager . getIndex ( this . indexPath , true , false ) ;
Buggy code:
public class DeviceSetupPanel extends JPanel { private static final long serialVersionUID = 1L ; private IDroplet droplet ; private final JPanel container ; public DeviceSetupPanel ( IDroplet droplet ) { } private void updatePanels ( ) { container . removeAll ( ) ; container . add ( Box . createRigidArea ( new Dimension ( 10 , 0 ) ) ) ; List < IActionDevice > devices = droplet . getDevices ( IActionDevice . class ) ; Collections . sort ( devices , droplet . getDeviceComparator ( ) ) ; for ( IActionDevice device : devices ) { <START_BUG> ActionDevicePanel < IActionDevice > devicePanel = new ActionDevicePanel < IActionDevice > ( droplet , device ) ; <END_BUG> container . add ( devicePanel ) ; container . add ( Box . createRigidArea ( new Dimension ( 10 , 0 ) ) ) ; } container . add ( Box . createHorizontalGlue ( ) ) ; container . revalidate ( ) ; container . repaint ( ) ; } public IDroplet getDroplet ( ) { } private PropertyChangeListener updateListener = new PropertyChangeListener ( ) { @ Override public void propertyChange ( PropertyChangeEvent evt ) { } } ; public void setDroplet ( IDroplet droplet ) { } private void registerListener ( ) { } private void unregisterListener ( ) { } }

Fix:
ActionDevicePanel < IActionDevice > devicePanel = new ActionDevicePanel < IActionDevice > ( this , droplet , device ) ;
Buggy code:
class ArtNode48 extends ArtNode { public static int count ; public ArtNode48 ( ) { } public ArtNode48 ( final ArtNode48 other ) { } public ArtNode48 ( final ArtNode16 other ) { } @ Override public Node n_clone ( ) { } @ Override public ChildPtr find_child ( byte c ) { } @ Override public Leaf minimum ( ) { int idx = 0 ; <START_BUG> while ( ( keys [ idx ] ) != 0 ) <END_BUG> idx ++ ; Node child = children [ ( ( to_uint ( keys [ idx ] ) ) - 1 ) ] ; return Node . minimum ( child ) ; } @ Override public void add_child ( ChildPtr ref , byte c , Node child , boolean force_clone ) { } @ Override public void iter ( IterCallback cb ) { } @ Override public int decrement_refcount ( ) { } byte [ ] keys = new byte [ 256 ] ; Node [ ] children = new Node [ 48 ] ; }

Fix:
while ( ( keys [ idx ] ) == 0 )
Buggy code:
public final class StreamHandlerFactory implements URLStreamHandlerFactory { public static final String SYS_PROTOCOLS = "java.protocol.handler.pkgs" ; private String protocolString = null ; private Hashtable protocols = new Hashtable ( ) ; private Jdk11Compat jdk11Compat = Jdk11Compat . getJdkCompat ( ) ; public StreamHandlerFactory ( ) { } public URLStreamHandler createURLStreamHandler ( String protoS ) { } private synchronized void loadProtocols ( ) { if ( ( protocolString ) == ( System . getProperty ( StreamHandlerFactory . SYS_PROTOCOLS ) ) ) return ; String protocolS = System . getProperty ( StreamHandlerFactory . SYS_PROTOCOLS ) ; <START_BUG> StringTokenizer tok = new StringTokenizer ( protocolString , "|" ) ; <END_BUG> protocols . clear ( ) ; while ( tok . hasMoreTokens ( ) ) { String protStr = tok . nextToken ( ) ; int hpos = protStr . lastIndexOf ( ".Handler" ) ; if ( hpos >= 0 ) { protStr = protStr . substring ( 0 , hpos ) ; int npos = protStr . lastIndexOf ( '.' ) ; String prot = protStr . substring ( ( hpos + 1 ) ) ; String protC = protStr . substring ( 0 , hpos ) ; protocols . put ( prot , protC ) ; } } protocolString = protocolS ; } public class DummyStreamHandler extends URLStreamHandler { DummyStreamHandler ( ) { } protected URLConnection openConnection ( URL xx ) throws IOException { } } }

Fix:
StringTokenizer tok = new StringTokenizer ( protocolS , "|" ) ;
Buggy code:
public final class MainActivity extends AppCompatActivity implements DeathPage . OnDeathPageInteractionListener , EquipmentPage . OnEquipmentPageInteractionListener , PlayerStatPage . OnPlayerSheetInteractionListener , RewardPage . OnRewardPageInteractionListener , Game . GameListener { final Game game = Game . getInstance ( ) ; final Player player = Player . getInstance ( ) ; final ItemFactory itemFactory = ItemFactory . getInstance ( ) ; DialogFragment gearPage = null ; ItemViewPage itemView = null ; DeathPage deathPage = null ; RewardPage rewardPage = null ; PlayerStatPage playerStatPage = null ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } void initializeGame ( ) { Resources res = getResources ( ) ; Game . initialize ( res , this ) ; Player . initialize ( res ) ; ItemFactory . initialize ( res ) ; gearPage = new EquipmentPage ( ) ; Context context = getApplicationContext ( ) ; itemView = new ItemViewPage ( context ) ; deathPage = new DeathPage ( ) ; <START_BUG> rewardPage = new RewardPage ( context , player ) ; <END_BUG> playerStatPage = ( ( PlayerStatPage ) ( getFragmentManager ( ) . findFragmentById ( R . id . playerStatPage ) ) ) ; playerStatPage . updateUI ( ) ; } private void showEquipmentPage ( ) { } private void showItemTooltip ( ItemButton button ) { } @ Override public void onPlayerSheetButtonClicked ( View view ) { } @ Override public void onGetReward ( Loot loot ) { } @ Override public void onEquipmentPageInteraction ( ItemButton view ) { } @ Override public void onDeathPageInteraction ( View view ) { } @ Override public void onRewardPageClosed ( ) { } @ Override public void onInspectItem ( ItemButton view ) { } @ Override public void onLootReady ( ) { } }

Fix:
rewardPage = new RewardPage ( ) ;
Buggy code:
public class ContentService extends IntentService { private static final String LOG_TAG = ContentService . class . getSimpleName ( ) ; private static final String ACTION_GET_CONTENT = "io.filepicker.services.action.get_content" ; private static final String ACTION_UPLOAD_FILE = "io.filepicker.services.action.upload_file" ; private static final String ACTION_PICK_FILES = "io.filepicker.services.action.pick_files" ; private static final String ACTION_LOGOUT = "io.filepicker.services.action.logout" ; private static final String ACTION_EXPORT_FILE = "io.filepicker.services.action.export_file" ; private static final String EXTRA_NODE = "io.filepicker.services.extra.node" ; private static final String EXTRA_FILENAME = "io.filepicker.services.extra.filename" ; private static final String EXTRA_FILE_URI = "io.filepicker.services.extra.file_uri" ; public ContentService ( ) { } public static void getContent ( Context context , Node node ) { } public static void pickFiles ( Context context , ArrayList < Node > files ) { } public static void uploadFile ( Context context , Uri fileUri ) { } public static void logout ( Context context , Node node ) { } public static void exportFile ( Context context , Node node , Uri fileUri , String filename ) { } @ Override protected void onHandleIntent ( Intent intent ) { } private void handleActionGetContent ( Node node ) { } private void handleActionPickFiles ( ArrayList < Node > nodes ) { } private void handleActionUploadFile ( final Uri uri ) { io . filepicker . api . FpApiClient . getFpApiClient ( this ) . uploadFile ( io . filepicker . utils . Utils . getImageName ( ) , io . filepicker . api . FpApiClient . getJsSession ( this ) , io . filepicker . utils . FilesUtils . getTypedFileFromUri ( this , uri ) , new retrofit . Callback < io . filepicker . models . UploadLocalFileResponse > ( ) { @ Override public void success ( io . filepicker . models . UploadLocalFileResponse object , retrofit . client . Response response ) { ArrayList < io . filepicker . models . FPFile > fpFiles = new ArrayList < > ( ) ; <START_BUG> io . filepicker . models . FPFile fpFile = object . parseToFpFile ( ) ; <END_BUG> fpFile . setLocalPath ( uri . toString ( ) ) ; fpFiles . add ( fpFile ) ; de . greenrobot . event . EventBus . getDefault ( ) . post ( new io . filepicker . events . FpFilesReceivedEvent ( fpFiles ) ) ; } @ Override public void failure ( RetrofitError error ) { handleError ( error ) ; } } ) ; } private void handleActionLogout ( Node node ) { } private void handleActionExportFile ( Node node , Uri fileUri , String filename ) { } private void handleError ( RetrofitError error ) { } }

Fix:
final io . filepicker . models . FPFile fpFile = object . parseToFpFile ( ) ;
Buggy code:
public class MathTools { public static void main ( String [ ] args ) { <START_BUG> System . out . println ( MathTools . divideBy100 ( 303 ) ) ; <END_BUG> } public static String divideBy100 ( Integer in ) { } }

Fix:
System . out . println ( MathTools . divideBy100 ( 2021 ) ) ;
Buggy code:
public final class InvocationOnObjectExpression extends ExpressionBase { private final String _functionName ; private final List < ? extends ExpressionBase > _params ; private final boolean _nullIfFirstParamIsNull ; public InvocationOnObjectExpression ( String functionName , List < ? extends ExpressionBase > params , boolean nullIfFirstParamIsNull , SourcePos sourcePos ) { } @ Override protected Object evaluateInternal ( ExecutionContext ctx ) { final List < Object > params = new ArrayList < Object > ( ) ; for ( ExpressionBase expr : _params ) params . add ( expr . evaluate ( ctx ) ) ; <START_BUG> if ( ( _nullIfFirstParamIsNull ) && ( ( params . get ( 0 ) ) == null ) ) { <END_BUG> ctx . logNullDeRef ( getPos ( ) ) ; return null ; } return ctx . getFunctionDefContext ( ) . invoke ( ctx , _functionName , params ) ; } }

Fix:
if ( ( ( _nullIfFirstParamIsNull ) && ( ( params . size ( ) ) > 0 ) ) && ( ( params . get ( 0 ) ) == null ) ) {
Buggy code:
@ SuppressWarnings ( "all" ) @ Service @ Validated @ Slf4j public class FmuOrderingServiceImpl implements FmuOrderingService { private final EavropRepository eavropRepository ; private final InvanareRepository invanareRepository ; private final DomainEventPublisher domainEventPublisher ; private final Configuration configuration ; private final LandstingRepository landstingRepository ; @ Inject public FmuOrderingServiceImpl ( final EavropRepository eavropRepository , final InvanareRepository invanareRepository , final Configuration configuration , final DomainEventPublisher domainEventPublisher , final LandstingRepository landstingRepository ) { } @ Override public ArendeId createEavrop ( CreateEavropCommand aCommand ) { } @ Transactional private Eavrop saveEavrop ( CreateEavropCommand aCommand ) { EavropProperties props = getEavropProperties ( ) ; Landsting landsting = landstingRepository . findByLandstingCode ( aCommand . getLandstingCode ( ) ) ; if ( landsting == null ) { throw new IllegalArgumentException ( String . format ( "Landsting<seq2seq4repair_space>with<seq2seq4repair_space>id<seq2seq4repair_space>%s<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist" , aCommand . getArendeId ( ) ) ) ; } if ( ( eavropRepository . findByArendeId ( aCommand . getArendeId ( ) ) ) != null ) { throw new IllegalArgumentException ( String . format ( "Eavrop<seq2seq4repair_space>with<seq2seq4repair_space>arendeId<seq2seq4repair_space>%s<seq2seq4repair_space>already<seq2seq4repair_space>exist" , aCommand . getArendeId ( ) ) ) ; } Eavrop eavrop = EavropBuilder . eavrop ( ) . withArendeId ( aCommand . getArendeId ( ) ) . withUtredningType ( aCommand . getUtredningType ( ) ) . withInvanare ( aCommand . getInvanare ( ) ) . withLandsting ( landsting ) . withBestallaradministrator ( aCommand . getBestallaradministrator ( ) ) . withInterpreter ( aCommand . getInterpreter ( ) ) . withEavropProperties ( props ) . withDescription ( aCommand . getDescription ( ) ) . withUtredningFocus ( aCommand . getUtredningFocus ( ) ) . withAdditionalInformation ( aCommand . getAdditionalInformation ( ) ) . withPriorMedicalExamination ( aCommand . getPriorMedicalExamination ( ) ) . build ( ) ; eavrop = eavropRepository . save ( eavrop ) ; <START_BUG> log . debug ( String . format ( "eavrop<seq2seq4repair_space>created<seq2seq4repair_space>::<seq2seq4repair_space>%s" , eavrop ) ) ; <END_BUG> return eavrop ; } private void handleEavropCreated ( EavropId eavropId , ArendeId arendeId ) { } private EavropProperties getEavropProperties ( ) { } private Configuration getConfiguration ( ) { } }

Fix:
log . debug ( String . format ( "eavrop<seq2seq4repair_space>with<seq2seq4repair_space>arendeId<seq2seq4repair_space>%s<seq2seq4repair_space>created" , eavrop . getArendeId ( ) ) ) ;
Buggy code:
public class ExpressionFinder extends QuestionAnswerAdaptor < Integer , PExp > { protected IInterpreterAssistantFactory af ; public ExpressionFinder ( IInterpreterAssistantFactory af ) { } @ Override public PExp caseAAssignmentDefinition ( AAssignmentDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAClassInvariantDefinition ( AClassInvariantDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp defaultSClassDefinition ( SClassDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAEqualsDefinition ( AEqualsDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAExplicitFunctionDefinition ( AExplicitFunctionDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAExplicitOperationDefinition ( AExplicitOperationDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAImplicitFunctionDefinition ( AImplicitFunctionDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAImplicitOperationDefinition ( AImplicitOperationDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAInstanceVariableDefinition ( AInstanceVariableDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAPerSyncDefinition ( APerSyncDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAStateDefinition ( AStateDefinition def , Integer lineno ) throws AnalysisException { <START_BUG> if ( ( def . getInitExpression ( ) ) != null ) { <END_BUG> PExp found = af . createPExpAssistant ( ) . findExpression ( def . getInvExpression ( ) , lineno ) ; if ( found != null ) { return found ; } } if ( ( def . getInitExpression ( ) ) != null ) { if ( ( def . getInitExpression ( ) ) instanceof AEqualsBinaryExp ) { AEqualsBinaryExp ee = ( ( AEqualsBinaryExp ) ( def . getInitExpression ( ) ) ) ; PExp found = af . createPExpAssistant ( ) . findExpression ( ee . getRight ( ) , lineno ) ; if ( found != null ) { return found ; } } } return null ; } @ Override public PExp caseAThreadDefinition ( AThreadDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseATypeDefinition ( ATypeDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp caseAValueDefinition ( AValueDefinition def , Integer lineno ) throws AnalysisException { } @ Override public PExp defaultPDefinition ( PDefinition node , Integer question ) throws AnalysisException { } @ Override public PExp createNewReturnValue ( INode node , Integer question ) throws AnalysisException { } @ Override public PExp createNewReturnValue ( Object node , Integer question ) throws AnalysisException { } }

Fix:
if ( ( def . getInvExpression ( ) ) != null ) {
Buggy code:
public class LSAProcessor { private static LSAProcessor processor ; int sequenceNumber ; Configuration config ; NetworkInfo netInfo ; public static HashMap < Integer , HashMap < Integer , LSA > > receivedLSAHistoryTable = new HashMap < Integer , HashMap < Integer , LSA > > ( ) ; private LSAProcessor ( Configuration config , NetworkInfo netInfo ) { } public static LSAProcessor getInstance ( Configuration inConfig , NetworkInfo inNetInfo ) { } public LSA createLSA ( ) { } public void broadcastLSA ( LSA lsa ) { try { synchronized ( netInfo ) { HashMap < Integer , RouterData > neighbors = netInfo . getNeighbors ( ) ; for ( Integer key : neighbors . keySet ( ) ) { RouterData rData = neighbors . get ( key ) ; if ( ( rData . routerID ) != ( lsa . router ) ) { rData . ipAddress = rData . ipAddress . replaceFirst ( "//" , "" ) ; System . out . println ( ( ( ( ( ( "About<seq2seq4repair_space>to<seq2seq4repair_space>send<seq2seq4repair_space>LSA<seq2seq4repair_space>to<seq2seq4repair_space>router<seq2seq4repair_space>id<seq2seq4repair_space>" + ( rData . routerID ) ) + ",<seq2seq4repair_space>" ) + ( rData . ipAddress ) ) + ",<seq2seq4repair_space>" ) + ( rData . port ) ) ) ; SocketBundle client = NetUtils . clientSocket ( rData . ipAddress , rData . port ) ; lsa . forward ( client . out ) ; } } } <START_BUG> } catch ( IOException e ) { <END_BUG> e . printStackTrace ( ) ; } } public void processLSA ( LSA lsa ) throws IOException { } public static Boolean getProbabilityByPercent ( int rate ) { } }

Fix:
} catch ( Exception e ) {
Buggy code:
public class MissileWeaponTest { private final List < MissileWeapon > allMissileWeapons = ItemDB . lookup ( MissileWeapon . class ) ; @ Test public void testGetNumCriticalSlots ( ) { } @ Test public void testGetMass ( ) { } @ Test public void testGetRangeZero ( ) { } @ Test public void testGetRangeMax ( ) { } @ Test public void testIsArtemisCapable ( ) { } @ Test public void testNotArtemisMissiles ( ) { } @ Test public void testGetDamagePerShot_lrm20 ( ) throws Exception { } @ Test public void testGetShotsPerVolley_lrm10 ( ) throws Exception { } @ Test public void testGetSecondsPerShot_srm6 ( ) throws Exception { } @ Test public void testGetSecondsPerShot_csrm6 ( ) throws Exception { } @ Test public void testGetSecondsPerShot_cssrm6 ( ) throws Exception { } @ Test public void testGetSecondsPerShot_clrm20 ( ) throws Exception { Weapon cut = ( ( Weapon ) ( ItemDB . lookup ( "C-LRM<seq2seq4repair_space>20" ) ) ) ; <START_BUG> double expected = ( cut . getCoolDown ( null ) ) + ( 20 * 0.05 ) ; <END_BUG> assertEquals ( expected , cut . getSecondsPerShot ( null ) , 0.0 ) ; } @ Test public void testGetRangeEffectivity_lrm20 ( ) throws Exception { } @ Test public void testGetRangeEffectivity_srm6 ( ) throws Exception { } }

Fix:
double expected = ( cut . getCoolDown ( null ) ) + ( 19 * 0.05 ) ;
Buggy code:
public class ClientUtils { public static final String TEXT_XML = "text//xml;<seq2seq4repair_space>charset=utf-8" ; public static Collection < ContentStream > toContentStreams ( final String str , final String contentType ) { } public static SolrInputDocument toSolrInputDocument ( SolrDocument d ) { } public static SolrDocument toSolrDocument ( SolrInputDocument d ) { } public static void writeXML ( SolrInputDocument doc , Writer writer ) throws IOException { } public static String toXML ( SolrInputDocument doc ) { } public static final Collection < String > fmts = DateUtil . DEFAULT_DATE_FORMATS ; public static Date parseDate ( String d ) throws ParseException , DateParseException { } public static DateFormat getThreadLocalDateFormat ( ) { } public static TimeZone UTC = DateUtil . UTC ; public static String escapeQueryChars ( String s ) { StringBuilder sb = new StringBuilder ( ) ; for ( int i = 0 ; i < ( s . length ( ) ) ; i ++ ) { char c = s . charAt ( i ) ; <START_BUG> if ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( c == '\\' ) || ( c == '+' ) ) || ( c == '-' ) ) || ( c == '!' ) ) || ( c == '(' ) ) || ( c == ')' ) ) || ( c == ':' ) ) || ( c == '^' ) ) || ( c == '[' ) ) || ( c == ']' ) ) || ( c == '\"' ) ) || ( c == '{' ) ) || ( c == '}' ) ) || ( c == '~' ) ) || ( c == '*' ) ) || ( c == '?' ) ) || ( c == '|' ) ) || ( c == '&' ) ) || ( Character . isWhitespace ( c ) ) ) { <END_BUG> sb . append ( '\\' ) ; } sb . append ( c ) ; } return sb . toString ( ) ; } public static String toQueryString ( SolrParams params , boolean xml ) { } }

Fix:
if ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( c == '\\' ) || ( c == '+' ) ) || ( c == '-' ) ) || ( c == '!' ) ) || ( c == '(' ) ) || ( c == ')' ) ) || ( c == ':' ) ) || ( c == '^' ) ) || ( c == '[' ) ) || ( c == ']' ) ) || ( c == '\"' ) ) || ( c == '{' ) ) || ( c == '}' ) ) || ( c == '~' ) ) || ( c == '*' ) ) || ( c == '?' ) ) || ( c == '|' ) ) || ( c == '&' ) ) || ( c == ';' ) ) || ( Character . isWhitespace ( c ) ) ) {
Buggy code:
public class BlockeyPlayerListener extends PlayerListener { public static Blockey plugin ; public int tasknumber ; public BlockeyPlayerListener ( Blockey instance ) { } public void onPlayerMove ( PlayerMoveEvent event ) { Player player = event . getPlayer ( ) ; if ( ( BlockeyPlayerListener . plugin . registered ( player ) ) && ( player . equals ( BlockeyPlayerListener . plugin . getCarrier ( ) ) ) ) { Location start = event . getFrom ( ) ; Location end = event . getTo ( ) ; <START_BUG> if ( ( ( start . getX ( ) ) != ( end . getX ( ) ) ) || ( ( start . getY ( ) ) != ( end . getY ( ) ) ) ) { <END_BUG> event . setCancelled ( true ) ; } } } public void onPlayerDropItem ( PlayerDropItemEvent event ) { } public void onPlayerPickupItem ( PlayerPickupItemEvent event ) { } public class PlayerTimer implements Runnable { public PlayerTimer ( ) { } public void run ( ) { } } }

Fix:
if ( ( ( start . getX ( ) ) != ( end . getX ( ) ) ) || ( ( start . getZ ( ) ) != ( end . getZ ( ) ) ) ) {
Buggy code:
public class TestIndexWriterOnDiskFull extends LuceneTestCase { public void testAddDocumentOnDiskFull ( ) throws IOException { } public void testAddIndexOnDiskFull ( ) throws IOException { } private static class FailTwiceDuringMerge extends MockDirectoryWrapper . Failure { public boolean didFail1 ; public boolean didFail2 ; @ Override public void eval ( MockDirectoryWrapper dir ) throws IOException { } } public void testCorruptionAfterDiskFullDuringMerge ( ) throws IOException { MockDirectoryWrapper dir = newDirectory ( ) ; IndexWriter w = new IndexWriter ( dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random ) ) . setMergeScheduler ( new SerialMergeScheduler ( ) ) . setReaderPooling ( true ) . setMergePolicy ( newLogMergePolicy ( 2 ) ) ) ; _TestUtil . keepFullyDeletedSegments ( w ) ; Document doc = new Document ( ) ; doc . add ( newField ( "f" , "doctor<seq2seq4repair_space>who" , YES , ANALYZED ) ) ; w . addDocument ( doc ) ; w . commit ( ) ; w . deleteDocuments ( new Term ( "f" , "who" ) ) ; w . addDocument ( doc ) ; TestIndexWriterOnDiskFull . FailTwiceDuringMerge ftdm = new TestIndexWriterOnDiskFull . FailTwiceDuringMerge ( ) ; ftdm . setDoFail ( ) ; dir . failOn ( ftdm ) ; try { w . commit ( ) ; fail ( "fake<seq2seq4repair_space>disk<seq2seq4repair_space>full<seq2seq4repair_space>IOExceptions<seq2seq4repair_space>not<seq2seq4repair_space>hit" ) ; } catch ( IOException ioe ) { <START_BUG> assertTrue ( ftdm . didFail1 ) ; <END_BUG> } _TestUtil . checkIndex ( dir ) ; ftdm . clearDoFail ( ) ; w . addDocument ( doc ) ; w . close ( ) ; dir . close ( ) ; } public void testImmediateDiskFull ( ) throws IOException { } private void addDoc ( IndexWriter writer ) throws IOException { } private void addDocWithIndex ( IndexWriter writer , int index ) throws IOException { } }

Fix:
assertTrue ( ( ( ftdm . didFail1 ) || ( ftdm . didFail2 ) ) ) ;
Buggy code:
public class IlluminaTransformer implements FileSetTransformer < String , String , File > { protected static final Logger log = LoggerFactory . getLogger ( IlluminaTransformer . class ) ; private Map < String , String > finishedCache = new HashMap < > ( ) ; private final Pattern runCompleteLogPattern = Pattern . compile ( "(\\d{1,2}\\//\\d{1,2}\\//\\d{4},\\d{2}:\\d{2}:\\d{2})\\.\\d{3},\\d+,\\d+,\\d+,Proce[s||e]sing\\s+completed\\.\\s+Run\\s+has\\s+finished\\." ) ; private final Pattern lastDateEntryLogPattern = Pattern . compile ( "(\\d{1,2}\\//\\d{1,2}\\//\\d{4},\\d{2}:\\d{2}:\\d{2})\\.\\d{3},\\d+,\\d+,\\d+,.*" ) ; private final DateFormat logDateFormat = new SimpleDateFormat ( "MM'//'dd'//'yyyy','HH:mm:ss" ) ; public Map < String , String > transform ( Message < Set < File > > message ) { } @ Override public Map < String , String > transform ( Set < File > files ) { } private void checkDates ( File rootFile , JSONObject run ) throws IOException { } private Boolean checkLogs ( File rootFile , JSONObject run ) throws IOException { } private JSONObject parseInterOp ( File rootFile ) throws IOException { MetrixContainer mc = new MetrixContainer ( rootFile . getAbsolutePath ( ) ) ; <START_BUG> return new nki . decorators . MetrixContainerDecorator ( mc ) . toJSON ( ) ; <END_BUG> } public JSONArray transformInterOpOnly ( Set < File > files ) { } public byte [ ] transformToJson ( Set < File > files ) { } public Message < Set < String > > runStatusFilesToStringSetMessage ( Message < Set < File > > message ) { } public Message < Set < String > > runCompletedFilesToStringSetMessage ( Message < Set < File > > message ) { } public Set < String > runStatusJobToStringSet ( JobExecution exec ) { } public Set < String > runCompletedJobToStringSet ( JobExecution exec ) { } }

Fix:
return JSONObject . fromObject ( new nki . decorators . MetrixContainerDecorator ( mc ) ) ;