nus-yam/ex-repair huggingface dataset:
Buggy code:
public class CommitsNotificationActorTest { @ Test public void branchLinkUrlTest ( ) throws UnsupportedEncodingException { String ownerLoginid = "whiteship" ; String proejctName = "yobi" ; <START_BUG> String branchName = URLEncoder . encode ( "refs//heads//feature//review" , "UTF-8" ) ; <END_BUG> String url = routes . CodeApp . codeBrowserWithBranch ( ownerLoginid , proejctName , branchName , "" ) . url ( ) ; assertThat ( url ) . isEqualTo ( "//whiteship//yobi//code//refs%2Fheads%2Ffeature%2Freview" ) ; } }

Fix:
String branchName = "refs//heads//feature//review" ;
Buggy code:
public abstract class TableSorter < T > { static final String key = TableSorter . class . getName ( ) ; private final Table table ; @ Nullable private final Comparator < ? super T > comparator ; private boolean enabled ; protected TableSorter ( final Table table ) { } protected TableSorter ( final Table table , @ Nullable final Comparator < ? super T > comparator ) { } public final class Handle { private final TableSorter < T > . Handle . Switcher switcher ; Handle ( final SortDirection direction ) { } private final class Switcher implements Listener { SortDirection direction ; Switcher ( final SortDirection direction ) { } public void handleEvent ( final Event event ) { } } public TableSorter < T > . Handle attach ( final TableColumn column ) { column . addListener ( Selection , this . switcher ) ; <START_BUG> column . setData ( TableSorter . key , this ) ; <END_BUG> return this ; } public TableSorter < T > . Handle detach ( final TableColumn column ) { } } public final TableSorter < T > . Handle attach ( final TableColumn column ) { return this . attach ( column , UP ) ; } public final TableSorter < T > . Handle attach ( final TableColumn column , final SortDirection direction ) { } private static TableSorter < ? > fetch ( final TableColumn column ) { } private static final void attachedSort ( final TableColumn column , final SortDirection direction ) { } public static final void automaticSort ( final Table table ) { } public static final void automaticSort ( final Table table , final TableColumn defaultColumn , final SortDirection defaultDirection ) { } public static final void enable ( final Table table , final boolean value ) { } public static final void enable ( final TableColumn column , final boolean value ) { } public final void sort ( final TableColumn column , final SortDirection direction ) { } @ SuppressWarnings ( "unchecked" ) private void directionSort ( final List < T > data , final SortDirection direction , final Comparator < ? super T > comparator ) { } public abstract Iterable < T > loadData ( ) { } public abstract void updateData ( Iterable < ? extends T > data ) { } public final void setEnabled ( final boolean value ) { } public final Table getTable ( ) { } @ Nullable public final Comparator < ? super T > getComparator ( ) { } public final boolean isEnabled ( ) { } }

Fix:
column . setData ( TableSorter . key , TableSorter . this ) ;
Buggy code:
public class ByteConverter extends AbstractIntegerConverter < Byte > { private static final long serialVersionUID = 1L ; public static final IConverter < Byte > INSTANCE = new ByteConverter ( ) ; public Byte convertToObject ( final String value , Locale locale ) { final Number number = parse ( value , Byte . MIN_VALUE , Byte . MAX_VALUE , locale ) ; if ( number == null ) { return null ; } <START_BUG> return new Byte ( number . byteValue ( ) ) ; <END_BUG> } @ Override protected Class < Byte > getTargetType ( ) { } }

Fix:
return number . byteValue ( ) ;
Buggy code:
public class BusinessFolderService { @ Inject protected SaleOrderServiceSupplychainImpl saleOrderService ; public SaleOrder createSaleOrder ( BusinessFolder businessFolder ) throws AxelorException { } public SaleOrder createSaleOrderFromTemplate ( BusinessFolder businessFolder ) throws AxelorException { <START_BUG> SaleOrder saleOrder = saleOrderService . createSaleOrder ( businessFolder . getTemplate ( ) ) ; <END_BUG> if ( ( businessFolder . getCustomer ( ) ) != null ) { saleOrder . setClientPartner ( businessFolder . getCustomer ( ) ) ; saleOrder = saleOrderService . getClientInformations ( saleOrder ) ; } return saleOrder ; } }

Fix:
SaleOrder saleOrder = saleOrderService . createSaleOrder ( businessFolder . getTemplateSaleOrder ( ) ) ;
Buggy code:
public class RuntimeConfigurable { private Vector children = new Vector ( ) ; private Object wrappedObject = null ; private AttributeList attributes ; private StringBuffer characters = new StringBuffer ( ) ; public RuntimeConfigurable ( Object proxy ) { } void setProxy ( Object proxy ) { } public void setAttributes ( AttributeList attributes ) { } public AttributeList getAttributes ( ) { } public void addChild ( RuntimeConfigurable child ) { } RuntimeConfigurable getChild ( int index ) { } public void addText ( String data ) { } public void addText ( char [ ] buf , int start , int end ) { } public void maybeConfigure ( Project p ) throws BuildException { if ( ( attributes ) != null ) { ProjectHelper . configure ( wrappedObject , attributes , p ) ; attributes = null ; } if ( ( characters . length ( ) ) != 0 ) { <START_BUG> ProjectHelper . addText ( wrappedObject , characters . toString ( ) ) ; <END_BUG> characters . setLength ( 0 ) ; } Enumeration = children . elements ( ) ; } }

Fix:
ProjectHelper . addText ( p , wrappedObject , characters . toString ( ) ) ;
Buggy code:
public class IslandGuardNew implements Listener { private final ASkyBlock plugin ; private final boolean debug = false ; public IslandGuardNew ( final ASkyBlock plugin ) { } @ EventHandler ( priority = EventPriority . LOW ) public void onPlayerInteract ( final PlayerInteractAtEntityEvent e ) { if ( debug ) { plugin . getLogger ( ) . info ( e . getEventName ( ) ) ; } if ( ! ( IslandGuard . inWorld ( e . getPlayer ( ) ) ) ) { return ; } if ( e . getPlayer ( ) . isOp ( ) ) { return ; } if ( VaultHelper . checkPerm ( e . getPlayer ( ) , ( ( Settings . PERMPREFIX ) + "mod.bypassprotect" ) ) ) { return ; } if ( ( ( e . getRightClicked ( ) ) != null ) && ( e . getRightClicked ( ) . getType ( ) . equals ( ARMOR_STAND ) ) ) { Island island = plugin . getGrid ( ) . getIslandAt ( e . getRightClicked ( ) . getLocation ( ) ) ; <START_BUG> if ( ( island != null ) && ( island . getIgsFlag ( allowArmorStandUse ) ) ) { <END_BUG> return ; } e . setCancelled ( true ) ; e . getPlayer ( ) . sendMessage ( ( ( ChatColor . RED ) + ( plugin . myLocale ( e . getPlayer ( ) . getUniqueId ( ) ) . islandProtected ) ) ) ; } } @ SuppressWarnings ( "deprecation" ) @ EventHandler ( priority = EventPriority . LOW ) public void onPlayerInteract ( final PlayerInteractEvent e ) { } @ EventHandler ( priority = EventPriority . LOWEST ) void placeArmorStandEvent ( PlayerInteractEvent e ) { } @ EventHandler ( priority = EventPriority . LOW ) public void ArmorStandDestroy ( EntityDamageByEntityEvent e ) { } No newline ; at end ; of file ; }

Fix:
if ( ( island != null ) && ( ( island . getMembers ( ) . contains ( e . getPlayer ( ) . getUniqueId ( ) ) ) || ( island . getIgsFlag ( allowArmorStandUse ) ) ) ) {
Buggy code:
public class Robot extends IterativeRobot { private F310Gamepad gamepad ; private DriveTrain driveTrain ; private TeleopDriveTrainController teleopDriveTrainController ; public void robotInit ( ) { } public void autonomousPeriodic ( ) { } public void teleopPeriodic ( ) { <START_BUG> this . driveTrainController . translateCurrInputToDrivingInstructions ( ) ; <END_BUG> } public void testPeriodic ( ) { } }

Fix:
this . teleopDriveTrainController . translateCurrInputToDrivingInstructions ( ) ;
Buggy code:
class EventTableGateway { private static final String TABLE_NAME = "event" ; private static final String COLUMN_ID = "id" ; private static final String COLUMN_DATE = "date" ; private static final String COLUMN_TIME = "time" ; private static final String COLUMN_TITLE = "title" ; private static final String COLUMN_ATTENDING = "attending" ; private static final String COLUMN_ADDRESS = "address" ; private static final String COLUMN_EVENTMANAGER = "eventManager" ; private static final String COLUMN_PRICE = "price" ; private Connection mConnection ; public EventTableGateway ( Connection connection ) { } <START_BUG> public int insertEvent ( String d , String tm , String tt , String at , String ad , String em , double p ) throws SQLException { <END_BUG> String query ; PreparedStatement stmt ; int numRowsAffected ; int id = - 1 ; query = ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( ( "INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" + ( EventTableGateway . TABLE_NAME ) ) + "<seq2seq4repair_space>(" ) + ( EventTableGateway . COLUMN_ID ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_DATE ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_TIME ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_TITLE ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_ATTENDING ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_ADDRESS ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_EVENTMANAGER ) ) + ",<seq2seq4repair_space>" ) + ( EventTableGateway . COLUMN_PRICE ) ) + ")<seq2seq4repair_space>VALUES<seq2seq4repair_space>(?,<seq2seq4repair_space>?,<seq2seq4repair_space>?,<seq2seq4repair_space>?,<seq2seq4repair_space>?,<seq2seq4repair_space>?,<seq2seq4repair_space>?)" ; stmt = mConnection . prepareStatement ( query , Statement . RETURN_GENERATED_KEYS ) ; stmt . setString ( 1 , d ) ; stmt . setString ( 2 , tm ) ; stmt . setString ( 3 , tt ) ; stmt . setString ( 4 , at ) ; stmt . setString ( 5 , ad ) ; stmt . setString ( 6 , em ) ; stmt . setDouble ( 7 , p ) ; numRowsAffected = stmt . executeUpdate ( ) ; if ( numRowsAffected == 1 ) { ResultSet keys = stmt . getGeneratedKeys ( ) ; keys . next ( ) ; id = keys . getInt ( 1 ) ; } return id ; } public boolean deleteEvent ( int id ) throws SQLException { } public List < Event > getEvents ( ) throws SQLException { } boolean updateEvent ( Event e ) throws SQLException { } }

Fix:
public int insertEvent ( String d , String tm , String tt , String at , double p , String ad , String em ) throws SQLException {
Buggy code:
public class BeanValidationFactoryDeployer implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void bindFactoryToJndi ( LazyValidatorFactory factory , DeploymentUnit deploymentUnit , DeploymentPhaseContext phaseContext , EEModuleDescription moduleDescription ) { if ( moduleDescription == null ) { return ; } final ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; if ( DeploymentTypeMarker . isType ( WAR , deploymentUnit ) ) { final ServiceName moduleContextServiceName = ContextNames . contextServiceNameOfModule ( moduleDescription . getAppName ( ) , moduleDescription . getModuleName ( ) ) ; bindServices ( factory , deploymentUnit , serviceTarget , moduleDescription , moduleDescription . getModuleName ( ) , moduleContextServiceName ) ; } for ( AbstractComponentDescription component : moduleDescription . getComponentDescriptions ( ) ) { if ( ( component . getNamingMode ( ) ) == ( ComponentNamingMode . CREATE ) ) { final ServiceName compContextServiceName = ContextNames . contextServiceNameOfComponent ( moduleDescription . getAppName ( ) , moduleDescription . getModuleName ( ) , component . getComponentName ( ) ) ; <START_BUG> bindServices ( factory , deploymentUnit , serviceTarget , moduleDescription , moduleDescription . getModuleName ( ) , compContextServiceName ) ; <END_BUG> } } } private void bindServices ( LazyValidatorFactory factory , DeploymentUnit deploymentUnit , ServiceTarget serviceTarget , EEModuleDescription description , String componentName , ServiceName contextServiceName ) { } @ Override public void undeploy ( DeploymentUnit context ) { } private static final class ValidatorJndiInjectable implements ManagedReferenceFactory { private final ValidatorFactory factory ; public ValidatorJndiInjectable ( ValidatorFactory factory ) { } @ Override public ManagedReference getReference ( ) { } } }

Fix:
bindServices ( factory , deploymentUnit , serviceTarget , moduleDescription , component . getComponentName ( ) , compContextServiceName ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class ConsoleCompletionsPageParticipant implements IConsolePageParticipant { public static class GetCompletionsInDebug implements ICommandResponseListener , IScriptConsoleCommunication { private static final ICompletionProposal [ ] EMPTY_COMPLETION_PROPOSALS = new ICompletionProposal [ 0 ] ; private String actTok ; private String text ; private int offset ; private volatile List < Object [ ] > receivedXmlCompletions ; private CurrentPyStackFrameForConsole currentPyStackFrameForConsole ; public GetCompletionsInDebug ( CurrentPyStackFrameForConsole currentPyStackFrameForConsole ) { } public String getDescription ( String text ) throws Exception { } @ Override public boolean isConnected ( ) { } public ICompletionProposal [ ] getCompletions ( String text , String actTok , int offset , boolean showForTabCompletion ) throws Exception { } private ICompletionProposal [ ] waitForCommand ( ) { int i = 300 ; while ( ( ( -- i ) > 0 ) && ( ( receivedXmlCompletions ) == null ) ) { try { Thread . sleep ( 10 ) ; } catch ( InterruptedException e ) { } } List < Object [ ] > fromServer = receivedXmlCompletions ; receivedXmlCompletions = null ; if ( fromServer == null ) { Log . logInfo ( "Timeout<seq2seq4repair_space>for<seq2seq4repair_space>waiting<seq2seq4repair_space>for<seq2seq4repair_space>debug<seq2seq4repair_space>completions<seq2seq4repair_space>elapsed<seq2seq4repair_space>(3<seq2seq4repair_space>seconds)." ) ; return ConsoleCompletionsPageParticipant . GetCompletionsInDebug . EMPTY_COMPLETION_PROPOSALS ; } List < ICompletionProposal > ret = new ArrayList < ICompletionProposal > ( fromServer . size ( ) ) ; <START_BUG> PydevConsoleCommunication . convertToICompletions ( text , actTok , offset , fromServer , ret , false ) ; <END_BUG> return ret . toArray ( new ICompletionProposal [ 0 ] ) ; } public void execInterpreter ( String command , ICallback < Object , InterpreterResponse > onResponseReceived ) { } @ Override public void interrupt ( ) { } @ Override public void setOnContentsReceivedCallback ( ICallback < Object , Tuple < String , String > > onContentsReceived ) { } public void close ( ) throws Exception { } public void commandComplete ( AbstractDebuggerCommand cmd ) { } public void linkWithDebugSelection ( boolean isLinkedWithDebug ) { } } private PyContentAssistant contentAssist ; public Object getAdapter ( Class adapter ) { } public void init ( IPageBookViewPage page , final IConsole console ) { } public void dispose ( ) { } public void activated ( ) { } public void deactivated ( ) { } }

Fix:
PydevConsoleCommunication . convertConsoleCompletionsToICompletions ( text , actTok , offset , fromServer , ret , false ) ;
Buggy code:
public class TargetLast extends TargetingMethod { private Map map = GameData . getInstance ( ) . getMap ( ) ; private List < Creep > creeps = map . getCreeps ( ) ; @ Override public Creep getTarget ( Vector2 towerPosition , double towerRange ) { if ( ( creeps . size ( ) ) > 0 ) { List < Creep > inRange = new ArrayList < Creep > ( ) ; for ( Creep c : creeps ) { if ( isWithinRange ( c , towerPosition , towerRange ) ) { inRange . add ( c ) ; } } if ( ( inRange . size ( ) ) <= 0 ) { return null ; } Creep target = inRange . get ( 0 ) ; double distanceToWaypoint = 0 ; int waypointNumber = 99999 ; for ( Creep creep : inRange ) { <START_BUG> if ( ( ( creep . getDistanceToNextWayPoint ( ) ) > distanceToWaypoint ) && ( ( creep . getNextWayPointID ( ) ) < waypointNumber ) ) { <END_BUG> target = creep ; distanceToWaypoint = creep . getDistanceToNextWayPoint ( ) ; waypointNumber = creep . getNextWayPointID ( ) ; } } return target ; } return null ; } }

Fix:
if ( ( ( creep . getDistanceToNextWayPoint ( ) ) > distanceToWaypoint ) && ( ( creep . getNextWayPointID ( ) ) <= waypointNumber ) ) {
Buggy code:
public class RChelp extends RCCommand { @ Override public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args ) { } public static void printCommandList ( CommandSender sender , Map commands , String [ ] args , ChatColor infoColor , ChatColor errorColor ) { String [ ] lines = new String [ commands . size ( ) ] ; int i = 0 ; for ( Object command : commands . keySet ( ) ) { lines [ i ] = ( ( ( ( ChatColor . YELLOW ) + ( command . toString ( ) ) ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( ( ( Map ) ( commands . get ( command ) ) ) . get ( "description" ) ) ; i ++ ; } <START_BUG> CommandUtils . pageMaker ( sender , "RedstoneChips<seq2seq4repair_space>commands" , "rchelp" , lines , infoColor , errorColor , ( ( CommandUtils . MaxLines ) - 1 ) ) ; <END_BUG> sender . sendMessage ( ( ( ( ( ( "Use<seq2seq4repair_space>" + ( ChatColor . YELLOW ) ) + ( sender instanceof Player ? "//" : "" ) ) + "rchelp<seq2seq4repair_space><command<seq2seq4repair_space>name>" ) + ( ChatColor . WHITE ) ) + "<seq2seq4repair_space>for<seq2seq4repair_space>help<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>specific<seq2seq4repair_space>command." ) ) ; } public static String getCommandHelp ( String command , org . tal . redstonechips . RedstoneChips rc ) { } }

Fix:
CommandUtils . pageMaker ( sender , "RedstoneChips<seq2seq4repair_space>commands" , "rchelp" , new ArrayLineSource ( lines ) , infoColor , errorColor , ( ( CommandUtils . MaxLines ) - 1 ) ) ;
Buggy code:
public class DateTime2ColumnTypeValueParser implements ColumnTypeValueParser { private static final long DATETIMEF_INT_OFS = 549755813888L ; @ Override public Object parse ( byte [ ] buf , Position pos , ColumnDefinition columnDef , int meta ) { long val = myDatetimePackedFromBinary ( buf , pos , meta ) ; long ymdhms = val > > > 24 ; long ymd = ymdhms > > > 17 ; long ym = ymd > > 5 ; long hms = ymdhms % ( 1L << 17 ) ; int day = ( ( int ) ( ymd % ( 1 << 5 ) ) ) ; int month = ( ( int ) ( ym % 13 ) ) ; int year = ( ( int ) ( ym // 13 ) ) ; int second = ( ( int ) ( hms % ( 1 << 6 ) ) ) ; int minute = ( ( int ) ( ( hms > > 6 ) % ( 1 << 6 ) ) ) ; int hour = ( ( int ) ( hms > > 12 ) ) ; Calendar cal = Calendar . getInstance ( ) ; <START_BUG> cal . set ( year , month , day , hour , minute , second ) ; <END_BUG> return cal . getTime ( ) ; } private long myDatetimePackedFromBinary ( byte [ ] buf , Position pos , int dec ) { } }

Fix:
cal . set ( year , ( month - 1 ) , day , hour , minute , second ) ;
Buggy code:
public class TableTest extends CleanupHelper { private static final DecoratedKey KEY2 = Util . dk ( "key2" ) ; private static final DecoratedKey TEST_KEY = Util . dk ( "key1" ) ; private static final DecoratedKey TEST_SLICE_KEY = Util . dk ( "key1-slicerange" ) ; public static void reTest ( ColumnFamilyStore cfs , Runnable verify ) throws Exception { } @ Test public void testGetRowNoColumns ( ) throws Throwable { } @ Test public void testGetRowSingleColumn ( ) throws Throwable { } @ Test public void testGetRowSliceByRange ( ) throws Throwable { } @ Test public void testGetSliceNoMatch ( ) throws Throwable { } @ Test public void testGetSliceWithCutoff ( ) throws Throwable { } @ Test public void testGetSliceWithBitmasks ( ) throws Throwable { } private void validateGetSliceNoMatch ( Table table ) throws IOException { } @ Test public void testGetSliceFromBasic ( ) throws Throwable { } @ Test public void testGetSliceFromAdvanced ( ) throws Throwable { } @ Test public void testGetSliceFromLarge ( ) throws Throwable { } private void validateSliceLarge ( ColumnFamilyStore cfStore ) throws IOException { } @ Test public void testGetSliceFromSuperBasic ( ) throws Throwable { final Table table = Table . open ( "Keyspace1" ) ; final ColumnFamilyStore cfStore = table . getColumnFamilyStore ( "Super1" ) ; final DecoratedKey ROW = Util . dk ( "row2" ) ; RowMutation rm = new RowMutation ( "Keyspace1" , ROW . key ) ; ColumnFamily cf = ColumnFamily . create ( "Keyspace1" , "Super1" ) ; <START_BUG> SuperColumn sc = new SuperColumn ( "sc1" . getBytes ( ) , LongType . instance , ClockType . Timestamp ) ; <END_BUG> sc . addColumn ( new Column ( Util . getBytes ( 1 ) , "val1" . getBytes ( ) , new TimestampClock ( 1L ) ) ) ; cf . addColumn ( sc ) ; rm . add ( cf ) ; rm . apply ( ) ; Runnable verify = new WrappedRunnable ( ) { public void runMayThrow ( ) throws Exception { ColumnFamily cf = cfStore . getColumnFamily ( ROW , new QueryPath ( "Super1" ) , EMPTY_BYTE_ARRAY , EMPTY_BYTE_ARRAY , false , 10 ) ; TableTest . assertColumns ( cf , "sc1" ) ; assertEquals ( new String ( cf . getColumn ( "sc1" . getBytes ( ) ) . getSubColumn ( Util . getBytes ( 1 ) ) . value ( ) ) , "val1" ) ; } } ; TableTest . reTest ( table . getColumnFamilyStore ( "Standard1" ) , verify ) ; } public static void assertColumns ( ColumnFamily cf , String ... columnNames ) { } public static void assertBitmaskedColumns ( ColumnFamily cf , List < byte [ ] > bitmasks , String ... unfilteredColumnNames ) { } public static void assertBitmaskedColumnsNameArray ( ColumnFamily cf , List < byte [ ] > bitmasks , String [ ] unfilteredColumnNames ) { } }

Fix:
SuperColumn sc = new SuperColumn ( "sc1" . getBytes ( ) , LongType . instance , ClockType . Timestamp , null ) ;
Buggy code:
public class EndGame extends BasicGameState { private ArrayList < Button > buttons ; private boolean hi = false ; public Context context ; private float score ; public float centX ; public float centY ; float halfWidth ; float halfHeight ; int index = 0 ; private char [ ] playerName = new char [ ] { 'A' , 'A' , 'A' } ; Leaderboards l = new Leaderboards ( ) ; EndGame ( float score ) { } @ Override public void init ( GameContainer gc , StateBasedGame game ) throws SlickException { context = new Context ( gc , gc . getGraphics ( ) ) ; buttons = new ArrayList < Button > ( ) ; Button backBtn = new Button ( context , new org . newdawn . slick . geom . Vector2f ( ( ( ( gc . getWidth ( ) ) // 2 ) - 75 ) , 450.0F ) , Context . getImage ( "back.png" ) , Context . getImage ( "highBack.png" ) ) ; backBtn . onClick ( ( ) -> { <START_BUG> if ( context . mute ) <END_BUG> Audio . playSound ( "testSample.wav" , MainMenu . mute ) ; if ( hi ) { submit ( ) ; } game . enterState ( 0 , new FadeOutTransition ( Color . black ) , new FadeInTransition ( Color . black ) ) ; } ) ; buttons . add ( backBtn ) ; centX = ( gc . getWidth ( ) ) // 2 ; centY = ( gc . getHeight ( ) ) // 2 ; halfHeight = ( gc . getHeight ( ) ) // 2 ; halfWidth = ( gc . getWidth ( ) ) // 2 ; } @ Override public void update ( GameContainer gc , StateBasedGame game , int i ) throws SlickException { } @ Override public void render ( GameContainer gc , StateBasedGame game , Graphics g ) throws SlickException { } public void showPlayerScore ( GameContainer gc , Graphics g , String playerScore ) { } public void askName ( GameContainer gc , Graphics g ) { } public void keyPressed ( int key , char c ) { } public void submit ( ) { } public char checkWhiteSpace ( char c , char temp ) { } @ Override public int getID ( ) { } }

Fix:
if ( ! context . mute )
Buggy code:
public class OSGiXServicesDeploymentProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; Deployment deployment = OSGiDeploymentAttachment . getAttachment ( deploymentUnit ) ; if ( deployment != null ) return ; String resName = "META-INF//jbosgi-xservice.properties" ; <START_BUG> VirtualFile virtualFile = phaseContext . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; <END_BUG> VirtualFile xserviceFile = virtualFile . getChild ( resName ) ; if ( xserviceFile . exists ( ) ) { try { OSGiMetaData metadata = OSGiMetaDataBuilder . load ( xserviceFile . openStream ( ) ) ; String location = virtualFile . getPathName ( ) ; String symbolicName = metadata . getBundleSymbolicName ( ) ; Version version = metadata . getBundleVersion ( ) ; deployment = DeploymentFactory . createDeployment ( AbstractVFS . adapt ( virtualFile ) , location , symbolicName , version ) ; deployment . addAttachment ( OSGiMetaData . class , metadata ) ; OSGiMetaDataAttachment . attachOSGiMetaData ( deploymentUnit , metadata ) ; OSGiDeploymentAttachment . attachDeployment ( deploymentUnit , deployment ) ; } catch ( IOException ex ) { throw new DeploymentUnitProcessingException ( ( "Cannot<seq2seq4repair_space>parse:<seq2seq4repair_space>" + xserviceFile ) ) ; } } } public void undeploy ( final DeploymentUnit context ) { } }

Fix:
VirtualFile virtualFile = phaseContext . getDeploymentUnit ( ) . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ;
Buggy code:
public class LifeWidget extends Actor { private static final float BAR_PADDING = 4.0F ; private NinePatch background ; private Player player ; private ValueProvider alphaValueProvider ; private ValueProvider healthValueProvider ; private float lastHealth ; private TweenManager tweenManager ; public LifeWidget ( Player player , TweenManager tweenManager ) { } @ Override public void draw ( Batch batch , float parentAlpha ) { super . draw ( batch , parentAlpha ) ; if ( ( lastHealth ) != ( player . getHealth ( ) ) ) { lastHealth = player . getHealth ( ) ; tweenManager . killTarget ( alphaValueProvider ) ; tweenManager . killTarget ( healthValueProvider ) ; alphaValueProvider . setValue ( 1.0F ) ; Tween . to ( alphaValueProvider , VALUE , 1.0F ) . target ( 0.0F ) . ease ( easeOutCubic ) . start ( tweenManager ) ; Tween . to ( healthValueProvider , VALUE , 0.5F ) . target ( player . getHealth ( ) ) . ease ( easeOutCubic ) . start ( tweenManager ) ; } background . getColor ( ) . a = parentAlpha * 0.1F ; background . draw ( batch , getX ( ) , getY ( ) , getWidth ( ) , getHeight ( ) ) ; <START_BUG> background . getColor ( ) . a = parentAlpha * ( 0.2F + ( alphaValueProvider . getValue ( ) ) ) ; <END_BUG> background . draw ( batch , ( ( getX ( ) ) + ( LifeWidget . BAR_PADDING ) ) , ( ( getY ( ) ) + ( LifeWidget . BAR_PADDING ) ) , ( ( ( getWidth ( ) ) - ( ( LifeWidget . BAR_PADDING ) * 2 ) ) * ( healthValueProvider . getValue ( ) ) ) , ( ( getHeight ( ) ) - ( ( LifeWidget . BAR_PADDING ) * 2 ) ) ) ; } }

Fix:
background . getColor ( ) . a = parentAlpha * ( 0.1F + ( alphaValueProvider . getValue ( ) ) ) ;
Buggy code:
public class TestCaseInsensitiveMap extends AbstractTestIterableMap { public TestCaseInsensitiveMap ( String testName ) { } public static void main ( String [ ] args ) { } public static Test suite ( ) { } public Map makeEmptyMap ( ) { } public String getCompatibilityVersion ( ) { } public void testCaseInsensitive ( ) { } public void testNullHandling ( ) { } public void testPutAll ( ) { } public void testClone ( ) { } public void testLocaleIndependence ( ) { Locale orig = Locale . getDefault ( ) ; <START_BUG> Locale [ ] locales = new Locale [ ] { Locale . ENGLISH , new Locale ( "tr" ) , Locale . getDefault ( ) } ; <END_BUG> String [ ] [ ] data = new String [ ] [ ] { new String [ ] { "i" , "I" } , new String [ ] { "ς" , "σ" } , new String [ ] { "Σ" , "ς" } , new String [ ] { "Σ" , "σ" } } ; try { for ( int i = 0 ; i < ( locales . length ) ; i ++ ) { Locale . setDefault ( locales [ i ] ) ; for ( int j = 0 ; j < ( data . length ) ; j ++ ) { assertTrue ( ( "Test<seq2seq4repair_space>data<seq2seq4repair_space>corrupt:<seq2seq4repair_space>" + j ) , data [ j ] [ 0 ] . equalsIgnoreCase ( data [ j ] [ 1 ] ) ) ; CaseInsensitiveMap map = new CaseInsensitiveMap ( ) ; map . put ( data [ j ] [ 0 ] , "value" ) ; assertEquals ( ( ( ( Locale . getDefault ( ) ) + ":<seq2seq4repair_space>" ) + j ) , "value" , map . get ( data [ j ] [ 1 ] ) ) ; } } } finally { Locale . setDefault ( orig ) ; } } }

Fix:
Locale [ ] locales = new Locale [ ] { Locale . ENGLISH , new Locale ( "tr" , "" , "" ) , Locale . getDefault ( ) } ;
Buggy code:
public class PortalApp extends JFrame { private static final long serialVersionUID = 1L ; private User m_user ; private DiscoveryPanel m_discoveryPanel ; public PortalApp ( User user ) { } public User getUser ( ) { } public boolean isPanelShowing ( ) { } public void addDiscoverer ( Discoverer d ) { } public void removeDiscoverer ( Discoverer d ) { } public void run ( ) { } public void hidePanel ( ) { } public void showPanel ( ) { } public static void main ( String [ ] args ) { User user = null ; try { user = UserUtils . s_readUser ( new File ( ( ( System . getProperty ( "user.home" ) ) + "//.fileportal" ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } if ( user == null ) { user = new User ( System . getProperty ( "user.name" ) ) ; user . setIcon ( DEFAULT_USER_ICON ) ; } final User u = user ; Runtime . getRuntime ( ) . addShutdownHook ( new Thread ( ) { @ Override public void run ( ) { if ( u != null ) { try { UserUtils . s_saveUser ( u , new File ( ( ( System . getProperty ( "user.home" ) ) + "//.fileportal" ) ) ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; } } } } ) ; LanDiscoverer disc = new LanDiscoverer ( user ) ; LanBroadcaster broad = new LanBroadcaster ( user ) ; LanIconServer icon = new LanIconServer ( user ) ; icon . start ( ) ; <START_BUG> FileReceiverServer server = new FileReceiverServer ( new GuiReceiverHandler ( ) ) ; <END_BUG> server . start ( ) ; disc . start ( ) ; broad . start ( ) ; PortalApp app = new PortalApp ( user ) ; app . addDiscoverer ( disc ) ; app . run ( ) ; } No newline ; at end ; of file ; }

Fix:
FileReceiverServer server = new FileReceiverServer ( new GuiReceiverHandler ( disc ) ) ;
Buggy code:
public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateComponentProvider { private final BeanDefinitionRegistry registry ; private BeanDefinitionDefaults beanDefinitionDefaults = new BeanDefinitionDefaults ( ) ; private String [ ] autowireCandidatePatterns ; private BeanNameGenerator beanNameGenerator = new AnnotationBeanNameGenerator ( ) ; private ScopeMetadataResolver scopeMetadataResolver = new AnnotationScopeMetadataResolver ( ) ; private boolean includeAnnotationConfig = true ; public ClassPathBeanDefinitionScanner ( BeanDefinitionRegistry registry ) { } public ClassPathBeanDefinitionScanner ( BeanDefinitionRegistry registry , boolean useDefaultFilters ) { } public ClassPathBeanDefinitionScanner ( BeanDefinitionRegistry registry , boolean useDefaultFilters , Environment environment ) { } public final BeanDefinitionRegistry getRegistry ( ) { } public void setBeanDefinitionDefaults ( BeanDefinitionDefaults beanDefinitionDefaults ) { } public void setAutowireCandidatePatterns ( String [ ] autowireCandidatePatterns ) { } public void setBeanNameGenerator ( BeanNameGenerator beanNameGenerator ) { } public void setScopeMetadataResolver ( ScopeMetadataResolver scopeMetadataResolver ) { } public void setScopedProxyMode ( ScopedProxyMode scopedProxyMode ) { } public void setIncludeAnnotationConfig ( boolean includeAnnotationConfig ) { } public int scan ( String ... basePackages ) { } protected Set < BeanDefinitionHolder > doScan ( String ... basePackages ) { } protected void postProcessBeanDefinition ( AbstractBeanDefinition beanDefinition , String beanName ) { } protected void registerBeanDefinition ( BeanDefinitionHolder definitionHolder , BeanDefinitionRegistry registry ) { } protected boolean checkCandidate ( String beanName , BeanDefinition beanDefinition ) throws IllegalStateException { } protected boolean isCompatible ( BeanDefinition newDefinition , BeanDefinition existingDefinition ) { <START_BUG> return ( ( ! ( existingDefinition instanceof AnnotatedBeanDefinition ) ) || ( newDefinition . getSource ( ) . equals ( existingDefinition . getSource ( ) ) ) ) || ( newDefinition . equals ( existingDefinition ) ) ; <END_BUG> } private static Environment getOrCreateEnvironment ( BeanDefinitionRegistry registry ) { } }

Fix:
return ( ( ! ( existingDefinition instanceof ScannedGenericBeanDefinition ) ) || ( newDefinition . getSource ( ) . equals ( existingDefinition . getSource ( ) ) ) ) || ( newDefinition . equals ( existingDefinition ) ) ;
Buggy code:
public abstract class Controller { private static String className ; protected HashMap < String , Object > resp ; protected HashMap < String , Object > parent ; protected ArrayList < HashMap < String , Object > > parents ; protected ArrayList < HashMap < ? , ? > > list = new ArrayList < HashMap < ? , ? > > ( ) ; protected Logger logger ; public Controller ( ) { } @ SuppressWarnings ( "unchecked" ) protected HashMap < String , Object > assemble ( Object list , HashMap < String , Object > params ) { } <START_BUG> public abstract HashMap < String , Object > index ( HashMap < String , Object > params ) ; <END_BUG> }

Fix:
public abstract HashMap < String , Object > index ( HashMap < String , Object > message ) ;
Buggy code:
public class NativeManagementRemoveHandler extends AbstractRemoveStepHandler { public static final NativeManagementRemoveHandler INSTANCE = new NativeManagementRemoveHandler ( ) ; private NativeManagementRemoveHandler ( ) { } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { final ServiceName endpointName = ManagementRemotingServices . MANAGEMENT_ENDPOINT ; ManagementRemotingServices . removeManagementChannelServices ( context , endpointName , MANAGEMENT_CHANNEL ) ; final ModelNode portNode = NATIVE_PORT . resolveModelAttribute ( context , model ) ; int port = ( portNode . isDefined ( ) ) ? portNode . asInt ( ) : 0 ; <START_BUG> ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR , port ) ; <END_BUG> context . removeService ( endpointName ) ; } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } }

Fix:
ManagementRemotingServices . removeConnectorServices ( context , MANAGEMENT_CONNECTOR ) ;
Buggy code:
public class HttpMirrorServer extends Thread implements Stoppable { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final int ACCEPT_TIMEOUT = 1000 ; private final int daemonPort ; private volatile boolean running ; private volatile Exception except ; public HttpMirrorServer ( int port ) { } @ Override public void run ( ) { } public void stopServer ( ) { } public Exception getException ( ) { } public static void main ( String [ ] args ) { <START_BUG> int port = 8080 ; <END_BUG> if ( ( args . length ) > 0 ) { port = Integer . parseInt ( args [ 0 ] ) ; } LoggingManager . setPriority ( "INFO" ) ; LoggingManager . setLoggingLevels ( System . getProperties ( ) ) ; HttpMirrorServer serv = new HttpMirrorServer ( port ) ; serv . start ( ) ; } }

Fix:
int port = 8081 ;
Buggy code:
public class InvitationsActivity extends ActionBarActivity { private Button mInviteButton ; private ListView mListView ; private List < UserBean > mData ; private User mCurrUser ; private UserDAO mUserDAO ; private InvitationsAdapter mAdapter ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { super . onResume ( ) ; mData = mUserDAO . getPending ( ) ; <START_BUG> mAdapter = new InvitationsAdapter ( this , mData , mCurrUser ) ; <END_BUG> mListView . setAdapter ( mAdapter ) ; } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
mAdapter = new InvitationsAdapter ( this , mData , mListView , mCurrUser ) ;
Buggy code:
public class DeadZone extends View { public static final String TAG = "DeadZone" ; public static final boolean DEBUG = false ; public static final int HORIZONTAL = 0 ; public static final int VERTICAL = 1 ; private static final boolean CHATTY = false ; private boolean mShouldFlash ; private float mFlashFrac = 0.0F ; private int mSizeMax ; private int mSizeMin ; private int mHold ; private int mDecay ; private boolean mVertical ; private boolean mStartFromRight ; private long mLastPokeTime ; private final Runnable mDebugFlash = new Runnable ( ) { @ Override public void run ( ) { } } ; public DeadZone ( Context context , AttributeSet attrs ) { } public DeadZone ( Context context , AttributeSet attrs , int defStyle ) { } static float lerp ( float a , float b , float f ) { } private float getSize ( long now ) { if ( ( mSizeMax ) == 0 ) return 0 ; long dt = now - ( mLastPokeTime ) ; if ( dt > ( ( mHold ) + ( mDecay ) ) ) <START_BUG> return mSizeMin ; <END_BUG> if ( dt < ( mHold ) ) return mSizeMax ; return ( ( int ) ( DeadZone . lerp ( mSizeMax , mSizeMin , ( ( ( float ) ( dt - ( mHold ) ) ) // ( mDecay ) ) ) ) ) ; } public void setFlashOnTouchCapture ( boolean dbg ) { } @ Override public boolean onTouchEvent ( MotionEvent event ) { } public void poke ( MotionEvent event ) { } public void setFlash ( float f ) { } public float getFlash ( ) { } public void setStartFromRight ( boolean startFromRight ) { } @ Override public void onDraw ( Canvas can ) { } }

Fix:
return 0 ;
Buggy code:
public class MailSessionAdd extends AbstractAddStepHandler { static final MailSessionAdd INSTANCE = new MailSessionAdd ( ) ; public static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "mail-session" ) ; protected MailSessionAdd ( ) { } @ Override protected void populateModel ( ModelNode existingModel , ModelNode newModel ) throws OperationFailedException { <START_BUG> Util . copyModel ( existingModel , newModel , JNDI_NAME , DEBUG , SERVER_TYPE ) ; <END_BUG> } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model , ServiceVerificationHandler verificationHandler , List < ServiceController < ? > > controllers ) throws OperationFailedException { } private void addOutboundSocketDependency ( MailSessionService service , ServiceBuilder < ? > mailSessionBuilder , MailSessionServer server ) { } }

Fix:
Util . copyModel ( existingModel , newModel , JNDI_NAME , DEBUG , FROM ) ;
Buggy code:
public class JavaSearchDocument extends SearchDocument { private IFile file ; protected byte [ ] byteContents ; protected char [ ] charContents ; public JavaSearchDocument ( String documentPath , SearchParticipant participant ) { } public JavaSearchDocument ( IFile file , SearchParticipant participant ) { } public JavaSearchDocument ( ZipEntry zipEntry , IPath zipFilePath , byte [ ] contents , SearchParticipant participant ) { } public byte [ ] getByteContents ( ) { } public char [ ] getCharContents ( ) { } public String getEncoding ( ) { } private IFile getFile ( ) { if ( ( this . file ) == null ) <START_BUG> this . file = ( ( IFile ) ( ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . findMember ( new Path ( getPath ( ) ) ) ) ) ; <END_BUG> return this . file ; } private IPath getLocation ( ) { } public String toString ( ) { } }

Fix:
this . file = ResourcesPlugin . getWorkspace ( ) . getRoot ( ) . getFile ( new Path ( getPath ( ) ) ) ;
Buggy code:
public class ArquillianDeploymentProcessor implements DeploymentUnitProcessor { private static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "arquillian" , "deployment" , "tracker" ) ; @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { <START_BUG> ArquillianConfig arqConfig = phaseContext . getAttachment ( KEY ) ; <END_BUG> if ( arqConfig == null ) return ; ServiceTarget serviceTarget = phaseContext . getServiceTarget ( ) ; ArquillianDeploymentProcessor . DeploymentTrackerService tracker = new ArquillianDeploymentProcessor . DeploymentTrackerService ( arqConfig ) ; ServiceBuilder < Object > serviceBuilder = serviceTarget . addService ( ArquillianDeploymentProcessor . SERVICE_NAME_BASE . append ( phaseContext . getDeploymentUnit ( ) . getName ( ) ) , tracker ) ; serviceBuilder . addDependency ( SERVICE_NAME , ArquillianService . class , tracker . injectedArquillianService ) ; Deployment osgiDeployment = OSGiDeploymentAttachment . getAttachment ( phaseContext . getDeploymentUnit ( ) ) ; if ( osgiDeployment != null ) { ServiceName serviceName = OSGiDeploymentService . getServiceName ( phaseContext . getDeploymentUnit ( ) . getName ( ) ) ; serviceBuilder . addDependency ( serviceName ) ; osgiDeployment . setAutoStart ( false ) ; } serviceBuilder . install ( ) ; } public void undeploy ( final DeploymentUnit context ) { } private class DeploymentTrackerService implements Service < Object > { private final ArquillianConfig arqConfig ; private final InjectedValue < ArquillianService > injectedArquillianService = new InjectedValue < ArquillianService > ( ) ; public DeploymentTrackerService ( ArquillianConfig arqConfig ) { } @ Override public void start ( StartContext context ) throws StartException { } @ Override public void stop ( StopContext context ) { } @ Override public Object getValue ( ) throws IllegalStateException { } } }

Fix:
ArquillianConfig arqConfig = phaseContext . getDeploymentUnit ( ) . getAttachment ( KEY ) ;
Buggy code:
public class LikeActivity extends Activity { private ListView l ; private LikeActivity . MessageAdapter Fadapter ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public class MessageAdapter extends BaseAdapter { private List < Posts > messagelist ; private Context context ; private LayoutInflater layoutInflater ; public class messagelistview { public TextView t1 ; public TextView t2 ; } public MessageAdapter ( Context context , List < Posts > objects ) { } @ Override public int getCount ( ) { } @ Override public Object getItem ( int position ) { } @ Override public long getItemId ( int position ) { } @ Override public View getView ( final int position , View convertView , ViewGroup parent ) { LikeActivity . MessageAdapter . messagelistview mlistview = null ; if ( convertView == null ) { mlistview = new LikeActivity . MessageAdapter . messagelistview ( ) ; convertView = layoutInflater . inflate ( listview , null ) ; mlistview . t1 = ( ( TextView ) ( convertView . findViewById ( listview_writer ) ) ) ; mlistview . t2 = ( ( TextView ) ( convertView . findViewById ( listview_title ) ) ) ; convertView . setTag ( mlistview ) ; } else { mlistview = ( ( LikeActivity . MessageAdapter . messagelistview ) ( convertView . getTag ( ) ) ) ; } mlistview . t1 . setText ( ( ( String ) ( messagelist . get ( position ) . getPostName ( ) ) ) ) ; mlistview . t2 . setText ( ( ( String ) ( messagelist . get ( position ) . getPostTitle ( ) ) ) ) ; l . setOnItemClickListener ( new AdapterView . OnItemClickListener ( ) { @ Override public void onItemClick ( AdapterView < ? > arg0 , View arg1 , int arg2 , long arg3 ) { Intent intent = new Intent ( LikeActivity . this , ContentActivity . class ) ; Bundle bundle = new Bundle ( ) ; <START_BUG> bundle . putString ( "PID" , String . valueOf ( messagelist . get ( position ) . getPostID ( ) ) ) ; <END_BUG> intent . putExtras ( bundle ) ; startActivity ( intent ) ; } } ) ; return convertView ; } } }

Fix:
bundle . putString ( "PID" , String . valueOf ( messagelist . get ( arg2 ) . getPostID ( ) ) ) ;
Buggy code:
public class Who extends CommandHandler { public Who ( DreamGuest pl ) { } public boolean onCommand ( CommandSender sender , Command cmd , String label , String [ ] args ) { } private String getLegend ( boolean canSeeFQ ) { final TreeMap < PermissionGroup , Integer > groupCount = new TreeMap < PermissionGroup , Integer > ( ) ; TreeSet < PermissionGroup > groups = PermissionHandler . getGroups ( ) ; for ( PermissionGroup group : groups ) { String groupName = group . getName ( ) ; groupCount . put ( group , 0 ) ; for ( Player player : Bukkit . getOnlinePlayers ( ) ) { if ( pl . isFakeQuit ( player ) ) { if ( ! canSeeFQ ) { continue ; } } <START_BUG> if ( PermissionHandler . getPlayerGroup ( player ) . equals ( groupName ) ) { <END_BUG> groupCount . put ( group , ( ( groupCount . get ( group ) ) + 1 ) ) ; } } } final StringBuilder stringBuilder = new StringBuilder ( ) ; for ( PermissionGroup group : groupCount . keySet ( ) ) { final int groupSize = groupCount . get ( group ) ; final char groupChar = this . getGroupChar ( group . getName ( ) ) ; stringBuilder . append ( DARK_GRAY ) . append ( "[" ) . append ( this . getColor ( group ) ) . append ( groupChar ) . append ( ":" ) . append ( groupSize ) . append ( DARK_GRAY ) . append ( "]<seq2seq4repair_space>" ) ; } final int onlinePlayers = ( canSeeFQ ) ? Bukkit . getOnlinePlayers ( ) . size ( ) : ( Bukkit . getOnlinePlayers ( ) . size ( ) ) - ( pl . getFakeQuitSize ( ) ) ; stringBuilder . append ( DARK_GRAY ) . append ( "(" ) . append ( WHITE ) . append ( "O:" ) . append ( onlinePlayers ) . append ( DARK_GRAY ) . append ( ")" ) ; return stringBuilder . toString ( ) ; } private char getGroupChar ( final String groupName ) { } private String getColor ( PermissionGroup group ) { } private TreeMap < PermissionGroup , List < Player > > createGroupMap ( final boolean canSeeFQ ) { } }

Fix:
if ( PermissionHandler . getPlayerGroup ( player ) . equals ( group ) ) {
Buggy code:
@ Component public class ExecutionStepFactory { private static final String STEPS_PACKAGE = "org.openscore.lang.runtime.steps" ; private static final String TASK_STEPS_CLASS = ( ExecutionStepFactory . STEPS_PACKAGE ) + ".TaskSteps" ; private static final String OPERATION_STEPS_CLASS = ( ExecutionStepFactory . STEPS_PACKAGE ) + ".ExecutableSteps" ; private static final String ACTION_STEPS_CLASS = ( ExecutionStepFactory . STEPS_PACKAGE ) + ".ActionSteps" ; private static final String NAVIGATION_ACTIONS_CLASS = "org.openscore.lang.runtime.navigations.Navigations" ; private static final String SIMPLE_NAVIGATION_METHOD = "navigate" ; public ExecutionStep createBeginTaskStep ( Long index , Map < String , Serializable > preTaskData , String refId , String taskName ) { } public ExecutionStep createFinishTaskStep ( Long index , Map < String , Serializable > postTaskData , Map < String , ResultNavigation > navigationValues , String taskName ) { } public ExecutionStep createStartStep ( Long index , Map < String , Serializable > preExecutableData , List < Input > execInputs , String executableName ) { } public ExecutionStep createActionStep ( Long index , Map < String , Serializable > actionRawData ) { Validate . notNull ( actionRawData , "actionData<seq2seq4repair_space>is<seq2seq4repair_space>null" ) ; Map < String , Serializable > actionData = new HashMap < > ( ) ; ActionType actionType ; @ SuppressWarnings ( "unchecked" ) <START_BUG> Map < String , String > javaActionData = ( ( Map < String , String > ) ( actionRawData . remove ( JAVA_ACTION ) ) ) ; <END_BUG> @ SuppressWarnings ( "unchecked" ) String pythonScript = ( ( String ) ( actionRawData . get ( PYTHON_SCRIPT_KEY ) ) ) ; boolean javaActionFound = MapUtils . isNotEmpty ( javaActionData ) ; boolean pythonScriptFound = StringUtils . isNotEmpty ( pythonScript ) ; if ( javaActionFound ) { actionType = ActionType . JAVA ; actionData . putAll ( javaActionData ) ; } else if ( pythonScriptFound ) { actionType = ActionType . PYTHON ; actionData . putAll ( actionRawData ) ; } else { throw new RuntimeException ( "Invalid<seq2seq4repair_space>action<seq2seq4repair_space>data" ) ; } actionData . put ( ACTION_TYPE , actionType ) ; actionData . put ( NEXT_STEP_ID_KEY , ( index + 1 ) ) ; return createGeneralStep ( index , ExecutionStepFactory . ACTION_STEPS_CLASS , "doAction" , actionData ) ; } public ExecutionStep createEndStep ( Long index , Map < String , Serializable > postExecutableData , List < Output > outputs , List < Result > results , String executableName ) { } private ExecutionStep createGeneralStep ( Long stepId , String actionClassName , String actionMethodName , Map < String , Serializable > actionData ) { } }

Fix:
Map < String , String > javaActionData = ( ( Map < String , String > ) ( actionRawData . get ( JAVA_ACTION ) ) ) ;
Buggy code:
public class FeedActivity extends AppCompatActivity { private ParseUser mUser ; private Toolbar mTitleBar ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onResume ( ) { } private void launchSubmitBarFragment ( ) { <START_BUG> Fragment trumpetFragment = new SubmitBarFragmentTemp ( ) ; <END_BUG> FragmentTransaction transaction = getFragmentManager ( ) . beginTransaction ( ) ; transaction . replace ( feedLayout , trumpetFragment ) ; transaction . commit ( ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } }

Fix:
Fragment trumpetFragment = new SubmitBarFragment ( ) ;