nus-yam/ex-repair huggingface dataset:
Buggy code:
public class WildcardBinding extends ReferenceBinding { ReferenceBinding genericType ; int rank ; public TypeBinding bound ; public TypeBinding [ ] otherBounds ; char [ ] genericSignature ; public int kind ; ReferenceBinding superclass ; ReferenceBinding [ ] superInterfaces ; TypeVariableBinding typeVariable ; LookupEnvironment environment ; public WildcardBinding ( ReferenceBinding genericType , int rank , TypeBinding bound , TypeBinding [ ] otherBounds , int kind , LookupEnvironment environment ) { } public int kind ( ) { } public boolean boundCheck ( TypeBinding argumentType ) { } public boolean canBeInstantiated ( ) { } public void collectSubstitutes ( Scope scope , TypeBinding otherType , Map substitutes , int constraint ) { } public char [ ] computeUniqueKey ( ) { } public String debugName ( ) { } public TypeBinding erasure ( ) { } public char [ ] genericTypeSignature ( ) { } public int hashCode ( ) { } void initialize ( ReferenceBinding someGenericType , TypeBinding someBound , TypeBinding [ ] someOtherBounds ) { } public boolean isSuperclassOf ( ReferenceBinding otherType ) { } public boolean isUnboundWildcard ( ) { } public boolean isWildcard ( ) { } public char [ ] readableName ( ) { } ReferenceBinding resolve ( ) { } public char [ ] shortReadableName ( ) { } public char [ ] signature ( ) { } public char [ ] sourceName ( ) { } public ReferenceBinding superclass ( ) { if ( ( this . superclass ) == null ) { TypeBinding superType = null ; if ( ( ( this . kind ) == ( Wildcard . EXTENDS ) ) && ( ! ( this . bound . isInterface ( ) ) ) ) { superType = this . bound ; } else { TypeVariableBinding variable = this . typeVariable ( ) ; if ( variable != null ) superType = variable . firstBound ; } <START_BUG> this . superclass = ( ( superType != null ) && ( ! ( superType . isInterface ( ) ) ) ) ? ( ( ReferenceBinding ) ( superType ) ) : environment . getType ( JAVA_LANG_OBJECT ) ; <END_BUG> } return this . superclass ; } public ReferenceBinding [ ] superInterfaces ( ) { } public void swapUnresolved ( UnresolvedReferenceBinding unresolvedType , ReferenceBinding resolvedType , LookupEnvironment env ) { } public String toString ( ) { } public TypeVariableBinding typeVariable ( ) { } }

Fix:
this . superclass = ( ( superType instanceof ReferenceBinding ) && ( ! ( superType . isInterface ( ) ) ) ) ? ( ( ReferenceBinding ) ( superType ) ) : environment . getType ( JAVA_LANG_OBJECT ) ;
Buggy code:
public class DB_StoredProcedure { private static PreparedStatement getSpecificInfoQuery ; public static void doStoredProcedures ( Connection conn ) throws SQLException { DB_StoredProcedure . getSpecificInfoQuery = conn . prepareStatement ( ( "SELECT<seq2seq4repair_space>ALIAS,<seq2seq4repair_space>" + ( "SYSTEMALIAS<seq2seq4repair_space>FROM<seq2seq4repair_space>SYS.SYSALIASES<seq2seq4repair_space>WHERE<seq2seq4repair_space>ALIASTYPE='S'<seq2seq4repair_space>AND<seq2seq4repair_space>" + "(CAST<seq2seq4repair_space>(JAVACLASSNAME<seq2seq4repair_space>AS<seq2seq4repair_space>VARCHAR(128)))<seq2seq4repair_space>=<seq2seq4repair_space>?" ) ) ) ; Statement stmt = conn . createStatement ( ) ; ResultSet rs = stmt . executeQuery ( ( "SELECT<seq2seq4repair_space>ALIAS,<seq2seq4repair_space>ALIASINFO,<seq2seq4repair_space>" + ( "ALIASID,<seq2seq4repair_space>SCHEMAID,<seq2seq4repair_space>JAVACLASSNAME,<seq2seq4repair_space>SYSTEMALIAS<seq2seq4repair_space>FROM<seq2seq4repair_space>SYS.SYSALIASES<seq2seq4repair_space>" + "WHERE<seq2seq4repair_space>ALIASTYPE='P'" ) ) ) ; boolean firstTime = true ; while ( rs . next ( ) ) { if ( rs . getBoolean ( 6 ) ) continue ; String procSchema = dblook . lookupSchemaId ( rs . getString ( 4 ) ) ; if ( dblook . isIgnorableSchema ( procSchema ) ) continue ; if ( firstTime ) { Logs . reportString ( "----------------------------------------------" ) ; <START_BUG> Logs . reportMessage ( "CSLOOK_StoredProcHeader" ) ; <END_BUG> Logs . reportString ( "----------------------------------------------\n" ) ; } String procName = rs . getString ( 1 ) ; String procFullName = dblook . addQuotes ( dblook . expandDoubleQuotes ( procName ) ) ; procFullName = ( procSchema + "." ) + procFullName ; String creationString = DB_StoredProcedure . createProcString ( procFullName , rs ) ; Logs . writeToNewDDL ( creationString ) ; Logs . writeStmtEndToNewDDL ( ) ; Logs . writeNewlineToNewDDL ( ) ; firstTime = false ; } rs . close ( ) ; stmt . close ( ) ; DB_StoredProcedure . getSpecificInfoQuery . close ( ) ; return ; } private static String createProcString ( String procName , ResultSet aProc ) throws SQLException { } }

Fix:
Logs . reportMessage ( "DBLOOK_StoredProcHeader" ) ;
Buggy code:
interface IFilter { public abstract IColumnIterator getMemtableColumnIterator ( ColumnFamily cf , DecoratedKey key , AbstractType comparator ) { } public abstract IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , FileDataInput file , DecoratedKey key , long dataStart ) { } <START_BUG> public abstract IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , String key ) ; <END_BUG> public abstract void collectReducedColumns ( IColumnContainer container , Iterator < IColumn > reducedColumns , int gcBefore ) { } public abstract SuperColumn filterSuperColumn ( SuperColumn superColumn , int gcBefore ) { } public Comparator < IColumn > getColumnComparator ( AbstractType comparator ) { } }

Fix:
public abstract IColumnIterator getSSTableColumnIterator ( SSTableReader sstable , DecoratedKey key ) ;
Buggy code:
public class SockJsUrlInfoTests { @ Test public void serverId ( ) throws Exception { SockJsUrlInfo info = new SockJsUrlInfo ( new URI ( "http:////example.com" ) ) ; int serverId = Integer . valueOf ( info . getServerId ( ) ) ; <START_BUG> assertTrue ( ( "Invalid<seq2seq4repair_space>serverId:<seq2seq4repair_space>" + serverId ) , ( ( serverId > 0 ) && ( serverId < 1000 ) ) ) ; <END_BUG> } @ Test public void sessionId ( ) throws Exception { } @ Test public void infoUrl ( ) throws Exception { } private void testInfoUrl ( String scheme , String expectedScheme ) throws Exception { } @ Test public void transportUrl ( ) throws Exception { } private void testTransportUrl ( String scheme , String expectedScheme , TransportType transportType ) throws Exception { } }

Fix:
assertTrue ( ( "Invalid<seq2seq4repair_space>serverId:<seq2seq4repair_space>" + serverId ) , ( ( serverId >= 0 ) && ( serverId < 1000 ) ) ) ;
Buggy code:
public class Main { public static Window applicationWindow ; public static void main ( String [ ] args ) { if ( System . getProperty ( "os.name" ) . toLowerCase ( ) . contains ( "mac" ) ) { IconSetter ic = new IconSetter ( ) ; <START_BUG> ic . setIcon ( "//resources//logo.png" ) ; <END_BUG> } Main . applicationWindow = Window . getInstance ( ) ; Main . applicationWindow . swapController ( new controllers . MainController ( new MainModel ( ) ) ) ; } }

Fix:
ic . setIcon ( "//resources//GLProcessLogo.png" ) ;
Buggy code:
public class PerlSdkType extends SdkType { private String perlExecutablePath = "" ; public PerlSdkType ( ) { } @ NotNull public static PerlSdkType getInstance ( ) { } @ Override public void saveAdditionalData ( @ NotNull SdkAdditionalData sdkAdditionalData , @ NotNull Element element ) { } @ Override public void setupSdkPaths ( @ NotNull Sdk sdk ) { SdkModificator sdkModificator = sdk . getSdkModificator ( ) ; <START_BUG> List < String > perlLibPaths = readFromProgram ( "perl<seq2seq4repair_space>-le<seq2seq4repair_space>\"print<seq2seq4repair_space>$_<seq2seq4repair_space>for<seq2seq4repair_space>@INC\"" ) ; <END_BUG> for ( String perlLibPath : perlLibPaths ) { if ( ! ( "." . equals ( perlLibPath ) ) ) { File libDir = new File ( perlLibPath ) ; if ( ( libDir . exists ( ) ) && ( libDir . isDirectory ( ) ) ) { VirtualFile virtualDir = LocalFileSystem . getInstance ( ) . findFileByIoFile ( libDir ) ; if ( virtualDir != null ) { sdkModificator . addRoot ( virtualDir , SOURCES ) ; sdkModificator . addRoot ( virtualDir , CLASSES ) ; } } } } sdkModificator . commitChanges ( ) ; } @ Nullable @ Override public AdditionalDataConfigurable createAdditionalDataConfigurable ( SdkModel sdkModel , SdkModificator sdkModificator ) { } @ Override public String getPresentableName ( ) { } @ Nullable @ Override public String suggestHomePath ( ) { } @ Override public String suggestSdkName ( String currentSdkName , String sdkHome ) { } @ Override public boolean isValidSdkHome ( String sdkHome ) { } private String executablePath ( String sdkHome ) { } @ Override public Icon getIcon ( ) { } @ Nullable @ Override public String getVersionString ( @ NotNull Sdk sdk ) { } Pattern perlVersionStringPattern = Pattern . compile ( "\\(([^)]+?)\\)<seq2seq4repair_space>built<seq2seq4repair_space>for<seq2seq4repair_space>(.+)" ) ; public String getPerlVersionString ( ) { } public String askPerlForPath ( ) { } public List < String > readFromProgram ( String command ) { } }

Fix:
List < String > perlLibPaths = readFromProgram ( "perl<seq2seq4repair_space>-le<seq2seq4repair_space>\"print<seq2seq4repair_space>for<seq2seq4repair_space>@INC\"" ) ;
Buggy code:
public class EventStateTest { @ Test public void closeEvents ( ) throws ConvergenceException , MathUserException , EventException { final double r1 = 90.0 ; final double r2 = 135.0 ; final double gap = r2 - r1 ; EventHandler closeEventsGenerator = new EventHandler ( ) { public void resetState ( double t , double [ ] y ) { } public double g ( double t , double [ ] y ) { return ( t - r1 ) * ( r2 - t ) ; } public int eventOccurred ( double t , double [ ] y , boolean increasing ) { return CONTINUE ; } } ; final double tolerance = 0.1 ; <START_BUG> EventState es = new EventState ( closeEventsGenerator , ( 1.5 * gap ) , tolerance , 10 , new BrentSolver ( tolerance ) ) ; <END_BUG> AbstractStepInterpolator interpolator = new DummyStepInterpolator ( new double [ 0 ] , new double [ 0 ] , true ) ; interpolator . storeTime ( ( r1 - ( 2.5 * gap ) ) ) ; interpolator . shift ( ) ; interpolator . storeTime ( ( r1 - ( 1.5 * gap ) ) ) ; es . reinitializeBegin ( interpolator ) ; interpolator . shift ( ) ; interpolator . storeTime ( ( r1 - ( 0.5 * gap ) ) ) ; Assert . assertFalse ( es . evaluateStep ( interpolator ) ) ; interpolator . shift ( ) ; interpolator . storeTime ( ( 0.5 * ( r1 + r2 ) ) ) ; Assert . assertTrue ( es . evaluateStep ( interpolator ) ) ; Assert . assertEquals ( r1 , es . getEventTime ( ) , tolerance ) ; es . stepAccepted ( es . getEventTime ( ) , new double [ 0 ] ) ; interpolator . shift ( ) ; interpolator . storeTime ( ( r2 + ( 0.4 * gap ) ) ) ; Assert . assertTrue ( es . evaluateStep ( interpolator ) ) ; Assert . assertEquals ( r2 , es . getEventTime ( ) , tolerance ) ; } }

Fix:
EventState es = new EventState ( closeEventsGenerator , ( 1.5 * gap ) , tolerance , 100 , new BrentSolver ( tolerance ) ) ;
Buggy code:
public class Z3Solver extends SmtLib2Solver { public Z3Solver ( ) { } private static String getZ3 ( ) { } @ Override public void initialize ( ) { } private int assumCount = 1 ; @ Override public Result query ( Sexp sexp ) { } public Result realizability_query ( Sexp inputs , Sexp outputs , Sexp transition , Sexp properties ) { Result result ; Symbol assum = new Symbol ( ( "assum" + ( ( assumCount ) ++ ) ) ) ; define ( new jkind . lustre . VarDecl ( assum . str , NamedType . BOOL ) ) ; send ( new Cons ( "assert" , new Cons ( "forall" , outputs , new Cons ( "not" , new Cons ( "and" , transition , properties ) ) ) ) ) ; <START_BUG> send ( new Cons ( "assert" , assum ) ) ; <END_BUG> send ( ( ( "(echo<seq2seq4repair_space>\"" + ( DONE ) ) + "\")" ) ) ; String status = readFromSolver ( ) ; if ( isSat ( status ) ) { send ( "(get-model)" ) ; send ( ( ( "(echo<seq2seq4repair_space>\"" + ( DONE ) ) + "\")" ) ) ; result = new jkind . solvers . SatResult ( parseModel ( readFromSolver ( ) ) ) ; } else if ( isUnsat ( status ) ) { result = new UnsatResult ( ) ; } else { result = new UnknownResult ( ) ; } return result ; } No newline ; at end ; of file ; }

Fix:
send ( new Cons ( "check-sat" , assum ) ) ;
Buggy code:
public class DefaultFailureDetailView implements FailureDetailView { JList fList ; static class StackTraceListModel extends AbstractListModel { private Vector fLines = new Vector ( 20 ) ; public Object getElementAt ( int index ) { } public int getSize ( ) { } public void setTrace ( String trace ) { } public void clear ( ) { } private void scan ( String trace ) { fLines . removeAllElements ( ) ; StringTokenizer st = new StringTokenizer ( trace , "\n\r" , false ) ; while ( st . hasMoreTokens ( ) ) <START_BUG> fLines . add ( st . nextToken ( ) ) ; <END_BUG> } } static class StackEntryRenderer extends DefaultListCellRenderer { public Component getListCellRendererComponent ( JList list , Object value , int modelIndex , boolean isSelected , boolean cellHasFocus ) { } } public Component getComponent ( ) { } public void showFailure ( TestFailure failure ) { } public void clear ( ) { } private DefaultFailureDetailView . StackTraceListModel getModel ( ) { } }

Fix:
fLines . addElement ( st . nextToken ( ) ) ;
Buggy code:
public class ChildBeanDefinition extends AbstractBeanDefinition { private String parentName ; public ChildBeanDefinition ( String parentName ) { } public ChildBeanDefinition ( String parentName , MutablePropertyValues pvs ) { } public ChildBeanDefinition ( String parentName , ConstructorArgumentValues cargs , MutablePropertyValues pvs ) { } public ChildBeanDefinition ( String parentName , Class beanClass , ConstructorArgumentValues cargs , MutablePropertyValues pvs ) { } public ChildBeanDefinition ( String parentName , String beanClassName , ConstructorArgumentValues cargs , MutablePropertyValues pvs ) { } public ChildBeanDefinition ( ChildBeanDefinition original ) { } public void setParentName ( String parentName ) { } public String getParentName ( ) { } @ Override public void validate ( ) throws BeanDefinitionValidationException { } @ Override public AbstractBeanDefinition cloneBeanDefinition ( ) { } @ Override public boolean equals ( Object other ) { } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { <START_BUG> StringBuffer sb = new StringBuffer ( "Child<seq2seq4repair_space>bean<seq2seq4repair_space>with<seq2seq4repair_space>parent<seq2seq4repair_space>'" ) ; <END_BUG> sb . append ( this . parentName ) . append ( "':<seq2seq4repair_space>" ) . append ( super . toString ( ) ) ; return sb . toString ( ) ; } }

Fix:
StringBuilder sb = new StringBuilder ( "Child<seq2seq4repair_space>bean<seq2seq4repair_space>with<seq2seq4repair_space>parent<seq2seq4repair_space>'" ) ;
Buggy code:
public class RequestPacket extends Packet { public String target = "//" ; public Method method = Method . GET ; public String userIP = "" ; public int userPort = 80 ; public boolean ssl = false ; public HashMap < String , String > get = new HashMap < String , String > ( ) ; public HashMap < String , String > post = new HashMap < String , String > ( ) ; public HashMap < String , String > cookie = new HashMap < String , String > ( ) ; public void procJL ( ) throws UnsupportedEncodingException { String get = ( target . contains ( "?" ) ) ? target . substring ( ( ( target . indexOf ( "?" ) ) + 1 ) ) : "" ; for ( String kd : get . split ( "&" ) ) { if ( kd . contains ( "=" ) ) { this . get . put ( URLDecoder . decode ( kd . substring ( 0 , kd . indexOf ( "=" ) ) , "UTF-8" ) , URLDecoder . decode ( kd . substring ( ( ( kd . indexOf ( "=" ) ) + 1 ) ) , "UTF-8" ) ) ; } else { this . get . put ( URLDecoder . decode ( kd , "UTF-8" ) , "" ) ; } } <START_BUG> if ( ( ( ( ( method ) == ( Method . POST ) ) && ( headers . getHeader ( "Content-Type" ) . equals ( "x-www-form-urlencoded" ) ) ) && ( ( body ) != null ) ) && ( ( body . getBody ( ) ) != null ) ) { <END_BUG> String post = new String ( body . getBody ( ) . data ) ; for ( String kd : post . split ( "&" ) ) { if ( kd . contains ( "=" ) ) { this . post . put ( URLDecoder . decode ( kd . substring ( 0 , kd . indexOf ( "=" ) ) , "UTF-8" ) , URLDecoder . decode ( kd . substring ( ( ( kd . indexOf ( "=" ) ) + 1 ) ) , "UTF-8" ) ) ; } else { this . post . put ( URLDecoder . decode ( kd , "UTF-8" ) , "" ) ; } } } if ( headers . hasHeader ( "Cookie" ) ) { String cookie = headers . getHeader ( "Cookie" ) ; for ( String kd : cookie . split ( ";" ) ) { if ( kd . contains ( "=" ) ) { this . cookie . put ( URLDecoder . decode ( kd . substring ( 0 , kd . indexOf ( "=" ) ) , "UTF-8" ) , URLDecoder . decode ( kd . substring ( ( ( kd . indexOf ( "=" ) ) + 1 ) ) , "UTF-8" ) ) ; } else { this . cookie . put ( URLDecoder . decode ( kd , "UTF-8" ) , "" ) ; } } } } public void write ( DataOutputStream out ) throws IOException { } public static RequestPacket read ( DataInputStream in ) throws IOException { } public byte [ ] serialize ( ) { } public String toString ( ) { } }

Fix:
if ( ( ( ( ( method ) == ( Method . POST ) ) && ( headers . getHeader ( "Content-Type" ) . equals ( "application//x-www-form-urlencoded" ) ) ) && ( ( body ) != null ) ) && ( ( body . getBody ( ) ) != null ) ) {
Buggy code:
public class PagesListHandler extends PagesGetHandler { public void handle ( HttpServletRequest request , HttpServletResponse response , String urn ) throws MissingDocumentException { try { String docid = request . getParameter ( DOCID ) ; String vPath = ( ( String ) ( request . getParameter ( VERSION1 ) ) ) ; String text = "[]" ; if ( docid != null ) { AeseVersion pages = doGetResourceVersion ( CORCODE , ( docid + "//pages" ) , vPath ) ; if ( pages == null ) throw new Exception ( ( "Couldn't<seq2seq4repair_space>find<seq2seq4repair_space>document<seq2seq4repair_space>" + docid ) ) ; String stil = pages . getVersionString ( ) ; JSONObject bson = ( ( JSONObject ) ( JSONValue . parse ( stil ) ) ) ; if ( bson . containsKey ( RANGES ) ) { JSONArray ranges = ( ( JSONArray ) ( bson . get ( RANGES ) ) ) ; JSONArray list = new JSONArray ( ) ; for ( int i = 0 ; i < ( ranges . size ( ) ) ; i ++ ) { JSONObject range = ( ( JSONObject ) ( ranges . get ( i ) ) ) ; String facs = getFacs ( range ) ; if ( facs != null ) list . add ( imageId ( facs ) ) ; } text = list . toJSONString ( ) ; } <START_BUG> response . setContentType ( "text//plain;charset=UTF-8" ) ; <END_BUG> response . getWriter ( ) . println ( text ) ; } else throw new Exception ( "Must<seq2seq4repair_space>specify<seq2seq4repair_space>document<seq2seq4repair_space>identifier" ) ; } catch ( Exception e ) { throw new MissingDocumentException ( e ) ; } } }

Fix:
response . setContentType ( "application//json;charset=UTF-8" ) ;
Buggy code:
public class MarkMessageAsReadAction extends AbstractFilterAction { public Command getCommand ( FilterAction filterAction , IFolder srcFolder , Object [ ] uids ) throws Exception { MailFolderCommandReference r = new MailFolderCommandReference ( srcFolder , uids ) ; <START_BUG> String variant = ( ( org . columba . mail . filter . MailFilterAction ) ( filterAction ) ) . getMarkVariant ( ) ; <END_BUG> if ( variant . equals ( "read" ) ) { r . setMarkVariant ( MARK_AS_READ ) ; } else if ( variant . equals ( "unread" ) ) { r . setMarkVariant ( MARK_AS_UNREAD ) ; } else if ( variant . equals ( "flagged" ) ) { r . setMarkVariant ( MARK_AS_FLAGGED ) ; } else if ( variant . equals ( "not_flagged" ) ) { r . setMarkVariant ( MARK_AS_UNFLAGGED ) ; } else if ( variant . equals ( "expunged" ) ) { r . setMarkVariant ( MARK_AS_EXPUNGED ) ; } else if ( variant . equals ( "not_expunged" ) ) { r . setMarkVariant ( MARK_AS_UNEXPUNGED ) ; } else if ( variant . equals ( "answered" ) ) { r . setMarkVariant ( MARK_AS_ANSWERED ) ; } else if ( variant . equals ( "spam" ) ) { r . setMarkVariant ( MARK_AS_SPAM ) ; } else if ( variant . equals ( "no_spam" ) ) { r . setMarkVariant ( MARK_AS_NOTSPAM ) ; } else { r . setMarkVariant ( MARK_AS_READ ) ; } MarkMessageCommand c = new MarkMessageCommand ( r ) ; return c ; } }

Fix:
String variant = filterAction . get ( "markvariant" ) ;
Buggy code:
public class MatrixTest { @ Test public void testMatrixCreation ( ) { } @ Test public void testMatrixMultiplication1 ( ) { } @ Test public void testMatrixMultiplication2 ( ) { } @ Test public void testMatrixMultCompatibility ( ) { } @ Test public void testMatrixAdd ( ) { } @ Test public void testMatrixReduceNormal ( ) { } @ Test public void testMatrixReduceNormal2 ( ) { <START_BUG> double [ ] [ ] data = new double [ ] [ ] { new double [ ] { 15 , 2 , 3 } , new double [ ] { 0 , 2 , 3 } } ; <END_BUG> double [ ] [ ] dataResult = new double [ ] [ ] { new double [ ] { 1 , 0 , 0 } , new double [ ] { 0 , 1 , 2 } } ; final Matrix testMatrix = new Matrix ( "Test1" , data ) ; assertEquals ( "Matrix<seq2seq4repair_space>Reduction<seq2seq4repair_space>gives<seq2seq4repair_space>incorrect<seq2seq4repair_space>result" , dataResult , testMatrix . reducedEchelonForm ( ) . getData ( ) ) ; } @ Test public void testMatrixReduceManyRows ( ) { } @ Test public void testMatrixReduceNegative ( ) { } @ Test public void testMatrixReduceLargeValue ( ) { } @ Test public void testERO1 ( ) { } @ Test public void testERO2Negative ( ) { } @ Test public void testERO3Negative ( ) { } @ Test public void testStepOne ( ) { } @ Test public void testStepOne2 ( ) { } }

Fix:
double [ ] [ ] data = new double [ ] [ ] { new double [ ] { 15 , 3 , 6 } , new double [ ] { 0 , 3 , 6 } } ;
Buggy code:
public class ExitCommand implements Command { public static final String EXIT = "exit" ; private static Set commands = new HashSet ( ) ; public ExitCommand ( ) { } public Set getActionNames ( ) { } public void doAction ( ActionEvent e ) { <START_BUG> ActionRouter . getInstance ( ) . actionPerformed ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , CheckDirty . CHECK_DIRTY ) ) ; <END_BUG> if ( GuiPackage . getInstance ( ) . isDirty ( ) ) { int chosenOption = JOptionPane . showConfirmDialog ( GuiPackage . getInstance ( ) . getMainFrame ( ) , JMeterUtils . getResString ( "cancel_exit_to_save" ) , JMeterUtils . getResString ( "Save?" ) , JOptionPane . YES_NO_CANCEL_OPTION , JOptionPane . QUESTION_MESSAGE ) ; if ( chosenOption == ( JOptionPane . NO_OPTION ) ) { System . exit ( 0 ) ; } else if ( chosenOption == ( JOptionPane . YES_OPTION ) ) { ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , Save . SAVE_ALL ) ) ; if ( ! ( GuiPackage . getInstance ( ) . isDirty ( ) ) ) { System . exit ( 0 ) ; } } } else { System . exit ( 0 ) ; } } }

Fix:
ActionRouter . getInstance ( ) . doActionNow ( new ActionEvent ( e . getSource ( ) , e . getID ( ) , CheckDirty . CHECK_DIRTY ) ) ;
Buggy code:
public class TaskFolderPresenter { public static final String KEY_TASK = "TASK" ; public static final String NAME_KEY = "taskedit_name" ; public static final String URGENT_KEY = "taskedit_urgent" ; public static final String TAG_KEY = "taskedit_tag" ; public static final String PRIORITY_KEY = "taskedit_priority" ; public static final String NOTE_KEY = "taskedit_note" ; public static final String PARENET_KEY = "taskedit_parent" ; public static final String REPEAT_KEY = "taskedit_repeat" ; public static final String EXPIRE_KEY = "taskedit_expire" ; public static final String REPEAT_PEROID_KEY = "taskedit_repeat_peroid" ; public static final String TASK_FOLDER_KEY = "taskedit_folder" ; private TaskListSorter m_sorter = null ; public TaskFolderPresenter ( boolean isSetSortListener ) { } public TaskFolder getFolderByIndex ( int index ) throws ServiceException { } public int getFolderCount ( ) { } public int saveTask ( int folderindex , Task task , boolean isNew ) throws ServiceException { TaskFolder folder = getFolderByIndex ( folderindex ) ; if ( ( ( ( task . getName ( ) ) == null ) || ( task . getName ( ) . isEmpty ( ) ) ) || ( task . getName ( ) . equals ( invalidStr ) ) ) { return 1 ; } ModelManager . getInstance ( ) . tag ( task ) ; if ( isNew ) { task . setId ( ModelManager . getInstance ( ) . getNewTaskId ( true ) ) ; folder . addTask ( task ) ; OnTaskResult . getInstance ( ) . inform ( add , folder , null , task ) ; return 0 ; } if ( folderindex != ( task . taskFolderId ) ) { Task clone = task . clone ( ) ; clone . taskFolderId = folderindex ; boolean result = delete ( folderindex , clone , false ) ; TaskFolder changedTofolder = getFolderByIndex ( ( ( int ) ( task . taskFolderId ) ) ) ; changedTofolder . addTask ( task ) ; <START_BUG> OnTaskResult . getInstance ( ) . inform ( add , folder , null , task ) ; <END_BUG> return result ? 0 : 1 ; } Task oldTask = folder . updateTask ( task ) ; if ( oldTask == null ) return 2 ; OnTaskResult . getInstance ( ) . inform ( update , folder , oldTask , task ) ; return 0 ; } public ArrayList < String > getTags ( ) { } public boolean delete ( int folderIndex , Task task , boolean includeChilds ) { } private boolean deleteChildTasks ( int folderIndex , long parentTaskId , Task . Status status ) { } public boolean finishTask ( int folderIndex , Task task ) { } public boolean activateTask ( int folderIndex , Task task ) { } public TaskListSorter getSorter ( ) { } }

Fix:
OnTaskResult . getInstance ( ) . inform ( add , changedTofolder , null , task ) ;
Buggy code:
final class WebMetaDataCreator { private static final String EJB_WEBSERVICE_REALM = "EJBWebServiceEndpointServlet<seq2seq4repair_space>Realm" ; private final SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new SecurityMetaDataAccessorEJB21 ( ) ; private final SecurityMetaDataAccessorEJB ejb3SecurityAccessor = new SecurityMetaDataAccessorEJB3 ( ) ; WebMetaDataCreator ( ) { } void create ( final Deployment dep ) { } private void createWebAppDescriptor ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createJBossWebAppDescriptor ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createServlets ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createServletMappings ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createSecurityConstraints ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createLoginConfig ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { } private void createSecurityRoles ( final Deployment dep , final JBossWebMetaData jbossWebMD ) { final String authMethod = getAuthMethod ( dep ) ; final boolean hasAuthMethod = authMethod != null ; if ( hasAuthMethod ) { final SecurityMetaDataAccessorEJB ejbMDAccessor = getEjbSecurityMetaDataAccessor ( dep ) ; final SecurityRolesMetaData securityRolesMD = ejbMDAccessor . getSecurityRoles ( dep ) ; <START_BUG> final boolean hasSecurityRolesMD = securityRolesMD != null ; <END_BUG> if ( hasSecurityRolesMD ) { WSLogger . ROOT_LOGGER . creatingSecurityRoles ( ) ; jbossWebMD . setSecurityRoles ( securityRolesMD ) ; } } final DeploymentUnit unit = dep . getAttachment ( DeploymentUnit . class ) ; DeploymentUnit parent = unit . getParent ( ) ; if ( parent != null ) { final EarMetaData earMetaData = parent . getAttachment ( EAR_METADATA ) ; if ( earMetaData != null ) { if ( ( jbossWebMD . getSecurityRoles ( ) ) == null ) { jbossWebMD . setSecurityRoles ( new SecurityRolesMetaData ( ) ) ; } SecurityRolesMetaData earSecurityRolesMetaData = earMetaData . getSecurityRoles ( ) ; if ( earSecurityRolesMetaData != null ) { SecurityRolesMetaDataMerger . merge ( jbossWebMD . getSecurityRoles ( ) , jbossWebMD . getSecurityRoles ( ) , earSecurityRolesMetaData ) ; } } } } private String getAuthMethod ( final Deployment dep ) { } private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor ( final Deployment dep ) { } }

Fix:
final boolean hasSecurityRolesMD = ( securityRolesMD != null ) && ( ! ( securityRolesMD . isEmpty ( ) ) ) ;
Buggy code:
public class DBUnitDataHandler implements DataHandler { @ Inject private Instance < DatabaseConnection > databaseConnection ; @ Inject private Instance < DataSetRegister > dataSetRegister ; @ Inject private Instance < AssertionErrorCollector > assertionErrorCollector ; @ Override public void initStatements ( @ Observes ApplyInitStatement applyInitStatementEvent ) { } @ Override public void cleanupStatements ( @ Observes ApplyCleanupStatement applyCleanupStatementEvent ) { } @ Override public void prepare ( @ Observes PrepareData prepareDataEvent ) { } @ Override public void compare ( @ Observes CompareData compareDataEvent ) { } @ Override public void cleanup ( @ Observes CleanUpData cleanupDataEvent ) { } @ Override public void executeScripts ( @ Observes ExecuteScripts executeScriptsEvent ) { for ( SqlScriptDescriptor scriptDescriptor : executeScriptsEvent . getDescriptors ( ) ) { <START_BUG> final String script = new ScriptHelper ( ) . loadScript ( scriptDescriptor . getLocation ( ) ) ; <END_BUG> executeScript ( script ) ; } } private void executeScript ( String script ) { } private void fillDatabase ( ) throws Exception { } private void cleanDatabase ( ) throws Exception { } }

Fix:
final String script = ScriptHelper . loadScript ( scriptDescriptor . getLocation ( ) ) ;
Buggy code:
public class ExtensionRemoveHandler extends AbstractRemoveStepHandler { public static final String OPERATION_NAME = REMOVE ; private final ExtensionRegistry extensionRegistry ; public ExtensionRemoveHandler ( final ExtensionRegistry extensionRegistry ) { } @ Override protected void performRemove ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { super . performRemove ( context , operation , model ) ; final PathAddress address = PathAddress . pathAddress ( operation . get ( OP_ADDR ) ) ; String module = address . getLastElement ( ) . getValue ( ) ; <START_BUG> extensionRegistry . removeExtension ( context . getRootResource ( ) , module ) ; <END_BUG> } @ Override protected void performRuntime ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } @ Override protected void recoverServices ( OperationContext context , ModelNode operation , ModelNode model ) throws OperationFailedException { } }

Fix:
extensionRegistry . removeExtension ( context . readResourceFromRoot ( EMPTY_ADDRESS ) , module ) ;
Buggy code:
public class ReplyToListAction extends FrameAction implements SelectionListener { public ReplyToListAction ( AbstractFrameController frameController ) { } public void actionPerformed ( ActionEvent evt ) { <START_BUG> FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameController ( ) ) ) . getTableSelection ( ) ; <END_BUG> processor . addOp ( new org . columba . mail . gui . composer . command . ReplyToMailingListCommand ( r ) ) ; } public void selectionChanged ( SelectionChangedEvent e ) { } }

Fix:
FolderCommandReference [ ] r = ( ( org . columba . mail . gui . frame . AbstractMailFrameController ) ( getFrameMediator ( ) ) ) . getTableSelection ( ) ;
Buggy code:
public class TestMetamodel extends SingleEMFTestCase { private static MetamodelImpl model ; public void setUp ( ) { } public void testMetaModelForDomainClassesExist ( ) { } public void testMetaClassFieldsArePopulated ( ) { EntityType < ImplicitFieldAccessSubclass > m = TestMetamodel . model . entity ( ImplicitFieldAccessSubclass . class ) ; assertNotNull ( m ) ; Class < ? > mCls = m . getJavaType ( ) ; assertSame ( ImplicitFieldAccessSubclass . class , mCls ) ; <START_BUG> Class < ? > m2Cls = TestMetamodel . model . repos . getMetaModel ( mCls , true ) ; <END_BUG> assertNotNull ( m2Cls ) ; try { Field f2 = getStaticField ( m2Cls , "base" ) ; assertNotNull ( f2 ) ; Object value = f2 . get ( null ) ; assertNotNull ( value ) ; assertTrue ( Attribute . class . isAssignableFrom ( value . getClass ( ) ) ) ; } catch ( Throwable t ) { t . printStackTrace ( ) ; fail ( ) ; } } public void testDomainClassCategorizedInPersistentCategory ( ) { } public void testGetAttributeByNameAndTypeFromMetaClass ( ) { } public void testAttributeByDeclaration ( ) { } public void testPCCollection ( ) { } public void testPCList ( ) { } public void testPCSet ( ) { } public void testDeclaredFields ( ) { } public void testNonExistentField ( ) { } public void testAttributeGettersForValidInput ( ) { } public void testSimpleIdAttributes ( ) { } public void testVersionAttributes ( ) { } public void testIdClassAttributes ( ) { } void assertFails ( ManagedType < ? > type , String name , boolean dec ) { } PersistenceType categorize ( Class < ? > c ) { } void assertCategory ( PersistenceType category , Class < ? > cls ) { } Field getStaticField ( Class < ? > cls , String name ) { } }

Fix:
Class < ? > m2Cls = TestMetamodel . model . getRepository ( ) . getMetaModel ( mCls , true ) ;
Buggy code:
public abstract class AbstractPhotonRequestHandler < R extends PhotonRequest > implements PhotonRequestHandler < R > { private ElasticsearchSearcher elasticsearchSearcher = new BaseElasticsearchSearcher ( ) ; @ Override public final List < JSONObject > handle ( R photonRequest ) { TagFilterQueryBuilder queryBuilder = buildQuery ( photonRequest ) ; Integer limit = photonRequest . getLimit ( ) ; SearchResponse results = elasticsearchSearcher . search ( queryBuilder . buildQuery ( ) , limit ) ; if ( ( results . getHits ( ) . getTotalHits ( ) ) == 0 ) { <START_BUG> results = elasticsearchSearcher . search ( queryBuilder . withStrictMatch ( ) . buildQuery ( ) , limit ) ; <END_BUG> } List < JSONObject > resultJsonObjects = new de . komoot . photon . utils . ConvertToJson ( photonRequest . getLanguage ( ) ) . convert ( results ) ; StreetDupesRemover streetDupesRemover = new StreetDupesRemover ( photonRequest . getLanguage ( ) ) ; resultJsonObjects = streetDupesRemover . execute ( resultJsonObjects ) ; if ( ( resultJsonObjects . size ( ) ) > limit ) { resultJsonObjects = resultJsonObjects . subList ( 0 , limit ) ; } return resultJsonObjects ; } abstract TagFilterQueryBuilder buildQuery ( R photonRequest ) { } }

Fix:
results = elasticsearchSearcher . search ( queryBuilder . withLenientMatch ( ) . buildQuery ( ) , limit ) ;
Buggy code:
public class TechManager { public static HashMap < String , Tech > techs = new HashMap < String , Tech > ( ) ; public static HashMap < Player , RPlayer > players = new HashMap < Player , RPlayer > ( ) ; private static Research plugin ; public TechManager ( Research plugin ) { } public static void initPlayer ( Player player ) { } public static void unloadPlayer ( Player player ) { } public static boolean addPoints ( Player player , int points ) { } public static boolean setPoints ( Player player , int points ) { } public static void applyLearnedTech ( Player player , Tech tech ) { } public static void addTech ( Player player , Tech tech ) { } public static void setTech ( Player player , Tech [ ] techs ) { } public static SQLPlayer getSQLPlayer ( Player player ) { <START_BUG> SQLPlayer sqlplayer = TechManager . plugin . getDatabase ( ) . find ( SQLPlayer . class ) . where ( ) . ieq ( "name" , player . getName ( ) ) . findUnique ( ) ; <END_BUG> if ( sqlplayer == null ) { sqlplayer = new SQLPlayer ( ) ; sqlplayer . setPlayerName ( player . getName ( ) ) ; sqlplayer . setCurrentPoints ( 0 ) ; TechManager . plugin . getDatabase ( ) . save ( sqlplayer ) ; } return sqlplayer ; } public static boolean startResearch ( Player player , String techName ) { } public static boolean startResearch ( Player player , Tech tech ) { } public static boolean canResearch ( Player player , Tech tech ) { } public static ArrayList < Tech > getAvailableTech ( Player player ) { } public static ArrayList < Tech > getResearched ( Player player ) { } public static int getPoints ( Player player ) { } public static Tech getCurrentResearch ( Player player ) { } }

Fix:
SQLPlayer sqlplayer = TechManager . plugin . getDatabase ( ) . find ( SQLPlayer . class ) . where ( ) . ieq ( "player_name" , player . getName ( ) ) . findUnique ( ) ;
Buggy code:
public class PersistenceManagerTest extends TestCase { private static final NodeId NODE_ID = NodeId . randomId ( ) ; private static final NodeId CHILD_ID = NodeId . randomId ( ) ; private static final Name TEST = NameFactoryImpl . getInstance ( ) . create ( "" , "test" ) ; private static final PropertyId PROPERTY_ID = new PropertyId ( PersistenceManagerTest . NODE_ID , PersistenceManagerTest . TEST ) ; private File directory ; protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void testOrientPersistenceManager ( ) throws Exception { OrientPersistenceManager manager = new OrientPersistenceManager ( ) ; manager . setUrl ( "memory:graph" ) ; manager . setUser ( "admin" ) ; manager . setPass ( "admin" ) ; <START_BUG> manager . setObjectPrefix ( "Test" ) ; <END_BUG> manager . setCreateDB ( true ) ; assertPersistenceManager ( manager ) ; } private void assertPersistenceManager ( PersistenceManager manager ) throws Exception { } private void assertCreateNewNode ( PersistenceManager manager ) { } private void assertCreateNewProperty ( PersistenceManager manager ) { } private void assertMissingItemStates ( PersistenceManager manager ) throws Exception { } private void assertCreateUpdateDelete ( PersistenceManager manager ) throws Exception { } private void assertEquals ( NodeState expected , NodeState actual ) { } private void assertEquals ( PropertyState expected , PropertyState actual ) { } private void assertEquals ( NodeReferences expected , NodeReferences actual ) { } }

Fix:
manager . setSchemaObjectPrefix ( "Test" ) ;
Buggy code:
public class Neo4jOutputModule extends ModuleImpl { public static final String BERUEHRUNGSZAEHLER_SCHLUESSEL = "zaehler" ; public static final String PROPERTYKEY_NEO4JURI = "URI<seq2seq4repair_space>of<seq2seq4repair_space>Neo4J<seq2seq4repair_space>DB" ; public static final String PROPERTYKEY_NEO4JUSR = "Username<seq2seq4repair_space>for<seq2seq4repair_space>Neo4J<seq2seq4repair_space>access" ; public static final String PROPERTYKEY_NEO4JPWD = "Password<seq2seq4repair_space>for<seq2seq4repair_space>Neo4J<seq2seq4repair_space>access" ; private String neo4jUri = "" ; private String neo4jUsr = "" ; private String neo4jPwd = "" ; public Neo4jOutputModule ( CallbackReceiver callbackReceiver , Properties properties ) throws Exception { } @ Override public boolean process ( ) throws Exception { <START_BUG> final Neo4jRestKlient graph = new Neo4jRestKlient ( this . neo4jUri , this . neo4jUsr , this . neo4jPwd ) ; <END_BUG> Gson gson = new GsonBuilder ( ) . create ( ) ; Knoten rootNode = gson . fromJson ( this . getInputCharPipe ( ) . getInput ( ) , Knoten . class ) ; URI graphRootNode = graph . erstelleKnoten ( rootNode . getName ( ) ) ; graph . eigenschaftHinzufuegen ( graphRootNode , Neo4jOutputModule . BERUEHRUNGSZAEHLER_SCHLUESSEL , rootNode . getZaehler ( ) ) ; Iterator < String > knotenKinderListenSchluessel = rootNode . getKinder ( ) . keySet ( ) . iterator ( ) ; while ( knotenKinderListenSchluessel . hasNext ( ) ) { String schluessel = knotenKinderListenSchluessel . next ( ) ; Knoten kindKnoten = rootNode . getKinder ( ) . get ( schluessel ) ; this . attachNodeToGraph ( graphRootNode , kindKnoten , graph ) ; } return true ; } private void attachNodeToGraph ( URI parent , Knoten child , Neo4jRestKlient graph ) throws URISyntaxException { } @ Override public void applyProperties ( ) throws Exception { } }

Fix:
Neo4jRestKlient graph = new Neo4jRestKlient ( this . neo4jUri , this . neo4jUsr , this . neo4jPwd ) ;
Buggy code:
public class DoStatement extends Statement { public Expression condition ; public Statement action ; private Label breakLabel ; private Label continueLabel ; int mergedInitStateIndex = - 1 ; public DoStatement ( Expression condition , Statement action , int s , int e ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream ) { if ( ( ( bits ) & ( IsReachableMASK ) ) == 0 ) { return ; } int pc = codeStream . position ; Label actionLabel = new Label ( codeStream ) ; actionLabel . place ( ) ; breakLabel . codeStream = codeStream ; if ( ( continueLabel ) != null ) { continueLabel . codeStream = codeStream ; } if ( ( action ) != null ) { action . generateCode ( currentScope , codeStream ) ; } if ( ( continueLabel ) != null ) { continueLabel . place ( ) ; condition . generateOptimizedBoolean ( currentScope , codeStream , actionLabel , null , true ) ; } breakLabel . place ( ) ; if ( ( mergedInitStateIndex ) != ( - 1 ) ) { codeStream . removeNotDefinitelyAssignedVariables ( currentScope , mergedInitStateIndex ) ; } <START_BUG> codeStream . recordPositionsFrom ( pc , this ) ; <END_BUG> } public void resolve ( BlockScope scope ) { } public String toString ( int tab ) { } public void traverse ( IAbstractSyntaxTreeVisitor visitor , BlockScope scope ) { } public void resetStateForCodeGeneration ( ) { } }

Fix:
codeStream . recordPositionsFrom ( pc , this . sourceStart ) ;
Buggy code:
public class Rmic extends MatchingTask { private static final String FAIL_MSG = "Rmic<seq2seq4repair_space>failed,<seq2seq4repair_space>messages<seq2seq4repair_space>should<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>provided." ; private File baseDir ; private String classname ; private File sourceBase ; private String stubVersion ; private Path compileClasspath ; private Path extdirs ; private boolean verify = false ; private boolean filtering = false ; private boolean iiop = false ; private String iiopopts ; private boolean idl = false ; private String idlopts ; private boolean debug = false ; private boolean includeAntRuntime = true ; private boolean includeJavaRuntime = false ; private Vector compileList = new Vector ( ) ; private ClassLoader loader = null ; public void setBase ( File base ) { } public File getBase ( ) { } public void setClassname ( String classname ) { } public String getClassname ( ) { } public void setSourceBase ( File sourceBase ) { } public File getSourceBase ( ) { } public void setStubVersion ( String stubVersion ) { } public String getStubVersion ( ) { } public void setFiltering ( boolean filter ) { } public boolean getFiltering ( ) { } public void setDebug ( boolean debug ) { } public boolean getDebug ( ) { } public void setClasspath ( Path classpath ) { } public Path createClasspath ( ) { } public void setClasspathRef ( Reference r ) { } public Path getClasspath ( ) { } public void setVerify ( boolean verify ) { } public boolean getVerify ( ) { } public void setIiop ( boolean iiop ) { } public boolean getIiop ( ) { } public void setIiopopts ( String iiopopts ) { } public String getIiopopts ( ) { } public void setIdl ( boolean idl ) { } public boolean getIdl ( ) { } public void setIdlopts ( String idlopts ) { } public String getIdlopts ( ) { } public Vector getFileList ( ) { } public void setIncludeantruntime ( boolean include ) { } public boolean getIncludeantruntime ( ) { } public void setIncludejavaruntime ( boolean include ) { } public boolean getIncludejavaruntime ( ) { } public void setExtdirs ( Path extdirs ) { } public Path createExtdirs ( ) { } public Path getExtdirs ( ) { } public Vector getCompileList ( ) { } public void execute ( ) throws BuildException { } private void moveGeneratedFile ( File baseDir , File sourceBaseFile , String classname , RmicAdapter adapter ) throws BuildException { } protected void scanDir ( File baseDir , String [ ] files , FileNameMapper mapper ) { SourceFileScanner sfs = new SourceFileScanner ( this ) ; String [ ] newFiles = sfs . restrict ( files , baseDir , baseDir , mapper ) ; for ( int i = 0 ; i < ( newFiles . length ) ; i ++ ) { String classname = newFiles [ i ] . replace ( File . separatorChar , '.' ) ; <START_BUG> classname = classname . substring ( 0 , classname . indexOf ( ".class" ) ) ; <END_BUG> compileList . addElement ( classname ) ; } } public boolean isValidRmiRemote ( String classname ) { } private boolean isValidRmiRemote ( Class testClass ) { } }

Fix:
classname = classname . substring ( 0 , classname . lastIndexOf ( ".class" ) ) ;
Buggy code:
@ RestController @ RequestMapping ( "//rest//file" ) public class FileController { @ Inject FileDataStore store ; @ RequestMapping ( method = RequestMethod . POST , value = "//remove//{id}" ) public void remove ( @ PathVariable ( "id" ) String id ) { } @ RequestMapping ( method = RequestMethod . GET , value = "//list" ) public List < DOFile > list ( ) { } @ RequestMapping ( method = RequestMethod . POST , value = "//upload" ) public void handleFileUpload ( @ RequestParam ( "file" ) MultipartFile file , HttpServletRequest req , HttpServletResponse resp ) throws IOException { if ( ! ( file . isEmpty ( ) ) ) { try { byte [ ] bytes = file . getBytes ( ) ; GridFS fs = store . getGridFs ( ) ; GridFSInputFile f = fs . createFile ( bytes ) ; f . setFilename ( file . getOriginalFilename ( ) ) ; f . save ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; } } else { } <START_BUG> resp . sendRedirect ( ( ( req . getServletContext ( ) . getContextPath ( ) ) + "//#//app//settings" ) ) ; <END_BUG> } }

Fix:
resp . sendRedirect ( ( ( req . getServletContext ( ) . getContextPath ( ) ) + "//index.html#//app//settings" ) ) ;
Buggy code:
public class SkeletalAnimationChildObject3D extends AAnimationObject3D { private static final int MAX_WEIGHTS_PER_VERTEX = 8 ; public int mNumJoints ; public SkeletalAnimationObject3D mSkeleton ; private SkeletalAnimationSequence mSequence ; public float [ ] boneWeights1 ; public float [ ] boneIndexes1 ; public float [ ] boneWeights2 ; public float [ ] boneIndexes2 ; private BufferInfo mboneWeights1BufferInfo = new BufferInfo ( ) ; private BufferInfo mboneIndexes1BufferInfo = new BufferInfo ( ) ; private BufferInfo mboneWeights2BufferInfo = new BufferInfo ( ) ; private BufferInfo mboneIndexes2BufferInfo = new BufferInfo ( ) ; protected FloatBuffer mboneWeights1 ; protected FloatBuffer mboneIndexes1 ; protected FloatBuffer mboneWeights2 ; protected FloatBuffer mboneIndexes2 ; protected int mMaxBoneWeightsPerVertex ; private int mNumVertices ; private SkeletalAnimationChildObject3D . BoneVertex [ ] mVertices ; private SkeletalAnimationChildObject3D . BoneWeight [ ] mWeights ; private SkeletalAnimationMaterialPlugin mMaterialPlugin ; private boolean mInverseZScale = false ; private Vector3 mTmpScale = new Vector3 ( ) ; public SkeletalAnimationChildObject3D ( ) { } @ Override public void calculateModelMatrix ( final Matrix4 parentMatrix ) { super . calculateModelMatrix ( parentMatrix ) ; if ( mInverseZScale ) mTmpScale . setAll ( x , y , ( - ( mScale . z ) ) ) ; else mTmpScale . setAll ( x , y , z ) ; mMMatrix . identity ( ) . translate ( mPosition ) . scale ( mTmpScale ) . multiply ( mRotationMatrix ) ; if ( parentMatrix != null ) <START_BUG> mMMatrix . leftMultiply ( mParentMatrix ) ; <END_BUG> } public void setShaderParams ( Camera camera ) { } public void setSkeleton ( Object3D skeleton ) { } public void setSkeletonMeshData ( int numVertices , SkeletalAnimationChildObject3D . BoneVertex [ ] vertices , int numWeights , SkeletalAnimationChildObject3D . BoneWeight [ ] weights ) { } private FloatBuffer alocateBuffer ( FloatBuffer buffer , float [ ] data ) { } public void play ( ) { } public void setAnimationSequence ( SkeletalAnimationSequence sequence ) { } public void prepareBoneWeightsAndIndices ( ) { } public void reload ( ) { } @ Override public void destroy ( ) { } public void setMaxBoneWeightsPerVertex ( int maxBoneWeightsPerVertex ) throws SkeletalAnimationException { } public int getMaxBoneWeightsPerVertex ( ) { } public static class BoneVertex { public Vector2 textureCoordinate = new Vector2 ( ) ; public Vector3 normal = new Vector3 ( ) ; public int weightIndex ; public int numWeights ; } public static class BoneWeight { public int jointIndex ; public float weightValue ; public Vector3 position = new Vector3 ( ) ; } public void setInverseZScale ( boolean value ) { } public SkeletalAnimationChildObject3D clone ( boolean copyMaterial ) { } }

Fix:
mMMatrix . leftMultiply ( parentMatrix ) ;