nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BoosterGet extends AsyncTask < Void , Void , String > { Context mContext ; Exception except = null ; ListView list ; boolean isActiveOnly ; ProgressBar bar ; TextView tooltip ; public BoosterGet ( Context context , ListView listView , boolean isActive , ProgressBar bars , TextView tooltips ) { } @ Override protected String doInBackground ( Void ... params ) { } protected void onPostExecute ( String json ) { } private void checkIfComplete ( ) { if ( ( ( MainStaticVars . tmpBooster ) == ( MainStaticVars . numOfBoosters ) ) && ( ! ( MainStaticVars . parseRes ) ) ) { MainStaticVars . parseRes = true ; MainStaticVars . boosterUpdated = true ; MainStaticVars . inProg = false ; if ( ! ( isActiveOnly ) ) { BoosterDescListAdapter adapter = new BoosterDescListAdapter ( mContext , layout . listview_booster_desc , MainStaticVars . boosterList ) ; list . setAdapter ( adapter ) ; bar . setVisibility ( GONE ) ; } else { ArrayList < BoosterDescription > tmp = new ArrayList < > ( ) ; for ( BoosterDescription desc : MainStaticVars . boosterList ) { tmp . add ( desc ) ; } Iterator < BoosterDescription > iter = tmp . iterator ( ) ; while ( iter . hasNext ( ) ) { BoosterDescription desc = iter . next ( ) ; if ( ! ( desc . checkIfBoosterActive ( ) ) ) iter . remove ( ) ; } BoosterDescListAdapter adapter = new BoosterDescListAdapter ( mContext , layout . listview_booster_desc , tmp ) ; list . setAdapter ( adapter ) ; tooltip . setVisibility ( INVISIBLE ) ; bar . setVisibility ( GONE ) ; MainStaticVars . parseRes = false ; } } <START_BUG> if ( MainStaticVars . parseRes ) { <END_BUG> tooltip . setVisibility ( VISIBLE ) ; tooltip . setText ( ( ( ( "Processed<seq2seq4repair_space>Player<seq2seq4repair_space>" + ( MainStaticVars . boosterProcessCounter ) ) + "//" ) + ( MainStaticVars . boosterMaxProcessCounter ) ) ) ; } } }

Fix:
if ( MainStaticVars . inProg ) {
Buggy code:
public class JTSUtil { public static LeafletLayer toLayer ( Geometry geom ) { } public static Collection < LeafletLayer > toLayers ( Geometry geom ) { } private static LMarker toLMarker ( Point point ) { } private static LPolyline toPolyline ( LineString lineString ) { } public static LPolygon toPolygon ( Polygon polygon ) { } public static LPolygon toPolygon ( LinearRing polygon ) { } private static org . vaadin . addon . leaflet . shared . Point [ ] toPointArray ( Coordinate [ ] coords ) { } public static org . vaadin . addon . leaflet . shared . Point [ ] toLeafletPointArray ( LineString path ) { } public static LineString toLineString ( org . vaadin . addon . leaflet . shared [ ] points ) { } public static LineString toLineString ( LPolyline polyline ) { } public static LinearRing toLinearRing ( LPolygon polygon ) { } public static Polygon toPolygon ( LPolygon polygon ) { org . vaadin . addon . leaflet . shared . Point [ ] points = polygon . getPoints ( ) ; if ( ( points . length ) == 0 ) { return null ; } List < PointArray > holes = polygon . getHoles ( ) ; if ( holes . isEmpty ( ) ) { return JTSUtil . getGeometryFactory ( ) . createPolygon ( JTSUtil . toLinearRing ( points ) ) ; } else { LinearRing [ ] holesLr = new LinearRing [ holes . size ( ) ] ; for ( int i = 0 ; i < ( holes . size ( ) ) ; i ++ ) { <START_BUG> holesLr [ i ] = JTSUtil . toLinearRing ( holes . get ( 0 ) . toArray ( new org . vaadin . addon . leaflet . shared . Point [ holes . get ( 0 ) . size ( ) ] ) ) ; <END_BUG> } return JTSUtil . getGeometryFactory ( ) . createPolygon ( JTSUtil . toLinearRing ( points ) , holesLr ) ; } } private static LinearRing toLinearRing ( org . vaadin . addon . leaflet . shared . Point [ ] points ) { } private static GeometryFactory getGeometryFactory ( ) { } public static org . vaadin . addon . leaflet . shared . Point toPoint ( org . vaadin . addon . leaflet . shared . Point p ) { } public static org . vaadin . addon . leaflet . shared . Point toPoint ( LMarker lMarker ) { } public static org . vaadin . addon . leaflet . shared . Point toLeafletPoint ( Point location ) { } public static Bounds getBounds ( Geometry geometry ) { } private static Geometry toGeometry ( String wellKnownText ) throws ParseException { } public static LeafletLayer toLayer ( String wellKnownText ) throws ParseException { } }

Fix:
holesLr [ i ] = JTSUtil . toLinearRing ( holes . get ( i ) . toArray ( new org . vaadin . addon . leaflet . shared . Point [ holes . get ( i ) . size ( ) ] ) ) ;
Buggy code:
public class InheritanceHeadTest extends WicketTestCase { public InheritanceHeadTest ( String name ) { } public void test_1 ( ) throws Exception { } public void test_2 ( ) throws Exception { } public void test_3 ( ) throws Exception { tester = new WicketTester ( new WebApplication ( ) { public Session newSession ( Request request , Response response ) { <START_BUG> return new org . apache . wicket . protocol . http . WebSession ( this , request ) . setStyle ( "myStyle" ) ; <END_BUG> } public Class getHomePage ( ) { return ConcretePage2 . class ; } protected WebResponse newWebResponse ( HttpServletResponse servletResponse ) { return new WebResponse ( servletResponse ) ; } } ) ; executeTest ( ConcretePage2 . class , "ExpectedResult3.html" ) ; } }

Fix:
return new org . apache . wicket . protocol . http . WebSession ( this , request , response ) . setStyle ( "myStyle" ) ;
Buggy code:
@ Entity public class AccountValidation extends Model implements PathBindable < AccountValidation > { private static final long serialVersionUID = 1L ; @ Id public int idAccountValidation ; public Date addDate ; public String codeGenerated ; public boolean isActivated ; public String personActivate ; @ ManyToOne public User user ; public static Finder < Integer , AccountValidation > find = new Finder < Integer , AccountValidation > ( Integer . class , AccountValidation . class ) ; public static AccountValidation findById ( int id ) { } public static Page < AccountValidation > find ( int page ) { } public static String generateCode ( ) { } public static AccountValidation checkCode ( String code ) { } public static boolean confirmCode ( String code ) { AccountValidation account = AccountValidation . checkCode ( code ) ; BonusRule bonusForSponsor = BonusRule . findByID ( "1" ) ; if ( account != null ) { System . out . println ( "Co<seq2seq4repair_space>code<seq2seq4repair_space>trong<seq2seq4repair_space>bd" ) ; if ( ! ( account . isActivated ) ) { if ( ! ( account . personActivate . equals ( "admin" ) ) ) { account . isActivated = true ; account . user . bonus += bonusForSponsor . bonus ; account . user . update ( ) ; account . update ( ) ; } else { System . out . println ( "admin<seq2seq4repair_space>ko<seq2seq4repair_space>dc<seq2seq4repair_space>activate<seq2seq4repair_space>code" ) ; account . isActivated = true ; account . update ( ) ; } } else { System . out . println ( "Account<seq2seq4repair_space>da<seq2seq4repair_space>activate" ) ; return false ; } } else { <START_BUG> System . out . println ( "KO<seq2seq4repair_space>tim<seq2seq4repair_space>thay<seq2seq4repair_space>code<seq2seq4repair_space>trong<seq2seq4repair_space>bd" ) ; <END_BUG> return false ; } return true ; } public static List < AccountValidation > findAccountByUser ( String userName ) { } public static boolean countList ( String userName ) { } public static boolean saveCode ( User user , String codePosted ) { } @ Override public AccountValidation bind ( String key , String value ) { } @ Override public String javascriptUnbind ( ) { } @ Override public String unbind ( String arg0 ) { } }

Fix:
System . out . println ( "Code<seq2seq4repair_space>parrainage<seq2seq4repair_space>Introuvable" ) ;
Buggy code:
public class SaveService { private static XStream saver = new XStream ( ) ; private static Logger log = LoggingManager . getLoggerForClass ( ) ; static String version = "1.0" ; static String propertiesVersion = "" ; private static final String PROPVERSION = "1.7" ; private static void makeAlias ( String alias , String clazz ) { } private static void initProps ( ) { } public static void saveTree ( HashTree tree , Writer writer ) throws Exception { } public static void saveElement ( Object el , Writer writer ) throws Exception { } public static Object loadElement ( InputStream in ) throws Exception { } public static Object loadElement ( Reader in ) throws Exception { } public static synchronized void saveSampleResult ( SampleResult res , Writer writer ) throws Exception { } public static synchronized void saveTestElement ( TestElement elem , Writer writer ) throws Exception { } static boolean versionsOK = true ; private static final String REVPFX = "$Revision:<seq2seq4repair_space>" ; private static final String REVSFX = "<seq2seq4repair_space>$" ; private static String extractVersion ( String rev ) { } private static void checkVersion ( Class clazz , String expected ) { } private static void checkVersions ( ) { SaveService . versionsOK = true ; SaveService . checkVersion ( BooleanPropertyConverter . class , "1.4" ) ; SaveService . checkVersion ( HashTreeConverter . class , "1.2" ) ; SaveService . checkVersion ( IntegerPropertyConverter . class , "1.3" ) ; SaveService . checkVersion ( LongPropertyConverter . class , "1.3" ) ; SaveService . checkVersion ( MultiPropertyConverter . class , "1.3" ) ; SaveService . checkVersion ( SampleResultConverter . class , "1.7" ) ; SaveService . checkVersion ( StringPropertyConverter . class , "1.6" ) ; SaveService . checkVersion ( TestElementConverter . class , "1.2" ) ; <START_BUG> SaveService . checkVersion ( TestElementPropertyConverter . class , "1.4" ) ; <END_BUG> SaveService . checkVersion ( ScriptWrapperConverter . class , "1.3" ) ; if ( ! ( SaveService . PROPVERSION . equalsIgnoreCase ( SaveService . propertiesVersion ) ) ) { SaveService . log . warn ( ( ( ( "Property<seq2seq4repair_space>file<seq2seq4repair_space>-<seq2seq4repair_space>expected<seq2seq4repair_space>" + ( SaveService . PROPVERSION ) ) + ",<seq2seq4repair_space>found<seq2seq4repair_space>" ) + ( SaveService . propertiesVersion ) ) ) ; } if ( SaveService . versionsOK ) { SaveService . log . info ( "All<seq2seq4repair_space>converter<seq2seq4repair_space>versions<seq2seq4repair_space>present<seq2seq4repair_space>and<seq2seq4repair_space>correct" ) ; } } public static TestResultWrapper loadTestResults ( InputStream reader ) throws Exception { } public static HashTree loadTree ( InputStream reader ) throws Exception { } public static boolean isSaveTestPlanFormat20 ( ) { } public static boolean isSaveTestLogFormat20 ( ) { } public static class Test extends JMeterTestCase { public Test ( ) { } public Test ( String name ) { } public void testVersions ( ) throws Exception { } } }

Fix:
SaveService . checkVersion ( TestElementPropertyConverter . class , "1.5" ) ;
Buggy code:
public class GtasksLoginActivity extends ListActivity { @ Autowired private GtasksPreferenceService gtasksPreferenceService ; @ Autowired private SyncV2Service syncService ; private GoogleAccountManager accountManager ; private String [ ] nameArray ; private String authToken ; private String accountName ; public GtasksLoginActivity ( ) { } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onListItemClick ( ListView l , View v , int position , long id ) { super . onListItemClick ( l , v , position , id ) ; final ProgressDialog pd = DialogUtilities . progressDialog ( this , this . getString ( gtasks_GLA_authenticating ) ) ; pd . show ( ) ; <START_BUG> final Account a = accountManager . getAccountByName ( nameArray [ position ] ) ; <END_BUG> accountName = a . name ; getAuthToken ( a , pd ) ; } private void getAuthToken ( Account a , final ProgressDialog pd ) { } private void onAuthCancel ( ) { } private void onAuthTokenSuccess ( ) { } protected void synchronize ( ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } private static final int REQUEST_AUTHENTICATE = 0 ; @ Override protected void onActivityResult ( int requestCode , int resultCode , Intent data ) { } No newline ; at end ; of file ; }

Fix:
final Account a = accountManager . getAccountByName ( nameArray [ ( position - 1 ) ] ) ;
Buggy code:
public class TreeEditor extends ControlEditor { Tree tree ; TreeItem item ; int column = 0 ; ControlListener columnListener ; TreeListener treeListener ; public TreeEditor ( Tree tree ) { } Rectangle computeBounds ( ) { } public void dispose ( ) { } public int getColumn ( ) { } public TreeItem getItem ( ) { } public void setColumn ( int column ) { } public void setItem ( TreeItem item ) { } public void setEditor ( Control editor , TreeItem item , int column ) { } public void setEditor ( Control editor , TreeItem item ) { } public void layout ( ) { <START_BUG> if ( tree . isDisposed ( ) ) <END_BUG> return ; if ( ( ( item ) == null ) || ( item . isDisposed ( ) ) ) return ; int columnCount = tree . getColumnCount ( ) ; if ( ( columnCount == 0 ) && ( ( column ) != 0 ) ) return ; if ( ( columnCount > 0 ) && ( ( ( column ) < 0 ) || ( ( column ) >= columnCount ) ) ) return ; super . layout ( ) ; } }

Fix:
if ( ( ( tree ) == null ) || ( tree . isDisposed ( ) ) )
Buggy code:
public class OpenStackClient { protected String endpoint ; protected OpenStackTokenProvider tokenProvider ; protected static int AUTHENTICATION_RETRIES = 1 ; protected OpenStackClientConnector connector ; protected Properties properties = new Properties ( ) ; protected static OpenStackClientConnector DEFAULT_CONNECTOR ; public OpenStackClient ( String endpoint ) { } public OpenStackClient ( String endpoint , OpenStackClientConnector connector ) { } public < T > OpenStackResponse request ( OpenStackRequest < T > request ) { } public < T > T execute ( OpenStackRequest < T > request ) { OpenStackResponse response = request ( request ) ; <START_BUG> return ( request . returnType ( ) ) != null ? response . getEntity ( request . returnType ( ) ) : null ; <END_BUG> } public void property ( String property , String value ) { } public void setTokenProvider ( OpenStackTokenProvider tokenProvider ) { } public void token ( String token ) { } }

Fix:
return ( ( request . returnType ( ) ) != null ) && ( ( request . returnType ( ) ) != ( Void . class ) ) ? response . getEntity ( request . returnType ( ) ) : null ;
Buggy code:
public class GrokExtractor extends Extractor { private static final Logger log = LoggerFactory . getLogger ( GrokExtractor . class ) ; private final Grok grok = new Grok ( ) ; public GrokExtractor ( MetricRegistry metricRegistry , Set < GrokPattern > grokPatterns , String id , String title , long order , CursorStrategy cursorStrategy , String sourceField , String targetField , Map < String , Object > extractorConfig , String creatorUserId , List < Converter > converters , ConditionType conditionType , String conditionValue ) throws ConfigurationException , ReservedFieldException { } @ Override protected Result [ ] run ( String value ) { final Match match = grok . match ( value ) ; match . captures ( ) ; final Map < String , Object > matches = match . toMap ( ) ; final List < Result > results = Lists . newArrayListWithCapacity ( matches . size ( ) ) ; for ( final Map . Entry < String , Object > entry : matches . entrySet ( ) ) { if ( ( entry . getValue ( ) ) != null ) { <START_BUG> results . add ( new Result ( entry . getValue ( ) . toString ( ) , entry . getKey ( ) , ( - 1 ) , ( - 1 ) ) ) ; <END_BUG> } } return results . toArray ( new Result [ results . size ( ) ] ) ; } }

Fix:
results . add ( new Result ( entry . getValue ( ) , entry . getKey ( ) , ( - 1 ) , ( - 1 ) ) ) ;
Buggy code:
public final class Properties { public static final Properties EMPTY_PROPERTIES = new Properties ( "NULL" , ValueMap . EMPTY_MAP ) ; private final String key ; private final ValueMap strings ; public Properties ( final String key , final ValueMap strings ) { } public final ValueMap getAll ( ) { } public final String getString ( final String key ) { } @ Override public final String toString ( ) { <START_BUG> return key ; <END_BUG> } }

Fix:
return "unique<seq2seq4repair_space>key:" + ( key ) ;
Buggy code:
public class Utilities { public static String NODE_STRING_NAME = "*node" ; public static String EDGE_STRING_NAME = "*edges" ; public static double NEW_AGENT_START = - ( Double . MAX_VALUE ) ; public static String GENERATE_NAME = "DEFAULT" ; public static long uid = - 1 ; private static Random random = new XSRandom ( System . currentTimeMillis ( ) ) ; private static final double FIFTY_PERCENT = 0.5 ; public static double generateRandomRangeDouble ( double min , double max ) { if ( min > max ) { double tmp = min ; min = max ; max = tmp ; } else if ( min == max ) { return min ; } <START_BUG> return min + ( ( Utilities . random . nextDouble ( ) ) * ( ( max - min ) + 1 ) ) ; <END_BUG> } public static int generateRandomRangeInteger ( int min , int max ) { } public static boolean generateWithProbabilty ( double probability ) { } public static boolean generateCoinFlip ( ) { } public static float generateRandomFloat ( ) { } public static double generateRandomDouble ( ) { } public static Vector2 randomiseVectorDouble ( double xMin , double xMax , double yMin , double yMax ) { } public static Vector2 randomiseVectorDouble ( double min , double max ) { } public static Vector2 randomiseVectorInteger ( int xMin , int xMax , int yMin , int yMax ) { } public static Vector2 randomiseBooleanVector ( double xMin , double xMax , double yMin , double yMax ) { } public static Vector2 randomiseVectorInteger ( int min , int max ) { } public static String generateTimeStamp ( ) { } public static double calculateDistance2D ( Vector2 vectorA , Vector2 vectorB ) { } public static void writeToFile ( String fileContents , String absoluteFilePath ) { } public static long generateUID ( ) { } }

Fix:
return min + ( ( Utilities . random . nextDouble ( ) ) * ( max - min ) ) ;
Buggy code:
public class ViewAccountInfoPanelAction extends AbstractSelectableAction { public ViewAccountInfoPanelAction ( FrameMediator frameMediator ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> ( ( org . columba . mail . gui . composer . ComposerView ) ( frameMediator . getView ( ) ) ) . showAccountInfoPanel ( ) ; <END_BUG> } }

Fix:
( ( org . columba . mail . gui . composer . ComposerView ) ( frameMediator . getBaseView ( ) ) ) . showAccountInfoPanel ( ) ;
Buggy code:
public class ToolDefinition { private static final int MAX_DEPTH = 4 ; private Path rootDirPath ; private String system ; private int width ; private int height ; private Map < String , Tab > tabMap ; private List < String > orderList ; private List < TeratermStationPlugin > nodePluginList ; private Initial initial ; public ToolDefinition ( ) { } public ToolDefinition ( Path path ) { } public void addTab ( Tab tab ) { } public Map < String , Tab > getTabMap ( ) { } public void setTabMap ( Map < String , Tab > tabMap ) { } public List < String > getOrderList ( ) { } public void setOrderList ( List < String > orderList ) { } public List < TeratermStationPlugin > getNodePluginList ( ) { } public void setNodePluginList ( List < TeratermStationPlugin > nodePluginList ) { } public String getSystem ( ) { } public void setSystem ( String system ) { } public int getWidth ( ) { } public void setWidth ( int width ) { } public int getHeight ( ) { } public void setHeight ( int height ) { } public Initial getInitial ( ) { } public void setInitial ( Initial initial ) { } public Path getRootDirPath ( ) { } public void initialize ( ) throws Exception { Set < FileVisitOption > options = EnumSet . allOf ( FileVisitOption . class ) ; PluginFileVisitor pluginVisitor = new PluginFileVisitor ( ( ( this . rootDirPath . getNameCount ( ) ) - 1 ) ) ; try { Files . walkFileTree ( this . rootDirPath , options , ToolDefinition . MAX_DEPTH , pluginVisitor ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw e ; } setNodePluginList ( pluginVisitor . getNodePluginList ( ) ) ; MyFileVisitor myVisitor = new MyFileVisitor ( ( ( this . rootDirPath . getNameCount ( ) ) - 1 ) ) ; try { Files . walkFileTree ( this . rootDirPath , options , ToolDefinition . MAX_DEPTH , myVisitor ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; throw e ; } for ( Tab tab : myVisitor . getTabMap ( ) . values ( ) ) { <START_BUG> if ( ( tab . getIniFile ( ) ) == null ) { <END_BUG> tab . setIniFile ( myVisitor . getIniFile ( ) ) ; } } setSystem ( myVisitor . getSystem ( ) ) ; setWidth ( myVisitor . getWidth ( ) ) ; setHeight ( myVisitor . getHeight ( ) ) ; setInitial ( myVisitor . getInitial ( ) ) ; setTabMap ( myVisitor . getTabMap ( ) ) ; setOrderList ( myVisitor . getOrderList ( ) ) ; } }

Fix:
if ( ( ( tab . getIniFile ( ) ) == null ) || ( tab . getIniFile ( ) . isEmpty ( ) ) ) {
Buggy code:
class DefaultStatefulBeanAccessTimeoutWriteHandler extends AbstractWriteAttributeHandler < Void > { static final DefaultStatefulBeanAccessTimeoutWriteHandler INSTANCE = new DefaultStatefulBeanAccessTimeoutWriteHandler ( ) ; @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder < Void > voidHandbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode valueToRestore , ModelNode valueToRevert , Void handback ) throws OperationFailedException { } void updateOrCreateDefaultStatefulBeanAccessTimeoutService ( final OperationContext context , final ModelNode model , List < ServiceController < ? > > newControllers ) throws OperationFailedException { <START_BUG> final long defaultAccessTimeout = DEFAULT_STATEFUL_BEAN_ACCESS_TIMEOUT . validateResolvedOperation ( model ) . asLong ( ) ; <END_BUG> final ServiceName serviceName = DefaultAccessTimeoutService . STATEFUL_SERVICE_NAME ; final ServiceRegistry registry = context . getServiceRegistry ( true ) ; final ServiceController sc = registry . getService ( serviceName ) ; if ( sc != null ) { final DefaultAccessTimeoutService defaultAccessTimeoutService = DefaultAccessTimeoutService . class . cast ( sc . getValue ( ) ) ; defaultAccessTimeoutService . setDefaultAccessTimeout ( defaultAccessTimeout ) ; } else { final DefaultAccessTimeoutService defaultAccessTimeoutService = new DefaultAccessTimeoutService ( defaultAccessTimeout ) ; final ServiceController < ? > newService = context . getServiceTarget ( ) . addService ( serviceName , defaultAccessTimeoutService ) . install ( ) ; if ( newControllers != null ) { newControllers . add ( newService ) ; } } } }

Fix:
final long defaultAccessTimeout = DEFAULT_STATEFUL_BEAN_ACCESS_TIMEOUT . resolveModelAttribute ( context , model ) . asLong ( ) ;
Buggy code:
public class CholeskyDecompositionImpl implements CholeskyDecomposition { public static final double DEFAULT_RELATIVE_SYMMETRY_THRESHOLD = 1.0E-15 ; public static final double DEFAULT_ABSOLUTE_POSITIVITY_THRESHOLD = 1.0E-10 ; private double [ ] [ ] lTData ; private RealMatrix cachedL ; private RealMatrix cachedLT ; public CholeskyDecompositionImpl ( final RealMatrix matrix ) { } public CholeskyDecompositionImpl ( final RealMatrix matrix , final double relativeSymmetryThreshold , final double absolutePositivityThreshold ) { } public RealMatrix getL ( ) { } public RealMatrix getLT ( ) { } public double getDeterminant ( ) { } public DecompositionSolver getSolver ( ) { } private static class Solver implements DecompositionSolver { private final double [ ] [ ] lTData ; private Solver ( final double [ ] [ ] lTData ) { } public boolean isNonSingular ( ) { } public RealVector solve ( final RealVector b ) { final int m = lTData . length ; if ( ( b . getDimension ( ) ) != m ) { throw new org . apache . commons . math . exception . DimensionMismatchException ( b . getDimension ( ) , m ) ; } <START_BUG> final double [ ] x = b . getData ( ) ; <END_BUG> for ( int j = 0 ; j < m ; j ++ ) { final double [ ] lJ = lTData [ j ] ; x [ j ] //= lJ [ j ] ; final double xJ = x [ j ] ; for ( int i = j + 1 ; i < m ; i ++ ) { x [ i ] -= xJ * ( lJ [ i ] ) ; } } for ( int j = m - 1 ; j >= 0 ; j -- ) { x [ j ] //= lTData [ j ] [ j ] ; final double xJ = x [ j ] ; for ( int i = 0 ; i < j ; i ++ ) { x [ i ] -= xJ * ( lTData [ i ] [ j ] ) ; } } return new ArrayRealVector ( x , false ) ; } private double [ ] [ ] solve ( double [ ] [ ] b , boolean reuseB ) { } public double [ ] [ ] solve ( double [ ] [ ] b ) { } public RealMatrix solve ( RealMatrix b ) { } public RealMatrix getInverse ( ) { } } }

Fix:
final double [ ] x = b . toArray ( ) ;
Buggy code:
public class MyKrisenInterfacesNodeDialog extends NodeDialogPane implements ItemListener { private static final String FILE_HISTORY_ID = "SupplyChainReaderFileHistory" ; private JCheckBox anonymizeBox ; private JCheckBox overrideBox ; private FilesHistoryPanel connField ; protected MyKrisenInterfacesNodeDialog ( ) { } @ Override protected void saveSettingsTo ( final NodeSettingsWO settings ) throws InvalidSettingsException { } @ Override protected void loadSettingsFrom ( final NodeSettingsRO settings , final PortObjectSpec [ ] specs ) { } @ Override public void itemStateChanged ( ItemEvent e ) { } private static String removeNameOfDB ( String path ) { <START_BUG> return path . endsWith ( "//DB" ) ? path . substring ( 0 , ( ( path . length ( ) ) - 3 ) ) : path ; <END_BUG> } }

Fix:
return ( path . endsWith ( "\\DB" ) ) || ( path . endsWith ( "//DB" ) ) ? path . substring ( 0 , ( ( path . length ( ) ) - 3 ) ) : path ;
Buggy code:
public class Platform extends Line implements WorldObject { private ContextMenu rightClickMenu ; public Platform ( double startX , double startY , double endX , double endY ) { } public Platform ( Point startPoint , Point endPoint ) { } public Platform ( BasicPlatform basic ) { } public void update ( Translation t ) { } public void setupEditFunctions ( ) { setOnMouseClicked ( new EventHandler < MouseEvent > ( ) { public void handle ( MouseEvent e ) { if ( ( e . getButton ( ) ) == ( MouseButton . SECONDARY ) ) { <START_BUG> getRightClickMenu ( ) . show ( getParent ( ) , e . getSceneX ( ) , e . getSceneY ( ) ) ; <END_BUG> } } } ) ; } public ContextMenu getRightClickMenu ( ) { } public VectorCT getNormal ( ) { } public VectorCT toVector ( ) { } public boolean intersects ( Rectangle rect ) { } public boolean fitsWithin ( Rectangle rect ) { } public BasicPlatform toBasicPlatform ( ) { } public String toString ( ) { } public void addTo ( Group parent ) { } public void setStart ( double x , double y ) { } public void setEnd ( double x , double y ) { } }

Fix:
getRightClickMenu ( ) . show ( getParent ( ) , e . getScreenX ( ) , e . getScreenY ( ) ) ;
Buggy code:
public class CollectorComponents { private Jaguar collectorLift ; private Relay collectorSpin ; private Relay conveyor ; public static final int COLLECTOR_LIFT_UP = 1 ; public static final int COLLECTOR_LIFT_DOWN = - 1 ; public static final int COLLECTOR_LIFT_STOP = 0 ; public static final int DEPLOY_UP_SIGN = 1 ; public static final int DEPLOY_DOWN_SIGN = - 1 ; public static final int CONVEYOR_UP = 1 ; public static final int CONVEYOR_DOWN = - 1 ; public static final int CONVEYOR_STOP = 0 ; private static final double DEFAULT_DEPLOY_MULTIPLIER = 0.9 ; public CollectorComponents ( int lift , int spin , int conveyor ) { } public void lift ( int liftDirection ) { switch ( liftDirection ) { case 1 : lift ( CollectorComponents . DEFAULT_DEPLOY_MULTIPLIER ) ; break ; case - 1 : lift ( ( ( - 1 ) * ( CollectorComponents . DEFAULT_DEPLOY_MULTIPLIER ) ) ) ; break ; default : <START_BUG> lift ( CollectorComponents . DEFAULT_DEPLOY_MULTIPLIER ) ; <END_BUG> break ; } } public void lift ( double power ) { } public void collect ( boolean collectState ) { } public void conveyorMove ( boolean conveyorState ) { } public void conveyorMove ( int conveyorState ) { } No newline ; at end ; of file ; }

Fix:
lift ( 0 ) ;
Buggy code:
class ConnectionFactoryService implements Service < Void > { private final String name ; private final ConnectionFactoryConfiguration configuration ; private final InjectedValue < JMSServerManager > jmsServer = new InjectedValue < JMSServerManager > ( ) ; public ConnectionFactoryService ( final ConnectionFactoryConfiguration configuration ) { } public synchronized void start ( StartContext context ) throws StartException { final JMSServerManager jmsManager = jmsServer . getValue ( ) ; try { WritableServiceBasedNamingStore . pushOwner ( context . getChildTarget ( ) ) ; try { jmsManager . createConnectionFactory ( false , configuration , configuration . getBindings ( ) ) ; } finally { WritableServiceBasedNamingStore . popOwner ( ) ; } } catch ( Exception e ) { <START_BUG> throw new StartException ( MessagingMessages . MESSAGES . failedToCreate ( "connection-factory" ) , e ) ; <END_BUG> } } public synchronized void stop ( StopContext context ) { } public Void getValue ( ) throws IllegalStateException { } InjectedValue < JMSServerManager > getJmsServer ( ) { } }

Fix:
throw MessagingMessages . MESSAGES . failedToCreate ( e , "connection-factory" ) ;
Buggy code:
@ Controller @ RequestMapping ( "//authority" ) public class AutoLoginAction { private static final String COOKIE_ENCRYPTION_KEY = "C0ckp1t" ; @ Autowired private AuthenticationManager myAuthenticationManager ; @ RequestMapping ( value = "//login.do" , method = { RequestMethod . GET , RequestMethod . POST } ) public void login ( HttpServletRequest request , HttpServletResponse response ) throws IOException { boolean hasLoggedIn = false ; try { UsernamePasswordAuthenticationToken token = getToken ( request ) ; token . setDetails ( new org . springframework . security . web . authentication . WebAuthenticationDetails ( request ) ) ; Authentication authenticatedUser = myAuthenticationManager . authenticate ( token ) ; SecurityContextHolder . getContext ( ) . setAuthentication ( authenticatedUser ) ; request . getRequestDispatcher ( "..//cluster//list.do" ) . forward ( request , response ) ; hasLoggedIn = true ; } catch ( Exception e ) { e . printStackTrace ( ) ; } finally { if ( ! hasLoggedIn ) { <START_BUG> response . sendRedirect ( ( ( ( ( ( ( request . getProtocol ( ) ) + ":////" ) + ( request . getServerName ( ) ) ) + ":" ) + ( request . getServerPort ( ) ) ) + "//" ) ) ; <END_BUG> } } } private Collection < GrantedAuthority > getAuthority ( String role ) { } private UsernamePasswordAuthenticationToken getToken ( HttpServletRequest request ) throws Exception { } public AuthenticationManager getMyAuthenticationManager ( ) { } public void setMyAuthenticationManager ( AuthenticationManager myAuthenticationManager ) { } }

Fix:
response . sendRedirect ( ( ( ( ( ( ( request . getScheme ( ) ) + ":////" ) + ( request . getServerName ( ) ) ) + ":" ) + ( request . getServerPort ( ) ) ) + "//" ) ) ;
Buggy code:
public class FieldReference extends Reference implements InvocationSite { public Expression receiver ; public char [ ] token ; public FieldBinding binding ; public long nameSourcePosition ; MethodBinding syntheticReadAccessor ; MethodBinding syntheticWriteAccessor ; public TypeBinding receiverType ; public FieldReference ( char [ ] source , long pos ) { } public FlowInfo analyseAssignment ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , Assignment assignment , boolean isCompound ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { } public FieldBinding fieldBinding ( ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { int pc = codeStream . position ; if ( ( constant ) != ( NotAConstant ) ) { if ( valueRequired ) { codeStream . generateConstant ( constant , implicitConversion ) ; } } else { boolean isStatic = binding . isStatic ( ) ; receiver . generateCode ( currentScope , codeStream , ( ( valueRequired && ( ! isStatic ) ) && ( ( binding . constant ) == ( NotAConstant ) ) ) ) ; if ( valueRequired ) { if ( ( binding . constant ) == ( NotAConstant ) ) { if ( ( binding . declaringClass ) == null ) { codeStream . arraylength ( ) ; } else { if ( ( syntheticReadAccessor ) == null ) { if ( isStatic ) { codeStream . getstatic ( binding ) ; } else { codeStream . getfield ( binding ) ; } } else { codeStream . invokestatic ( syntheticReadAccessor ) ; } } codeStream . generateImplicitConversion ( implicitConversion ) ; } else { codeStream . generateConstant ( binding . constant , implicitConversion ) ; } } } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public static final Constant getConstantFor ( FieldBinding binding , boolean implicitReceiver , Reference ref , int indexInQualification ) { } public boolean isFieldReference ( ) { } public boolean isSuperAccess ( ) { } public boolean isTypeAccess ( ) { } public void manageSyntheticReadAccessIfNecessary ( BlockScope currentScope ) { } public void manageSyntheticWriteAccessIfNecessary ( BlockScope currentScope ) { } public TypeBinding resolveType ( BlockScope scope ) { } public void setDepth ( int d ) { } public void setFieldIndex ( int index ) { } public String toStringExpression ( ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class QuestionImpl implements Serializable , Question { private static final long serialVersionUID = 1029628355154231307L ; private String question ; private Map < Integer , String > answers ; private Integer correctAnsKey ; public QuestionImpl ( String question , Map < Integer , String > answers , Integer correctAnswer ) { } public String getQuestion ( ) { } public Map < Integer , String > getAnswers ( ) { } public Integer getCorrectAnswerKey ( ) { } public void setCorrectAnswerKey ( Integer key ) { } public String getCorrectAnswer ( ) { } public void printAnswers ( ) { <START_BUG> for ( int i = 1 ; i < ( answers . size ( ) ) ; i ++ ) { <END_BUG> if ( i == 1 ) { System . out . print ( ( ( i + ")<seq2seq4repair_space>" ) + ( answers . get ( i ) ) ) ) ; } else if ( i == 4 ) { System . out . print ( ( ( ( "<seq2seq4repair_space>" + i ) + ")<seq2seq4repair_space>" ) + ( answers . get ( i ) ) ) ) ; System . out . println ( ) ; } else { System . out . print ( ( ( ( "<seq2seq4repair_space>" + i ) + ")<seq2seq4repair_space>" ) + ( answers . get ( i ) ) ) ) ; } } } }

Fix:
for ( int i = 1 ; i <= ( answers . size ( ) ) ; i ++ ) {
Buggy code:
public class FaceletMetaResolvingStrategy extends AbstractTagResolvingStrategy < IFaceletTagResolvingStrategy . TLDWrapper , String > implements IFaceletTagResolvingStrategy { public static final String ID = "org.eclipse.jst.jsf.facelet.metadata.FaceletMetaResolvingStrategy" ; public static final String DISPLAY_NAME = Messages . DefaultJSPTagResolver_DisplayName ; private final ViewMetadataLoader _loader ; private final ViewMetadataMapper _mapper ; private final FaceletDocumentFactory _factory ; public FaceletMetaResolvingStrategy ( final IProject project , final FaceletDocumentFactory factory ) { } @ Override public ITagElement resolve ( final IFaceletTagResolvingStrategy . TLDWrapper elementDecl ) { final String uri = elementDecl . getUri ( ) ; final String tagName = elementDecl . getTagDefn ( ) . getName ( ) ; final TagIdentifier tagId = TagIdentifierFactory . createJSPTagWrapper ( uri , tagName ) ; final TagMapping mapping = _loader . getTagToViewMapping ( tagId ) ; TypeInfo elementType = null ; if ( mapping != null ) { elementType = findTypeInfo ( mapping , "1.1" , null ) ; } if ( elementType instanceof ComponentTypeInfo ) { <START_BUG> return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . ComponentTag ( uri , tagName , ( ( ComponentTypeInfo ) ( elementType ) ) , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ; <END_BUG> } else if ( elementType instanceof ConverterTypeInfo ) { return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . ConverterTag ( uri , tagName , ( ( ConverterTypeInfo ) ( elementType ) ) , null , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ; } else if ( elementType instanceof ValidatorTypeInfo ) { return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . ValidatorTag ( uri , tagName , ( ( ValidatorTypeInfo ) ( elementType ) ) , null , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ; } else if ( elementType instanceof TagHandlerType ) { return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . HandlerTag ( uri , tagName , ( ( TagHandlerType ) ( elementType ) ) , null , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ; } else if ( DefaultTagTypeInfo . isDefaultLib ( tagId . getUri ( ) ) ) { return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . NoArchetypeFaceletTag ( uri , tagName , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ; } return null ; } private TypeInfo findTypeInfo ( final TagMapping mapping , final String jsfVersion , final String libVersion ) { } @ Override public String getId ( ) { } public String getDisplayName ( ) { } }

Fix:
return new org . eclipse . jst . jsf . facelet . core . internal . tagmodel . ComponentTag ( uri , tagName , ( ( ComponentTypeInfo ) ( elementType ) ) , null , _factory , new MetadataAttributeAdvisor ( tagId , _loader ) ) ;
Buggy code:
public class ArgumentParser { public static NumberWriter getNumberWriterByArgument ( String argument ) { } public static NumberSorter getNumberSorterByArgument ( String argument ) { } public static NumberReader getNumberReaderByArgument ( String argument ) { if ( Objects . equals ( argument , "xml" ) ) { return new XMLNumberReader ( ) ; } else <START_BUG> if ( Objects . equals ( argument , "ms" ) ) { <END_BUG> return new SpaceSeparatedNumberReader ( ) ; } throw new RuntimeException ( "Invalid<seq2seq4repair_space>params" ) ; } }

Fix:
if ( Objects . equals ( argument , "ss" ) ) {
Buggy code:
public abstract class AbstractMapEntity implements Map < String , Object > { private final Map < String , Object > delegate ; public AbstractMapEntity ( ) { } @ Override public void clear ( ) { } @ Override public boolean containsKey ( final Object arg0 ) { } @ Override public boolean containsValue ( final Object arg0 ) { } @ Override public Set < Map . Entry < String , Object > > entrySet ( ) { } @ Override public boolean equals ( final Object object ) { } @ Override public Object get ( final Object arg0 ) { } @ SuppressWarnings ( "unchecked" ) public < T > T getAndCoerce ( final String key ) { } @ Override public int hashCode ( ) { } @ Override public boolean isEmpty ( ) { } @ Override public Set < String > keySet ( ) { } @ Override public Object put ( final String key , final Object value ) { final Object output ; if ( value == null ) { output = remove ( key ) ; } else { <START_BUG> output = put ( key , value ) ; <END_BUG> } return output ; } @ Override public void putAll ( final Map < ? extends String , ? extends Object > arg0 ) { } @ Override public Object remove ( final Object arg0 ) { } @ Override public int size ( ) { } @ Override public Collection < Object > values ( ) { } }

Fix:
output = delegate . put ( key , value ) ;
Buggy code:
public class GenericWhitespaceCheck extends Check { private int mDepth ; @ Override public int [ ] getDefaultTokens ( ) { } @ Override public void beginTree ( DetailAST aRootAST ) { } @ Override public void visitToken ( DetailAST aAST ) { } private void processEnd ( DetailAST aAST ) { final String line = getLine ( ( ( aAST . getLineNo ( ) ) - 1 ) ) ; final int before = ( aAST . getColumnNo ( ) ) - 1 ; final int after = ( aAST . getColumnNo ( ) ) + 1 ; if ( ( ( 0 <= before ) && ( Character . isWhitespace ( line . charAt ( before ) ) ) ) && ( ! ( Utils . whitespaceBefore ( before , line ) ) ) ) { log ( aAST . getLineNo ( ) , before , "ws.preceded" , ">" ) ; } if ( after < ( line . length ( ) ) ) { if ( 1 == ( mDepth ) ) { final char charAfter = line . charAt ( after ) ; if ( ( ( ( aAST . getParent ( ) . getType ( ) ) == ( TokenTypes . TYPE_ARGUMENTS ) ) && ( ( aAST . getParent ( ) . getParent ( ) . getType ( ) ) == ( TokenTypes . DOT ) ) ) && ( ( aAST . getParent ( ) . getParent ( ) . getParent ( ) . getType ( ) ) == ( TokenTypes . METHOD_CALL ) ) ) { if ( Character . isWhitespace ( charAfter ) ) { log ( aAST . getLineNo ( ) , after , "ws.followed" , ">" ) ; } } else <START_BUG> if ( ( ( ( ( ( ! ( Character . isWhitespace ( charAfter ) ) ) && ( '(' != charAfter ) ) && ( ')' != charAfter ) ) && ( ',' != charAfter ) ) && ( '[' != charAfter ) ) && ( '.' != charAfter ) ) { <END_BUG> log ( aAST . getLineNo ( ) , after , "ws.illegalFollow" , ">" ) ; } } else { final int indexOfAmp = line . indexOf ( '&' , after ) ; if ( ( indexOfAmp != ( - 1 ) ) && ( GenericWhitespaceCheck . whitespaceBetween ( after , indexOfAmp , line ) ) ) { if ( ( indexOfAmp - after ) == 0 ) { log ( aAST . getLineNo ( ) , after , "ws.notPreceded" , "&" ) ; } else if ( ( indexOfAmp - after ) != 1 ) { log ( aAST . getLineNo ( ) , after , "ws.followed" , ">" ) ; } } else if ( ( line . charAt ( after ) ) == '<seq2seq4repair_space>' ) { log ( aAST . getLineNo ( ) , after , "ws.followed" , ">" ) ; } } } } private void processStart ( DetailAST aAST ) { } private static boolean whitespaceBetween ( int aFromIndex , int aToIndex , String aLine ) { } }

Fix:
if ( ( ( ( ( ( ( ! ( Character . isWhitespace ( charAfter ) ) ) && ( '(' != charAfter ) ) && ( ')' != charAfter ) ) && ( ',' != charAfter ) ) && ( '[' != charAfter ) ) && ( '.' != charAfter ) ) && ( ':' != charAfter ) ) {
Buggy code:
public abstract class TableAdapter < T > extends ArrayAdapter < T > { float [ ] columnWidths = new float [ 0 ] ; int numberOfColumns = 0 ; int unusableWidth = 0 ; int spaceColor = Color . WHITE ; int columnSpacing = 0 ; int rowSpacing = 0 ; int cellPadding = 0 ; int cellBackgroundColor = Color . TRANSPARENT ; public TableAdapter ( Context context , T [ ] values ) { } public abstract View getView ( int position , View convertView , ViewGroup parent , int usableWidth ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { } public LayoutParams getLayoutParamsAt ( int n , int maxWidth ) { } protected View getRowSeparator ( ) { } protected View getColumnSeparator ( ) { } public void setCellBackgroundColor ( int color ) { } public void setSpaceColor ( int color ) { } public void setColumnSpacing ( int spacing ) { } public void setRowSpacing ( int spacing ) { } public void setColumnWidths ( float [ ] widths ) { } public void setCellPadding ( int padding ) { } private void updateDimensions ( ) { if ( ( columnWidths ) == null ) { return ; } this . numberOfColumns = columnWidths . length ; <START_BUG> this . unusableWidth = ( - ( ( numberOfColumns ) * ( columnSpacing ) ) ) - ( ( ( numberOfColumns ) * 2 ) * ( cellPadding ) ) ; <END_BUG> } }

Fix:
this . unusableWidth = ( ( numberOfColumns ) * ( columnSpacing ) ) + ( ( ( numberOfColumns ) * 2 ) * ( cellPadding ) ) ;
Buggy code:
public class TestLegacyMergeSchedulerPolicyConfig extends SolrTestCaseJ4 { @ BeforeClass public static void beforeClass ( ) throws Exception { } @ Test public void testLegacy ( ) throws Exception { <START_BUG> IndexWriter writer = ( ( org . apache . solr . update . DirectUpdateHandler2 ) ( h . getCore ( ) . getUpdateHandler ( ) ) ) . getIndexWriterProvider ( ) . getIndexWriter ( h . getCore ( ) ) ; <END_BUG> assertTrue ( writer . getConfig ( ) . getMergePolicy ( ) . getClass ( ) . getName ( ) . equals ( LogDocMergePolicy . class . getName ( ) ) ) ; assertTrue ( writer . getConfig ( ) . getMergeScheduler ( ) . getClass ( ) . getName ( ) . equals ( SerialMergeScheduler . class . getName ( ) ) ) ; } }

Fix:
IndexWriter writer = ( ( org . apache . solr . update . DirectUpdateHandler2 ) ( h . getCore ( ) . getUpdateHandler ( ) ) ) . getSolrCoreState ( ) . getIndexWriter ( h . getCore ( ) ) ;
Buggy code:
public class Version { private Version ( ) { } public static String id ( ) { <START_BUG> return "3.8" ; <END_BUG> } }

Fix:
return "@version@" ;
Buggy code:
public class Player extends Entity { public static final float WIDTH_RATIO = 1.0F ; public static final float HEIGHT_RATIO = 1.0F ; private static final float SPEED = 0.006F ; private static final int BASE_HEALTH = 20 ; private static final int BASE_ARMOR = 1 ; private static final int BASE_DAMAGE = 1 ; private static final String TAG = Player . class . getCanonicalName ( ) ; private final Player . EventListener eventListener ; private float outBoundX ; private float outBoundY ; public Player ( int tileSize , PointF location , float outBoundX , float outBoundY , Player . EventListener eventListener ) { } public void render ( Renderer renderer , float [ ] matrixProjection , float [ ] matrixView ) { } private void calculateAnimationFrame ( ) { } @ Override public boolean applyAttack ( Attack attack ) { } public void startNewAttack ( Renderer renderer ) { PointF end = new PointF ( getLocation ( ) . x , getLocation ( ) . y ) ; PointF start = getNewCenterLocation ( ) ; start . offset ( ( ( - 0.6F ) // 2 ) , ( ( - 0.9F ) // 2 ) ) ; switch ( getLastDirection ( ) ) { case NORTH : end . offset ( 0 , ( ( ( getVelocityY ( ) ) * 500 ) + 3 ) ) ; break ; case NORTHEAST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) + 3 ) , ( ( ( getVelocityY ( ) ) * 500 ) + 3 ) ) ; break ; case EAST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) + 3 ) , 0 ) ; break ; case SOUTHEAST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) + 3 ) , ( ( ( getVelocityY ( ) ) * 500 ) - 3 ) ) ; break ; case SOUTH : end . offset ( 0 , ( ( ( getVelocityY ( ) ) * 500 ) - 3 ) ) ; break ; case SOUTHWEST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) - 3 ) , ( ( ( getVelocityY ( ) ) * 500 ) - 3 ) ) ; break ; case WEST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) - 3 ) , 0 ) ; break ; case NORTHWEST : end . offset ( ( ( ( getVelocityX ( ) ) * 500 ) - 3 ) , ( ( ( getVelocityY ( ) ) * 500 ) + 3 ) ) ; break ; } <START_BUG> renderer . addAttack ( new AttackMelee ( getTileSize ( ) , getDamage ( ) , 2 , 1 , getLocation ( ) , 300 , false , getLastDirection ( ) , this ) ) ; <END_BUG> } public interface EventListener { void onHealthChanged ( int health , int maxHealth ) { } } }

Fix:
renderer . addAttack ( new AttackMelee ( getTileSize ( ) , getDamage ( ) , 1 , 1 , getLocation ( ) , 300 , false , getLastDirection ( ) , this ) ) ;
Buggy code:
public class SessionBeanSetSessionContextMethodInvocationInterceptor implements Interceptor { public static final InterceptorFactory FACTORY = new ImmediateInterceptorFactory ( new SessionBeanSetSessionContextMethodInvocationInterceptor ( ) ) ; private SessionBeanSetSessionContextMethodInvocationInterceptor ( ) { } @ Override public Object processInvocation ( final InterceptorContext context ) throws Exception { SessionBeanComponentInstance instance = ( ( SessionBeanComponentInstance ) ( context . getPrivateData ( ComponentInstance . class ) ) ) ; final InvocationType invocationType = context . getPrivateData ( InvocationType . class ) ; try { <START_BUG> context . putPrivateData ( InvocationType . class , SET_SESSION_CONTEXT ) ; <END_BUG> ( ( SessionBean ) ( context . getTarget ( ) ) ) . setSessionContext ( instance . getEjbContext ( ) ) ; } finally { context . putPrivateData ( InvocationType . class , invocationType ) ; } return context . proceed ( ) ; } }

Fix:
context . putPrivateData ( InvocationType . class , DEPENDENCY_INJECTION ) ;