nus-yam/ex-repair huggingface dataset:
Buggy code:
public class BcelAdvice extends Advice { private Test pointcutTest ; private ExposedState exposedState ; private boolean hasMatchedAtLeastOnce = false ; public BcelAdvice ( AjAttribute . AdviceAttribute attribute , Pointcut pointcut , Member signature , ResolvedType concreteAspect ) { } public BcelAdvice ( AdviceKind kind , Pointcut pointcut , Member signature , int extraArgumentFlags , int start , int end , ISourceContext sourceContext , ResolvedType concreteAspect ) { } public ShadowMunger concretize ( ResolvedType fromType , World world , PerClause clause ) { } public ShadowMunger parameterizeWith ( ResolvedType declaringType , Map typeVariableMap ) { <START_BUG> Pointcut pc = getPointcut ( ) . parameterizeWith ( typeVariableMap ) ; <END_BUG> BcelAdvice ret = null ; Member adviceSignature = signature ; if ( ( ( signature ) instanceof ResolvedMember ) && ( signature . getDeclaringType ( ) . isGenericType ( ) ) ) { adviceSignature = ( ( ResolvedMember ) ( signature ) ) . parameterizedWith ( declaringType . getTypeParameters ( ) , declaringType , declaringType . isParameterizedType ( ) ) ; } ret = new BcelAdvice ( this . attribute , pc , adviceSignature , this . concreteAspect ) ; return ret ; } public boolean match ( Shadow shadow , World world ) { } public void specializeOn ( Shadow shadow ) { } private boolean canInline ( Shadow s ) { } public void implementOn ( Shadow s ) { } private void removeUnnecessaryProblems ( BcelMethod method , int problemLineNumber ) { } private Collection collectCheckedExceptions ( UnresolvedType [ ] excs ) { } private Collection thrownExceptions = null ; public Collection getThrownExceptions ( ) { } public boolean mustCheckExceptions ( ) { } public boolean hasDynamicTests ( ) { } InstructionList getAdviceInstructions ( BcelShadow s , BcelVar extraArgVar , InstructionHandle ifNoAdvice ) { } public InstructionList getAdviceArgSetup ( BcelShadow shadow , BcelVar extraVar , InstructionList closureInstantiation ) { } public InstructionList getNonTestAdviceInstructions ( BcelShadow shadow ) { } public Member getOriginalSignature ( ) { } public InstructionList getTestInstructions ( BcelShadow shadow , InstructionHandle sk , InstructionHandle fk , InstructionHandle next ) { } public int compareTo ( Object other ) { } public BcelVar [ ] getExposedStateAsBcelVars ( boolean isAround ) { } public boolean hasMatchedSomething ( ) { } public void setHasMatchedSomething ( boolean hasMatchedSomething ) { } protected void suppressLintWarnings ( World inWorld ) { } protected void clearLintSuppressions ( World inWorld , Collection toClear ) { } }

Fix:
Pointcut pc = getPointcut ( ) . parameterizeWith ( typeVariableMap , declaringType . getWorld ( ) ) ;
Buggy code:
public class LogFragment extends Fragment { String logText ; private LogFragment . OnFragmentInteractionListener mListener ; TextView logView ; Button clearButton ; ListView Loglist ; ArrayAdapter < String > listAdapter ; public LogFragment newInstance ( String param1 , String param2 ) { } public LogFragment ( ) { } @ Override public void onCreate ( Bundle savedInstanceState ) { } @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void onButtonPressed ( Uri uri ) { } @ Override public void onAttach ( Activity activity ) { } @ Override public void onResume ( ) { } @ Override public void onDetach ( ) { } public void makeLog ( String entry ) { <START_BUG> LogItems . add ( entry ) ; <END_BUG> listAdapter . notifyDataSetChanged ( ) ; } public interface OnFragmentInteractionListener { public void onFragmentInteraction ( Uri uri ) { } } OnClickListener logClearer = new View . OnClickListener ( ) { @ Override public void onClick ( View view ) { } } ; }

Fix:
MainActivity . makeLog ( entry ) ;
Buggy code:
public class Motd { private static final Logger log = Logger . getLogger ( "Minecraft" ) ; public static String getMotd ( MessageReceiver caller ) { } public static void makeMotd ( ) { } public static String replace ( String text , Player p ) { if ( text . contains ( "&" ) ) { text = text . replace ( "&" , Marker ) ; } if ( text . contains ( "&&" ) ) { text = text . replaceAll ( "&&" , "&" ) ; } if ( text . contains ( "%playerlist%" ) ) { text = text . replaceAll ( "%playerlist%" , etc . getServer ( ) . getPlayerNames ( ) ) ; } if ( text . contains ( "%player%" ) ) { text = text . replaceAll ( "%player%" , p . getName ( ) ) ; } if ( text . contains ( "%group%" ) ) { <START_BUG> text = text . replaceAll ( "%group%" , p . getGroups ( ) [ 0 ] ) ; <END_BUG> } if ( text . contains ( "%onlineplayers%" ) ) { text = text . replaceAll ( "%onlineplayers%" , Integer . toString ( etc . getServer ( ) . getPlayerList ( ) . size ( ) ) ) ; } if ( text . contains ( "%maxplayers%" ) ) { text = text . replaceAll ( "%maxplayers%" , Integer . toString ( etc . getInstance ( ) . getPlayerLimit ( ) ) ) ; } if ( text . contains ( "%level%" ) ) { text = text . replaceAll ( "%level%" , Integer . toString ( p . getLevel ( ) ) ) ; } if ( text . contains ( "%exp%" ) ) { text = text . replaceAll ( "%exp%" , Integer . toString ( p . getXP ( ) ) ) ; } return text ; } }

Fix:
text = text . replaceAll ( "%group%" , ( ( p . getGroups ( ) . length ) > 0 ? p . getGroups ( ) [ 0 ] : etc . getDataSource ( ) . getDefaultGroup ( ) . Name ) ) ;
Buggy code:
public class Train implements TrainInterface { public double width = 2.65 ; public double length = 32.2 ; public double height = 3.42 ; public double speed ; public double currentSpeed ; public double acceleration = 0.5 ; public double power ; public double trainSpeedLimit = 70 ; public double serviceBrakeRate = 1.2 ; public double speedLimit ; public String station ; public double blockLength ; public int blockId ; public int id ; public double emergencyBrakeRate = 2.73 ; public double mass = 56.7 * 907.185 ; public int numCars ; public int numPassengers ; public int authority ; TrainControllerInterface trainController ; TrackModelInterface trackModel ; public Train ( ) { } public void setSpeed ( double speed ) { } public void setCurrentSpeed ( double speed ) { } public double getCurrentSpeed ( ) { } public void setAcceleration ( double acceleration ) { } public void setSpeedLimit ( double speedLimit ) { } public void setStation ( String station ) { } public void setBlockLength ( double blockLength ) { } public void setBlockId ( int blockId ) { } public double getSpeed ( ) { } public double getAcceleration ( ) { } public void setNumPassengers ( int numPassengers ) { } public int getNumPassengers ( ) { } public double getMass ( ) { } public double getHeight ( ) { } public double getWidth ( ) { } public double getLength ( ) { } public int getNumCars ( ) { } public void pullEmergencyBrake ( ) { } public double getBrakeLimit ( ) { } public double getSpeedLimit ( ) { } public void setPower ( double mass , double speed , double acceleration ) { } public double getPower ( ) { } public void setAuthority ( int authority ) { } public void run ( ) { trainController . setAcceleration ( getAcceleration ( ) ) ; trainController . setSpeed ( getSpeed ( ) ) ; while ( ( blockId ) <= ( authority ) ) { trackModel . setBlockOccupied ( blockId , id ) ; setSpeed ( ( ( 70 * 1000 ) // 3600 ) ) ; double distance = 0 ; while ( distance <= ( blockLength ) ) { distance += ( speed ) * 60 ; <START_BUG> getPower ( mass , speed , 0 ) ; <END_BUG> try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } trackModel . setBlockUnoccupied ( blockId ) ; ( blockId ) ++ ; } } }

Fix:
setPower ( mass , speed , 0 ) ;
Buggy code:
public class TestGroupTests { @ Rule public ExpectedException thrown = ExpectedException . none ( ) ; @ Test public void parseNull ( ) throws Exception { } @ Test public void parseEmptyString ( ) throws Exception { } @ Test public void parseWithSpaces ( ) throws Exception { } @ Test public void parseInMixedCase ( ) throws Exception { } @ Test public void parseMissing ( ) throws Exception { thrown . expect ( IllegalArgumentException . class ) ; <START_BUG> thrown . expectMessage ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>test<seq2seq4repair_space>group<seq2seq4repair_space>'missing'<seq2seq4repair_space>when<seq2seq4repair_space>parsing<seq2seq4repair_space>" + ( "testGroups<seq2seq4repair_space>value:<seq2seq4repair_space>'performance,<seq2seq4repair_space>missing'.<seq2seq4repair_space>Available<seq2seq4repair_space>groups<seq2seq4repair_space>include:<seq2seq4repair_space>" + "[LONG_RUNNING,PERFORMANCE,JMXMP,CI]" ) ) ) ; <END_BUG> TestGroup . parse ( "performance,<seq2seq4repair_space>missing" ) ; } @ Test public void parseAll ( ) throws Exception { } }

Fix:
thrown . expectMessage ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>test<seq2seq4repair_space>group<seq2seq4repair_space>'missing'<seq2seq4repair_space>when<seq2seq4repair_space>parsing<seq2seq4repair_space>" + ( "testGroups<seq2seq4repair_space>value:<seq2seq4repair_space>'performance,<seq2seq4repair_space>missing'.<seq2seq4repair_space>Available<seq2seq4repair_space>groups<seq2seq4repair_space>include:<seq2seq4repair_space>" + "[LONG_RUNNING,PERFORMANCE,JMXMP,CI,CUSTOM_COMPILATION]" ) ) ) ;
Buggy code:
public class XmlHandler implements DataHandler { private static final Pattern HANDLE_PATTERN = Pattern . compile ( "^![a-z]+\\d+$" ) ; private final String link ; private final Map < String , XmlData > data ; public XmlHandler ( final ConfigParser cfg ) { } @ Override public boolean isHandlerOf ( final String query ) { } @ Override public XmlData getData ( final String query ) throws NoResultsException { if ( ! ( isHandlerOf ( query ) ) ) throw new InvalidHandlerException ( query ) ; else if ( query . equals ( ".update" ) ) try { update ( ) ; return new XmlUpdateData ( ) ; } catch ( IOException | SAXException | ParserConfigurationException e ) { throw new NoResultsException ( query , e ) ; } XmlData result ; synchronized ( data ) { <START_BUG> result = data . get ( query ) ; <END_BUG> } if ( result == null ) throw new NoResultsException ( query ) ; return result ; } public void update ( ) throws IOException , ParserConfigurationException , SAXException { } private void addData ( final Map < String , XmlData > map ) throws IOException , ParserConfigurationException , SAXException { } private void addChapter ( final XmlData xml , final Node chapter ) { } private Document getDocument ( ) throws IOException , ParserConfigurationException , SAXException { } }

Fix:
result = data . get ( query . substring ( 1 ) ) ;
Buggy code:
public class TaskList { protected static ArrayList < String > tags = new ArrayList < String > ( ) ; private ArrayList < Task > listOfTasks ; public TaskList ( ) { } public TaskList ( ArrayList < Task > listOfTasks ) { } public ArrayList < Task > getTasks ( ) { } public TaskList getTasksByDay ( LocalDate date ) { } public TaskList getTasksByTags ( ArrayList < String > tags ) { TaskList tasks = new TaskList ( ) ; if ( tags . isEmpty ( ) ) { return this ; } for ( Task i : listOfTasks ) { for ( String tag : i . getTags ( ) ) { if ( tags . contains ( tag ) ) { tasks . addTask ( i ) ; <START_BUG> continue ; <END_BUG> } } } return tasks ; } public boolean addTask ( Task task ) { } public boolean addRecurringTask ( Task task , String parameters ) { } public void undo ( ) { } public static ArrayList < Task > copyArray ( ArrayList < Task > original ) { } public static void addTag ( String tag ) { } public static ArrayList < String > getAllTags ( ) { } public boolean writeToFile ( Path filePath ) { } public boolean readFromFile ( Path filePath ) { } public static void sortListByAscending ( ) { } public Task getTaskByUUID ( UUID id ) { } public int size ( ) { } public Task getTaskByIndex ( int index ) { } public boolean deleteTask ( Task task ) { } public String toString ( ) { } public boolean addAll ( TaskList listOfTasksToAddFrom ) { } }

Fix:
break ;
Buggy code:
public class GeneralOptionPane extends AbstractOptionPane { public GeneralOptionPane ( ) { } protected void _init ( ) { } protected void _save ( ) { String lineSep = null ; switch ( lineSeparator . getSelectedIndex ( ) ) { case 0 : lineSep = "\n" ; break ; case 1 : lineSep = "\r\n" ; break ; case 2 : lineSep = "\r" ; break ; } jEdit . setProperty ( "buffer.lineSeparator" , lineSep ) ; jEdit . setProperty ( "buffer.encoding" , ( ( String ) ( encoding . getSelectedItem ( ) ) ) ) ; <START_BUG> jEdit . setBooleanProperty ( "buffer.encodingAutodetect" , ( ( String ) ( encodingAutodetect . isSelected ( ) ) ) ) ; <END_BUG> switch ( checkModStatus . getSelectedIndex ( ) ) { case 0 : jEdit . setBooleanProperty ( "autoReloadDialog" , false ) ; jEdit . setBooleanProperty ( "autoReload" , false ) ; break ; case 1 : jEdit . setBooleanProperty ( "autoReloadDialog" , true ) ; jEdit . setBooleanProperty ( "autoReload" , false ) ; break ; case 2 : jEdit . setBooleanProperty ( "autoReloadDialog" , true ) ; jEdit . setBooleanProperty ( "autoReload" , true ) ; break ; } jEdit . setProperty ( "recentFiles" , recentFiles . getText ( ) ) ; jEdit . setBooleanProperty ( "sortRecent" , sortRecent . isSelected ( ) ) ; jEdit . setBooleanProperty ( "saveCaret" , saveCaret . isSelected ( ) ) ; jEdit . setBooleanProperty ( "persistentMarkers" , persistentMarkers . isSelected ( ) ) ; jEdit . setBooleanProperty ( "restore" , restore . isSelected ( ) ) ; jEdit . setBooleanProperty ( "restore.cli" , restoreCLI . isSelected ( ) ) ; jEdit . setBooleanProperty ( "sortBuffers" , sortBuffers . isSelected ( ) ) ; jEdit . setBooleanProperty ( "sortByName" , sortByName . isSelected ( ) ) ; jEdit . setBooleanProperty ( "twoStageSave" , twoStageSave . isSelected ( ) ) ; jEdit . setBooleanProperty ( "confirmSaveAll" , confirmSaveAll . isSelected ( ) ) ; jEdit . setBooleanProperty ( "stripTrailingEOL" , stripTrailingEOL . isSelected ( ) ) ; } private JComboBox lineSeparator ; private JComboBox encoding ; private JCheckBox encodingAutodetect ; private JComboBox checkModStatus ; private JTextField recentFiles ; private JCheckBox saveCaret ; private JCheckBox sortRecent ; private JCheckBox persistentMarkers ; private JCheckBox restore ; private JCheckBox restoreCLI ; private JCheckBox sortBuffers ; private JCheckBox sortByName ; private JCheckBox twoStageSave ; private JCheckBox confirmSaveAll ; private JCheckBox stripTrailingEOL ; }

Fix:
jEdit . setBooleanProperty ( "buffer.encodingAutodetect" , encodingAutodetect . isSelected ( ) ) ;
Buggy code:
public class TestTurkishAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new TurkishAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new TurkishAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
public class SwitchStatement extends Statement { public Expression expression ; public Statement [ ] statements ; public BlockScope scope ; public int explicitDeclarations ; public BranchLabel breakLabel ; public CaseStatement [ ] cases ; public CaseStatement defaultCase ; public int blockStart ; public int caseCount ; int [ ] constants ; public static final int CASE = 0 ; public static final int FALLTHROUGH = 1 ; public static final int ESCAPING = 2 ; public SyntheticMethodBinding synthetic ; int preSwitchInitStateIndex = - 1 ; int mergedInitStateIndex = - 1 ; public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { } public StringBuffer printStatement ( int indent , StringBuffer output ) { } public void resolve ( BlockScope upperScope ) { } public void traverse ( ASTVisitor visitor , BlockScope blockScope ) { } public void branchChainTo ( BranchLabel label ) { <START_BUG> if ( this . breakLabel . hasForwardReferences ( ) ) { <END_BUG> label . appendForwardReferencesFrom ( this . breakLabel ) ; } } }

Fix:
if ( ( this . breakLabel . forwardReferenceCount ) > 0 ) {
Buggy code:
public class AamDataMaintenance { static Logger log = Logger . getLogger ( AamDataMaintenance . class . getName ( ) ) ; public static AamData retrieveDataToModel ( String agentId , String coBranch ) { } public static List retrieveDataToList ( String city , String ssc , String branch , String office ) { } public static AamData retrieveOtherData ( AamData aamData ) { } public static AamData getData ( AamData aamData , String typeOfData ) { } public static String retrieveAgentName ( String agentId , String coBranch ) { String agentName = "" ; try { AamDataMaintenance . session = AamDataMaintenance . clientSessionFactory . openSession ( ) ; AamDataMaintenance . session . setDefaultReadOnly ( true ) ; Criteria crit = AamDataMaintenance . session . createCriteria ( AamData . class ) ; if ( ( null != agentId ) && ( ! ( "" . equals ( agentId ) ) ) ) { crit . setProjection ( Projections . property ( "agentName" ) ) ; crit . add ( Restrictions . eq ( "agentCode" , agentId ) ) ; } <START_BUG> if ( ( null != agentId ) && ( ! ( "" . equals ( agentId ) ) ) ) { <END_BUG> crit . add ( Restrictions . eq ( "branch" , coBranch ) ) ; } ArrayList list = ( ( ArrayList ) ( crit . setCacheable ( true ) . list ( ) ) ) ; if ( ( list != null ) && ( ( list . size ( ) ) > 0 ) ) agentName = ( ( String ) ( list . get ( 0 ) ) ) ; } catch ( Exception he ) { he . printStackTrace ( ) ; LogsMaintenance logsMain = new LogsMaintenance ( ) ; StringWriter errors = new StringWriter ( ) ; he . printStackTrace ( new PrintWriter ( errors ) ) ; logsMain . insertLogs ( "AamDataMaintenance" , ( ( Level . SEVERE ) + "" ) , errors . toString ( ) ) ; } finally { AamDataMaintenance . session . close ( ) ; } return agentName ; } public static Integer checkIfAgentExist ( String agentId , String coBranch ) { } public static final SessionFactory clientSessionFactory = new Configuration ( ) . configure ( "client_hibernate.cfg.xml" ) . buildSessionFactory ( ) ; public static Session session = null ; }

Fix:
if ( ( null != coBranch ) && ( ! ( "" . equals ( coBranch ) ) ) ) {
Buggy code:
public class CopterFlightActionsFragment extends ApiListenerFragment implements View . OnClickListener , FlightActionsFragment . SlidingUpHeader { private static final String TAG = CopterFlightActionsFragment . class . getSimpleName ( ) ; private static final String ACTION_FLIGHT_ACTION_BUTTON = "Copter<seq2seq4repair_space>flight<seq2seq4repair_space>action<seq2seq4repair_space>button" ; private static final double TAKEOFF_ALTITUDE = 10.0 ; private static final IntentFilter eventFilter = new IntentFilter ( ) ; private final BroadcastReceiver eventReceiver = new BroadcastReceiver ( ) { @ Override public void onReceive ( Context context , Intent intent ) { } } ; private MissionProxy missionProxy ; private View mDisconnectedButtons ; private View mDisarmedButtons ; private View mArmedButtons ; private View mInFlightButtons ; private Button followBtn ; private Button homeBtn ; private Button landBtn ; private Button pauseBtn ; private Button autoBtn ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } @ Override public void onViewCreated ( View view , Bundle savedInstanceState ) { } @ Override public void onApiConnected ( ) { } @ Override public void onApiDisconnected ( ) { } @ Override public void onClick ( View v ) { } private void getDronieConfirmation ( ) { } private void getTakeOffInAutoConfirmation ( ) { } private void getArmingConfirmation ( ) { } private void updateFlightModeButtons ( ) { } private void resetFlightModeButtons ( ) { } private void updateFollowButton ( ) { } private void resetButtonsContainerVisibility ( ) { } private void setupButtonsByFlightState ( ) { final State droneState = getDrone ( ) . getAttribute ( STATE ) ; <START_BUG> if ( droneState . isConnected ( ) ) { <END_BUG> if ( droneState . isArmed ( ) ) { if ( droneState . isFlying ( ) ) { setupButtonsForFlying ( ) ; } else { setupButtonsForArmed ( ) ; } } else { setupButtonsForDisarmed ( ) ; } } else { setupButtonsForDisconnected ( ) ; } } private void setupButtonsForDisconnected ( ) { } private void setupButtonsForDisarmed ( ) { } private void setupButtonsForArmed ( ) { } private void setupButtonsForFlying ( ) { } @ Override public boolean isSlidingUpPanelEnabled ( Drone drone ) { } }

Fix:
if ( ( droneState != null ) && ( droneState . isConnected ( ) ) ) {
Buggy code:
public class Genome { public ArrayList < Connection > cons = new ArrayList < > ( ) ; public ArrayList < Node > nodes = new ArrayList < > ( ) ; public int inNum ; public int outNum ; public int species ; public Genome ( int in , int out ) { } public Genome ( Genome g ) { } public Genome ( Genome a , Genome b ) { } public void mutate ( ) { } public ArrayList < Integer > prop ; public ArrayList < Integer > next ; public boolean [ ] used ; public void propagate ( int id ) { } public void iterate ( double [ ] in , int iters ) { } public double [ ] getOut ( ) { double [ ] out = new double [ outNum ] ; for ( int i = 0 ; i < ( outNum ) ; i ++ ) { <START_BUG> out [ i ] = nodes . get ( ( i + ( inNum ) ) ) . val ; <END_BUG> } return out ; } public String toString ( ) { } public void clear ( ) { } }

Fix:
out [ i ] = nodes . get ( ( i + ( inNum ) ) ) . get ( ) ;
Buggy code:
public class ReadRepairVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( ReadRepairVerbHandler . class ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] body = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> DataInputBuffer buffer = new DataInputBuffer ( ) ; buffer . reset ( body , body . length ) ; try { RowMutationMessage rmMsg = RowMutationMessage . serializer ( ) . deserialize ( buffer ) ; RowMutation rm = rmMsg . getRowMutation ( ) ; rm . apply ( ) ; } catch ( IOException e ) { ReadRepairVerbHandler . logger_ . debug ( LogUtil . throwableToString ( e ) ) ; } } }

Fix:
byte [ ] body = message . getMessageBody ( ) ;
Buggy code:
public abstract class BTNContainedActor extends BTNActor implements Activatable { private static final float OSCILLATION_DELTA = 300.0F ; public static final int STATE_HIDING = 1 ; public static final int STATE_VISIBLE = 2 ; public static final int STATE_HIT = 3 ; private static final float CONTENT_WIDTH = 180.0F ; private static final float CONTENT_HEIGHT = 349.0F ; protected BTNGameScreen gameScreen ; private SequenceAction oscillateSequence ; private Container container ; private volatile boolean activated ; private float anchorY ; public BTNContainedActor ( ) { } public BTNContainedActor ( Array < TextureRegion > textures , float x , float y , BTNGameScreen gameScreen , Container c ) { } public BTNContainedActor ( TextureRegion texture , float x , float y , BTNGameScreen gameScreen , Container c ) { } @ Override public void activate ( ) { } private void prepare ( ) { } @ Override public void deactivate ( ) { } public Container getContainer ( ) { } protected void initialize ( BTNGameScreen gameScreen , Container c ) { } public boolean isActivated ( ) { } public void setActivated ( boolean activated ) { } public float getAnchorY ( ) { } public void setAnchorY ( float anchorY ) { } public BTNGameScreen getGameScreen ( ) { } @ Override public void onCollide ( Collidable partner ) { super . onCollide ( partner ) ; setActorState ( BTNContainedActor . STATE_HIT ) ; this . clearActions ( ) ; MoveToAction moveDown = new MoveToAction ( ) ; moveDown . setPosition ( getX ( ) , ( ( getY ( ) ) - ( getHeight ( ) ) ) ) ; <START_BUG> moveDown . setDuration ( gameScreen . getDifficultyManager ( ) . getLaunchSpeed ( ) ) ; <END_BUG> moveDown . setInterpolation ( linear ) ; this . addAction ( moveDown ) ; deactivate ( ) ; } private void doContentsDownNormal ( ) { } }

Fix:
moveDown . setDuration ( ( ( gameScreen . getDifficultyManager ( ) . getLaunchSpeed ( ) ) // 2.0F ) ) ;
Buggy code:
public class MessagingXmlParsingDeploymentUnitProcessor implements DeploymentUnitProcessor { private static final XMLInputFactory INPUT_FACTORY = XMLInputFactory . newInstance ( ) ; private static final String [ ] LOCATIONS = new String [ ] { "WEB-INF" , "META-INF" } ; private static final QName ROOT_1_0 = new QName ( MESSAGING_DEPLOYMENT_1_0 . getUriString ( ) , "messaging-deployment" ) ; private static final QName ROOT_NO_NAMESPACE = new QName ( "messaging-deployment" ) ; private final XMLMapper mapper ; public MessagingXmlParsingDeploymentUnitProcessor ( ) { } @ Override public void deploy ( final DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { } private void setIfSupported ( final XMLInputFactory inputFactory , final String property , final Object value ) { } @ Override public void undeploy ( final DeploymentUnit context ) { } private Set < VirtualFile > messageDestinations ( final DeploymentUnit deploymentUnit ) { final VirtualFile deploymentRoot = deploymentUnit . getAttachment ( DEPLOYMENT_ROOT ) . getRoot ( ) ; if ( ( deploymentRoot == null ) || ( ! ( deploymentRoot . exists ( ) ) ) ) { return Collections . emptySet ( ) ; } <START_BUG> final String deploymentRootName = deploymentRoot . getLowerCaseName ( ) ; <END_BUG> if ( deploymentRootName . endsWith ( "-jms.xml" ) ) { return Collections . singleton ( deploymentRoot ) ; } final Set < VirtualFile > ret = new HashSet < VirtualFile > ( ) ; for ( String location : MessagingXmlParsingDeploymentUnitProcessor . LOCATIONS ) { final VirtualFile loc = deploymentRoot . getChild ( location ) ; if ( loc . exists ( ) ) { for ( final VirtualFile file : loc . getChildren ( ) ) { if ( file . getName ( ) . endsWith ( "-jms.xml" ) ) { ret . add ( file ) ; } } } } return ret ; } private static void safeClose ( final XMLStreamReader closeable , final String file ) { } }

Fix:
final String deploymentRootName = deploymentRoot . getName ( ) . toLowerCase ( ) ;
Buggy code:
public class FigInterface extends FigNodeModelElement { public static int OVERLAP = 4 ; protected FigRect _bigPort ; protected FigRect _outline ; protected FigText _stereoFake ; protected FigText _oper ; public MElementResidence resident = new MElementResidenceImpl ( ) ; public FigInterface ( ) { } public FigInterface ( GraphModel gm , Object node ) { } public String placeString ( ) { } public Object clone ( ) { } public Selection makeSelection ( ) { } public void setOwner ( Object node ) { } public Dimension getMinimumSize ( ) { } public void setLineColor ( Color c ) { } public void setLineWidth ( int w ) { } public void setBounds ( int x , int y , int w , int h ) { } public void setEnclosingFig ( Fig encloser ) { super . setEnclosingFig ( encloser ) ; if ( ! ( ( getOwner ( ) ) instanceof MModelElement ) ) return ; MModelElement me = ( ( MModelElement ) ( getOwner ( ) ) ) ; MNamespace m = null ; ProjectBrowser pb = ProjectBrowser . TheInstance ; <START_BUG> if ( ( encloser != null ) && ( ( encloser . getOwner ( ) ) instanceof MModel ) ) { <END_BUG> m = ( ( MNamespace ) ( encloser . getOwner ( ) ) ) ; } else { if ( ( pb . getTarget ( ) ) instanceof UMLDiagram ) { m = ( ( MNamespace ) ( ( ( UMLDiagram ) ( pb . getTarget ( ) ) ) . getNamespace ( ) ) ) ; } } if ( ( encloser != null ) && ( ( encloser . getOwner ( ) ) instanceof MComponentImpl ) ) { MComponent component = ( ( MComponent ) ( encloser . getOwner ( ) ) ) ; MInterface in = ( ( MInterface ) ( getOwner ( ) ) ) ; resident . setImplementationLocation ( component ) ; resident . setResident ( in ) ; } else { resident . setImplementationLocation ( null ) ; resident . setResident ( null ) ; } try { me . setNamespace ( m ) ; } catch ( Exception e ) { System . out . println ( "could<seq2seq4repair_space>not<seq2seq4repair_space>set<seq2seq4repair_space>package" ) ; } } protected void textEdited ( FigText ft ) throws PropertyVetoException { } protected void modelChanged ( ) { } static final long serialVersionUID = 4928213949795787107L ; }

Fix:
if ( ( encloser != null ) && ( ( encloser . getOwner ( ) ) instanceof MPackage ) ) {
Buggy code:
public class Server extends ServerSocket { public static final int DEFAULT_BACKLOG = 50 ; ISocketAcceptHandler acceptHandler ; Thread listenerThread ; ThreadGroup threadGroup ; protected void debug ( String msg ) { <START_BUG> Trace . trace ( PLUGIN_ID , DEBUG , msg ) ; <END_BUG> } protected void traceStack ( String msg , Throwable e ) { } public Server ( ThreadGroup group , int port , ISocketAcceptHandler handler ) throws IOException { } public Server ( int port , ISocketAcceptHandler handler ) throws IOException { } protected Thread setupListener ( ) { } protected void handleAccept ( final Socket aSocket ) { } public synchronized void close ( ) throws IOException { } }

Fix:
Trace . trace ( PLUGIN_ID , CONNECTION , msg ) ;
Buggy code:
public class DecoratedFieldCellEditor extends CellEditor { protected Text text ; private DecoratedField decoratedField ; private ModifyListener modifyListener ; private boolean isSelection = false ; private boolean isDeleteable = false ; private boolean isSelectable = false ; private static final int defaultStyle = SWT . SINGLE ; public DecoratedFieldCellEditor ( Composite parent ) { } private void checkDeleteable ( ) { } private void checkSelectable ( ) { } private void checkSelection ( ) { } protected Control createControl ( Composite parent ) { decoratedField = new DecoratedField ( parent , getStyle ( ) , new TextControlCreator ( ) ) ; text = ( ( Text ) ( decoratedField . getControl ( ) ) ) ; <START_BUG> decoratedField . setBackground ( text . getBackground ( ) ) ; <END_BUG> decoratedField . setUseMaximumDecorationWidth ( false ) ; text . addSelectionListener ( new SelectionAdapter ( ) { public void widgetDefaultSelected ( SelectionEvent e ) { handleDefaultSelection ( e ) ; } } ) ; text . addKeyListener ( new KeyAdapter ( ) { public void keyPressed ( KeyEvent e ) { keyReleaseOccured ( e ) ; if ( ( ( getControl ( ) ) == null ) || ( getControl ( ) . isDisposed ( ) ) ) return ; checkSelection ( ) ; checkDeleteable ( ) ; checkSelectable ( ) ; } } ) ; text . addTraverseListener ( new TraverseListener ( ) { public void keyTraversed ( TraverseEvent e ) { if ( ( ( e . detail ) == ( SWT . TRAVERSE_ESCAPE ) ) || ( ( e . detail ) == ( SWT . TRAVERSE_RETURN ) ) ) { e . doit = false ; } } } ) ; text . addMouseListener ( new MouseAdapter ( ) { public void mouseUp ( MouseEvent e ) { checkSelection ( ) ; checkDeleteable ( ) ; checkSelectable ( ) ; } } ) ; text . addFocusListener ( new FocusAdapter ( ) { public void focusLost ( FocusEvent e ) { DecoratedFieldCellEditor . this . focusLost ( ) ; } } ) ; text . setFont ( parent . getFont ( ) ) ; text . setBackground ( parent . getBackground ( ) ) ; text . setText ( "" ) ; text . addModifyListener ( getModifyListener ( ) ) ; return decoratedField . getLayoutControl ( ) ; } protected Object doGetValue ( ) { } protected void doSetFocus ( ) { } protected void doSetValue ( Object value ) { } protected void editOccured ( ModifyEvent e ) { } public LayoutData getLayoutData ( ) { } private ModifyListener getModifyListener ( ) { } protected void handleDefaultSelection ( SelectionEvent event ) { } public boolean isCopyEnabled ( ) { } public boolean isCutEnabled ( ) { } public boolean isDeleteEnabled ( ) { } public boolean isPasteEnabled ( ) { } public boolean isSaveAllEnabled ( ) { } public boolean isSelectAllEnabled ( ) { } protected void keyReleaseOccured ( KeyEvent keyEvent ) { } public void performCopy ( ) { } public void performCut ( ) { } public void performDelete ( ) { } public void performPaste ( ) { } public void performSelectAll ( ) { } public Text getTextControl ( ) { } public DecoratedField getDecoratedField ( ) { } }

Fix:
decoratedField . getLayoutControl ( ) . setBackground ( text . getBackground ( ) ) ;
Buggy code:
public class Test007_Cancel_Button_Verification extends GSTAbstractClass { @ Features ( "User<seq2seq4repair_space>management" ) @ Test @ Title ( "Cancel<seq2seq4repair_space>button<seq2seq4repair_space>verification<seq2seq4repair_space>for<seq2seq4repair_space>role" ) public void testCancelButtonVerification ( ) throws Exception { OpenView . openExtras ( RoleAdministration ) ; $ ( By . partialLinkText ( "testrole" ) ) . click ( ) ; String description = "This<seq2seq4repair_space>is<seq2seq4repair_space>new<seq2seq4repair_space>description<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>role" ; $ ( By . xpath ( ".////*[@id='roleAdministrationForm:description']" ) ) . val ( description ) ; $ ( By . xpath ( ".////*[@id='currentObjectForm:alteredPanel']" ) ) . waitUntil ( present , 8000 ) ; $ ( "#discardEnabled" ) . waitUntil ( enabled , 8000 ) . click ( ) ; <START_BUG> $ ( By . xpath ( ".////*[@id='footerForm:message']//dt//span" ) ) . shouldNotBe ( visible ) ; <END_BUG> } }

Fix:
$ ( By . xpath ( ".////*[@id='footerForm:message']//dt//span" ) ) . shouldNot ( appear ) ;
Buggy code:
final class FileUpdateTask extends AbstractFileTask { FileUpdateTask ( MiscContentItem item , File target , File backup , ContentModification modification ) { } public void execute ( final PatchingContext context ) throws IOException { final InputStream is = context . getLoader ( ) . openContentStream ( item ) ; try { <START_BUG> final byte [ ] hash = copy ( is , target ) ; <END_BUG> final MiscContentItem backupItem = new MiscContentItem ( item . getName ( ) , item . getPath ( ) , backupHash ) ; final ContentModification rollback = createRollback ( context , item , backupItem , hash ) ; context . recordRollbackAction ( rollback ) ; } finally { PatchUtils . safeClose ( is ) ; } } protected ContentModification createRollback ( PatchingContext context , MiscContentItem item , MiscContentItem backupItem , byte [ ] targetHash ) { } }

Fix:
final byte [ ] hash = PatchUtils . copy ( is , target ) ;
Buggy code:
public final class CommandImageManager extends EventManager { public static final int TYPE_DEFAULT = 0 ; public static final int TYPE_DISABLED = 1 ; public static final int TYPE_HOVER = 2 ; private final Map imagesById = new HashMap ( ) ; public final void addCommandImageManagerListener ( final ICommandImageManagerListener listener ) { } public final void bind ( final String commandId , final int type , final String style , final URL url ) { } public final void bind ( final String commandId , final int type , final String style , final ImageDescriptor descriptor ) { } public final void clear ( ) { } private final void fireManagerChanged ( final CommandImageManagerEvent event ) { } public final String generateUnusedStyle ( final String commandId ) { } public final ImageDescriptor getImageDescriptor ( final String commandId ) { } public final ImageDescriptor getImageDescriptor ( final String commandId , final int type ) { } public final ImageDescriptor getImageDescriptor ( final String commandId , final int type , final String style ) { if ( commandId == null ) { throw new NullPointerException ( ) ; } final Object [ ] images = ( ( Object [ ] ) ( imagesById . get ( commandId ) ) ) ; if ( images == null ) { return null ; } if ( ( type < 0 ) || ( type >= ( images . length ) ) ) { throw new IllegalArgumentException ( "The<seq2seq4repair_space>type<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>one<seq2seq4repair_space>of<seq2seq4repair_space>TYPE_DEFAULT,<seq2seq4repair_space>TYPE_DISABLED<seq2seq4repair_space>and<seq2seq4repair_space>TYPE_HOVER." ) ; } Object typedImage = images [ type ] ; if ( typedImage == null ) { <START_BUG> typedImage = images [ CommandImageManager . TYPE_DEFAULT ] ; <END_BUG> } if ( typedImage instanceof ImageDescriptor ) { return ( ( ImageDescriptor ) ( typedImage ) ) ; } if ( typedImage instanceof Map ) { final Map styleMap = ( ( Map ) ( typedImage ) ) ; Object styledImage = styleMap . get ( style ) ; if ( styledImage instanceof ImageDescriptor ) { return ( ( ImageDescriptor ) ( styledImage ) ) ; } if ( style != null ) { styledImage = styleMap . get ( null ) ; if ( styledImage instanceof ImageDescriptor ) { return ( ( ImageDescriptor ) ( styledImage ) ) ; } } } return null ; } public final ImageDescriptor getImageDescriptor ( final String commandId , final String style ) { } public final void removeCommandImageManagerListener ( final ICommandImageManagerListener listener ) { } }

Fix:
return null ;
Buggy code:
public class PatternValidator extends StringValidator { private static final long serialVersionUID = 1L ; private final Pattern pattern ; public PatternValidator ( final String pattern ) { } public PatternValidator ( final String pattern , final int flags ) { } public PatternValidator ( final Pattern pattern ) { } public PatternValidator ( final MetaPattern pattern ) { } public final Pattern getPattern ( ) { } protected Map variablesMap ( IValidatable validatable ) { final Map map = super . variablesMap ( validatable ) ; <START_BUG> map . put ( "pattern" , pattern ) ; <END_BUG> return map ; } public String toString ( ) { } protected void onValidate ( IValidatable validatable ) { } }

Fix:
map . put ( "pattern" , pattern . pattern ( ) ) ;
Buggy code:
public class SiteModel extends AbstractTableModel { private static final long serialVersionUID = 1L ; private ArrayList < Site > siteList ; private String [ ] columnNames = new String [ ] { "Name" , "Checked-In" , "Days<seq2seq4repair_space>Staying" , "Site<seq2seq4repair_space>#" , "Misc" } ; @ Override public int getColumnCount ( ) { } @ Override public int getRowCount ( ) { } @ Override public Object getValueAt ( int row , int col ) { switch ( col ) { case 0 : return siteList . get ( row ) . getNameReserving ( ) ; case 1 : return DateFormat . getDateInstance ( DateFormat . SHORT ) . format ( siteList . get ( row ) . getCheckIn ( ) . getTime ( ) ) ; case 2 : return siteList . get ( row ) . getDaysStaying ( ) ; case 3 : return siteList . get ( row ) . getSiteNumber ( ) ; case 4 : if ( ( siteList . get ( row ) ) instanceof RV ) return "Power:<seq2seq4repair_space>" + ( ( ( RV ) ( siteList . get ( row ) ) ) . getPower ( ) ) ; else <START_BUG> return "Occupants:<seq2seq4repair_space>" + ( ( ( Tent ) ( siteList . get ( row ) ) ) . getSiteNumber ( ) ) ; <END_BUG> default : return null ; } } @ Override public String getColumnName ( int col ) { } public SiteModel ( ) { } public void removeSite ( int i ) { } public void addSite ( Site inputSite ) { } }

Fix:
return "Occupants:<seq2seq4repair_space>" + ( ( ( Tent ) ( siteList . get ( row ) ) ) . getNumOfTenters ( ) ) ;
Buggy code:
public class TileEntityDarkFurnace extends TileEntity implements ISidedInventory { public DarkEnergy darkEnergy = new DarkEnergy ( 0 ) ; public ItemStack itemStored ; public TileEntityDarkFurnace ( ) { } public boolean convertItem ( ItemStack convertedItem ) { } @ Override public void readFromNBT ( NBTTagCompound tag ) { } public void writeToNBT ( NBTTagCompound tag ) { } @ Override public int [ ] getAccessibleSlotsFromSide ( int p_94128_1_ ) { } @ Override public boolean canInsertItem ( int slotIndex , ItemStack itemInserted , int side ) { <START_BUG> return true ; <END_BUG> } @ Override public boolean canExtractItem ( int slotIndex , ItemStack itemExtracted , int side ) { } @ Override public int getSizeInventory ( ) { } @ Override public ItemStack getStackInSlot ( int slotIndex ) { } @ Override public ItemStack decrStackSize ( int p_70298_1_ , int p_70298_2_ ) { } @ Override public ItemStack getStackInSlotOnClosing ( int p_70304_1_ ) { } @ Override public void setInventorySlotContents ( int slot , ItemStack itemToSetSlotAs ) { } @ Override public String getInventoryName ( ) { } @ Override public boolean hasCustomInventoryName ( ) { } @ Override public int getInventoryStackLimit ( ) { } @ Override public boolean isUseableByPlayer ( EntityPlayer p_70300_1_ ) { } @ Override public void openInventory ( ) { } @ Override public void closeInventory ( ) { } @ Override public boolean isItemValidForSlot ( int slotIndex , ItemStack item ) { } }

Fix:
return BlockDarkFurnace . isItemAccepted ( itemInserted ) ;
Buggy code:
class Main { private static ArrayList < String > argumentList ; public static void main ( String [ ] args ) { } public void work ( ) { Bank testBank = new Bank ( "Fred" , 1000 , 20 , true ) ; <START_BUG> testBank . addCustomer ( 10000 ) ; <END_BUG> testBank . printCustomerInfoToFile ( ) ; } }

Fix:
testBank . addCustomer ( 5 ) ;
Buggy code:
public class Sprite { protected BufferedImage texture ; protected Vec2d position ; private int speed ; protected Vec2d velocity ; private int rows ; private int columns ; private int framesPerSecond ; private Rectangle boundingBox ; private int currentFrame ; private int totalFrames ; private float timeSinceLastFrame ; private boolean isBlocked ; private Weapon weapon ; public Sprite ( BufferedImage texture , Vec2d initPosition , int speed , int rows , int columns , int FPS ) { } public void Update ( float elapsedTime ) { } public void Draw ( Graphics g ) { } public void Draw ( Graphics g , AffineTransform tx ) { } private void UpdateAnimation ( float elapsedTime ) { } private void UpdatePosition ( float elapsedTime ) { } private float getNanoSecondsInFrame ( ) { } private Rectangle CreateBoundingBox ( Vec2d newPosition ) { <START_BUG> Rectangle boundingBox = new Rectangle ( ( ( int ) ( newPosition . x ) ) , ( ( int ) ( newPosition . y ) ) , getWidth ( ) , ( ( getHeight ( ) ) * 2 ) ) ; <END_BUG> return boundingBox ; } public int getNumWalls ( ) { } public boolean intersects ( Sprite s ) { } public int getWidth ( ) { } public int getHeight ( ) { } public Rectangle getBoundingBox ( ) { } public void setIsBlocked ( boolean newVal ) { } public boolean isBlocked ( ) { } public boolean isWall ( ) { } }

Fix:
Rectangle boundingBox = new Rectangle ( ( ( int ) ( newPosition . x ) ) , ( ( int ) ( newPosition . y ) ) , getWidth ( ) , getHeight ( ) ) ;
Buggy code:
public class SummaryFragment extends Fragment { private MainActivity mMainActivity = CaratApplication . getMainActivity ( ) ; private PieChart mChart ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { final View inflatedView ; int hogsCount = 0 ; int bugsCount = 0 ; if ( ( CaratApplication . storage ) != null ) { SimpleHogBug [ ] h = storage . getHogReport ( ) ; <START_BUG> SimpleHogBug [ ] b = storage . getHogReport ( ) ; <END_BUG> if ( h != null ) hogsCount = h . length ; if ( b != null ) bugsCount = b . length ; } if ( mMainActivity . isStatsDataAvailable ( ) ) { inflatedView = inflater . inflate ( summary , container , false ) ; drawPieChart ( inflatedView ) ; setClickableUserStatsText ( inflatedView , hogsCount , bugsCount ) ; } else { inflatedView = inflater . inflate ( summary_unavailable , container , false ) ; } return inflatedView ; } private void setClickableUserStatsText ( final View inflatedView , int hogsCount , int bugsCount ) { } private void handleHogsCountClick ( View root ) { } private void handleBugsCountClick ( View root ) { } private void drawPieChart ( final View inflatedView ) { } protected PieData generatePieData ( ) { } }

Fix:
SimpleHogBug [ ] b = storage . getBugReport ( ) ;
Buggy code:
public class JasperC extends DefaultCompilerAdapter { public boolean execute ( ) throws BuildException { getJspc ( ) . log ( "Using<seq2seq4repair_space>jasper<seq2seq4repair_space>compiler" , MSG_VERBOSE ) ; Commandline cmd = setupJasperCommand ( ) ; try { Java java = ( ( Java ) ( getJspc ( ) . getProject ( ) . createTask ( "java" ) ) ) ; if ( ( getJspc ( ) . getClasspath ( ) ) != null ) java . setClasspath ( getJspc ( ) . getClasspath ( ) ) ; java . setClassname ( "org.apache.jasper.JspC" ) ; String [ ] args = cmd . getArguments ( ) ; for ( int i = 0 ; i < ( args . length ) ; i ++ ) java . createArg ( ) . setValue ( args [ i ] ) ; java . setFailonerror ( true ) ; java . execute ( ) ; return true ; } catch ( Exception ex ) { if ( ex instanceof BuildException ) { throw ( ( BuildException ) ( ex ) ) ; } else { <START_BUG> throw new BuildException ( "Error<seq2seq4repair_space>running<seq2seq4repair_space>jsp<seq2seq4repair_space>compiler:<seq2seq4repair_space>" , ex , getJspc ( ) . getLocation ( ) ) ; <END_BUG> } } } private Commandline setupJasperCommand ( ) { } }

Fix:
throw new BuildException ( "Error<seq2seq4repair_space>running<seq2seq4repair_space>jsp<seq2seq4repair_space>compiler:<seq2seq4repair_space>" , ex ) ;
Buggy code:
class FilePickerResultHandler implements ActivityResultHandler { private static final String LOGTAG = "GeckoFilePickerResultHandler" ; private static final String UPLOADS_DIR = "uploads" ; private final ResultHandler handler ; private final int tabId ; private final File cacheDir ; private String mImageName = "" ; public FilePickerResultHandler ( final FilePicker . ResultHandler handler , final Context context , final int tabId ) { } void sendResult ( String res ) { } @ Override public void onActivityResult ( int resultCode , Intent intent ) { } public String generateImageName ( ) { } private class VideoLoaderCallbacks implements LoaderCallbacks < Cursor > { private final Uri uri ; public VideoLoaderCallbacks ( Uri uri ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor cursor ) { } private void tryFileLoaderCallback ( ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } } private class FileLoaderCallbacks implements LoaderCallbacks < Cursor > , Tabs . OnTabsChangedListener { private final Uri uri ; private final File cacheDir ; private final int tabId ; String tempFile ; public FileLoaderCallbacks ( Uri uri , File cacheDir , int tabId ) { } @ Override public Loader < Cursor > onCreateLoader ( int id , Bundle args ) { } @ Override public void onLoadFinished ( Loader < Cursor > loader , Cursor cursor ) { } @ Override public void onLoaderReset ( Loader < Cursor > loader ) { } @ Override public void onTabChanged ( Tab tab , Tabs . TabEvents msg , Object data ) { <START_BUG> if ( ( tab . getId ( ) ) != ( tabId ) ) { <END_BUG> return ; } if ( ( msg == ( TabEvents . LOCATION_CHANGE ) ) || ( msg == ( TabEvents . CLOSED ) ) ) { ThreadUtils . postToBackgroundThread ( new Runnable ( ) { @ Override public void run ( ) { File f = new File ( tempFile ) ; f . delete ( ) ; } } ) ; Tabs . unregisterOnTabsChangedListener ( this ) ; } } } }

Fix:
if ( ( tab == null ) || ( ( tab . getId ( ) ) != ( tabId ) ) ) {
Buggy code:
public class View { public void title ( ) { } public void initialPage ( ) { } public void printUserList ( HashMap < Integer , Client > clients ) { } public void selectUser ( HashMap < Integer , Client > clients ) { } public void createUser ( ) { } public void deleteUser ( HashMap < Integer , Client > clients ) { } public void selectBank ( ) { System . out . println ( "은행을<seq2seq4repair_space>선택해주세요" ) ; System . out . println ( "1.<seq2seq4repair_space>KB" ) ; System . out . println ( "2.<seq2seq4repair_space>NH" ) ; <START_BUG> System . out . println ( "3.<seq2seq4repair_space>SH" ) ; <END_BUG> System . out . print ( "<seq2seq4repair_space>Select<seq2seq4repair_space>Number<seq2seq4repair_space>:<seq2seq4repair_space>" ) ; } public void banking ( ) { } public void currentBalance ( int balance ) { } public void currentDebt ( int debt ) { } public void deposit ( ) { } public void withdraw ( ) { } public void transferAccountNumber ( ) { } public void transferMoney ( ) { } public void printStateList ( LinkedList < String > stateList ) { } public void loan ( ) { } public void repay ( ) { } public void timeLeap ( ) { } public void noAccount ( ) { } public void createAccount ( ) { } public void deleteAccount ( int bal ) { } }

Fix:
System . out . println ( "3.<seq2seq4repair_space>Woori" ) ;
Buggy code:
public class ReadBigFile { public static void main ( String [ ] args ) throws Exception { String xlsxFile = ReadBigFile . class . getResource ( "//test-oom.xlsx" ) . getPath ( ) ; <START_BUG> DefaultDocumentReader docReader = new DefaultDocumentReader ( new File ( xlsxFile ) ) ; <END_BUG> SheetReader sheetReader = docReader . getReaderForSheet ( 0 ) ; sheetReader . startRead ( ) ; String [ ] lineValues = null ; int i = 0 ; while ( ( lineValues = sheetReader . readLine ( ) ) != null ) { i ++ ; System . out . println ( ( ( i + "#<seq2seq4repair_space>" ) + ( StringUtils . join ( lineValues , ",<seq2seq4repair_space>" ) ) ) ) ; } sheetReader . close ( ) ; docReader . close ( ) ; System . out . println ( "done." ) ; } }

Fix:
DocumentReader docReader = new DefaultDocumentReader ( new File ( xlsxFile ) ) ;