nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Spiel { private Kasten [ ] kaesten = new Kasten [ 9 ] ; private final Spieler [ ] spieler = new Spieler [ 2 ] ; private Spieler activePlayer ; private final View view ; private boolean isRunning = true ; public Spiel ( final View view ) { } private void initGame ( ) { } private void gameStart ( ) { } private void startRound ( Kasten [ ] kaesten ) { } private void gameEnd ( ) { } public class RestartListener implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { <START_BUG> System . out . println ( e . getActionCommand ( ) ) ; <END_BUG> } } class ButtonListener implements ActionListener { @ Override public void actionPerformed ( ActionEvent e ) { CustomButton button = ( ( CustomButton ) ( e . getSource ( ) ) ) ; if ( ( activePlayer . getWuerfelErgebnis ( ) ) != 2 ) { button . setBackground ( activePlayer . getColor ( ) ) ; button . setOpaque ( true ) ; isRunning = ! ( activePlayer . pinSetzen ( kaesten , button . getFeld ( ) . getFeldIndex ( ) , button . getKastenIndex ( ) ) ) ; } else { button . setDefaultBackground ( ) ; activePlayer . pinLoeschen ( kaesten , button . getFeld ( ) . getFeldIndex ( ) , button . getKastenIndex ( ) ) ; } if ( isRunning ) { if ( ( activePlayer . equals ( spieler [ 0 ] ) ) && ( ( activePlayer . getWuerfelErgebnis ( ) ) != 2 ) ) activePlayer = spieler [ 1 ] ; else if ( ( activePlayer . equals ( spieler [ 1 ] ) ) && ( ( activePlayer . getWuerfelErgebnis ( ) ) != 2 ) ) activePlayer = spieler [ 0 ] ; else System . out . println ( ( ( activePlayer . getName ( ) ) + "<seq2seq4repair_space>ist<seq2seq4repair_space>nochmal<seq2seq4repair_space>an<seq2seq4repair_space>der<seq2seq4repair_space>Reihe." ) ) ; } startRound ( kaesten ) ; } } public void restartGame ( ) { } }

Fix:
restartGame ( ) ;
Buggy code:
public class ReminderAdapter extends DBAdapter { private static ReminderAdapter mAdapter ; private ReminderAdapter ( ) { } public static ReminderAdapter getInstance ( ) { } public void addDBEntry ( SQLiteDatabase database , Reminder reminder ) { } public List < Reminder > queryDBEntry ( SQLiteDatabase database ) { } private Reminder cursorToReminder ( Cursor cursor ) { <START_BUG> Reminder reminder = new Reminder ( cursor . getString ( 0 ) , cursor . getString ( 1 ) , cursor . getString ( 2 ) , cursor . getString ( 3 ) , cursor . getInt ( 4 ) ) ; <END_BUG> return reminder ; } No newline ; at end ; of file ; }

Fix:
Reminder reminder = new Reminder ( cursor . getString ( 0 ) , cursor . getLong ( 1 ) , cursor . getString ( 2 ) , cursor . getString ( 3 ) , cursor . getInt ( 4 ) ) ;
Buggy code:
public class TaskInfo extends SubTaskInfo { double preWork = 0 ; int totalWork = 0 ; TaskInfo ( JobInfo parentJobInfo , String infoName , int total ) { } void addWork ( double workIncrement ) { } void addWork ( double workIncrement , IProgressMonitor parentMonitor , int parentTicks ) { } String getDisplayString ( ) { } public String getDisplayStringWithoutTask ( ) { } int getPercentDone ( ) { <START_BUG> return ( ( int ) ( ( ( preWork ) * 100 ) // ( totalWork ) ) ) ; <END_BUG> } private String unknownProgress ( ) { } }

Fix:
return Math . min ( ( ( int ) ( ( ( preWork ) * 100 ) // ( totalWork ) ) ) , 100 ) ;
Buggy code:
public class NoteViewActivity extends ActionBarActivity { NoteInfo noteInfo ; GooglePlaces googlePlaces = null ; TextView addressDetailsTextView = null ; TextView addressTextView = null ; EditText editText = null ; CheckBox checkBoxEnableAlerts = null ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } private void returnFromActivity ( int resultCode , NoteInfo resultObject ) { } class LoadPlaces extends AsyncTask < String , String , String > { ArrayList < Place > placesList = new ArrayList < Place > ( ) ; @ Override protected void onPreExecute ( ) { } protected String doInBackground ( String ... args ) { } protected void onPostExecute ( String file_url ) { runOnUiThread ( new Runnable ( ) { public void run ( ) { Spinner dropdown = ( ( Spinner ) ( findViewById ( spinnerPlaceDetails ) ) ) ; dropdown . setOnItemSelectedListener ( new AdapterView . OnItemSelectedListener ( ) { @ Override public void onItemSelected ( AdapterView < ? > parent , View view , int position , long id ) { if ( ( parent . getItemAtPosition ( position ) ) != null ) { String placeName = parent . getItemAtPosition ( position ) . toString ( ) ; addressDetailsTextView . setText ( placeName ) ; for ( Place place : placesList ) { if ( ( ( place . name ) == placeName ) && ( ( ( place . formatted_address ) != null ) || ( ( place . formatted_address ) != "" ) ) ) { addressTextView . setText ( place . formatted_address ) ; } } } } @ Override public void onNothingSelected ( AdapterView < ? > parent ) { } } ) ; if ( ( placesList ) != null ) { String [ ] items = new String [ ( placesList . size ( ) ) + 1 ] ; <START_BUG> items [ 0 ] = null ; <END_BUG> int pos = 1 ; for ( Place place : placesList ) { items [ ( pos ++ ) ] = place . name ; } ArrayAdapter < String > adapter = new ArrayAdapter < String > ( getBaseContext ( ) , layout . simple_spinner_item , items ) ; dropdown . setAdapter ( adapter ) ; } } } ) ; } } }

Fix:
items [ 0 ] = "" ;
Buggy code:
public class JsonMapObjectInspector extends StandardMapObjectInspector { public JsonMapObjectInspector ( ObjectInspector mapKeyObjectInspector , ObjectInspector mapValueObjectInspector ) { } @ Override public Map < ? , ? > getMap ( Object data ) { } @ Override public int getMapSize ( Object data ) { if ( ( JsonObjectInspectorUtils . checkObject ( data ) ) == null ) { return - 1 ; } JSONObject jObj = safeJSONObjectCast ( data ) ; <START_BUG> return jObj . length ( ) ; <END_BUG> } @ Override public Object getMapValueElement ( Object data , Object key ) { } private JSONObject safeJSONObjectCast ( Object data ) { } }

Fix:
return jObj . mapLength ( ) ;
Buggy code:
public abstract class EntityLiving extends Entity { protected double health ; protected double healthMax ; protected double attackPower ; protected double speed ; protected boolean bMoving ; protected EntityLiving ( Sprite sprite , double x , double y , double r , double health , double attackPower , double speed ) { } abstract double takeDamage ( double amount ) { } abstract double dealDamage ( ) { } abstract void AI ( LevelInteractable activeLevel ) { } public double getHealth ( ) { } public double getHealthMax ( ) { } public double getDamage ( ) { } public boolean isMoving ( ) { } @ Override public void tick ( LevelInteractable activeLevel ) { super . tick ( activeLevel ) ; AI ( activeLevel ) ; if ( isMoving ( ) ) { long deltaTime = ( System . nanoTime ( ) ) - ( timePreviousTick ) ; <START_BUG> double magnitude = ( deltaTime // 1000000.0 ) * ( speed ) ; <END_BUG> Point2D . Double position = getPosition ( ) ; position . x += ( Math . cos ( vectorAngle ) ) * magnitude ; position . y += ( Math . sin ( vectorAngle ) ) * magnitude ; setPosition ( position ) ; } } }

Fix:
double magnitude = ( deltaTime // 1.0E9 ) * ( speed ) ;
Buggy code:
public class ErrorState implements State { private final State nextState ; private final String errorMessage ; private final StateValues stateValues ; private ConsoleWrapper theConsole ; public ErrorState ( ConsoleWrapper theConsole , String errorMessage ) { } public ErrorState ( ConsoleWrapper theConsole , String errorMessage , State nextState ) { } public ErrorState ( ConsoleWrapper theConsole , String errorMessage , State nextState , StateValues stateValues ) { } public State execute ( ) { <START_BUG> boolean direct = ( theConsole . getConsole ( ) ) == null ; <END_BUG> printf ( AddUser . NEW_LINE , direct ) ; printf ( "<seq2seq4repair_space>*<seq2seq4repair_space>" , direct ) ; printf ( DomainManagementMessages . MESSAGES . errorHeader ( ) , direct ) ; printf ( "<seq2seq4repair_space>*<seq2seq4repair_space>" , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; printf ( errorMessage , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; printf ( AddUser . NEW_LINE , direct ) ; if ( ( ( ( stateValues ) != null ) && ( ! ( stateValues . isInteractive ( ) ) ) ) && ( ( nextState ) == null ) ) { throw new AddUserFailedException ( errorMessage ) ; } return nextState ; } private void printf ( final String message , final boolean direct ) { } }

Fix:
boolean direct = theConsole . hasConsole ( ) ;
Buggy code:
public abstract class AbstractMetamataTask extends Task { protected Path classPath = null ; protected Path sourcePath = null ; protected File metamataHome = null ; protected CommandlineJava cmdl = new CommandlineJava ( ) ; protected Vector fileSets = new Vector ( ) ; protected File optionsFile = null ; protected Hashtable includedFiles = null ; public AbstractMetamataTask ( ) { } protected AbstractMetamataTask ( String className ) { } protected static final void addAllVector ( Vector dest , Enumeration files ) { } protected static final File createTmpFile ( ) { } public void setMaxmemory ( String max ) { } public void setMetamatahome ( final File metamataHome ) { } public void addFileSet ( FileSet fs ) { } public Path createClasspath ( ) { } public Argument createJvmarg ( ) { } public Path createSourcepath ( ) { } public void execute ( ) throws BuildException { } protected void setUp ( ) throws BuildException { } protected final File getMetamataJar ( File home ) { } protected Hashtable getFileMapping ( ) { } protected abstract Vector getOptions ( ) { } protected void checkOptions ( ) throws BuildException { if ( ( ( metamataHome ) == null ) || ( ! ( metamataHome . exists ( ) ) ) ) { throw new BuildException ( "'metamatahome'<seq2seq4repair_space>must<seq2seq4repair_space>point<seq2seq4repair_space>to<seq2seq4repair_space>Metamata<seq2seq4repair_space>home<seq2seq4repair_space>directory." ) ; } <START_BUG> metamataHome = project . resolveFile ( metamataHome . getPath ( ) ) ; <END_BUG> File jar = getMetamataJar ( metamataHome ) ; if ( ! ( jar . exists ( ) ) ) { throw new BuildException ( ( jar + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>Check<seq2seq4repair_space>your<seq2seq4repair_space>metamata<seq2seq4repair_space>installation." ) ) ; } } protected void cleanUp ( ) { } protected abstract ExecuteStreamHandler createStreamHandler ( ) { } protected void execute0 ( ExecuteStreamHandler handler ) throws BuildException { } protected void generateOptionsFile ( File tofile , Vector options ) throws BuildException { } protected Hashtable scanFileSets ( ) { } }

Fix:
metamataHome = resolveFile ( metamataHome . getPath ( ) ) ;
Buggy code:
public class POP3Server { private AccountItem accountItem ; private File file ; public POP3Protocol pop3Connection ; private boolean alreadyLoaded ; private POP3Store store ; protected POP3HeaderCache headerCache ; public POP3Server ( AccountItem accountItem ) { } public void save ( ) throws Exception { } public File getConfigFile ( ) { } public AccountItem getAccountItem ( ) { } public Folder getFolder ( ) { SpecialFoldersItem foldersItem = accountItem . getSpecialFoldersItem ( ) ; <START_BUG> String inboxStr = foldersItem . getInbox ( ) ; <END_BUG> System . out . println ( ( "inbox-string=" + inboxStr ) ) ; int inboxInt = Integer . parseInt ( inboxStr ) ; Folder f = ( ( Folder ) ( treeModel . getFolder ( inboxInt ) ) ) ; System . out . println ( ( "f=" + f ) ) ; return f ; } public void logout ( ) throws Exception { } public void forceLogout ( ) throws Exception { } public Vector getUIDList ( int totalMessageCount , WorkerStatusController worker ) throws Exception { } public Vector getMessageSizeList ( ) throws Exception { } protected boolean existsLocally ( Object uid , HeaderList list ) throws Exception { } protected boolean existsRemotely ( Object uid , Vector uidList ) throws Exception { } protected Vector synchronize ( Vector newList ) throws Exception { } public void deleteMessages ( int [ ] indexes ) throws Exception { } public int getMessageCount ( ) throws Exception { } public Message getMessage ( int index , Object uid , WorkerStatusController worker ) throws Exception { } public String getFolderName ( ) { } public POP3Store getStore ( ) { } }

Fix:
String inboxStr = foldersItem . get ( "inbox" ) ;
Buggy code:
public class RemoveList implements Action { @ Override public void execute ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { int listId = Integer . parseInt ( request . getParameter ( "listId" ) ) ; User user = ( ( User ) ( request . getSession ( ) . getAttribute ( "user" ) ) ) ; try { ListDAO dao = DAOHelper . getListDAO ( request ) ; List list = new List ( listId ) ; if ( dao . removeList ( list , user ) ) { DisplayHelper . setItems ( request ) ; DisplayHelper . setList ( request ) ; <START_BUG> RequestDispatcher rd = request . getRequestDispatcher ( "//index.jsp" ) ; <END_BUG> rd . forward ( request , response ) ; } else { response . sendRedirect ( "index.jsp" ) ; } } catch ( SQLException e ) { response . sendRedirect ( "error.jsp" ) ; } catch ( ClassNotFoundException e ) { response . sendRedirect ( "error.jsp" ) ; } } }

Fix:
RequestDispatcher rd = request . getRequestDispatcher ( "//lists.jsp" ) ;
Buggy code:
public class ServiceMessageSender implements ReactiveState . FeedbackLoop , ReactiveState . Upstream { private final AeronInfra aeronInfra ; private final Publication serviceRequestPub ; private final BufferClaim bufferClaim = new BufferClaim ( ) ; private final BackoffIdleStrategy idleStrategy = AeronUtils . newBackoffIdleStrategy ( ) ; private final byte [ ] sessionId ; public ServiceMessageSender ( AeronInfra aeronInfra , Publication serviceRequestPub , String sessionId ) { } public synchronized void sendRequest ( long n ) { } public synchronized void sendCancel ( ) { } public synchronized long sendHeartbeat ( ) { } private long claimBuffer ( int length ) { } private void putSessionId ( MutableDirectBuffer mutableBuffer , int offset , byte [ ] sessionId ) { } private void commitRequest ( BufferClaim bufferClaim , long n , byte [ ] sessionId ) { } private void commitCancel ( BufferClaim bufferClaim , byte [ ] sessionId ) { } private void commitHeartbeat ( BufferClaim bufferClaim , byte [ ] sessionId ) { } @ Override public Object upstream ( ) { <START_BUG> return serviceRequestPub . channel ( ) ; <END_BUG> } @ Override public Object delegateInput ( ) { } @ Override public Object delegateOutput ( ) { } }

Fix:
return ( ( serviceRequestPub . channel ( ) ) + "//" ) + ( serviceRequestPub . streamId ( ) ) ;
Buggy code:
public class BeanFactoryAnnotationUtils { public static < T > T qualifiedBeanOfType ( BeanFactory beanFactory , Class < T > beanType , String qualifier ) { } private static < T > T qualifiedBeanOfType ( ConfigurableListableBeanFactory bf , Class < T > beanType , String qualifier ) { Map < String , T > candidateBeans = BeanFactoryUtils . beansOfTypeIncludingAncestors ( bf , beanType ) ; T matchingBean = null ; for ( String beanName : candidateBeans . keySet ( ) ) { if ( BeanFactoryAnnotationUtils . isQualifierMatch ( qualifier , beanName , bf ) ) { if ( matchingBean != null ) { throw new IllegalStateException ( ( ( ( ( "No<seq2seq4repair_space>unique<seq2seq4repair_space>" + ( beanType . getSimpleName ( ) ) ) + "<seq2seq4repair_space>bean<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>qualifier<seq2seq4repair_space>'" ) + qualifier ) + "'" ) ) ; } matchingBean = candidateBeans . get ( beanName ) ; } } if ( matchingBean != null ) { return matchingBean ; } else { <START_BUG> throw new IllegalStateException ( ( ( ( ( ( "No<seq2seq4repair_space>matching<seq2seq4repair_space>" + ( beanType . getSimpleName ( ) ) ) + "<seq2seq4repair_space>bean<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>qualifier<seq2seq4repair_space>'" ) + qualifier ) + "'<seq2seq4repair_space>-<seq2seq4repair_space>neither<seq2seq4repair_space>qualifier<seq2seq4repair_space>" ) + "match<seq2seq4repair_space>nor<seq2seq4repair_space>bean<seq2seq4repair_space>name<seq2seq4repair_space>match!" ) ) ; <END_BUG> } } private static boolean isQualifierMatch ( String qualifier , String beanName , ConfigurableListableBeanFactory bf ) { } }

Fix:
throw new IllegalStateException ( ( ( ( ( ( "No<seq2seq4repair_space>matching<seq2seq4repair_space>" + ( beanType . getSimpleName ( ) ) ) + "<seq2seq4repair_space>bean<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>qualifier<seq2seq4repair_space>'" ) + qualifier ) + "'<seq2seq4repair_space>-<seq2seq4repair_space>neither<seq2seq4repair_space>qualifier<seq2seq4repair_space>" ) + "nor<seq2seq4repair_space>bean<seq2seq4repair_space>name<seq2seq4repair_space>matches!" ) ) ;
Buggy code:
public class SubDeploymentDependencyProcessor implements DeploymentUnitProcessor { @ Override public void deploy ( DeploymentPhaseContext phaseContext ) throws DeploymentUnitProcessingException { final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final DeploymentUnit parent = deploymentUnit . getParent ( ) ; if ( parent == null ) { return ; } final ModuleSpecification moduleSpec = deploymentUnit . getAttachment ( MODULE_SPECIFICATION ) ; final AttachmentList < DeploymentUnit > subDeployments = parent . getAttachment ( SUB_DEPLOYMENTS ) ; final ModuleLoader moduleLoader = deploymentUnit . getAttachment ( SERVICE_MODULE_LOADER ) ; final ModuleIdentifier parentModule = parent . getAttachment ( MODULE_IDENTIFIER ) ; if ( parentModule != null ) { <START_BUG> moduleSpec . addDependency ( new ModuleDependency ( moduleLoader , parentModule , false , false , false ) ) ; <END_BUG> } for ( DeploymentUnit subDeployment : subDeployments ) { if ( subDeployment . getServiceName ( ) . equals ( deploymentUnit . getServiceName ( ) ) ) { continue ; } if ( PrivateSubDeploymentMarker . isPrivate ( subDeployment ) ) { continue ; } ModuleDependency moduleDependency = new ModuleDependency ( moduleLoader , subDeployment . getAttachment ( MODULE_IDENTIFIER ) , false , false , true ) ; moduleSpec . addDependency ( moduleDependency ) ; } } @ Override public void undeploy ( DeploymentUnit context ) { } }

Fix:
moduleSpec . addDependency ( new ModuleDependency ( moduleLoader , parentModule , false , false , true ) ) ;
Buggy code:
public class BinaryMember extends Member { protected BinaryMember ( int type , IJavaElement parent , String name ) { } public void copy ( IJavaElement container , IJavaElement sibling , String rename , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public ISourceRange getNameRange ( ) { } public ISourceRange getSourceRange ( ) throws JavaModelException { } public boolean isBinary ( ) { } public boolean isStructureKnown ( ) throws JavaModelException { } public void move ( IJavaElement container , IJavaElement sibling , String rename , boolean force , IProgressMonitor monitor ) throws JavaModelException { } protected void openHierarchy ( ) throws JavaModelException { Openable openableParent = ( ( Openable ) ( getOpenableParent ( ) ) ) ; if ( openableParent != null ) { JavaElementInfo openableParentInfo = ( ( JavaElementInfo ) ( fgJavaModelManager . getInfo ( ( ( IJavaElement ) ( openableParent ) ) ) ) ) ; if ( openableParentInfo == null ) { <START_BUG> openableParent . openWhenClosed ( null , null ) ; <END_BUG> openableParentInfo = ( ( JavaElementInfo ) ( fgJavaModelManager . getInfo ( ( ( IJavaElement ) ( openableParent ) ) ) ) ) ; } ClassFileInfo cfi = ( ( ClassFileInfo ) ( openableParentInfo ) ) ; cfi . getBinaryChildren ( ) ; } } public void rename ( String name , boolean force , IProgressMonitor monitor ) throws JavaModelException { } public void setContents ( String contents , IProgressMonitor monitor ) throws JavaModelException { } }

Fix:
openableParent . openWhenClosed ( null ) ;
Buggy code:
public class SendMail { private final String mailSMTPServer ; private final String mailSMTPServerPort ; public SendMail ( ) { } SendMail ( String mailSMTPServer , String mailSMTPServerPort ) { } public void sendMail ( String from , String to , String subject , String message ) { Properties props = new Properties ( ) ; props . put ( "mail.transport.protocol" , "smtp" ) ; props . put ( "mail.smtp.starttls.enable" , "true" ) ; props . put ( "mail.smtp.host" , mailSMTPServer ) ; props . put ( "mail.smtp.auth" , "true" ) ; props . put ( "mail.smtp.user" , from ) ; props . put ( "mail.debug" , "true" ) ; props . put ( "mail.smtp.port" , mailSMTPServerPort ) ; props . put ( "mail.smtp.socketFactory.port" , mailSMTPServerPort ) ; props . put ( "mail.smtp.socketFactory.class" , "javax.net.ssl.SSLSocketFactory" ) ; props . put ( "mail.smtp.socketFactory.fallback" , "false" ) ; SendMail . SimpleAuth auth ; <START_BUG> auth = new SendMail . SimpleAuth ( "charlesportoferreira@gmail.com" , "cHpf871170" ) ; <END_BUG> Session session = Session . getInstance ( props , auth ) ; session . setDebug ( true ) ; Message msg = new javax . mail . internet . MimeMessage ( session ) ; try { msg . setRecipient ( TO , new InternetAddress ( to ) ) ; msg . setFrom ( new InternetAddress ( from ) ) ; msg . setSubject ( subject ) ; msg . setContent ( message , "text//plain;<seq2seq4repair_space>charset=iso-8859-1" ) ; } catch ( MessagingException e ) { System . out . println ( ">><seq2seq4repair_space>Erro:<seq2seq4repair_space>Completar<seq2seq4repair_space>Mensagem" ) ; e . printStackTrace ( ) ; } Transport tr ; try { tr = session . getTransport ( "smtp" ) ; tr . connect ( mailSMTPServer , "charlesportoferreira@gmail.com" , "cHpf871170" ) ; msg . saveChanges ( ) ; tr . sendMessage ( msg , msg . getAllRecipients ( ) ) ; tr . close ( ) ; } catch ( MessagingException e ) { System . out . println ( ">><seq2seq4repair_space>Erro:<seq2seq4repair_space>Envio<seq2seq4repair_space>Mensagem" ) ; e . printStackTrace ( ) ; } } class SimpleAuth extends Authenticator { public String username = null ; public String password = null ; public SimpleAuth ( String user , String pwd ) { } @ Override protected PasswordAuthentication getPasswordAuthentication ( ) { } } }

Fix:
auth = new SendMail . SimpleAuth ( "charlesportoferreira@gmail.com" , "vc_nao_devia_olhar" ) ;
Buggy code:
public class TestSqlEntityProcessor { private static ThreadLocal < Integer > local = new ThreadLocal < Integer > ( ) ; @ Test public void singleBatch ( ) { } @ Test public void tranformer ( ) { } @ Test public void tranformerWithReflection ( ) { } @ Test public void tranformerList ( ) { EntityProcessor sep = new EntityProcessorWrapper ( new SqlEntityProcessor ( ) , null ) ; List < Map < String , Object > > rows = getRows ( 2 ) ; VariableResolverImpl vr = new VariableResolverImpl ( ) ; HashMap < String , String > ea = new HashMap < String , String > ( ) ; ea . put ( "query" , "SELECT<seq2seq4repair_space>*<seq2seq4repair_space>FROM<seq2seq4repair_space>A" ) ; ea . put ( "transformer" , TestSqlEntityProcessor . T2 . class . getName ( ) ) ; sep . init ( AbstractDataImportHandlerTest . getContext ( null , vr , TestSqlEntityProcessor . getDs ( rows ) , FULL_DUMP , null , ea ) ) ; TestSqlEntityProcessor . local . set ( 0 ) ; Map < String , Object > r = null ; int count = 0 ; while ( true ) { r = sep . nextRow ( ) ; if ( r == null ) break ; count ++ ; } <START_BUG> Assert . assertEquals ( 2 , TestSqlEntityProcessor . local . get ( ) ) ; <END_BUG> Assert . assertEquals ( 4 , count ) ; } private List < Map < String , Object > > getRows ( int count ) { } private static DataSource < Iterator < Map < String , Object > > > getDs ( final List < Map < String , Object > > rows ) { } public static class T extends Transformer { public Object transformRow ( Map < String , Object > aRow , Context context ) { } } public static class T3 { public Object transformRow ( Map < String , Object > aRow ) { } } public static class T2 extends Transformer { public Object transformRow ( Map < String , Object > aRow , Context context ) { } } }

Fix:
Assert . assertEquals ( 2 , ( ( int ) ( TestSqlEntityProcessor . local . get ( ) ) ) ) ;
Buggy code:
public class SudokuSolver implements Solver { public Board solve ( Board board ) { } private Board solveByBackTracking ( Board board ) { Board solvedBoard = board . copy ( ) ; solve ( 0 , 0 , solvedBoard . getMatrix ( ) ) ; <START_BUG> return solvedBoard ; <END_BUG> } boolean solve ( int row , int col , Integer [ ] [ ] matrix ) { } boolean isLegalMove ( int row , int col , int val , Integer [ ] [ ] matrix ) { } boolean isMoveLegalInBox ( int row , int col , int val , Integer [ ] [ ] matrix ) { } }

Fix:
return new StandardSudokuBoard ( solvedBoard . getMatrix ( ) ) ;
Buggy code:
public class Buffer implements IBuffer { protected IFile file ; protected int flags ; protected char [ ] contents ; protected ArrayList changeListeners ; protected IOpenable owner ; protected int gapStart = - 1 ; protected int gapEnd = - 1 ; protected Object lock = new Object ( ) ; protected static final int F_HAS_UNSAVED_CHANGES = 1 ; protected static final int F_IS_READ_ONLY = 2 ; protected static final int F_IS_CLOSED = 4 ; protected Buffer ( IFile file , IOpenable owner , boolean readOnly ) { } public void addBufferChangedListener ( IBufferChangedListener listener ) { } public void append ( char [ ] text ) { } public void append ( String text ) { } public void close ( ) { } public char getChar ( int position ) { } public char [ ] getCharacters ( ) { } public String getContents ( ) { } public int getLength ( ) { } public IOpenable getOwner ( ) { } public String getText ( int offset , int length ) { } public IResource getUnderlyingResource ( ) { } public boolean hasUnsavedChanges ( ) { } public boolean isClosed ( ) { } public boolean isReadOnly ( ) { } protected void moveAndResizeGap ( int position , int size ) { } protected void notifyChanged ( final BufferChangedEvent event ) { } public void removeBufferChangedListener ( IBufferChangedListener listener ) { } public void replace ( int position , int length , char [ ] text ) { } public void replace ( int position , int length , String text ) { } public void save ( IProgressMonitor progress , boolean force ) throws JavaModelException { if ( ( isReadOnly ( ) ) || ( ( this . file ) == null ) ) { return ; } if ( ! ( hasUnsavedChanges ( ) ) ) return ; try { String encoding = null ; try { <START_BUG> this . file . getCharset ( ) ; <END_BUG> } catch ( CoreException ce ) { } String stringContents = this . getContents ( ) ; if ( stringContents == null ) return ; byte [ ] bytes = ( encoding == null ) ? stringContents . getBytes ( ) : stringContents . getBytes ( encoding ) ; ByteArrayInputStream stream = new ByteArrayInputStream ( bytes ) ; if ( this . file . exists ( ) ) { this . file . setContents ( stream , ( force ? ( IResource . FORCE ) | ( IResource . KEEP_HISTORY ) : IResource . KEEP_HISTORY ) , null ) ; } else { this . file . create ( stream , force , null ) ; } } catch ( IOException e ) { throw new JavaModelException ( e , IJavaModelStatusConstants . IO_EXCEPTION ) ; } catch ( CoreException e ) { throw new JavaModelException ( e ) ; } this . flags &= ~ ( Buffer . F_HAS_UNSAVED_CHANGES ) ; } public void setContents ( char [ ] newContents ) { } public void setContents ( String newContents ) { } protected void setReadOnly ( boolean readOnly ) { } public String toString ( ) { } }

Fix:
encoding = this . file . getCharset ( ) ;
Buggy code:
public class LocalOverrideFileLoader { public static Map < String , String > loadLocalProperties ( String rootNode , String group ) { Preconditions . checkArgument ( ( ( ! ( Strings . isNullOrEmpty ( rootNode ) ) ) && ( ! ( Strings . isNullOrEmpty ( group ) ) ) ) , "rootNode<seq2seq4repair_space>or<seq2seq4repair_space>group<seq2seq4repair_space>cannot<seq2seq4repair_space>be<seq2seq4repair_space>empty." ) ; Map < String , String > properties = null ; final String localOverrideFile = LocalOverrideFileLoader . findLocalOverrideFile ( ) ; InputStream in = null ; try { in = LocalOverrideFileLoader . class . getClassLoader ( ) . getResourceAsStream ( localOverrideFile ) ; if ( in != null ) { final DocumentBuilderFactory factory = DocumentBuilderFactory . newInstance ( ) ; final DocumentBuilder builder = factory . newDocumentBuilder ( ) ; final Document doc = builder . parse ( in ) ; final Element factoriesNode = Preconditions . checkNotNull ( doc . getDocumentElement ( ) , "Root<seq2seq4repair_space>xml<seq2seq4repair_space>node<seq2seq4repair_space>node-factories<seq2seq4repair_space>not<seq2seq4repair_space>exists." ) ; Node factoryNode = LocalOverrideFileLoader . findChild ( factoriesNode , "node-factory" , "root" , rootNode ) ; <START_BUG> if ( factoriesNode != null ) { <END_BUG> Node nodeGroup = LocalOverrideFileLoader . findChild ( factoryNode , "group" , "id" , group ) ; if ( nodeGroup != null ) { NodeList childNodes = nodeGroup . getChildNodes ( ) ; int nodeCount = childNodes . getLength ( ) ; if ( nodeCount > 0 ) { properties = Maps . newHashMap ( ) ; for ( int i = 0 ; i < nodeCount ; i ++ ) { Node item = childNodes . item ( i ) ; if ( item . hasAttributes ( ) ) { NamedNodeMap attributes = item . getAttributes ( ) ; Node keyAttr = attributes . getNamedItem ( "key" ) ; if ( keyAttr != null ) { String propKey = keyAttr . getNodeValue ( ) ; String propVal = item . getFirstChild ( ) . getNodeValue ( ) ; if ( ( propKey != null ) && ( propVal != null ) ) { properties . put ( propKey , propVal ) ; } } } } } } } } } catch ( ParserConfigurationException e ) { throw Throwables . propagate ( e ) ; } catch ( SAXException e ) { throw Throwables . propagate ( e ) ; } catch ( IOException e ) { throw Throwables . propagate ( e ) ; } finally { if ( in != null ) { try { in . close ( ) ; } catch ( IOException e ) { } } } return properties ; } private static String findLocalOverrideFile ( ) { } private static Node findChild ( Node parent , String childNodeName , String attrName , String attrValue ) { } }

Fix:
if ( factoryNode != null ) {
Buggy code:
public class Main { public static void main ( String [ ] args ) throws IOException { <START_BUG> ANTLRFileStream input = new ANTLRFileStream ( "scripts//ql//quest1.ql" ) ; <END_BUG> QLLexer lexer = new QLLexer ( input ) ; CommonTokenStream tokens = new CommonTokenStream ( lexer ) ; QLParser parser = new QLParser ( tokens ) ; ParseTree tree = parser . questionnaire ( ) ; QLImplVisitor visitor = new QLImplVisitor ( ) ; Questionnaire questionnaire = ( ( Questionnaire ) ( tree . accept ( visitor ) ) ) ; TypeChecker typeChecker = new TypeChecker ( ) ; if ( questionnaire . accept ( typeChecker ) ) { GUIVisitor guiVisitor = new GUIVisitor ( ) ; questionnaire . accept ( guiVisitor ) ; } typeChecker . printMessages ( ) ; } }

Fix:
ANTLRFileStream input = new ANTLRFileStream ( "scripts//ql//problem_quest2.ql" ) ;
Buggy code:
public class ResourceAdapterService implements Service < ResourceAdapter > { private static final Logger log = Logger . getLogger ( "org.jboss.as.connector" ) ; public static final ServiceName SERVICE_NAME_BASE = JBOSS . append ( "connector" , "jndiname" ) ; private final ResourceAdapter value ; public ResourceAdapterService ( ResourceAdapter value ) { } @ Override public ResourceAdapter getValue ( ) throws IllegalArgumentException , IllegalStateException { } @ Override public void start ( StartContext context ) throws StartException { <START_BUG> ResourceAdapterService . log . errorf ( "started<seq2seq4repair_space>ResourceAdapterService<seq2seq4repair_space>%s" , context . getController ( ) . getName ( ) ) ; <END_BUG> } @ Override public void stop ( StopContext context ) { } }

Fix:
ResourceAdapterService . log . infof ( "started<seq2seq4repair_space>ResourceAdapterService<seq2seq4repair_space>%s" , context . getController ( ) . getName ( ) ) ;
Buggy code:
public class SampleSenderFactory { private static final Logger log = LoggingManager . getLoggerForClass ( ) ; private static final String MODE_STANDARD = "Standard" ; private static final String MODE_HOLD = "Hold" ; private static final String MODE_BATCH = "Batch" ; private static final String MODE_STATISTICAL = "Statistical" ; private static final String MODE_STRIPPED = "Stripped" ; private static final String MODE_STRIPPED_BATCH = "StrippedBatch" ; private static final String MODE_ASYNCH = "Asynch" ; private static final String MODE_DISKSTORE = "DiskStore" ; static SampleSender getInstance ( RemoteSampleListener listener ) { final boolean holdSamples = JMeterUtils . getPropDefault ( "hold_samples" , false ) ; <START_BUG> final String type = JMeterUtils . getPropDefault ( "mode" , SampleSenderFactory . MODE_STANDARD ) ; <END_BUG> if ( holdSamples || ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_HOLD ) ) ) { HoldSampleSender h = new HoldSampleSender ( listener ) ; return h ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_BATCH ) ) { BatchSampleSender b = new BatchSampleSender ( listener ) ; return b ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_STATISTICAL ) ) { StatisticalSampleSender s = new StatisticalSampleSender ( listener ) ; return s ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_STANDARD ) ) { StandardSampleSender s = new StandardSampleSender ( listener ) ; return s ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_STRIPPED_BATCH ) ) { return new DataStrippingSampleSender ( new BatchSampleSender ( listener ) ) ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_STRIPPED ) ) { return new DataStrippingSampleSender ( listener ) ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_ASYNCH ) ) { return new AsynchSampleSender ( listener ) ; } else if ( type . equalsIgnoreCase ( SampleSenderFactory . MODE_DISKSTORE ) ) { return new DiskStoreSampleSender ( listener ) ; } else { SampleSender s = null ; try { Class < ? > clazz = Class . forName ( type ) ; Constructor < ? > cons = clazz . getConstructor ( new Class [ ] { RemoteSampleListener . class } ) ; s = ( ( SampleSender ) ( cons . newInstance ( new Object [ ] { listener } ) ) ) ; } catch ( Exception e ) { SampleSenderFactory . log . error ( ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>sample<seq2seq4repair_space>sender<seq2seq4repair_space>from<seq2seq4repair_space>class<seq2seq4repair_space>" + type ) ) ; throw new IllegalArgumentException ( e . getMessage ( ) , e ) ; } return s ; } } }

Fix:
final String type = JMeterUtils . getPropDefault ( "mode" , SampleSenderFactory . MODE_STRIPPED_BATCH ) ;
Buggy code:
public class CameraPropertyPersister implements IBookmarkPropertyCreator , IBookmarkPropertyExporter { private static final String CAMERA_ELEMENT_NAME = "camera" ; private static final String [ ] SUPPORTED_TYPES = new String [ ] { CameraProperty . TYPE } ; private static final Logger logger = LoggerFactory . getLogger ( CameraPropertyPersister . class ) ; private Persister persister ; public CameraPropertyPersister ( ) { } @ Override public String [ ] getSupportedTypes ( ) { } @ Override public IBookmarkProperty createFromCurrentState ( String type ) { View view = INSTANCE . getActiveView ( ) ; if ( view == null ) { <START_BUG> return null ; <END_BUG> } Position eyePosition = view . getCurrentEyePosition ( ) ; Vec4 center = view . getCenterPoint ( ) ; Globe globe = view . getGlobe ( ) ; Position lookatPosition = globe . computePositionFromPoint ( center ) ; Vec4 upVector = view . getUpVector ( ) ; return new CameraProperty ( eyePosition , lookatPosition , upVector ) ; } @ Override public void exportToXML ( IBookmarkProperty property , Element propertyElement ) { } @ Override public IBookmarkProperty createFromXML ( String type , Element propertyElement ) { } }

Fix:
return new CameraProperty ( Position . ZERO , Position . ZERO , Vec4 . ZERO ) ;
Buggy code:
public class RangeSliceReply { public final List < Row > rows ; public RangeSliceReply ( List < Row > rows ) { } public Message getReply ( Message originalMessage ) throws IOException { DataOutputBuffer dob = new DataOutputBuffer ( ) ; dob . writeInt ( rows . size ( ) ) ; for ( Row row : rows ) { Row . serializer ( ) . serialize ( row , dob ) ; } byte [ ] data = Arrays . copyOf ( dob . getData ( ) , dob . getLength ( ) ) ; <START_BUG> return originalMessage . getReply ( FBUtilities . getLocalAddress ( ) , data ) ; <END_BUG> } @ Override public String toString ( ) { } public static RangeSliceReply read ( byte [ ] body ) throws IOException { } }

Fix:
return originalMessage . getReply ( FBUtilities . getLocalAddress ( ) , data , originalMessage . getVersion ( ) ) ;
Buggy code:
public class NavigationDrawerFragment extends Fragment { private DrawerLayout mDrawerLayout ; private ListView mDrawerListView ; private View mFragmentContainerView ; private NavigationDrawerFragment . NavigationDrawerCallbacks mCallbacks ; private ActionBarDrawerToggle mDrawerToggle ; private ImageView profilePic ; private TextView profileName ; @ Override public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { } public void selectItem ( int position ) { } public void setUp ( final Toolbar toolbar , Profile profile ) { Context context = getActivity ( ) ; mFragmentContainerView = getActivity ( ) . findViewById ( fragment_navigation_drawer ) ; if ( ! ( profile . getImageURL ( ) . equals ( "null" ) ) ) Picasso . with ( context ) . load ( profile . getImageURL ( ) ) . into ( profilePic ) ; else { Bitmap bitmap = BitmapFactory . decodeResource ( context . getResources ( ) , user_default ) ; profilePic . setImageBitmap ( bitmap ) ; } profileName . setText ( ( ( ( profile . getFirstName ( ) ) + "<seq2seq4repair_space>" ) + ( profile . getLastName ( ) ) ) ) ; mDrawerLayout = ( ( DrawerLayout ) ( getActivity ( ) . findViewById ( drawer_layout ) ) ) ; mDrawerLayout . setDrawerShadow ( drawer_shadow , START ) ; <START_BUG> mDrawerToggle = new ActionBarDrawerToggle ( getActivity ( ) , mDrawerLayout , toolbar , string . test , string . test ) { <END_BUG> @ Override public void onDrawerClosed ( View view ) { super . onDrawerClosed ( view ) ; } @ Override public void onDrawerOpened ( View drawerView ) { super . onDrawerOpened ( drawerView ) ; } } ; mDrawerLayout . post ( new Runnable ( ) { @ Override public void run ( ) { mDrawerToggle . syncState ( ) ; } } ) ; mDrawerToggle . setDrawerIndicatorEnabled ( true ) ; mDrawerLayout . setDrawerListener ( mDrawerToggle ) ; } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } @ Override public void onConfigurationChanged ( Configuration newConfig ) { } @ Override public void onAttach ( Activity activity ) { } public ActionBarDrawerToggle getDrawerToggle ( ) { } public interface NavigationDrawerCallbacks { void onNavigationDrawerItemSelected ( String itemName ) { } } }

Fix:
mDrawerToggle = new ActionBarDrawerToggle ( getActivity ( ) , mDrawerLayout , toolbar , string . app_name , string . app_name ) {
Buggy code:
public class HttpsListenerAdd extends AbstractListenerAdd { HttpsListenerAdd ( HttpsListenerResourceDefinition def ) { } @ Override protected ServiceName constructServiceName ( String name ) { <START_BUG> return HTTPS_LISTENER . append ( name ) ; <END_BUG> } @ Override AbstractListenerService < ? extends AbstractListenerService > createService ( String name , OperationContext context , ModelNode model ) throws OperationFailedException { } @ Override void configureAdditionalDependencies ( OperationContext context , ServiceBuilder < ? extends AbstractListenerService > serviceBuilder , ModelNode model , AbstractListenerService service ) throws OperationFailedException { } }

Fix:
return LISTENER . append ( name ) ;
Buggy code:
public interface IMarkupCacheKeyProvider { <START_BUG> CharSequence getCacheKey ( final MarkupContainer container , Class containerClass ) ; <END_BUG> }

Fix:
String getCacheKey ( final MarkupContainer container , Class containerClass ) ;
Buggy code:
public class DependSelector extends MappingSelector { public DependSelector ( ) { } public String toString ( ) { <START_BUG> StringBuffer buf = new StringBuffer ( "{dependselector<seq2seq4repair_space>targetdir:<seq2seq4repair_space>" ) ; <END_BUG> if ( ( targetdir ) == null ) { buf . append ( "NOT<seq2seq4repair_space>YET<seq2seq4repair_space>SET" ) ; } else { buf . append ( targetdir . getName ( ) ) ; } buf . append ( "<seq2seq4repair_space>granularity:<seq2seq4repair_space>" ) ; buf . append ( granularity ) ; if ( ( map ) != null ) { buf . append ( "<seq2seq4repair_space>mapper:<seq2seq4repair_space>" ) ; buf . append ( map . toString ( ) ) ; } else if ( ( mapperElement ) != null ) { buf . append ( "<seq2seq4repair_space>mapper:<seq2seq4repair_space>" ) ; buf . append ( mapperElement . toString ( ) ) ; } buf . append ( "}" ) ; return buf . toString ( ) ; } public boolean selectionTest ( File srcfile , File destfile ) { } }

Fix:
StringBuilder buf = new StringBuilder ( "{dependselector<seq2seq4repair_space>targetdir:<seq2seq4repair_space>" ) ;
Buggy code:
public class MemoryPoolMXBeanResetPeakUsageHandler implements OperationStepHandler , DescriptionProvider { public static final MemoryPoolMXBeanResetPeakUsageHandler INSTANCE = new MemoryPoolMXBeanResetPeakUsageHandler ( ) ; private MemoryPoolMXBeanResetPeakUsageHandler ( ) { } @ Override public void execute ( OperationContext context , ModelNode operation ) throws OperationFailedException { try { getMemoryPoolMXBean ( operation ) . resetPeakUsage ( ) ; } catch ( SecurityException e ) { throw new OperationFailedException ( new ModelNode ( ) . set ( e . toString ( ) ) ) ; } <START_BUG> context . completeStep ( ) ; <END_BUG> } @ Override public ModelNode getModelDescription ( Locale locale ) { } private MemoryPoolMXBean getMemoryPoolMXBean ( ModelNode operation ) throws OperationFailedException { } }

Fix:
context . completeStep ( NOOP_ROLLBACK_HANDLER ) ;
Buggy code:
public class Group { private final List < Position > positions ; private final Operator operator ; private final int expectedResult ; public static Group of ( Operator operator , int result , Position ... positions ) { } public Group ( Operator operator , int result , Position ... positions ) { } public Group ( Operator operator , int result , List < Position > positions ) { } public List < Position > getPositions ( ) { } public Operator getOperator ( ) { } public int getResult ( ) { } public boolean isCorrect ( Board board ) { } public boolean isCorrect ( List < Integer > values ) { } <START_BUG> public int getValue ( Board board ) { <END_BUG> List < Integer > values = new java . util . ArrayList ( positions . size ( ) ) ; for ( Position position : positions ) { values . add ( board . getCellValue ( position ) ) ; } return getValue ( values ) ; } public Integer getValue ( List < Integer > values ) { } private int getValueMinus ( List < Integer > values ) { } private Integer getValueDivide ( List < Integer > values ) { } private int getValueMultiply ( List < Integer > values ) { } private int getValuePlus ( List < Integer > values ) { } private Integer getValueIdentity ( List < Integer > values ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } }

Fix:
public Integer getValue ( Board board ) {
Buggy code:
public class CopyProjectAction extends SelectionListenerAction { private static String COPY_TOOL_TIP = WorkbenchMessages . getString ( "CopyProjectAction.toolTip" ) ; private static String COPY_TITLE = WorkbenchMessages . getString ( "CopyProjectAction.title" ) ; private static String COPY_PROGRESS_TITLE = WorkbenchMessages . getString ( "CopyProjectAction.progressTitle" ) ; private static String COPY_PROJECT_FAILED_MESSAGE = WorkbenchMessages . getString ( "CopyProjectAction.copyFailedMessage" ) ; private static String PROBLEMS_TITLE = WorkbenchMessages . getString ( "CopyProjectAction.copyFailedTitle" ) ; public static final String ID = ( PlatformUI . PLUGIN_ID ) + ".CopyProjectAction" ; protected Shell shell ; protected IStatus errorStatus ; public CopyProjectAction ( Shell shell ) { } CopyProjectAction ( Shell shell , String name ) { } protected IProjectDescription createDescription ( IProject project , String projectName , IPath rootLocation ) throws CoreException { } void displayError ( String message ) { } protected String getErrorsTitle ( ) { } protected AbstractUIPlugin getPlugin ( ) { } boolean performCopy ( final IProject project , final String projectName , final IPath newLocation ) { WorkspaceModifyOperation op = new WorkspaceModifyOperation ( ) { public void execute ( IProgressMonitor monitor ) { monitor . beginTask ( CopyProjectAction . COPY_PROGRESS_TITLE , 100 ) ; try { if ( monitor . isCanceled ( ) ) throw new OperationCanceledException ( ) ; IProjectDescription newDescription = createDescription ( project , projectName , newLocation ) ; monitor . worked ( 50 ) ; <START_BUG> project . copy ( newDescription , true , monitor ) ; <END_BUG> monitor . worked ( 50 ) ; } catch ( CoreException e ) { recordError ( e ) ; } finally { monitor . done ( ) ; } } } ; try { new ProgressMonitorDialog ( shell ) . run ( true , true , op ) ; } catch ( InterruptedException e ) { return false ; } catch ( InvocationTargetException e ) { displayError ( WorkbenchMessages . format ( "CopyProjectAction.internalError" , new Object [ ] { e . getTargetException ( ) . getMessage ( ) } ) ) ; return false ; } return true ; } protected Object [ ] queryDestinationParameters ( IProject project ) { } final void recordError ( CoreException error ) { } public void run ( ) { } protected boolean updateSelection ( IStructuredSelection selection ) { } }

Fix:
project . copy ( newDescription , ( ( IResource . SHALLOW ) | ( IResource . FORCE ) ) , monitor ) ;
Buggy code:
public class RCp extends RCCommand { @ Override public boolean onCommand ( CommandSender sender , Command command , String label , String [ ] args ) { if ( playerPages . containsKey ( sender ) ) { PageInfo pageInfo = playerPages . get ( sender ) ; if ( ( args . length ) > 1 ) { sender . sendMessage ( ( ( rc . getPrefs ( ) . getErrorColor ( ) ) + "Bad<seq2seq4repair_space>rcp<seq2seq4repair_space>syntax.<seq2seq4repair_space>Expecting<seq2seq4repair_space>//rcp<seq2seq4repair_space><page<seq2seq4repair_space>no.|prev|next|last>." ) ) ; return true ; } else if ( ( args . length ) == 0 ) { if ( ( pageInfo . page ) < ( pageInfo . pageCount ) ) pageInfo . page = ( pageInfo . page ) + 1 ; else { pageInfo . page = 1 ; } } else if ( ( args . length ) == 1 ) { if ( ParsingUtils . isNumber ( args [ 0 ] ) ) { pageInfo . page = Integer . valueOf ( args [ 0 ] ) ; } else if ( "previous" . startsWith ( args [ 0 ] ) ) { if ( ( pageInfo . page ) > 1 ) pageInfo . page = ( pageInfo . page ) - 1 ; else { sender . sendMessage ( ( ( rc . getPrefs ( ) . getErrorColor ( ) ) + "There's<seq2seq4repair_space>no<seq2seq4repair_space>previous<seq2seq4repair_space>page." ) ) ; return true ; } } else if ( "next" . startsWith ( args [ 0 ] ) ) { if ( ( pageInfo . page ) < ( pageInfo . pageCount ) ) pageInfo . page = ( pageInfo . page ) + 1 ; else { sender . sendMessage ( ( ( rc . getPrefs ( ) . getErrorColor ( ) ) + "There<seq2seq4repair_space>are<seq2seq4repair_space>no<seq2seq4repair_space>more<seq2seq4repair_space>pages." ) ) ; return true ; } } else if ( "last" . startsWith ( args [ 0 ] ) ) { pageInfo . page = pageInfo . pageCount ; } else { sender . sendMessage ( ( ( rc . getPrefs ( ) . getErrorColor ( ) ) + "Bad<seq2seq4repair_space>rcp<seq2seq4repair_space>syntax.<seq2seq4repair_space>Expecting<seq2seq4repair_space>//rcp<seq2seq4repair_space><page<seq2seq4repair_space>no.|prev|next|last>." ) ) ; return true ; } } <START_BUG> CommandUtils . pageMaker ( sender , pageInfo . title , null , pageInfo . lines , pageInfo . infoColor , pageInfo . errorColor , pageInfo . linesPerPage ) ; <END_BUG> return true ; } else { sender . sendMessage ( ( ( rc . getPrefs ( ) . getErrorColor ( ) ) + "You<seq2seq4repair_space>need<seq2seq4repair_space>to<seq2seq4repair_space>use<seq2seq4repair_space>a<seq2seq4repair_space>command<seq2seq4repair_space>with<seq2seq4repair_space>pages<seq2seq4repair_space>before<seq2seq4repair_space>using<seq2seq4repair_space>//rcp." ) ) ; return true ; } } }

Fix:
CommandUtils . pageMaker ( sender , pageInfo . title , null , pageInfo . src , pageInfo . infoColor , pageInfo . errorColor , pageInfo . linesPerPage ) ;