nus-yam/ex-repair huggingface dataset:
Buggy code:
public class EJBArgsPolicyContextHandler implements PolicyContextHandler { public static final String EJB_ARGS_KEY = "javax.ejb.arguments" ; private static ThreadLocal ejbContext = new ThreadLocal ( ) ; static void setArgs ( Object [ ] args ) { } public Object getContext ( String key , Object data ) throws PolicyContextException { Object context = null ; <START_BUG> if ( ( key . equalsIgnoreCase ( EJBArgsPolicyContextHandler . EJB_ARGS_KEY ) ) == false ) <END_BUG> context = EJBArgsPolicyContextHandler . ejbContext . get ( ) ; return context ; } public String [ ] getKeys ( ) throws PolicyContextException { } public boolean supports ( String key ) throws PolicyContextException { } }

Fix:
if ( ( key . equalsIgnoreCase ( EJBArgsPolicyContextHandler . EJB_ARGS_KEY ) ) == true )
Buggy code:
public class TestGalicianAnalyzer extends BaseTokenStreamTestCase { public void testResourcesAvailable ( ) { } public void testBasics ( ) throws IOException { } public void testExclude ( ) throws IOException { } public void testRandomStrings ( ) throws Exception { <START_BUG> checkRandomData ( random ( ) , new GalicianAnalyzer ( TEST_VERSION_CURRENT ) , ( 10000 * ( RANDOM_MULTIPLIER ) ) ) ; <END_BUG> } }

Fix:
checkRandomData ( random ( ) , new GalicianAnalyzer ( TEST_VERSION_CURRENT ) , ( 1000 * ( RANDOM_MULTIPLIER ) ) ) ;
Buggy code:
@ Extension public class AddOn extends org . intellimate . izou . sdk . addon . AddOn { public static final String ID = AddOn . class . getCanonicalName ( ) ; private WifiScanner wifiScanner ; public AddOn ( ) { } @ Override public void prepare ( ) { } @ Override public Activator [ ] registerActivator ( ) { } @ Override public ContentGenerator [ ] registerContentGenerator ( ) { } @ Override public EventsControllerModel [ ] registerEventController ( ) { EventsControllerModel [ ] eventsControllers = new EventsControllerModel [ 1 ] ; <START_BUG> eventsControllers [ 0 ] = new WifiScanner ( getContext ( ) ) ; <END_BUG> return eventsControllers ; } @ Override public OutputPlugin [ ] registerOutputPlugin ( ) { } @ Override public OutputExtension [ ] registerOutputExtension ( ) { } }

Fix:
eventsControllers [ 0 ] = wifiScanner ;
Buggy code:
public class Typedef extends Definer { protected void addDefinition ( String name , Class c ) throws BuildException { <START_BUG> project . addDataTypeDefinition ( name , c ) ; <END_BUG> } }

Fix:
getProject ( ) . addDataTypeDefinition ( name , c ) ;
Buggy code:
public class NetCommand extends AbstractLogEnabled { protected boolean _traceCommandLine = false ; protected Commandline _commandLine ; protected Execute2 _exe ; protected boolean _failOnError ; protected Task _owner ; protected String _program ; protected String _title ; public NetCommand ( Task owner , String title , String program ) throws TaskException { } public void setFailOnError ( boolean b ) { } public void setTraceCommandLine ( boolean b ) { } public boolean getFailFailOnError ( ) { } public void addArgument ( String argument ) { if ( ( argument != null ) && ( ( argument . length ( ) ) != 0 ) ) { <START_BUG> _commandLine . createArgument ( ) . setValue ( argument ) ; <END_BUG> } } public void runCommand ( ) throws TaskException { } protected void logError ( String msg ) { } protected void logVerbose ( String msg ) { } protected void prepareExecutor ( ) throws TaskException { } }

Fix:
_commandLine . addArgument ( argument ) ;
Buggy code:
@ RestController @ EnableAutoConfiguration @ ComponentScan @ Transactional public class ConversationController { Logger logger = LoggerFactory . getLogger ( ConversationController . class ) ; @ Resource private ConversationRepository itemRepository ; @ Autowired private RfRequestRepository rfRequestRepository ; @ Autowired private RfResponseRepository rfResponseRepository ; @ RequestMapping ( value = "//api//conversations" , method = RequestMethod . POST , headers = "Accept=application//json" ) @ ResponseBody public Conversation create ( @ RequestBody ConversationDTO conversationDTO ) { } @ RequestMapping ( value = "//api//conversations//{conversationId}" , method = RequestMethod . DELETE , headers = "Accept=application//json" ) @ ResponseBody public Conversation delete ( @ PathVariable ( "conversationId" ) String conversationId ) { } @ RequestMapping ( value = "//api//conversations" , method = RequestMethod . GET ) @ ResponseBody public List < Conversation > findAll ( @ RequestParam ( value = "page" , required = false ) Integer page , @ RequestParam ( value = "limit" , required = false ) Integer limit ) { } @ RequestMapping ( value = "//api//conversations//{conversationId}" , method = RequestMethod . GET ) @ ResponseBody public Conversation findById ( @ PathVariable ( "conversationId" ) String conversationId ) { } @ RequestMapping ( value = "//api//conversations//{conversationId}" , method = RequestMethod . PUT , headers = "Accept=application//json" ) @ ResponseBody public Conversation update ( @ PathVariable ( "conversationId" ) <START_BUG> Long conversationId , @ RequestBody <END_BUG> ConversationDTO updated ) { logger . debug ( ( "Updating<seq2seq4repair_space>item<seq2seq4repair_space>with<seq2seq4repair_space>information:<seq2seq4repair_space>" + updated ) ) ; Conversation item = itemRepository . findOne ( updated . getId ( ) ) ; item . setName ( updated . getName ( ) ) ; item . setDescription ( updated . getDescription ( ) ) ; RfRequestDTO rfRequestDTO = updated . getRfRequestDTO ( ) ; RfRequest rfRequest = item . getRfRequest ( ) ; if ( null != rfRequestDTO ) { rfRequest . setApiUrlString ( rfRequestDTO . getApiUrl ( ) ) ; if ( ( rfRequestDTO . getApiBody ( ) ) != null ) { rfRequest . setApiBody ( rfRequestDTO . getApiBody ( ) . getBytes ( ) ) ; } rfRequest . setMethodType ( rfRequestDTO . getMethodType ( ) ) ; } item . setRfRequest ( rfRequest ) ; return item ; } }

Fix:
String conversationId , @ RequestBody
Buggy code:
public class ClassScope extends Scope { public TypeDeclaration referenceContext ; private TypeReference superTypeReference ; public ClassScope ( Scope parent , TypeDeclaration context ) { } void buildAnonymousTypeBinding ( SourceTypeBinding enclosingType , ReferenceBinding supertype ) { } private void buildFields ( ) { } void buildFieldsAndMethods ( ) { } private LocalTypeBinding buildLocalType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } void buildLocalTypeBinding ( SourceTypeBinding enclosingType ) { } private void buildMemberTypes ( ) { } private void buildMethods ( ) { } SourceTypeBinding buildType ( SourceTypeBinding enclosingType , PackageBinding packageBinding ) { } private void buildTypeVariables ( ) { } private void checkAndSetModifiers ( ) { } private void checkAndSetModifiersForField ( FieldBinding fieldBinding , FieldDeclaration fieldDecl ) { } private void checkForInheritedMemberTypes ( SourceTypeBinding sourceType ) { } private void connectMemberTypes ( ) { } private boolean connectSuperclass ( ) { } private boolean connectSuperInterfaces ( ) { } void connectTypeHierarchy ( ) { } private void connectTypeHierarchyWithoutMembers ( ) { } public boolean detectCycle ( ReferenceBinding superType , TypeReference reference , TypeBinding [ ] argTypes ) { } private boolean detectCycle ( SourceTypeBinding sourceType , ReferenceBinding superType , TypeReference reference ) { } private ReferenceBinding findAmbiguousInterface ( ReferenceBinding newInterface , ReferenceBinding currentType ) { } private ReferenceBinding findSupertype ( TypeReference typeReference ) { try { typeReference . aboutToResolve ( this ) ; compilationUnitScope ( ) . recordQualifiedReference ( typeReference . getTypeName ( ) ) ; this . superTypeReference = typeReference ; ReferenceBinding superType = ( ( ReferenceBinding ) ( typeReference . resolveSuperType ( this ) ) ) ; this . superTypeReference = null ; if ( superType == null ) return null ; <START_BUG> compilationUnitScope ( ) . recordTypeReference ( superType ) ; <END_BUG> if ( superType . isParameterizedType ( ) ) return superType ; if ( detectCycle ( referenceContext . binding , superType , typeReference ) ) return null ; return superType ; } catch ( AbortCompilation e ) { e . updateContext ( typeReference , referenceCompilationUnit ( ) . compilationResult ) ; throw e ; } } public ProblemReporter problemReporter ( ) { } public TypeDeclaration referenceType ( ) { } public String toString ( ) { } }

Fix:
compilationUnitScope ( ) . recordSuperTypeReference ( superType ) ;
Buggy code:
public class NSRunLoop extends NSObject { public NSRunLoop ( ) { } public NSRunLoop ( int id ) { } public NSRunLoop ( id id ) { } public static NSRunLoop currentRunLoop ( ) { } public static NSRunLoop mainRunLoop ( ) { } public boolean runMode ( NSString mode , NSDate limitDate ) { <START_BUG> return ( OS . objc_msgSend ( this . id , sel_runMode_beforeDate_ , ( mode != null ? mode . id : 0 ) , ( limitDate != null ? limitDate . id : 0 ) ) ) != 0 ; <END_BUG> } }

Fix:
return OS . objc_msgSend_bool ( this . id , sel_runMode_beforeDate_ , ( mode != null ? mode . id : 0 ) , ( limitDate != null ? limitDate . id : 0 ) ) ;
Buggy code:
public class WicketTesterHelper { public static class ComponentData implements IClusterable { private static final long serialVersionUID = 1L ; public String path ; public String type ; public String value ; } public static List < WicketTesterHelper . ComponentData > getComponentData ( final Page page ) { } public static void assertEquals ( final Collection < ? > expects , final Collection < ? > actuals ) { } public static void failWithVerboseMessage ( final Collection < ? > expects , final Collection < ? > actuals ) { } public static String asLined ( final Collection < ? > objects ) { <START_BUG> StringBuffer lined = new StringBuffer ( ) ; <END_BUG> for ( Iterator < ? > iter = objects . iterator ( ) ; iter . hasNext ( ) ; ) { String objectString = iter . next ( ) . toString ( ) ; lined . append ( "<seq2seq4repair_space>" ) ; lined . append ( objectString ) ; if ( iter . hasNext ( ) ) { lined . append ( "\n" ) ; } } return lined . toString ( ) ; } public static AjaxEventBehavior findAjaxEventBehavior ( Component component , String event ) { } public static IBehavior findBehavior ( Component component , Class < ? extends IBehavior > behaviorClass ) { } }

Fix:
StringBuilder lined = new StringBuilder ( ) ;
Buggy code:
public class Project extends BuildElement { private String defaultTarget = null ; private String base ; private String name ; private Map targets = new HashMap ( ) ; private List tasks = new ArrayList ( ) ; private Map importedProjects = new HashMap ( ) ; private URL sourceURL ; public Project ( URL sourceURL , Location location ) { } public URL getSourceURL ( ) { } public void addTarget ( Target target ) throws ProjectModelException { } public void setDefaultTarget ( String defaultTarget ) { } public String getDefaultTarget ( ) { } public void setBase ( String base ) { } public String getBase ( ) { } public void setName ( String name ) { } <START_BUG> public void addTask ( Task task ) { <END_BUG> tasks . add ( task ) ; } public void importProject ( String importName , Project project ) throws ProjectModelException { } public Iterator getTargets ( ) { } public Target getTarget ( String targetName ) { } public Iterator getImportedProjectNames ( ) { } public Project getImportedProject ( String importName ) { } public Iterator getTasks ( ) { } }

Fix:
public void addTask ( TaskElement task ) {
Buggy code:
public class SimpleProcessLogger implements ProcessorLog { private final Logger logger ; private final LogRepository logRepository ; private final Object component ; public SimpleProcessLogger ( final String componentId , final Object component ) { } private Object [ ] addProcessor ( final Object [ ] originalArgs ) { } private Object [ ] prependToArgs ( final Object [ ] originalArgs , final Object ... toAdd ) { } private Object [ ] translateException ( final Object [ ] os ) { } private boolean lastArgIsException ( final Object [ ] os ) { } @ Override public void warn ( final String msg , final Throwable t ) { } @ Override public void warn ( String msg , Object [ ] os ) { } @ Override public void warn ( String msg , Object [ ] os , final Throwable t ) { } @ Override public void warn ( String msg ) { } @ Override public void trace ( String msg , Throwable t ) { } @ Override public void trace ( String msg , Object [ ] os ) { } @ Override public void trace ( String msg ) { } @ Override public void trace ( String msg , Object [ ] os , Throwable t ) { } @ Override public boolean isWarnEnabled ( ) { } @ Override public boolean isTraceEnabled ( ) { } @ Override public boolean isInfoEnabled ( ) { } @ Override public boolean isErrorEnabled ( ) { } @ Override public boolean isDebugEnabled ( ) { } @ Override public void info ( String msg , Throwable t ) { } @ Override public void info ( String msg , Object [ ] os ) { } @ Override public void info ( String msg ) { } @ Override public void info ( String msg , Object [ ] os , Throwable t ) { } @ Override public String getName ( ) { } @ Override public void error ( String msg , Throwable t ) { } @ Override public void error ( String msg , Object [ ] os ) { } @ Override public void error ( String msg ) { } private Object [ ] addProcessorAndThrowable ( final Object [ ] os , final Throwable t ) { final Object [ ] modifiedArgs = new Object [ ( os . length ) + 2 ] ; modifiedArgs [ 0 ] = component . toString ( ) ; for ( int i = 0 ; i < ( os . length ) ; i ++ ) { modifiedArgs [ ( i + 1 ) ] = os [ i ] ; } <START_BUG> modifiedArgs [ ( ( modifiedArgs . length ) - 1 ) ] = t . toString ( ) ; <END_BUG> return modifiedArgs ; } @ Override public void error ( String msg , Object [ ] os , Throwable t ) { } @ Override public void debug ( String msg , Throwable t ) { } @ Override public void debug ( String msg , Object [ ] os ) { } @ Override public void debug ( String msg , Object [ ] os , Throwable t ) { } @ Override public void debug ( String msg ) { } }

Fix:
modifiedArgs [ ( ( modifiedArgs . length ) - 1 ) ] = ( t == null ) ? "" : t . toString ( ) ;
Buggy code:
public abstract class ProxyInputStream extends FilterInputStream { public ProxyInputStream ( InputStream proxy ) { } @ Override public int read ( ) throws IOException { } @ Override public int read ( byte [ ] bts ) throws IOException { try { <START_BUG> beforeRead ( bts . length ) ; <END_BUG> int n = in . read ( bts ) ; afterRead ( n ) ; return n ; } catch ( IOException e ) { handleIOException ( e ) ; return - 1 ; } } @ Override public int read ( byte [ ] bts , int off , int len ) throws IOException { } @ Override public long skip ( long ln ) throws IOException { } @ Override public int available ( ) throws IOException { } @ Override public void close ( ) throws IOException { } @ Override public synchronized void mark ( int readlimit ) { } @ Override public synchronized void reset ( ) throws IOException { } @ Override public boolean markSupported ( ) { } protected void beforeRead ( int n ) throws IOException { } protected void afterRead ( int n ) throws IOException { } protected void handleIOException ( IOException e ) throws IOException { } }

Fix:
beforeRead ( ( bts != null ? bts . length : 0 ) ) ;
Buggy code:
public abstract class ConfiguratorBase implements Configurator { public static final String DEBUG_KEY = "log4j.debug" ; protected Logger getLogger ( LoggerRepository repository ) { } protected void addError ( ErrorItem errorItem ) { } public abstract List getErrorList ( ) { } protected void attachListAppender ( LoggerRepository repository ) { } protected void detachListAppender ( LoggerRepository repository ) { } public static void attachTemporaryConsoleAppender ( LoggerRepository repository ) { Logger ll = repository . getLogger ( LOG4J_PACKAGE_NAME ) ; ConsoleAppender appender = new ConsoleAppender ( ) ; appender . setLayout ( new PatternLayout ( "LOG4J-INTERNAL:<seq2seq4repair_space>%d<seq2seq4repair_space>%level<seq2seq4repair_space>[%t]<seq2seq4repair_space>%c#%M:%L)-<seq2seq4repair_space>%m%n" ) ) ; appender . setName ( TEMP_CONSOLE_APPENDER_NAME ) ; <START_BUG> appender . activateOptions ( ) ; <END_BUG> ll . addAppender ( appender ) ; } public static void detachTemporaryConsoleAppender ( LoggerRepository repository , List errorList ) { } public void dumpErrors ( ) { } }

Fix:
appender . activate ( ) ;
Buggy code:
public class DatabaseActivity extends Activity implements IActivity { private EditText editTextDatabaseName ; private EditText editTextDatabasePwd ; private MenuItem saveDatabaseItem ; private DatabaseModel databaseModel ; private int databaseId ; private DatabaseProperty databaseProperty ; private EditText editTextDatabasePwdNew ; private EditText editTextDatabasePwdNewRepeat ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { InputMethodManager imm = ( ( InputMethodManager ) ( getSystemService ( INPUT_METHOD_SERVICE ) ) ) ; imm . hideSoftInputFromWindow ( editTextDatabaseName . getWindowToken ( ) , 0 ) ; switch ( item . getItemId ( ) ) { case id . menuItemDatabaseSave : if ( ( ( databaseProperty ) != null ) && ( Security . getInstance ( ) . checkPassword ( editTextDatabasePwd . getText ( ) . toString ( ) , databaseProperty . getDatabasePwd ( ) ) ) ) { databaseProperty . setDatabaseName ( editTextDatabaseName . getText ( ) . toString ( ) ) ; <START_BUG> if ( ! ( editTextDatabasePwdNew . getText . toString ( ) . isEmpty ( ) ) ) { <END_BUG> databaseProperty . setDatabasePwd ( editTextDatabasePwdNew . getText ( ) . toString ( ) ) ; } databaseModel . updateUserDatabase ( databaseProperty ) ; } else if ( ( databaseProperty ) == null ) { databaseId = databaseModel . createUserDatabase ( new DatabaseProperty ( editTextDatabaseName . getText ( ) . toString ( ) , editTextDatabasePwd . getText ( ) . toString ( ) , drawable . ic_database ) ) ; for ( String categoryName : getResources ( ) . getStringArray ( array_default_category_name ) ) { databaseModel . createUserCategory ( new de . szut . passkeeper . property . CategoryProperty ( databaseId , categoryName , drawable . ic_folder ) ) ; } } Intent intentListCategory = new Intent ( this , ListCategoryActivity . class ) . setFlags ( FLAG_ACTIVITY_NEW_TASK ) . putExtra ( "databaseId" , databaseId ) . putExtra ( "databasePwd" , editTextDatabasePwd . getText ( ) . toString ( ) ) ; startActivity ( intentListCategory ) ; finish ( ) ; break ; } return super . onOptionsItemSelected ( item ) ; } @ Override public void setDefaults ( ) { } @ Override public void populateView ( ) { } }

Fix:
if ( ! ( editTextDatabasePwdNew . getText ( ) . toString ( ) . isEmpty ( ) ) ) {
Buggy code:
public interface QueryParameter < T > extends Parameter < T > { public abstract boolean isNamed ( ) { } public abstract boolean isPositional ( ) { } public abstract boolean isValueAssignable ( Object v ) { } public abstract boolean isBound ( ) { } <START_BUG> public abstract QueryParameter < T > bindValue ( Object v ) ; <END_BUG> public abstract Object getValue ( ) { } public abstract Object getValue ( boolean mustBeBound ) { } public abstract void clearBinding ( ) { } public abstract Class < ? > getExpectedValueType ( ) { } }

Fix:
public abstract QueryParameter < T > bindValue ( T v ) ;
Buggy code:
public class Pipeline { public static void main ( String [ ] args ) { Pipeline p = new Pipeline ( ) ; <START_BUG> p . execute ( 1 , 20 ) ; <END_BUG> } public void execute ( int startId , int endId ) { } public void initDataDir ( ) { } public void callFileFetcher ( int startId , int endId ) throws Exception { } public void callFileParser ( int startId , int endId ) throws Exception { } public void callBatchFormulaCalculater ( int startId , int endId ) throws Exception { } public void callShortestUniquePrefixFinder ( ) throws Exception { } No newline ; at end ; of file ; }

Fix:
p . execute ( 1 , 10 ) ;
Buggy code:
public class SelectExistingTournament extends ActionBarActivity { Vector < String > tournamentNamesVector = new Vector < String > ( ) ; String tournamentSelected = "" ; int tournamentID ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override public boolean onCreateOptionsMenu ( Menu menu ) { } @ Override public boolean onOptionsItemSelected ( MenuItem item ) { } public void createDisplay ( ) { } public void select ( View view ) { } public void GetTournaments ( ) { String myQuery = "SELECT<seq2seq4repair_space>COUNT(ROWID)<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; Cursor myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; myCursor . moveToFirst ( ) ; int tourneyExists = myCursor . getInt ( 0 ) ; <START_BUG> if ( tourneyExists == 1 ) { <END_BUG> myQuery = "SELECT<seq2seq4repair_space>TournamentName<seq2seq4repair_space>FROM<seq2seq4repair_space>Tournament" ; myCursor = DatabaseCommunicator . CreateFetchQuery ( myQuery ) ; Log . d ( "SelectExistingTourney" , "Query<seq2seq4repair_space>Complete" ) ; myCursor . moveToFirst ( ) ; tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; while ( myCursor . moveToNext ( ) ) { tournamentNamesVector . add ( myCursor . getString ( 0 ) ) ; } } else { Toast . makeText ( getApplicationContext ( ) , ( "No<seq2seq4repair_space>Tournaments<seq2seq4repair_space>have<seq2seq4repair_space>been<seq2seq4repair_space>created<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>System<seq2seq4repair_space>yet.<seq2seq4repair_space>" + "Please<seq2seq4repair_space>create<seq2seq4repair_space>a<seq2seq4repair_space>Tournament<seq2seq4repair_space>first." ) , LENGTH_SHORT ) . show ( ) ; thread . start ( ) ; } } Thread thread = new Thread ( ) { @ Override public void run ( ) { } } ; }

Fix:
if ( tourneyExists >= 1 ) {
Buggy code:
public class NodeRepository { ConcurrentHashMap < String , Node > graph ; String thisMachinesName ; public NodeRepository ( String thisMachinesName ) { } public boolean HMdoesNodeExist ( String nodeName ) { <START_BUG> if ( graph . containsKey ( nodeName ) ) { <END_BUG> return true ; } else { return false ; } } public void HMaddNode ( String nodeName ) { } public void HMremoveNode ( String nodeName ) { } public Node HMgetNode ( String nodeName ) { } public int HMsizeOfGraph ( ) { } public void HMaddNeighbor ( String nodeName , String neighborName , int cost ) { } public void HMremoveNeighbor ( String nodeName , String neighborName ) { } public void HMsetNeighborList ( String nodeName , ArrayList < NeighborAndCostStrings > neighbors ) { } public ConcurrentHashMap < String , Node > getGraph ( ) { } public String getThisMachinesName ( ) { } public void setThisMachinesName ( String thisMachinesName ) { } public ArrayList < Node > getGraphList ( ) { } }

Fix:
if ( ( graph . containsKey ( nodeName ) ) == true ) {
Buggy code:
final class ObjectFactory { private static final String DEFAULT_PROPERTIES_FILENAME = "xerces.properties" ; private static final boolean DEBUG = ObjectFactory . isDebugEnabled ( ) ; private static final int DEFAULT_LINE_LENGTH = 80 ; private static Properties fXercesProperties = null ; private static long fLastModified = - 1 ; static Object createObject ( String factoryId , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } static Object createObject ( String factoryId , String propertiesFilename , String fallbackClassName ) throws ObjectFactory . ConfigurationError { } private static boolean isDebugEnabled ( ) { } private static void debugPrintln ( String msg ) { } static ClassLoader findClassLoader ( ) throws ObjectFactory . ConfigurationError { } static Object newInstance ( String className , ClassLoader cl , boolean doFallback ) throws ObjectFactory . ConfigurationError { } static Class findProviderClass ( String className , ClassLoader cl , boolean doFallback ) throws ClassNotFoundException , ObjectFactory . ConfigurationError { SecurityManager security = System . getSecurityManager ( ) ; if ( security != null ) { <START_BUG> final int lastDot = className . lastIndexOf ( "." ) ; <END_BUG> String packageName = className ; if ( lastDot != ( - 1 ) ) packageName = className . substring ( 0 , lastDot ) ; security . checkPackageAccess ( packageName ) ; } Class providerClass ; if ( cl == null ) { providerClass = Class . forName ( className ) ; } else { try { providerClass = cl . loadClass ( className ) ; } catch ( ClassNotFoundException x ) { if ( doFallback ) { ClassLoader current = ObjectFactory . class . getClassLoader ( ) ; if ( current == null ) { providerClass = Class . forName ( className ) ; } else if ( cl != current ) { cl = current ; providerClass = cl . loadClass ( className ) ; } else { throw x ; } } else { throw x ; } } } return providerClass ; } private static Object findJarServiceProvider ( String factoryId ) throws ObjectFactory . ConfigurationError { } static final class ConfigurationError extends Error { static final long serialVersionUID = - 7285495612271660427L ; private Exception exception ; ConfigurationError ( String msg , Exception x ) { } Exception getException ( ) { } } }

Fix:
final int lastDot = className . lastIndexOf ( '.' ) ;
Buggy code:
public class SquatStatsArrayAdapter extends ArrayAdapter < String > { int [ ] values ; String [ ] names ; Context context ; public SquatStatsArrayAdapter ( Context context , int resource , String [ ] names , int [ ] values ) { } @ Override public View getView ( int position , View convertView , ViewGroup parent ) { LayoutInflater inflate = LayoutInflater . from ( context ) ; View rowview = inflate . inflate ( squat_stats_listview_individual , null , true ) ; TextView name = ( ( TextView ) ( rowview . findViewById ( name ) ) ) ; TextView value = ( ( TextView ) ( rowview . findViewById ( value ) ) ) ; name . setText ( names [ position ] ) ; switch ( position ) { case 5 : value . setText ( ( ( ( ( float ) ( values [ position ] ) ) // 1000 ) + "s" ) ) ; break ; case 0 : <START_BUG> value . setText ( ( ( ( Math . abs ( values [ position ] ) ) + "" ) + ( ( char ) ( 176 ) ) ) ) ; <END_BUG> break ; default : value . setText ( ( ( ( ( Math . abs ( values [ position ] ) ) + "" ) + ( ( char ) ( 176 ) ) ) + "//s" ) ) ; break ; } return rowview ; } }

Fix:
value . setText ( ( ( ( values [ position ] ) + "" ) + ( ( char ) ( 176 ) ) ) ) ;
Buggy code:
public class SynchronizedCollection < E > implements Serializable , Collection < E > { private static final long serialVersionUID = 2412805092710877986L ; protected final Collection < E > collection ; protected final Object lock ; public static < T > SynchronizedCollection < T > synchronizedCollection ( final Collection < T > coll ) { } protected SynchronizedCollection ( final Collection < E > collection ) { } protected SynchronizedCollection ( final Collection < E > collection , final Object lock ) { } protected Collection < E > decorated ( ) { } public boolean add ( final E object ) { } public boolean addAll ( final Collection < ? extends E > coll ) { } public void clear ( ) { } public boolean contains ( final Object object ) { } public boolean containsAll ( final Collection < ? > coll ) { } public boolean isEmpty ( ) { } public Iterator < E > iterator ( ) { } public Object [ ] toArray ( ) { } public < T > T [ ] toArray ( final T [ ] object ) { } public boolean remove ( final Object object ) { } public boolean removeAll ( final Collection < ? > coll ) { } public boolean retainAll ( final Collection < ? > coll ) { } public int size ( ) { } @ Override public boolean equals ( final Object object ) { synchronized ( lock ) { if ( object == ( this ) ) { return true ; } <START_BUG> return decorated ( ) . equals ( object ) ; <END_BUG> } } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
return ( object == ( this ) ) || ( decorated ( ) . equals ( object ) ) ;
Buggy code:
public class Decorations extends Canvas { String text ; Image image ; Image [ ] images = new Image [ 0 ] ; boolean minimized ; boolean maximized ; Menu menuBar ; Menu [ ] menus ; Control savedFocus ; Button defaultButton ; Button saveDefault ; int accelGroup ; int vboxHandle ; Decorations ( ) { } public Decorations ( Composite parent , int style ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } void _setImages ( Image [ ] images ) { } void addMenu ( Menu menu ) { } int compare ( ImageData data1 , ImageData data2 ) { } <START_BUG> Control computeTabGroup ( ) { <END_BUG> return this ; } Control computeTabRoot ( ) { } void createAccelGroup ( ) { } void createWidget ( int index ) { } void destroyAccelGroup ( ) { } void fixAccelGroup ( ) { } void fixDecorations ( Decorations newDecorations , Control control , Menu [ ] menus ) { } public Button getDefaultButton ( ) { } public Image getImage ( ) { } public Image [ ] getImages ( ) { } public boolean getMaximized ( ) { } public Menu getMenuBar ( ) { } public boolean getMinimized ( ) { } String getNameText ( ) { } public String getText ( ) { } public boolean isReparentable ( ) { } boolean isTabGroup ( ) { } boolean isTabItem ( ) { } Decorations menuShell ( ) { } void removeMenu ( Menu menu ) { } void releaseChildren ( boolean destroy ) { } void releaseHandle ( ) { } void releaseWidget ( ) { } boolean restoreFocus ( ) { } public void setDefaultButton ( Button button ) { } public void setImage ( Image image ) { } public void setImages ( Image [ ] images ) { } public void setMaximized ( boolean maximized ) { } public void setMenuBar ( Menu menu ) { } public void setMinimized ( boolean minimized ) { } void setSavedFocus ( Control control ) { } public void setText ( String string ) { } void sort ( Image [ ] images ) { } boolean traverseItem ( boolean next ) { } boolean traverseReturn ( ) { } }

Fix:
Widget computeTabGroup ( ) {
Buggy code:
public class PvPlayer extends EcoPlayer { private WeakReference < Player > player ; private final UUID uuid ; private boolean newbie ; private boolean tagged ; private boolean pvpState ; private boolean pvpLogged ; private boolean override ; private long toggleTime ; private long respawnTime ; private long taggedTime ; private NewbieTask newbieTask ; private final HashMap < String , Integer > victim = new HashMap < > ( ) ; private final PvPManager plugin ; private TeamProfile teamProfile ; public PvPlayer ( final Player player , final PvPManager plugin ) { } public final String getName ( ) { } public final UUID getUUID ( ) { } @ Override public final Player getPlayer ( ) { } public final String getWorldName ( ) { } public final long getToggleTime ( ) { } public final void togglePvP ( ) { } public final boolean hasToggleCooldownPassed ( ) { } public final boolean isNewbie ( ) { } public final boolean isInCombat ( ) { } public final boolean hasPvPEnabled ( ) { } public final boolean hasPvPLogged ( ) { } public final boolean hasOverride ( ) { } public final void disableFly ( ) { } public final void setNewbie ( final boolean newbie ) { } public final void setTagged ( final boolean attacker , final String tagger ) { } public final void unTag ( ) { } public final void setPvP ( final boolean pvpState ) { } public final void addVictim ( final String victimName ) { } public final void clearVictims ( ) { } public final void setPvpLogged ( final boolean pvpLogged ) { } public final boolean hasRespawnProtection ( ) { } public final void setRespawnTime ( final long respawnTime ) { } public final boolean toggleOverride ( ) { } public final long getTaggedTime ( ) { } public final void loadState ( ) { } public void loadUserData ( final Map < String , Object > userData ) { } public final Map < String , Object > getUserData ( ) { final Map < String , Object > userData = new HashMap < > ( ) ; userData . put ( PVP_STATUS , hasPvPEnabled ( ) ) ; userData . put ( TOGGLE_TIME , getToggleTime ( ) ) ; userData . put ( NEWBIE , isNewbie ( ) ) ; <START_BUG> userData . put ( NEWBIE_TIMELEFT , newbieTask . getTimeleft ( ) ) ; <END_BUG> return userData ; } public final void updatePlayer ( final Player p ) { } public final void removeCombatTeam ( ) { } public static PvPlayer get ( final Player player ) { } }

Fix:
userData . put ( NEWBIE_TIMELEFT , ( ( newbieTask ) != null ? newbieTask . getTimeleft ( ) : 0 ) ) ;
Buggy code:
public class JAXRSubsystemParsingTestCase extends AbstractSubsystemTest { public static final String SUBSYSTEM_XML = ( ( ( ( ( "<subsystem<seq2seq4repair_space>xmlns='" + ( CURRENT . getUriString ( ) ) ) + "'>" ) + "<datasource<seq2seq4repair_space>jndi-name='java:DataSource'//>" ) + "<connection-factory<seq2seq4repair_space>jndi-name='java:ConnectionFactory'//>" ) + "<flags<seq2seq4repair_space>drop-on-start='true'<seq2seq4repair_space>create-on-start='true'<seq2seq4repair_space>drop-on-stop='true'//>" ) + "<//subsystem>" ; public JAXRSubsystemParsingTestCase ( ) { } @ Test public void testParseSubsystem ( ) throws Exception { List < ModelNode > operations = super . parse ( JAXRSubsystemParsingTestCase . SUBSYSTEM_XML ) ; <START_BUG> Assert . assertEquals ( 6 , operations . size ( ) ) ; <END_BUG> } @ Test public void testInstallIntoController ( ) throws Exception { } @ Test public void testParseAndMarshalModel ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } }

Fix:
Assert . assertEquals ( 1 , operations . size ( ) ) ;
Buggy code:
public class CodeSnippetSingleNameReference extends SingleNameReference implements InvocationSite , ProblemReasons , EvaluationConstants { EvaluationContext evaluationContext ; FieldBinding delegateThis ; public CodeSnippetSingleNameReference ( char [ ] source , long pos , EvaluationContext evaluationContext ) { } public FlowInfo analyseCode ( BlockScope currentScope , FlowContext flowContext , FlowInfo flowInfo , boolean valueRequired ) { switch ( ( this . bits ) & ( ASTNode . RestrictiveFlagMASK ) ) { case Binding . FIELD : FieldBinding fieldBinding ; <START_BUG> if ( ( ( fieldBinding = ( ( FieldBinding ) ( this . binding ) ) ) . isBlankFinal ( ) ) && ( currentScope . allowBlankFinalFieldAssignment ( fieldBinding ) ) ) { <END_BUG> if ( ! ( flowInfo . isDefinitelyAssigned ( fieldBinding ) ) ) { currentScope . problemReporter ( ) . uninitializedBlankFinalField ( fieldBinding , this ) ; } } break ; case Binding . LOCAL : LocalVariableBinding localBinding ; if ( ! ( flowInfo . isDefinitelyAssigned ( ( localBinding = ( ( LocalVariableBinding ) ( this . binding ) ) ) ) ) ) { currentScope . problemReporter ( ) . uninitializedLocalVariable ( localBinding , this ) ; } if ( ( ( flowInfo . tagBits ) & ( FlowInfo . UNREACHABLE ) ) == 0 ) { localBinding . useFlag = LocalVariableBinding . USED ; } else if ( ( localBinding . useFlag ) == ( LocalVariableBinding . UNUSED ) ) { localBinding . useFlag = LocalVariableBinding . FAKE_USED ; } } return flowInfo ; } public TypeBinding checkFieldAccess ( BlockScope scope ) { } public void generateAssignment ( BlockScope currentScope , CodeStream codeStream , Assignment assignment , boolean valueRequired ) { } public void generateCode ( BlockScope currentScope , CodeStream codeStream , boolean valueRequired ) { } public void generateCompoundAssignment ( BlockScope currentScope , CodeStream codeStream , MethodBinding writeAccessor , Expression expression , int operator , int assignmentImplicitConversion , boolean valueRequired ) { } public void generatePostIncrement ( BlockScope currentScope , CodeStream codeStream , CompoundAssignment postIncrement , boolean valueRequired ) { } public void generateReceiver ( CodeStream codeStream ) { } public TypeBinding getReceiverType ( BlockScope currentScope ) { } public void manageSyntheticAccessIfNecessary ( BlockScope currentScope , FlowInfo flowInfo , boolean isReadAccess ) { } public TypeBinding reportError ( BlockScope scope ) { } }

Fix:
if ( ( ( fieldBinding = ( ( FieldBinding ) ( this . binding ) ) ) . isBlankFinal ( ) ) && ( currentScope . needBlankFinalFieldInitializationCheck ( fieldBinding ) ) ) {
Buggy code:
public class Activator implements IDistributionConstants , BundleActivator , ServiceTrackerCustomizer { private BundleContext context ; private ServiceTracker containerManagerServiceTracker ; private ServiceTracker helloServiceTracker ; public void start ( BundleContext context ) throws Exception { } private Filter createRemoteFilter ( ) throws InvalidSyntaxException { } public void stop ( BundleContext context ) throws Exception { } public Object addingService ( ServiceReference reference ) { System . out . println ( "IHello<seq2seq4repair_space>service<seq2seq4repair_space>proxy<seq2seq4repair_space>being<seq2seq4repair_space>added" ) ; IHello hello = ( ( IHello ) ( context . getService ( reference ) ) ) ; hello . hello ( ) ; System . out . println ( "Called<seq2seq4repair_space>hello()<seq2seq4repair_space>on<seq2seq4repair_space>proxy<seq2seq4repair_space>successfully" ) ; IRemoteService remoteService = ( ( IRemoteService ) ( reference . getProperty ( REMOTE ) ) ) ; IFuture future = RemoteServiceHelper . futureExec ( remoteService , "hello" , null ) ; try { future . get ( ) ; <START_BUG> System . out . println ( "Called<seq2seq4repair_space>futureExec<seq2seq4repair_space>successfully" ) ; <END_BUG> } catch ( Exception e ) { e . printStackTrace ( ) ; } return hello ; } public void modifiedService ( ServiceReference reference , Object service ) { } public void removedService ( ServiceReference reference , Object service ) { } private IContainerManager getContainerManagerService ( ) { } }

Fix:
System . out . println ( "Called<seq2seq4repair_space>future.get()<seq2seq4repair_space>successfully" ) ;
Buggy code:
public final class NewsEntry implements Serializable { @ SerializedName ( "title" ) private String mTitle ; @ SerializedName ( "desc" ) private String mDesc ; @ SerializedName ( "url" ) private String mUrl ; @ SerializedName ( "url_mobile" ) private String mUrlMobile ; @ SerializedName ( "pubDate" ) private long mPubDate ; public String getTitle ( ) { } public String getDesc ( ) { } public String getUrl ( ) { } public String getUrlMobile ( ) { } public long getPubDate ( ) { } @ Override public boolean equals ( Object o ) { NewsEntry other = ( ( NewsEntry ) ( o ) ) ; <START_BUG> return ( ( ( ( TextUtils . equals ( mTitle , other . mTitle ) ) && ( TextUtils . equals ( mDesc , other . mDesc ) ) ) && ( TextUtils . equals ( mUrl , other . mUrl ) ) ) && ( TextUtils . equals ( mUrlMobile , other . mUrlMobile ) ) ) && ( ( mPubDate ) == ( other . mPubDate ) ) ; <END_BUG> } }

Fix:
return ( ( ( TextUtils . equals ( mTitle , other . mTitle ) ) && ( TextUtils . equals ( mDesc , other . mDesc ) ) ) && ( TextUtils . equals ( mUrl , other . mUrl ) ) ) && ( TextUtils . equals ( mUrlMobile , other . mUrlMobile ) ) ;
Buggy code:
@ RunWith ( Arquillian . class ) @ RunAsClient public class CliArgumentsTestCase extends AbstractCliTestBase { private static final String tempDir = System . getProperty ( "java.io.tmpdir" ) ; @ ArquillianResource private ManagementClient managementClient ; @ Deployment public static Archive < ? > getDeployment ( ) { } @ Test public void testVersionArgument ( ) throws Exception { <START_BUG> CLIWrapper cw = new CLIWrapper ( true , new String [ ] { "--version" } ) ; <END_BUG> String output = cw . readAllUnformated ( WAIT_TIMEOUT , WAIT_LINETIMEOUT ) ; Assert . assertTrue ( output . contains ( "JBOSS_HOME" ) ) ; Assert . assertTrue ( cw . hasQuit ( ) ) ; } @ Test public void testCommandArgument ( ) throws Exception { } @ Test public void testCommandsArgument ( ) throws Exception { } @ Test public void testFileArgument ( ) throws Exception { } @ Test public void testConnectArgument ( ) throws Exception { } @ Test public void testControlerArgument ( ) throws Exception { } private String getControllerString ( ) { } private String getControllerString ( int portOffset ) { } }

Fix:
CLIWrapper cw = new CLIWrapper ( false , new String [ ] { "--version" } ) ;
Buggy code:
public class TestCaseClassLoader extends ClassLoader { private Vector fPathItems ; private String [ ] defaultExclusions = new String [ ] { "junit.framework." , "junit.extensions." , "junit.runner." } ; static final String EXCLUDED_FILE = "excluded.properties" ; private Vector fExcluded ; public TestCaseClassLoader ( ) { } public TestCaseClassLoader ( String classPath ) { } private void scanPath ( String classPath ) { } public URL getResource ( String name ) { } public InputStream getResourceAsStream ( String name ) { } public boolean isExcluded ( String name ) { } public synchronized Class loadClass ( String name , boolean resolve ) throws ClassNotFoundException { } private byte [ ] lookupClassData ( String className ) throws ClassNotFoundException { byte [ ] data = null ; for ( int i = 0 ; i < ( fPathItems . size ( ) ) ; i ++ ) { String path = ( ( String ) ( fPathItems . elementAt ( i ) ) ) ; String fileName = ( className . replace ( '.' , '//' ) ) + ".class" ; if ( isJar ( path ) ) { data = loadJarData ( path , fileName ) ; } else { data = loadFileData ( path , fileName ) ; } if ( data != null ) return data ; } <START_BUG> throw new ClassNotFoundException ( ) ; <END_BUG> } boolean isJar ( String pathEntry ) { } private byte [ ] loadFileData ( String path , String fileName ) { } private byte [ ] getClassData ( File f ) { } private byte [ ] loadJarData ( String path , String fileName ) { } private void readExcludedPackages ( ) { } }

Fix:
throw new ClassNotFoundException ( className ) ;
Buggy code:
public final class JoinUtil { private JoinUtil ( ) { } public static Query createJoinQuery ( String fromField , boolean multipleValuesPerDocument , String toField , Query fromQuery , IndexSearcher fromSearcher , ScoreMode scoreMode ) throws IOException { switch ( scoreMode ) { case None : TermsCollector termsCollector = TermsCollector . create ( fromField , multipleValuesPerDocument ) ; fromSearcher . search ( fromQuery , termsCollector ) ; <START_BUG> return new TermsQuery ( toField , termsCollector . getCollectorTerms ( ) ) ; <END_BUG> case Total : case Max : case Avg : TermsWithScoreCollector termsWithScoreCollector = TermsWithScoreCollector . create ( fromField , multipleValuesPerDocument , scoreMode ) ; fromSearcher . search ( fromQuery , termsWithScoreCollector ) ; return new TermsIncludingScoreQuery ( toField , multipleValuesPerDocument , termsWithScoreCollector . getCollectedTerms ( ) , termsWithScoreCollector . getScoresPerTerm ( ) , fromQuery ) ; default : throw new IllegalArgumentException ( String . format ( Locale . ROOT , "Score<seq2seq4repair_space>mode<seq2seq4repair_space>%s<seq2seq4repair_space>isn't<seq2seq4repair_space>supported." , scoreMode ) ) ; } } }

Fix:
return new TermsQuery ( toField , fromQuery , termsCollector . getCollectorTerms ( ) ) ;
Buggy code:
public class TemplateUtils { private static TemplateUtils instance = new TemplateUtils ( ) ; private static final Logger logger = LogManager . getLogger ( TemplateUtils . class . getName ( ) ) ; private Map < String , String > cachedTemplates = new HashMap < > ( 16 ) ; private TemplateUtils ( ) { } public static TemplateUtils getInstance ( ) { } public String getHtmlTemplate ( ServletContext context , String filePath ) { try { if ( ! ( filePath . startsWith ( "//" ) ) ) { filePath = "//" + filePath ; } <START_BUG> if ( null == ( cachedTemplates . get ( filePath ) ) ) { <END_BUG> InputStream inputStream = context . getResourceAsStream ( filePath ) ; final String string = IOUtil . getInstance ( ) . inputStreamToString ( inputStream ) ; cachedTemplates . put ( filePath , string ) ; } return cachedTemplates . get ( filePath ) ; } catch ( Exception e ) { TemplateUtils . logger . warn ( String . format ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>resource<seq2seq4repair_space>for<seq2seq4repair_space>file[%s],<seq2seq4repair_space>Returning<seq2seq4repair_space>empty<seq2seq4repair_space>string" , filePath ) ) ; return StringUtils . EMPTY ; } } @ SuppressWarnings ( "unchecked" ) public String getFieldController ( ServletContext context , String operationType , String entityType , FieldMeta fieldMeta , String label ) { } public String getReadOnlyController ( FieldMeta fieldMeta , Class clazz ) { } public String getIdController ( ServletContext context , String key , String label ) { } public String getEnumController ( ServletContext context , String key , Class clazz ) { } public String getBaseObjectController ( ServletContext context , FieldMeta fieldMeta , Class < ? extends BaseObject > clazz ) { } public String getBaseObjectTypeHeadController ( ServletContext context , FieldMeta fieldMeta , Class < ? extends BaseObject > clazz ) { } public String getBaseObjectSelectController ( ServletContext context , FieldMeta fieldMeta , Class < ? extends BaseObject > clazz ) { } public String getBooleanController ( ServletContext context , String key ) { } public String getNumberController ( ServletContext context , String key , String label ) { } public String getDateController ( ServletContext context , String key , final Date defaultVal ) { } public String getStringController ( ServletContext context , String key , String label ) { } public String getButtonsController ( ServletContext context , String entityType , final String operationType ) { } public String getFieldLabelHtml ( String entityType , String key ) { } public String getListController ( ServletContext context ) { } }

Fix:
if ( ( null == ( cachedTemplates . get ( filePath ) ) ) || ( ApplicationConfig . isDevelopmentMode ( ) ) ) {
Buggy code:
@ Configuration ( "Ku,<seq2seq4repair_space>Kv,<seq2seq4repair_space>au,<seq2seq4repair_space>av,<seq2seq4repair_space>beta,<seq2seq4repair_space>numIters,<seq2seq4repair_space>burnIn,<seq2seq4repair_space>sampleLag" ) public class LDCC extends GraphicRecommender { private Table < Integer , Integer , Integer > Zu ; private Table < Integer , Integer , Integer > Zv ; private DenseMatrix Nui ; private DenseMatrix Nvj ; private DenseVector Nv ; private int [ ] [ ] [ ] Nijl ; private DenseMatrix Nij ; private int Ku ; private int Kv ; private float au ; private float av ; private float bl ; private DenseMatrix PIu ; private DenseMatrix PIv ; private DenseMatrix PIuSum ; private DenseMatrix PIvSum ; private double [ ] [ ] [ ] theta ; private double [ ] [ ] [ ] thetaSum ; public LDCC ( SparseMatrix trainMatrix , SparseMatrix testMatrix , int fold ) { } @ Override protected void initModel ( ) throws Exception { } @ Override protected void eStep ( ) { } @ Override protected void readoutParams ( ) { } @ Override protected void postProbDistr ( ) { } @ Override protected boolean isConverged ( int iter ) throws Exception { postProbDistr ( ) ; int N = 0 ; double sum = 0 ; for ( MatrixEntry me : trainMatrix ) { int u = me . row ( ) ; int v = me . column ( ) ; double ruv = me . get ( ) ; int l = scales . indexOf ( ruv ) ; double prob = 0 ; for ( int i = 0 ; i < ( Ku ) ; i ++ ) { for ( int j = 0 ; j < ( Kv ) ; j ++ ) { prob += ( ( theta [ i ] [ j ] [ l ] ) * ( PIu . get ( u , i ) ) ) * ( PIv . get ( v , j ) ) ; } } sum += Math . log ( prob ) ; N ++ ; } double perp = Math . exp ( ( ( - sum ) // N ) ) ; double delta = ( loss ) - perp ; Logs . debug ( "{}{}<seq2seq4repair_space>iter<seq2seq4repair_space>{}<seq2seq4repair_space>achieves<seq2seq4repair_space>perplexity<seq2seq4repair_space>=<seq2seq4repair_space>{},<seq2seq4repair_space>delta_perp<seq2seq4repair_space>=<seq2seq4repair_space>{}" , algoName , foldInfo , iter , perp , delta ) ; <START_BUG> if ( ( iter > 1 ) && ( delta > 0 ) ) <END_BUG> return true ; loss = perp ; return false ; } @ Override protected void postModel ( ) throws Exception { } @ Override protected double predict ( int u , int v ) throws Exception { } @ Override public String toString ( ) { } }

Fix:
if ( ( ( numStats ) > 1 ) && ( delta > 0 ) )