nus-yam/ex-repair huggingface dataset:
Buggy code:
public abstract class OperationHistoryActionHandler extends Action implements IAdaptable , ActionFactory . IWorkbenchAction { private static final int MAX_LABEL_LENGTH = 32 ; private class PartListener implements IPartListener { public void partActivated ( IWorkbenchPart part ) { } public void partBroughtToTop ( IWorkbenchPart part ) { } public void partClosed ( IWorkbenchPart part ) { <START_BUG> if ( part . equals ( site . getPart ( ) ) ) { <END_BUG> dispose ( ) ; } else if ( ( ( site ) instanceof MultiPageEditorSite ) && ( part . equals ( ( ( MultiPageEditorSite ) ( site ) ) . getMultiPageEditor ( ) ) ) ) { dispose ( ) ; } } public void partDeactivated ( IWorkbenchPart part ) { } public void partOpened ( IWorkbenchPart part ) { } } private class HistoryListener implements IOperationHistoryListener { public void historyNotification ( final OperationHistoryEvent event ) { } } private boolean pruning = false ; private IPartListener partListener = new OperationHistoryActionHandler . PartListener ( ) ; private IOperationHistoryListener historyListener = new OperationHistoryActionHandler . HistoryListener ( ) ; private TimeTriggeredProgressMonitorDialog progressDialog ; private IUndoContext undoContext = null ; IWorkbenchPartSite site ; OperationHistoryActionHandler ( IWorkbenchPartSite site , IUndoContext context ) { } public void dispose ( ) { } abstract void flush ( ) { } abstract String getCommandString ( ) { } abstract String getTooltipString ( ) { } abstract String getSimpleCommandString ( ) { } abstract String getSimpleTooltipString ( ) { } IOperationHistory getHistory ( ) { } abstract IUndoableOperation getOperation ( ) { } public final void run ( ) { } abstract IStatus runCommand ( IProgressMonitor pm ) throws ExecutionException { } public Object getAdapter ( Class adapter ) { } private IWorkbenchWindow getWorkbenchWindow ( ) { } abstract boolean shouldBeEnabled ( ) { } public void setContext ( IUndoContext context ) { } public void setPruneHistory ( boolean prune ) { } public void update ( ) { } private String shortenText ( String message ) { } final void reportException ( Throwable t ) { } final boolean isInvalid ( ) { } final IUndoContext getUndoContext ( ) { } }

Fix:
if ( ( ( site ) != null ) && ( part . equals ( site . getPart ( ) ) ) ) {
Buggy code:
public abstract class TestElement { public abstract List < TestMethod > getAfters ( ) { } public abstract List < TestMethod > getBefores ( ) { } public void runBefores ( Object target ) throws Throwable { } public void runAfters ( Object target ) throws MultipleFailureException { MultipleFailureException errors = new MultipleFailureException ( ) ; List < TestMethod > afters = getAfters ( ) ; for ( TestMethod after : afters ) try { after . invokeExplosively ( target ) ; } catch ( Throwable e ) { errors . add ( e ) ; } <START_BUG> errors . throwUnlessEmpty ( ) ; <END_BUG> } public void runProtected ( EachTestNotifier roadie , Runnable runnable , Object target ) throws Throwable { } }

Fix:
errors . assertEmpty ( ) ;
Buggy code:
public class MainActivity extends FragmentActivity implements ConfirmDialogFragment . ConfirmDialogListner { private TimeOversiktOpenHelper myDbHelper ; private class InitiateDatabase extends AsyncTask < String , String , Integer > { public InitiateDatabase ( ) { } @ Override protected Integer doInBackground ( String ... strings ) { } } private class StoreWorkHours extends AsyncTask < Void , Void , Integer > { private String workDate ; private String workHours ; private String workDescription ; public StoreWorkHours ( String hours , String description , String date ) { } @ Override protected Integer doInBackground ( Void ... strings ) { Time ts = new Time ( ) ; ts . setToNow ( ) ; SQLiteDatabase db = myDbHelper . getWritableDatabase ( ) ; if ( ( ( workDate . isEmpty ( ) ) || ( workHours . isEmpty ( ) ) ) || ( workDescription . isEmpty ( ) ) ) { return 0 ; } <START_BUG> SimpleDateFormat inputFormat = new SimpleDateFormat ( "dd.MM.yyyy" , Locale . getDefault ( ) ) ; <END_BUG> Date parsedWorkDate = new Date ( ) ; try { parsedWorkDate = inputFormat . parse ( workDate ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } SimpleDateFormat outputFormat = new SimpleDateFormat ( "yyyy-MM-dd" , Locale . getDefault ( ) ) ; try { workDate = outputFormat . format ( parsedWorkDate ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } ContentValues values = new ContentValues ( ) ; values . put ( COLUMN_NAME_DATE , workDate ) ; values . put ( COLUMN_NAME_HOURS , workHours ) ; values . put ( COLUMN_NAME_DESCRIPTION , workDescription ) ; values . put ( COLUMN_NAME_TS , ts . toMillis ( false ) ) ; db . insert ( TABLE_NAME , COLUMN_NAME_NULLABLE , values ) ; db . close ( ) ; return 1 ; } @ Override protected void onPostExecute ( Integer result ) { } } public static class DatePickerFragment extends DialogFragment implements DatePickerDialog . OnDateSetListener { @ Override public Dialog onCreateDialog ( Bundle savedInstanceState ) { } public void onDateSet ( DatePicker view , int year , int month , int day ) { } } @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override public void onDialogPositiveClick ( DialogFragment dialog ) { } @ Override public void onDialogNegativeClick ( DialogFragment dialog ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } public boolean onOptionsItemSelected ( MenuItem item ) { } public void showWorkDatePickerDialog ( View view ) { } public void workSendConfirm ( View view ) { } }

Fix:
SimpleDateFormat inputFormat = new SimpleDateFormat ( "yyyy//MM//dd" , Locale . getDefault ( ) ) ;
Buggy code:
public class TaskActivity extends Activity { private TextView titleTextView ; private TextView tagsTextView ; private TableLayout datesTableLayout ; private TableRow startTableRow ; private TextView startTextView ; private TableRow deadlineTableRow ; private TextView deadlineTextView ; private TextView descriptionTextView ; private OnItemClickListener taskStatusChangeListener ; private OnDeleteListener deleteTaskListener ; private long currentTaskId ; private Task currentTask ; @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public void onResume ( ) { } private void updateInterface ( ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { boolean eventHandled = false ; List < Task > tasks = null ; switch ( item . getItemId ( ) ) { case id . taskMenu_status : tasks = new LinkedList < Task > ( ) ; tasks . add ( currentTask ) ; ChangeTaskStatusDialogFragment statusFragment = new ChangeTaskStatusDialogFragment ( tasks ) ; statusFragment . setOnItemClickListener ( this . taskStatusChangeListener ) ; statusFragment . show ( getFragmentManager ( ) , "change_task_status" ) ; eventHandled = true ; break ; case id . taskMenu_edit : long currentTaskId = currentTask . getId ( ) ; Intent intent = new Intent ( this , EditTaskActivity . class ) ; <START_BUG> intent . putExtra ( "action" , "edit" ) ; <END_BUG> intent . putExtra ( "task_id" , currentTaskId ) ; startActivity ( intent ) ; eventHandled = true ; break ; case id . taskMenu_delete : tasks = new LinkedList < Task > ( ) ; tasks . add ( currentTask ) ; DeleteTaskDialogFragment deleteFragment = new DeleteTaskDialogFragment ( tasks ) ; deleteFragment . setOnDeleteListener ( this . deleteTaskListener ) ; deleteFragment . show ( getFragmentManager ( ) , "delete_task" ) ; eventHandled = true ; break ; default : eventHandled = super . onOptionsItemSelected ( item ) ; break ; } return eventHandled ; } }

Fix:
intent . putExtra ( "mode" , "edit" ) ;
Buggy code:
public class MidPointIntegrator extends BaseAbstractUnivariateIntegrator { public static final int MIDPOINT_MAX_ITERATIONS_COUNT = 64 ; public MidPointIntegrator ( final double relativeAccuracy , final double absoluteAccuracy , final int minimalIterationCount , final int maximalIterationCount ) throws NotStrictlyPositiveException , NumberIsTooLargeException , NumberIsTooSmallException { } public MidPointIntegrator ( final int minimalIterationCount , final int maximalIterationCount ) throws NotStrictlyPositiveException , NumberIsTooLargeException , NumberIsTooSmallException { } public MidPointIntegrator ( ) { } private double stage ( final int n , double previousStageResult ) throws TooManyEvaluationsException { final double min = getMin ( ) ; final double diff = ( getMax ( ) ) - min ; if ( n == 0 ) { <START_BUG> final double midPoint = 0.5 * diff ; <END_BUG> return diff * ( computeObjectiveValue ( midPoint ) ) ; } else { final long np = 1L << ( n - 1 ) ; double sum = 0 ; final double spacing = diff // np ; double x = min + ( 0.5 * spacing ) ; for ( long i = 0 ; i < np ; i ++ ) { sum += computeObjectiveValue ( x ) ; x += spacing ; } return 0.5 * ( previousStageResult + ( sum * spacing ) ) ; } } protected double doIntegrate ( ) throws MathIllegalArgumentException , MaxCountExceededException , TooManyEvaluationsException { } }

Fix:
final double midPoint = min + ( 0.5 * diff ) ;
Buggy code:
public class RAttributeAttributeGroup extends org . tigris . scarab . om . BaseRAttributeAttributeGroup implements Persistent { public void delete ( ScarabUser user ) throws Exception { Module module = getAttributeGroup ( ) . getModule ( ) ; <START_BUG> if ( user . hasPermission ( MODULE__EDIT , module ) ) { <END_BUG> Criteria c = new Criteria ( ) . add ( GROUP_ID , getGroupId ( ) ) . add ( ATTRIBUTE_ID , getAttributeId ( ) ) ; RAttributeAttributeGroupPeer . doDelete ( c ) ; } else { throw new org . tigris . scarab . util . ScarabException ( ScarabConstants . NO_PERMISSION_MESSAGE ) ; } } }

Fix:
if ( user . hasPermission ( MODULE__CONFIGURE , module ) ) {
Buggy code:
@ Deprecated public class FilePassivationStoreAdd extends PassivationStoreAdd { public FilePassivationStoreAdd ( AttributeDefinition ... attributes ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > serviceControllers ) throws IllegalArgumentException , OperationFailedException { int initialMaxSize = MAX_SIZE . resolveModelAttribute ( context , model ) . asInt ( ) ; String containerName = CACHE_CONTAINER . getDefaultValue ( ) . asString ( ) ; <START_BUG> this . install ( context , operation , initialMaxSize , containerName , "passivation" , verificationHandler , serviceControllers ) ; <END_BUG> } }

Fix:
this . install ( context , operation , initialMaxSize , containerName , null , verificationHandler , serviceControllers ) ;
Buggy code:
public final class SharedStoreBackupActivation extends Activation { private SharedStoreSlavePolicy sharedStoreSlavePolicy ; private ActiveMQServerImpl activeMQServer ; private final Object failbackCheckerGuard = new Object ( ) ; private boolean cancelFailBackChecker ; public SharedStoreBackupActivation ( ActiveMQServerImpl server , SharedStoreSlavePolicy sharedStoreSlavePolicy ) { } public void run ( ) { } public void close ( boolean permanently , boolean restarting ) throws Exception { } @ Override public JournalLoader createJournalLoader ( PostOffice postOffice , PagingManager pagingManager , StorageManager storageManager , QueueFactory queueFactory , NodeManager nodeManager , ManagementService managementService , GroupingHandler groupingHandler , Configuration configuration , ActiveMQServer parentServer ) throws ActiveMQException { <START_BUG> if ( ( sharedStoreSlavePolicy . getScaleDownPolicy ( ) ) != null ) { <END_BUG> return new BackupRecoveryJournalLoader ( postOffice , pagingManager , storageManager , queueFactory , nodeManager , managementService , groupingHandler , configuration , parentServer , ScaleDownPolicy . getScaleDownConnector ( sharedStoreSlavePolicy . getScaleDownPolicy ( ) , activeMQServer ) , activeMQServer . getClusterManager ( ) . getClusterController ( ) ) ; } else { return super . createJournalLoader ( postOffice , pagingManager , storageManager , queueFactory , nodeManager , managementService , groupingHandler , configuration , parentServer ) ; } } private void startFailbackChecker ( ) { } private class FailbackChecker implements Runnable { private boolean restarting = false ; public void run ( ) { } } }

Fix:
if ( ( ( sharedStoreSlavePolicy . getScaleDownPolicy ( ) ) != null ) && ( sharedStoreSlavePolicy . getScaleDownPolicy ( ) . isEnabled ( ) ) ) {
Buggy code:
public class BalancedBinaryTree { public boolean isBalanced ( BSTNode root ) { } private int getHeight ( BSTNode root ) { } private int checkHeight ( BSTNode root ) { if ( root == null ) { return 0 ; } int leftHeight = checkHeight ( root . left ) ; if ( leftHeight == ( - 1 ) ) { return - 1 ; } int rightHeight = checkHeight ( root . right ) ; if ( rightHeight == ( - 1 ) ) { return - 1 ; } int heightDifference = leftHeight - rightHeight ; if ( ( Math . abs ( heightDifference ) ) > 1 ) { return - 1 ; } else { <START_BUG> return Math . max ( leftHeight , rightHeight ) ; <END_BUG> } } public boolean isBalancedBetter ( BSTNode root ) { } }

Fix:
return ( Math . max ( leftHeight , rightHeight ) ) + 1 ;
Buggy code:
public class TerminItemDB { Connection connection = null ; public TerminItemDB ( ) { } public ArrayList < TerminItem > getAllTermineItems ( ) { } public void addTerminItem ( TerminItem terminItem ) { String query = "insert<seq2seq4repair_space>into<seq2seq4repair_space>termin<seq2seq4repair_space>(tidatum,<seq2seq4repair_space>ti_kid,<seq2seq4repair_space>ticheck,<seq2seq4repair_space>tireihenfolge)<seq2seq4repair_space>values<seq2seq4repair_space>(?,?,<seq2seq4repair_space>?,<seq2seq4repair_space>?)" ; try { PreparedStatement pstm = connection . prepareStatement ( query ) ; <START_BUG> pstm . setString ( 1 , "" ) ; <END_BUG> pstm . setInt ( 2 , terminItem . getKundenId ( ) ) ; pstm . setBoolean ( 3 , false ) ; pstm . setInt ( 4 , terminItem . getRoutenReihenfolge ( ) ) ; pstm . execute ( ) ; pstm . close ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } public void deleteTerminItem ( int kid , String datum ) { } public ArrayList < TerminItem > getTerminItemsOfSpecificDay ( String datum ) { } No newline ; at end ; of file ; }

Fix:
pstm . setString ( 1 , terminItem . getDatum ( ) ) ;
Buggy code:
public class Party implements HUDDataSource { private List < Person > members = new ArrayList < Person > ( ) ; private int money ; private Party . Pace currentPace ; private Party . Rations currentRations ; private Vehicle vehicle ; private int location ; private List < Animal > animals = new ArrayList < Animal > ( ) ; public enum Pace { STEADY ( "Steady" , 20 ) , STRENUOUS ( "Strenuous" , 40 ) , GRUELING ( "Grueling" , 60 ) ; private final String name ; private final int speed ; private Pace ( String name , int speed ) { } @ Override public String toString ( ) { } public int getSpeed ( ) { } } public enum Rations { FILLING ( "Filling" , 100 ) , MEAGER ( "Meager" , 50 ) , BAREBONES ( "Barebones" , 25 ) ; private final String name ; private final int rationAmount ; private Rations ( String name , int rationAmount ) { } @ Override public String toString ( ) { } public int getRationAmount ( ) { } } public Party ( ) { } public Party ( Party . Pace currentPace , Party . Rations currentRations , List < Person > party ) { } public void buyItemForInventory ( List < Item > items , Inventoried buyer ) { } public List < Inventoried > canGetItem ( Item . ITEM_TYPE itemType , int numberOf ) { } public List < Person > getPartyMembers ( ) { } public List < Person . Skill > getSkills ( ) { } public int getMoney ( ) { } public void setMoney ( int money ) { } public Vehicle getVehicle ( ) { } public void setVehicle ( Vehicle vehicle ) { } public Party . Pace getPace ( ) { } public void setPace ( Party . Pace currentPace ) { } public Party . Rations getRations ( ) { } public void setRations ( Party . Rations rations ) { } @ Override public String toString ( ) { } public int getLocation ( ) { } public List < String > walk ( ) { } private double getMoveModifier ( ) { } private List < Animal > getAnimals ( ) { } public void heal ( Person person , int amount ) { } public void healToFull ( Person person ) { } public void grazeAnimal ( Animal animal ) { <START_BUG> animal . getStatus ( ) . increase ( 50 ) ; <END_BUG> } public void feedAnimal ( Animal animal ) { } public String checkHungerStatus ( Person person ) { } public void addAnimals ( List < Animal > animalList ) { } }

Fix:
animal . increaseStatus ( 50 ) ;
Buggy code:
public class TestRunner extends BaseTestRunner { PrintStream fWriter = System . out ; int fColumn = 0 ; public static final int SUCCESS_EXIT = 0 ; public static final int FAILURE_EXIT = 1 ; public static final int EXCEPTION_EXIT = 2 ; public TestRunner ( ) { } public TestRunner ( PrintStream writer ) { } public TestSuiteLoader getLoader ( ) { } public void testFailed ( int status , Test test , Throwable t ) { } public void testStarted ( String testName ) { } public void testEnded ( String testName ) { } protected TestResult createTestResult ( ) { } public TestResult doRun ( Test test ) { } public TestResult doRun ( Test suite , boolean wait ) { } protected void pause ( boolean wait ) { } public static void main ( String [ ] args ) { } public synchronized void print ( TestResult result ) { } public void printErrors ( TestResult result ) { } public void printFailures ( TestResult result ) { } public void printHeader ( TestResult result ) { if ( result . wasSuccessful ( ) ) { getWriter ( ) . println ( ) ; getWriter ( ) . print ( "OK" ) ; <START_BUG> getWriter ( ) . println ( ( ( "<seq2seq4repair_space>(" + ( result . runCount ( ) ) ) + "<seq2seq4repair_space>tests)" ) ) ; <END_BUG> } else { getWriter ( ) . println ( ) ; getWriter ( ) . println ( "FAILURES!!!" ) ; getWriter ( ) . println ( ( ( ( ( ( "Tests<seq2seq4repair_space>run:<seq2seq4repair_space>" + ( result . runCount ( ) ) ) + ",<seq2seq4repair_space>Failures:<seq2seq4repair_space>" ) + ( result . failureCount ( ) ) ) + ",<seq2seq4repair_space>Errors:<seq2seq4repair_space>" ) + ( result . errorCount ( ) ) ) ) ; } } public static void run ( Class testClass ) { } public static TestResult run ( Test test ) { } public static void runAndWait ( Test suite ) { } protected TestResult start ( String [ ] args ) throws Exception { } protected void runFailed ( String message ) { } protected PrintStream getWriter ( ) { } }

Fix:
getWriter ( ) . println ( ( ( ( ( "<seq2seq4repair_space>(" + ( result . runCount ( ) ) ) + "<seq2seq4repair_space>test" ) + ( ( result . runCount ( ) ) == 1 ? "" : "s" ) ) + ")" ) ) ;
Buggy code:
public abstract class AbstractLineDecoration implements LineDecoration { static final long serialVersionUID = 1577970039258356627L ; private Color fFillColor ; private Color fBorderColor ; private transient Rectangle myBounds ; public AbstractLineDecoration ( ) { } public void draw ( Graphics g , int x1 , int y1 , int x2 , int y2 ) { } public Rectangle displayBox ( ) { } public abstract Polygon outline ( int x1 , int y1 , int x2 , int y2 ) { } public void write ( StorableOutput dw ) { } public void read ( StorableInput dr ) throws IOException { String fillColorId = dr . readString ( ) ; <START_BUG> if ( fillColorId . equals ( FRAME_COLOR . getName ( ) ) ) { <END_BUG> setFillColor ( FigureAttributes . readColor ( dr ) ) ; } String borderColorId = dr . readString ( ) ; if ( ( borderColorId . equals ( "BorderColor" ) ) || ( borderColorId . equals ( FRAME_COLOR . getName ( ) ) ) ) { setBorderColor ( FigureAttributes . readColor ( dr ) ) ; } } public void setFillColor ( Color fillColor ) { } public Color getFillColor ( ) { } public void setBorderColor ( Color borderColor ) { } public Color getBorderColor ( ) { } }

Fix:
if ( fillColorId . equals ( FILL_COLOR . getName ( ) ) ) {
Buggy code:
public class TypeAliasParser extends Parser { private static final int END = - 1 ; private static final int TYPE = 1 ; private static final int NAME = 2 ; private static final int TYPE_PARAMETERS = 4 ; private static final int TYPE_PARAMETERS_END = 8 ; private static final int EQUAL = 16 ; protected ITypeAliasMap map ; protected ITypeAlias typeAlias ; public TypeAliasParser ( ITypeAliasMap map ) { } public TypeAliasParser ( ITypeAliasMap map , ITypeAlias typeAlias ) { } @ Override public void parse ( IParserManager pm , IToken token ) { int type = token . type ( ) ; switch ( this . mode ) { case TypeAliasParser . END : this . map . addTypeAlias ( this . typeAlias ) ; pm . popParser ( true ) ; return ; case TypeAliasParser . TYPE : this . mode = TypeAliasParser . NAME ; if ( type != ( DyvilKeywords . TYPE ) ) { pm . reparse ( ) ; pm . report ( token , "typealias.type" ) ; } return ; case TypeAliasParser . NAME : if ( ParserUtil . isIdentifier ( type ) ) { Name name = token . nameValue ( ) ; <START_BUG> this . typeAlias = new dyvil . tools . compiler . ast . type . alias . TypeAlias ( name ) ; <END_BUG> this . mode = TypeAliasParser . TYPE_PARAMETERS ; return ; } pm . popParser ( ) ; pm . report ( token , "typealias.identifier" ) ; return ; case TypeAliasParser . TYPE_PARAMETERS : if ( type == ( BaseSymbols . OPEN_SQUARE_BRACKET ) ) { this . typeAlias . setTypeParameterized ( ) ; this . mode = TypeAliasParser . TYPE_PARAMETERS_END ; pm . pushParser ( new dyvil . tools . compiler . parser . type . TypeParameterListParser ( this . typeAlias ) ) ; return ; } case TypeAliasParser . EQUAL : this . mode = TypeAliasParser . END ; pm . pushParser ( pm . newTypeParser ( this . typeAlias ) ) ; if ( type != ( BaseSymbols . EQUALS ) ) { pm . reparse ( ) ; pm . report ( token , "typealias.equals" ) ; } return ; case TypeAliasParser . TYPE_PARAMETERS_END : this . mode = TypeAliasParser . EQUAL ; if ( type != ( BaseSymbols . CLOSE_SQUARE_BRACKET ) ) { pm . reparse ( ) ; pm . report ( token , "typealias.generic.close_bracket" ) ; } return ; } } }

Fix:
this . typeAlias = new dyvil . tools . compiler . ast . type . alias . TypeAlias ( name , token . raw ( ) ) ;
Buggy code:
public class Utility { private static final String LOG_TAG = Utility . class . getSimpleName ( ) ; public static final float ABSORB_THREASHOLD_RATE = ( ( float ) ( 1.1 ) ) ; public static int generateRandomInt ( int lo , int hi ) { } public static float generateRandomFloat ( float lo , float hi ) { } public static int generateRandomNonWhite_Transparent_BlackColor ( ) { } public static boolean isAbsorbableLarger ( AbstractCircle largeCircle , AbstractCircle smallCircle ) { } public static boolean canAbsorb ( AbstractCircle largeCircle , AbstractCircle smallCircle ) { if ( ! ( Utility . isAbsorbableLarger ( largeCircle , smallCircle ) ) ) { return false ; } <START_BUG> return ( ( Utility . pointsDistance ( largeCircle . getmCenter ( ) , smallCircle . getmCenter ( ) ) ) + ( smallCircle . getmRadius ( ) ) ) <= ( 1.1 * ( largeCircle . getmRadius ( ) ) ) ; <END_BUG> } public static float pointsDistance ( PointF p1 , PointF p2 ) { } No newline ; at end ; of file ; }

Fix:
return ( Utility . pointsDistance ( largeCircle . getmCenter ( ) , smallCircle . getmCenter ( ) ) ) <= ( ( largeCircle . getmRadius ( ) ) - ( smallCircle . getmRadius ( ) ) ) ;
Buggy code:
public class IDFactory { private static final Trace debug = Trace . create ( "idfactory" ) ; public static final String SECURITY_PROPERTY = ( IDFactory . class . getName ( ) ) + ".security" ; private static Hashtable namespaces = new Hashtable ( ) ; private static boolean securityEnabled = false ; public static final Namespace addNamespace ( Namespace n ) throws SecurityException { } protected static final Namespace addNamespace0 ( Namespace n ) { } protected static final void checkPermission ( NamespacePermission p ) throws SecurityException { } public static final boolean containsNamespace ( Namespace n ) throws SecurityException { } public static final List getNamespaces ( ) { } private static void debug ( String msg ) { } private static void dumpStack ( String msg , Throwable e ) { } protected static final boolean containsNamespace0 ( Namespace n ) { } public static final Namespace getNamespace ( Namespace n ) throws SecurityException { } public static final Namespace getNamespaceByName ( String name ) throws SecurityException { IDFactory . debug ( ( ( "getNamespaceByName(" + name ) + ")" ) ) ; <START_BUG> Namespace ns = new Namespace ( null , name , null , null ) ; <END_BUG> return IDFactory . getNamespace ( ns ) ; } protected static final Namespace getNamespace0 ( Namespace n ) { } public static final ID makeGUID ( ) throws IDInstantiationException { } public static final ID makeGUID ( int length ) throws IDInstantiationException { } protected static void log ( String s ) { } protected static void logException ( String s , Throwable t ) { } protected static void logAndThrow ( String s , Throwable t ) throws IDInstantiationException { } protected static void logAndThrow ( String s ) throws IDInstantiationException { } public static final ID makeID ( Namespace n , String [ ] argTypes , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( String namespacename , String [ ] argTypes , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( Namespace n , Object [ ] args ) throws IDInstantiationException { } public static final ID makeID ( String namespacename , Object [ ] args ) throws IDInstantiationException { } public static final ID makeStringID ( String idstring ) throws IDInstantiationException { } public static final ID makeLongID ( Long l ) throws IDInstantiationException { } public static final ID makeLongID ( long l ) throws IDInstantiationException { } public static final Namespace removeNamespace ( Namespace n ) throws SecurityException { } protected static final Namespace removeNamespace0 ( Namespace n ) { } }

Fix:
Namespace ns = new Namespace ( null , name , name , null ) ;
Buggy code:
@ Singleton @ Startup @ LocalBean @ Lock ( LockType . READ ) public class HistoryCacheServiceBean { @ Inject private Logger LOG ; @ EJB private CacheManagerServiceBean cacheManagerService ; private RemoteCache < PayloadHistory , PayloadHistory > countersCache ; private QueryFactory < Query > qf ; @ PostConstruct private void init ( ) { } public void store ( String payload ) { } public Map < String , Long > countHistoryByLastMins ( final Integer minutes ) { Map < String , Long > counters = null ; try { GregorianCalendar calendar = new GregorianCalendar ( ) ; <START_BUG> calendar . add ( Calendar . MINUTE , ( - 1 ) ) ; <END_BUG> Query query = null ; QueryBuilder < Query > qb = qf . from ( PayloadHistory . class ) . select ( Expression . property ( "payload" ) , Expression . count ( "timestamp" ) ) . having ( "timestamp" ) . gte ( calendar . getTime ( ) ) . toBuilder ( ) ; qb . groupBy ( "payload" ) ; query = qb . build ( ) ; List < Object [ ] > results = query . list ( ) ; counters = new TreeMap < > ( ) ; for ( Object [ ] result : results ) { counters . put ( ( ( String ) ( result [ 0 ] ) ) , ( ( Long ) ( result [ 1 ] ) ) ) ; } } catch ( Exception e ) { LOG . error ( "Error<seq2seq4repair_space>find<seq2seq4repair_space>results<seq2seq4repair_space>by<seq2seq4repair_space>piva" , e ) ; } return counters ; } }

Fix:
calendar . add ( Calendar . MINUTE , ( minutes * ( - 1 ) ) ) ;
Buggy code:
public class HttpManagementWriteAttributeHandler extends AbstractWriteAttributeHandler < Void > { private final LocalHostControllerInfoImpl hostControllerInfo ; private final HostControllerEnvironment environment ; public HttpManagementWriteAttributeHandler ( final LocalHostControllerInfoImpl hostControllerInfo , final HostControllerEnvironment environment ) { } @ Override protected boolean applyUpdateToRuntime ( OperationContext context , ModelNode operation , String attributeName , ModelNode resolvedValue , ModelNode currentValue , HandbackHolder < Void > handbackHolder ) throws OperationFailedException { } @ Override protected void revertUpdateToRuntime ( final OperationContext context , final ModelNode operation , final String attributeName , final ModelNode valueToRestore , final ModelNode valueToRevert , final Void handback ) throws OperationFailedException { } static void updateHttpManagementService ( final OperationContext context , final ModelNode subModel , final LocalHostControllerInfoImpl hostControllerInfo , final HostControllerEnvironment environment , final ServiceVerificationHandler verificationHandler ) throws OperationFailedException { HttpManagementRemoveHandler . removeHttpManagementService ( context ) ; HttpManagementAddHandler . populateHostControllerInfo ( hostControllerInfo , context , subModel ) ; <START_BUG> HttpManagementAddHandler . installHttpManagementServices ( context . getServiceTarget ( ) , hostControllerInfo , environment , verificationHandler ) ; <END_BUG> } }

Fix:
HttpManagementAddHandler . installHttpManagementServices ( context . getRunningMode ( ) , context . getServiceTarget ( ) , hostControllerInfo , environment , verificationHandler ) ;
Buggy code:
abstract class AbstractSingleSelectChoice < T > extends AbstractChoice < T , T > { private static final String CHOOSE_ONE = "Choose<seq2seq4repair_space>One" ; private static final String NO_SELECTION_VALUE = "-1" ; private static final String EMPTY_STRING = "" ; private boolean nullValid = false ; public AbstractSingleSelectChoice ( MarkupContainer parent , final String id ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , final String id , final List < T > choices ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , final String id , final List < T > data , final IChoiceRenderer < T > renderer ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > data ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , final String id , IModel < T > model , final List < T > data , final IChoiceRenderer < T > renderer ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , String id , IModel < List < T > > choices ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , String id , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } public AbstractSingleSelectChoice ( MarkupContainer parent , String id , IModel < T > model , IModel < List < T > > choices , IChoiceRenderer < T > renderer ) { } @ Override public final String getModelValue ( ) { } public boolean isNullValid ( ) { } public AbstractSingleSelectChoice < T > setNullValid ( boolean nullValid ) { } @ Override protected final T convertValue ( final String [ ] value ) { } @ Override protected CharSequence getDefaultChoiceMarkup ( final Object selected ) { if ( isNullValid ( ) ) { final String option = getDefaultChoiceText ( ) ; final AppendingStringBuffer buffer = new AppendingStringBuffer ( ( 32 + ( option . length ( ) ) ) ) ; buffer . append ( "\n<option" ) ; if ( selected == null ) { buffer . append ( "<seq2seq4repair_space>selected=\"selected\"" ) ; } buffer . append ( "<seq2seq4repair_space>value=\"\">" ) . append ( option ) . append ( "<//option>" ) ; return buffer ; } else { if ( ( ( selected == null ) || ( selected . equals ( AbstractSingleSelectChoice . NO_SELECTION_VALUE ) ) ) || ( selected . equals ( AbstractSingleSelectChoice . EMPTY_STRING ) ) ) { <START_BUG> final String option = AbstractSingleSelectChoice . getLocalizer ( ) . getString ( "null" , this , AbstractSingleSelectChoice . CHOOSE_ONE ) ; <END_BUG> return new AppendingStringBuffer ( "\n<option<seq2seq4repair_space>selected=\"selected\"<seq2seq4repair_space>value=\"\">" ) . append ( option ) . append ( "<//option>" ) ; } } return "" ; } protected String getDefaultChoiceText ( ) { } @ Override protected boolean isSelected ( final T object , int index , String selected ) { } }

Fix:
final String option = getDefaultChoiceText ( ) ;
Buggy code:
public class EditorUtils { public static Range computeNewCaretPosition ( Range oldCaretPosition ) { Range newCaretPos = null ; if ( oldCaretPosition . isCollapsed ( ) ) { newCaretPos = oldCaretPosition . cloneRange ( ) ; <START_BUG> if ( EditorUtils . isNonEmptyTextNode ( oldCaretPosition . getStartContainer ( ) ) ) { <END_BUG> return oldCaretPosition ; } else { List < Text > leftTextNodesInSameP = EditorUtils . getLeftTextNodesInSameP ( oldCaretPosition ) ; int leftSize = leftTextNodesInSameP . size ( ) ; if ( leftSize > 0 ) { Text firstLeftTextNode = leftTextNodesInSameP . get ( ( leftSize - 1 ) ) ; newCaretPos . setStart ( firstLeftTextNode , firstLeftTextNode . getLength ( ) ) ; } else { List < Text > rightTextNodesInSameP = EditorUtils . getRightTextNodesInSameP ( oldCaretPosition ) ; if ( ( rightTextNodesInSameP . size ( ) ) > 0 ) { Text firstRightTextNode = rightTextNodesInSameP . get ( 0 ) ; newCaretPos . setStart ( firstRightTextNode , 0 ) ; } } } newCaretPos . collapse ( true ) ; } return newCaretPos ; } public static Node getAncestorBelowParagraph ( Node node ) { } public static Node getAncestorParagraph ( Node node ) { } public static List < OperationTarget > getIntermediaryTargets ( Range range ) { } public static List < Text > getNonEmptyTextNodes ( Range range ) { } private static List < Text > getLeftTextNodesInSameP ( Range range ) { } private static List < Text > getRightTextNodesInSameP ( Range range ) { } public static boolean isNonEmptyTextNode ( Node node ) { } public Node getPreviousNodeInSameParagraph ( Range range ) { } }

Fix:
if ( ( EditorUtils . isNonEmptyTextNode ( oldCaretPosition . getStartContainer ( ) ) ) && ( ( oldCaretPosition . getStartOffset ( ) ) > 0 ) ) {
Buggy code:
public class BatchImageBuilder extends AbstractImageBuilder implements ICompilerRequestor , IImageBuilder { protected boolean fDoingBatchBuild = false ; public BatchImageBuilder ( StateImpl state ) { } protected BatchImageBuilder ( StateImpl state , ConfigurableOption [ ] options ) { } public void build ( ) { } public IDelta getImageDelta ( IImageContext imageContext ) { } public void lazyBuild ( PackageElement unit ) { <START_BUG> Assert . isTrue ( false , Util . bind ( "build.lazyBuildDisabled" ) ) ; <END_BUG> } public String toString ( ) { } }

Fix:
Assert . isTrue ( false , "Internal<seq2seq4repair_space>Error<seq2seq4repair_space>-<seq2seq4repair_space>Lazy<seq2seq4repair_space>building<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>disabled" ) ;
Buggy code:
public abstract class AbstractStringList implements Serializable , IStringSequence { public abstract IStringIterator iterator ( ) { } public abstract int size ( ) { } public abstract String get ( int index ) { } public String [ ] toArray ( ) { } public final List toList ( ) { } public int totalLength ( ) { } public final String join ( ) { } public final String join ( final String separator ) { } public final String join ( final int first , final int last , final String separator ) { final int length = ( totalLength ( ) ) + ( ( separator . length ( ) ) * ( Math . max ( 0 , ( ( last - first ) - 1 ) ) ) ) ; <START_BUG> final StringBuffer buf = new StringBuffer ( length ) ; <END_BUG> for ( int i = first ; i < last ; i ++ ) { buf . append ( get ( i ) ) ; if ( i != ( last - 1 ) ) { buf . append ( separator ) ; } } return buf . toString ( ) ; } public String toString ( ) { } }

Fix:
final AppendingStringBuffer buf = new AppendingStringBuffer ( length ) ;
Buggy code:
public class ToolFactory { public static ICodeFormatter createCodeFormatter ( ) { } public static ICodeFormatter createDefaultCodeFormatter ( Map options ) { } public static IClassFileDisassembler createDefaultClassFileDisassembler ( ) { } public static IClassFileReader createDefaultClassFileReader ( String fileName , int decodingFlag ) { } public static IClassFileReader createDefaultClassFileReader ( IClassFile classfile , int decodingFlag ) { IPackageFragmentRoot root = ( ( IPackageFragmentRoot ) ( classfile . getAncestor ( IJavaElement . PACKAGE_FRAGMENT_ROOT ) ) ) ; if ( root != null ) { try { if ( root instanceof JarPackageFragmentRoot ) { String archiveName = ( ( JarPackageFragmentRoot ) ( root ) ) . getJar ( ) . getName ( ) ; String entryName = classfile . getParent ( ) . getElementName ( ) ; entryName = entryName . replace ( '.' , '//' ) ; if ( entryName . equals ( "" ) ) { entryName += classfile . getElementName ( ) ; } else { entryName += '//' + ( classfile . getElementName ( ) ) ; } return ToolFactory . createDefaultClassFileReader ( archiveName , entryName , decodingFlag ) ; } else { <START_BUG> return ToolFactory . createDefaultClassFileReader ( classfile . getCorrespondingResource ( ) . getLocation ( ) . toOSString ( ) , decodingFlag ) ; <END_BUG> } } catch ( CoreException e ) { } } return null ; } public static IClassFileReader createDefaultClassFileReader ( String zipFileName , String zipEntryName , int decodingFlag ) { } public static IScanner createScanner ( boolean tokenizeComments , boolean tokenizeWhiteSpace , boolean assertMode , boolean recordLineSeparator ) { } }

Fix:
return ToolFactory . createDefaultClassFileReader ( classfile . getPath ( ) . toOSString ( ) , decodingFlag ) ;
Buggy code:
public abstract class AbstractClasspathResource extends Resource { private Path classpath ; private Reference loader ; private boolean parentFirst = true ; public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public Path getClasspath ( ) { } public Reference getLoader ( ) { } public void setLoaderRef ( Reference r ) { } public void setParentFirst ( boolean b ) { } public void setRefid ( Reference r ) { } public boolean isExists ( ) { } public InputStream getInputStream ( ) throws IOException { if ( isReference ( ) ) { return ( ( Resource ) ( getCheckedRef ( ) ) ) . getInputStream ( ) ; } dieOnCircularReference ( ) ; ClassLoader cl = null ; if ( ( loader ) != null ) { cl = ( ( ClassLoader ) ( loader . getReferencedObject ( ) ) ) ; } if ( cl == null ) { if ( ( getClasspath ( ) ) != null ) { <START_BUG> Path p = getClasspath ( ) . concatSystemClasspath ( ) ; <END_BUG> if ( parentFirst ) { cl = getProject ( ) . createClassLoader ( p ) ; } else { cl = AntClassLoader . newAntClassLoader ( getProject ( ) . getCoreLoader ( ) , getProject ( ) , p , false ) ; } } else { cl = JavaResource . class . getClassLoader ( ) ; } if ( ( ( loader ) != null ) && ( cl != null ) ) { getProject ( ) . addReference ( loader . getRefId ( ) , cl ) ; } } return openInputStream ( cl ) ; } protected abstract InputStream openInputStream ( ClassLoader cl ) throws IOException { } protected synchronized void dieOnCircularReference ( Stack stk , Project p ) { } }

Fix:
Path p = getClasspath ( ) . concatSystemClasspath ( "ignore" ) ;
Buggy code:
public class Simulador { protected Boolean servidorOcupado = false ; protected Temporizador temporizador ; protected Fila fila ; protected MetricaDeInteresse metricaDeInteresse ; public Simulador ( Double tempoFinal , Classe classeObrigatoria , Classe ... classes ) { } protected void setServidorOcupado ( Boolean servidorOcupado ) { } protected Boolean getServidorOcupado ( ) { } protected Temporizador getTemporizador ( ) { } protected Fila getFila ( ) { } public MetricaDeInteresse getMetricaDeInteresse ( ) { } protected void prepararSimulacao ( List < Classe > classes ) { } protected void LiberaServidorEBuscaNovoCliente ( Double horarioDeEntradaNoServidor , Cliente cliente ) { } protected void ProcessarCliente ( Cliente cliente ) { } protected void InsereClienteNaFila ( Double horarioDeEntrada , Classe classe ) { Cliente cliente = new Cliente ( classe , horarioDeEntrada ) ; if ( ! ( servidorOcupado ) ) { cliente . setTempoSaida ( horarioDeEntrada ) ; ProcessarCliente ( cliente ) ; } else { <START_BUG> fila . adicionar ( cliente ) ; <END_BUG> } temporizador . registrarTarefaPorAtraso ( Random . Exponencial ( classe . getLambda ( ) ) , ( tempo ) -> InsereClienteNaFila ( tempo , classe ) ) ; } public MetricaDeInteresse iniciarSimulacao ( ) { } public MetricaDeInteresse continuarSimulação ( Double tempoFinal ) { } }

Fix:
fila . adicionar ( cliente , false ) ;
Buggy code:
public final class TopItems { private static final long [ ] NO_IDS = new long [ 0 ] ; private TopItems ( ) { } public static List < RecommendedItem > getTopItems ( int howMany , LongPrimitiveIterator possibleItemIDs , IDRescorer rescorer , TopItems . Estimator < Long > estimator ) throws TasteException { if ( ( possibleItemIDs == null ) || ( estimator == null ) ) { throw new IllegalArgumentException ( "argument<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; } Queue < RecommendedItem > topItems = new PriorityQueue < RecommendedItem > ( ( howMany + 1 ) , Collections . reverseOrder ( ) ) ; boolean full = false ; double lowestTopValue = Double . NEGATIVE_INFINITY ; while ( possibleItemIDs . hasNext ( ) ) { long itemID = possibleItemIDs . next ( ) ; if ( ( rescorer == null ) || ( ! ( rescorer . isFiltered ( itemID ) ) ) ) { double preference ; try { preference = estimator . estimate ( itemID ) ; } catch ( NoSuchItemException nsie ) { continue ; } double rescoredPref = ( rescorer == null ) ? preference : rescorer . rescore ( itemID , preference ) ; if ( ( ! ( Double . isNaN ( rescoredPref ) ) ) && ( ( ! full ) || ( rescoredPref > lowestTopValue ) ) ) { topItems . add ( new GenericRecommendedItem ( itemID , ( ( float ) ( rescoredPref ) ) ) ) ; if ( full ) { topItems . poll ( ) ; } else if ( ( topItems . size ( ) ) > howMany ) { full = true ; topItems . poll ( ) ; } lowestTopValue = topItems . peek ( ) . getValue ( ) ; } } } int size = topItems . size ( ) ; if ( size == 0 ) { return Collections . emptyList ( ) ; } List < RecommendedItem > result = new ArrayList < RecommendedItem > ( size ) ; result . addAll ( topItems ) ; <START_BUG> Collections . sort ( result ) ; <END_BUG> return result ; } public static long [ ] getTopUsers ( int howMany , LongPrimitiveIterator allUserIDs , IDRescorer rescorer , TopItems . Estimator < Long > estimator ) throws TasteException { } public static List < GenericItemSimilarity . ItemItemSimilarity > getTopItemItemSimilarities ( int howMany , Iterable < GenericItemSimilarity . ItemItemSimilarity > allSimilarities ) { } public static List < GenericUserSimilarity . UserUserSimilarity > getTopUserUserSimilarities ( int howMany , Iterable < GenericUserSimilarity . UserUserSimilarity > allSimilarities ) { } public interface Estimator < T > { double estimate ( T thing ) throws TasteException { } } }

Fix:
Collections . sort ( result , ByValueRecommendedItemComparator . getInstance ( ) ) ;
Buggy code:
public class TypeConstraint extends SortableConstraint { private static final Logger logger = Logger . getLogger ( TypeConstraint . class . getName ( ) ) ; protected HttpServletRequest request = null ; protected String rawType = null ; protected String type = null ; @ Override public boolean checkAndConfigure ( String part , SecurityContext securityContext , HttpServletRequest request ) { } @ Override public List < GraphObject > doGet ( final List < VetoableGraphObjectListener > listeners ) throws PathException { } @ Override public RestMethodResult doPost ( final Map < String , Object > propertySet , final List < VetoableGraphObjectListener > listeners ) throws Throwable { } @ Override public RestMethodResult doHead ( ) throws Throwable { } @ Override public RestMethodResult doOptions ( ) throws Throwable { } public String getType ( ) { } public void setType ( String type ) { } public AbstractNode createNode ( final List < VetoableGraphObjectListener > listeners , final Map < String , Object > propertySet ) throws Throwable { } @ Override public ResourceConstraint tryCombineWith ( ResourceConstraint next ) throws PathException { } @ Override public String getUriPart ( ) { <START_BUG> return type ; <END_BUG> } @ Override public boolean isCollectionResource ( ) { } public String getRawType ( ) { } protected boolean hasSearchableAttributes ( List < SearchAttribute > searchAttributes ) { } private int parseInteger ( Object source ) { } }

Fix:
return rawType ;
Buggy code:
public abstract class ListView extends WebMarkupContainer { private int firstIndex = 0 ; private boolean optimizeItemRemoval = false ; private int viewSize = Integer . MAX_VALUE ; public ListView ( final String id ) { } public ListView ( final String id , final IModel model ) { } public ListView ( final String id , final List list ) { } public final List getList ( ) { } public boolean getOptimizeItemRemoval ( ) { } public final int getStartIndex ( ) { } public int getViewSize ( ) { } public final Link moveDownLink ( final String id , final ListItem item ) { } public final Link moveUpLink ( final String id , final ListItem item ) { } public final Link removeLink ( final String id , final ListItem item ) { } public ListView setOptimizeItemRemoval ( boolean optimizeItemRemoval ) { } public ListView setStartIndex ( final int startIndex ) { } public ListView setViewSize ( final int size ) { } protected IModel getListItemModel ( final IModel listViewModel , final int index ) { } protected void internalOnBeginRequest ( ) { } protected ListItem newItem ( final int index ) { } protected void onBeginPopulateItem ( final ListItem item ) { } protected void onRender ( final MarkupStream markupStream ) { } protected abstract void populateItem ( final ListItem item ) { } protected void renderItem ( final ListItem item ) { <START_BUG> item . render ( ) ; <END_BUG> } }

Fix:
item . render ( getMarkupStream ( ) ) ;
Buggy code:
public class ServerModelDeploymentStartUpdate extends AbstractServerModelUpdate < Void > { private static final long serialVersionUID = 5773083013951607950L ; private ServerGroupDeploymentElement deploymentElement ; private final String deploymentUnitName ; public ServerModelDeploymentStartUpdate ( final String deploymentUnitName ) { } public String getDeploymentUnitName ( ) { } @ Override public ServerModelDeploymentStopUpdate getCompensatingUpdate ( ServerModel original ) { } @ Override public void applyUpdate ( ServerModel serverModel ) throws UpdateFailedException { } @ Override public < P > void applyUpdate ( final UpdateContext updateContext , final UpdateResultHandler < ? super Void , P > resultHandler , final P param ) { <START_BUG> final ServiceName deploymentUnitServiceName = JBOSS_DEPLOYMENT . append ( deploymentUnitName ) ; <END_BUG> final ServiceRegistry serviceRegistry = updateContext . getServiceRegistry ( ) ; final ServiceController < ? > controller = serviceRegistry . getService ( deploymentUnitServiceName ) ; if ( ( deploymentElement ) != null ) { if ( controller != null ) { controller . setMode ( ACTIVE ) ; } else { final ServiceTarget serviceTarget = updateContext . getServiceTarget ( ) ; final RootDeploymentUnitService service = new RootDeploymentUnitService ( deploymentUnitName , deploymentElement . getRuntimeName ( ) , deploymentElement . getSha1Hash ( ) , null ) ; serviceTarget . addService ( deploymentUnitServiceName , service ) . addDependency ( JBOSS_DEPLOYMENT_CHAINS , DeployerChains . class , service . getDeployerChainsInjector ( ) ) . addDependency ( SERVICE_NAME , ServerDeploymentRepository . class , service . getServerDeploymentRepositoryInjector ( ) ) . setInitialMode ( ACTIVE ) . install ( ) ; if ( resultHandler != null ) resultHandler . handleSuccess ( null , param ) ; } } else if ( resultHandler != null ) { resultHandler . handleSuccess ( null , param ) ; } } }

Fix:
final ServiceName deploymentUnitServiceName = Services . deploymentUnitName ( deploymentUnitName ) ;
Buggy code:
public class StrictValidator extends DefaultLuaValidator { @ Override public void addValidation ( MethodVisitor mv , Class < ? > type ) { if ( type . equals ( boolean . class ) ) { mv . visitTypeInsn ( INSTANCEOF , "org//luaj//vm2//LuaBoolean" ) ; } else if ( ( ( ( ( ( ( type . equals ( byte . class ) ) || ( type . equals ( int . class ) ) ) || ( type . equals ( char . class ) ) ) || ( type . equals ( short . class ) ) ) || ( type . equals ( float . class ) ) ) || ( type . equals ( double . class ) ) ) || ( type . equals ( long . class ) ) ) { mv . visitTypeInsn ( INSTANCEOF , "org//luaj//vm2//LuaNumber" ) ; } else if ( type . equals ( String . class ) ) { <START_BUG> mv . visitTypeInsn ( INSTANCEOF , "org//luaj//vm2//Sting" ) ; <END_BUG> } else if ( LuaValue . class . isAssignableFrom ( type ) ) { mv . visitTypeInsn ( INSTANCEOF , Type . getInternalName ( type ) ) ; } else { throw new APIBuilder . BuilderException ( ( "Cannot<seq2seq4repair_space>validate<seq2seq4repair_space>" + ( type . getName ( ) ) ) ) ; } } }

Fix:
mv . visitTypeInsn ( INSTANCEOF , "org//luaj//vm2//LuaString" ) ;