nus-yam/ex-repair huggingface dataset:
Buggy code:
public class Neo4j2GraphSpecificTestSuite extends TestSuite { public Neo4j2GraphSpecificTestSuite ( ) { } public Neo4j2GraphSpecificTestSuite ( final GraphTest graphTest ) { } public void testLongIdConversions ( ) { } public void testQueryIndex ( ) throws Exception { } public void testIndexParameters ( ) throws Exception { } public void testHaGraph ( ) throws Exception { } public void testRollbackExceptionOnBeforeTxCommit ( ) throws Exception { Neo4j2Graph graph = ( ( Neo4j2Graph ) ( graphTest . generateGraph ( ) ) ) ; GraphDatabaseService rawGraph = graph . getRawGraph ( ) ; rawGraph . registerTransactionEventHandler ( new org . neo4j . graphdb . event . TransactionEventHandler < Object > ( ) { @ Override public Object beforeCommit ( TransactionData data ) throws Exception { if ( true ) { throw new RuntimeException ( "jippo<seq2seq4repair_space>validation<seq2seq4repair_space>exception" ) ; } return null ; } @ Override public void afterCommit ( TransactionData data , Object state ) { } @ Override public void afterRollback ( TransactionData data , Object state ) { } } ) ; try { Vertex vertex = graph . addVertex ( null ) ; graph . commit ( ) ; } catch ( Exception e ) { graph . rollback ( ) ; } <START_BUG> assertTrue ( ( ! ( GlobalGraphOperations . at ( rawGraph ) . getAllNodes ( ) . iterator ( ) . hasNext ( ) ) ) ) ; <END_BUG> graph . shutdown ( ) ; } No newline ; at end ; of file ; }

Fix:
assertTrue ( ( ! ( graph . getVertices ( ) . iterator ( ) . hasNext ( ) ) ) ) ;
Buggy code:
public class ProgressLabelProvider extends LabelProvider { Image image ; public Image getImage ( Object element ) { <START_BUG> return JobProgressManager . getInstance ( ) . getDisplayImage ( ( ( JobTreeElement ) ( element ) ) ) ; <END_BUG> } public String getText ( Object element ) { } }

Fix:
return ProgressManager . getInstance ( ) . getDisplayImage ( ( ( JobTreeElement ) ( element ) ) ) ;
Buggy code:
public class TimeTableServlet extends HttpServlet { DataManager dataManager ; String base ; @ Override public void init ( ServletConfig config ) throws ServletException { } protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } public String login ( HttpServletRequest request , String url ) { String userName = request . getParameter ( "username" ) ; String password = request . getParameter ( "password" ) ; Lecturer lecturer = LecturerDAO . getLecturerLogin ( dataManager , userName , password ) ; if ( lecturer == null ) { Logger . getGlobal ( ) . log ( Level . INFO , ( "Login<seq2seq4repair_space>credentials<seq2seq4repair_space>Username:<seq2seq4repair_space>{0}\n<seq2seq4repair_space>" + "Password:<seq2seq4repair_space>{1}<seq2seq4repair_space>not<seq2seq4repair_space>found" ) , new Object [ ] { userName , password } ) ; } else if ( ( lecturer . getLectureRole ( ) . equals ( "HOD" ) ) || ( lecturer . getLectureRole ( ) . equals ( "Dean" ) ) ) { url = ( base ) + "admin.jsp" ; request . getSession ( ) . setAttribute ( "user" , userName ) ; } else <START_BUG> if ( "System<seq2seq4repair_space>Administrator" . equals ( lecturer . getLectureRole ( ) ) ) { <END_BUG> url = ( base ) + "sysadmin.jsp" ; request . getSession ( ) . setAttribute ( "user" , userName ) ; } else { url = ( base ) + "lecturer.jsp" ; request . getSession ( ) . setAttribute ( "user" , userName ) ; } return url ; } public void logOut ( HttpServletRequest request ) { } public void addLecturer ( HttpServletRequest request , HttpServletResponse response ) throws IOException { } public void addHall ( HttpServletRequest request ) { } }

Fix:
if ( "Sysadmin" . equals ( lecturer . getLectureRole ( ) ) ) {
Buggy code:
@ Path ( "//parent" ) public class ParentResource { @ GET public Response childDSRs ( ) { String parent = DSRServer . getProperty ( REGISTRY_PARENT_URL ) ; <START_BUG> if ( parent . isEmpty ( ) ) { <END_BUG> parent = "No<seq2seq4repair_space>parent<seq2seq4repair_space>set!" ; } return Response . ok ( ) . entity ( parent ) . build ( ) ; } }

Fix:
if ( ( parent == null ) || ( parent . isEmpty ( ) ) ) {
Buggy code:
@ Component public class BlockStatusServiceImpl implements BlockStatusService { private BlockCalendarService _blockCalendarService ; private BlockLocationService _blockLocationService ; private BlockGeospatialService _blockGeospatialService ; private ExtendedCalendarService _extendedCalendarService ; private int _runningLateWindow = 30 * 60 ; private int _runningEarlyWindow = 10 * 60 ; @ Autowired public void setActive ( BlockCalendarService activeCalendarService ) { } @ Autowired public void setBlockLocationService ( BlockLocationService blockLocationService ) { } @ Autowired public void setBlockGeospatialService ( BlockGeospatialService blockGeospatialService ) { } @ Autowired public void setExtendedCalendarService ( ExtendedCalendarService extendedCalendarSerivce ) { } @ ConfigurationParameter public void setRunningLateWindow ( int runningLateWindowInSeconds ) { } public int getRunningLateWindow ( ) { } @ ConfigurationParameter public void setRunningEarlyWindow ( int runningEarlyWindowInSeconds ) { } public int getRunningEarlyWindow ( ) { } @ Override public Map < BlockInstance , List < BlockLocation > > getBlocks ( AgencyAndId blockId , long serviceDate , AgencyAndId vehicleId , long time ) { } @ Override public BlockLocation getBlockForVehicle ( AgencyAndId vehicleId , long time ) { } @ Override public List < BlockLocation > getAllActiveBlocks ( long time ) { } @ Override public List < BlockLocation > getActiveBlocksForAgency ( String agencyId , long time ) { } @ Override public List < BlockLocation > getBlocksForRoute ( AgencyAndId routeId , long time ) { } @ Override public List < BlockLocation > getBlocksForBounds ( CoordinateBounds bounds , long time ) { long timeFrom = time - ( ( _runningLateWindow ) * 1000 ) ; long timeTo = time + ( ( _runningEarlyWindow ) * 1000 ) ; List < BlockInstance > instances = _blockGeospatialService . getActiveScheduledBlocksPassingThroughBounds ( bounds , timeFrom , timeTo ) ; List < BlockLocation > locations = getAsLocations ( instances , time ) ; List < BlockLocation > inRange = new ArrayList < BlockLocation > ( ) ; for ( BlockLocation location : locations ) { CoordinatePoint p = location . getLocation ( ) ; <START_BUG> if ( bounds . contains ( p ) ) <END_BUG> inRange . add ( location ) ; } return inRange ; } @ Override public Map < BlockInstance , List < List < BlockLocation > > > getBlocksForIndex ( BlockSequenceIndex index , List < Date > timestamps ) { } private List < BlockInstance > getBlockInstances ( AgencyAndId blockId , long serviceDate , long time ) { } private List < BlockLocation > getAsLocations ( Iterable < BlockInstance > instances , long time ) { } private void computeLocations ( BlockInstance instance , AgencyAndId vehicleId , long time , List < BlockLocation > results ) { } private List < BlockInstance > getBlockInstancesForIndexAndTimestamps ( BlockSequenceIndex index , List < Date > timestamps ) { } private void getBlockLocationsForInstanceAndTimestamps ( BlockInstance instance , List < Date > timestamps , Map < BlockInstance , List < List < BlockLocation > > > results ) { } }

Fix:
if ( ( p != null ) && ( bounds . contains ( p ) ) )
Buggy code:
public class PerObject extends PerClause { private boolean isThis ; private Pointcut entry ; private static final Set thisKindSet = new HashSet ( Shadow . ALL_SHADOW_KINDS ) ; private static final Set targetKindSet = new HashSet ( Shadow . ALL_SHADOW_KINDS ) ; public PerObject ( Pointcut entry , boolean isThis ) { } public Set couldMatchKinds ( ) { } public FuzzyBoolean fastMatch ( FastMatchInfo type ) { } protected FuzzyBoolean matchInternal ( Shadow shadow ) { } public void resolveBindings ( IScope scope , Bindings bindings ) { } private Var getVar ( Shadow shadow ) { } protected Test findResidueInternal ( Shadow shadow , ExposedState state ) { } public PerClause concretize ( ResolvedTypeX inAspect ) { PerObject ret = new PerObject ( entry , isThis ) ; ret . inAspect = inAspect ; if ( inAspect . isAbstract ( ) ) return ret ; World world = inAspect . getWorld ( ) ; Pointcut concreteEntry = entry . concretize ( inAspect , 0 , null ) ; inAspect . crosscuttingMembers . addConcreteShadowMunger ( Advice . makePerObjectEntry ( world , concreteEntry , isThis , inAspect ) ) ; ResolvedTypeMunger munger = new org . aspectj . weaver . PerObjectInterfaceTypeMunger ( inAspect , concreteEntry ) ; <START_BUG> inAspect . crosscuttingMembers . addTypeMunger ( world . concreteTypeMunger ( munger , inAspect ) ) ; <END_BUG> if ( inAspect . isAnnotationStyleAspect ( ) ) { inAspect . crosscuttingMembers . addLateTypeMunger ( inAspect . getWorld ( ) . makePerClauseAspect ( inAspect , getKind ( ) ) ) ; } if ( Ajc5MemberMaker . isAnnotationStyleAspect ( inAspect ) ) { inAspect . crosscuttingMembers . addLateTypeMunger ( new org . aspectj . weaver . bcel . BcelAccessForInlineMunger ( inAspect ) ) ; } return ret ; } public void write ( DataOutputStream s ) throws IOException { } public static PerClause readPerClause ( VersionedDataInputStream s , ISourceContext context ) throws IOException { } public Kind getKind ( ) { } public boolean isThis ( ) { } public String toString ( ) { } public String toDeclarationString ( ) { } }

Fix:
inAspect . crosscuttingMembers . addLateTypeMunger ( world . concreteTypeMunger ( munger , inAspect ) ) ;
Buggy code:
public class Board { private List < Sequence > sequencesArray ; private List < Sequence > sequencesArrayBackup ; Board ( ) { } public void reset ( ) { } public boolean moveTile ( MoveTileData data ) { int sourceIndex = data . getSourceSequenceIndex ( ) ; int sourcePosition = data . getSourceSequencePosition ( ) ; int targetIndex = data . getTargetSequenceIndex ( ) ; int targetPosition = data . getTargetSequencePosition ( ) ; if ( isMoveValid ( data ) ) { if ( ( isSequenceContainsOneTileOnly ( sourceIndex ) ) && ( sourceIndex < targetIndex ) ) { targetIndex = targetIndex - 1 ; } <START_BUG> if ( sourcePosition < targetPosition ) { <END_BUG> targetPosition = targetPosition - 1 ; } Tile tile = removeTile ( sourceIndex , sourcePosition ) ; return addTile ( targetIndex , targetPosition , tile ) ; } return false ; } public Tile removeTile ( int sequenceIndex , int indexInSequence ) { } public boolean addTile ( int sequenceIndex , int indexInSequence , Tile tile ) { } public boolean isValid ( ) { } public void addSequence ( Sequence sequence ) { } public Sequence getSequence ( int index ) { } public List < Sequence > getSequences ( ) { } public boolean isTargetValid ( int sequenceIndex , int sequencePosition ) { } private boolean isMovePositionValid ( int sequenceIndex , int sequencePosition ) { } public boolean isMoveValid ( MoveTileData data ) { } private boolean split ( int sequenceIndex , int indexInSequence , Tile tile ) { } public void storeBackup ( ) { } public void restoreFromBackup ( ) { } private boolean isSequenceContainsOneTileOnly ( int sourceSequenceIndex ) { } }

Fix:
if ( ( sourceIndex == targetIndex ) && ( sourcePosition < targetPosition ) ) {
Buggy code:
public class PendingFile { private static PendingFile . PendingFileSerializer serializer_ = new PendingFile . PendingFileSerializer ( ) ; public static PendingFile . PendingFileSerializer serializer ( ) { } private final SSTable sstable ; public final Descriptor desc ; public final String component ; public final List < Pair < Long , Long > > sections ; public final OperationType type ; public final long size ; public long progress ; public PendingFile ( Descriptor desc , PendingFile pf ) { } public PendingFile ( SSTable sstable , Descriptor desc , String component , List < Pair < Long , Long > > sections , OperationType type ) { } public String getFilename ( ) { } public boolean equals ( Object o ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( ( getFilename ( ) ) + "//" ) + ( StringUtils . join ( sections , "," ) ) ) + "\n\t<seq2seq4repair_space>progress=" ) + ( progress ) ) + "//" ) + ( size ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( ( ( progress ) * 100 ) // ( size ) ) ) + "%" ; <END_BUG> } public static class PendingFileSerializer implements ICompactSerializer < PendingFile > { public void serialize ( PendingFile sc , DataOutputStream dos , int version ) throws IOException { } public PendingFile deserialize ( DataInputStream dis , int version ) throws IOException { } } }

Fix:
return ( ( ( ( ( ( ( ( ( getFilename ( ) ) + "<seq2seq4repair_space>sections=" ) + ( sections . size ( ) ) ) + "<seq2seq4repair_space>progress=" ) + ( progress ) ) + "//" ) + ( size ) ) + "<seq2seq4repair_space>-<seq2seq4repair_space>" ) + ( ( ( progress ) * 100 ) // ( size ) ) ) + "%" ;
Buggy code:
public final class FilterBasedTriggeringPolicy implements TriggeringPolicy { private Filter headFilter ; private Filter tailFilter ; public FilterBasedTriggeringPolicy ( ) { } public boolean isTriggeringEvent ( final Appender appender , final LoggingEvent event , final String file , final long fileLength ) { } <START_BUG> public void addFilter ( Filter newFilter ) { <END_BUG> if ( ( headFilter ) == null ) { headFilter = newFilter ; tailFilter = newFilter ; } else { tailFilter . setNext ( newFilter ) ; tailFilter = newFilter ; } } public void clearFilters ( ) { } public Filter getFilter ( ) { } public void activateOptions ( ) { } }

Fix:
public void addFilter ( final Filter newFilter ) {
Buggy code:
public abstract class AbstractStringXEnumSet < E extends AbstractXEnumBase < E > > extends AbstractCollection < E > implements Serializable , Set < E > { private static final long serialVersionUID = 34398390989170000L + 98 ; private String bitmap ; private transient boolean _is$Frozen = false ; public final boolean is$Frozen ( ) { } protected final void verify$Not$Frozen ( ) { } public void freeze ( ) { } protected abstract int getMaxOrdinal ( ) { } public AbstractStringXEnumSet ( ) { } public AbstractStringXEnumSet ( String bitmap ) { } public String getBitmap ( ) { } public static String bitmapOf ( TokenizableEnum [ ] arg ) { } @ Override public int size ( ) { } @ Override public boolean isEmpty ( ) { } @ Override public boolean contains ( Object o ) { } protected boolean contains ( String token ) { } protected void add ( String token ) { } @ Override public boolean add ( E e ) { } public boolean addEnum ( TokenizableEnum e ) { } @ Override public boolean remove ( Object o ) { } @ Override public void clear ( ) { } @ Override public int hashCode ( ) { } @ Override public boolean equals ( Object o ) { } protected static class SetOfXEnumsIterator < E extends AbstractXEnumBase < E > > implements Iterator < E > { private final XEnumFactory < E > myFactory ; private final String bitmap ; private int index = 0 ; public SetOfXEnumsIterator ( String bitmap , XEnumFactory < E > myFactory ) { } @ Override public boolean hasNext ( ) { <START_BUG> return ( bitmap . length ( ) ) <= ( index ) ; <END_BUG> } @ Override public E next ( ) { } @ Override public void remove ( ) { } } }

Fix:
return ( index ) < ( bitmap . length ( ) ) ;
Buggy code:
public final class SimpleSessionStore extends BaseInterceptor { int manager_note ; int maxActiveSessions = - 1 ; int size = 16 ; int max = 256 ; public SimpleSessionStore ( ) { } public void setMaxActiveSessions ( int count ) { } public void setInitialPool ( int initial ) { } public void setMaxPool ( int max ) { } public void engineInit ( ContextManager cm ) throws TomcatException { } public void reload ( Request req , Context ctx ) throws TomcatException { } public ServerSession findSession ( Request request , String sessionId , boolean create ) { } public void contextInit ( Context ctx ) throws TomcatException { } public void contextShutdown ( Context ctx ) throws TomcatException { } public int sessionState ( Request req , ServerSession session , int state ) { } public Enumeration getSessionIds ( Context ctx ) { } public Enumeration getSessions ( Context ctx ) { } public int getSessionCount ( Context ctx ) { } public int getRecycledCount ( Context ctx ) { } public ServerSession findSession ( Context ctx , String sessionId ) { } private SimpleSessionStore . SimpleSessionManager getManager ( Context ctx ) { } public static class SimpleSessionManager { private int debug = 0 ; private BaseInterceptor mod ; protected SimplePool recycled = new SimplePool ( ) ; protected Hashtable sessions = new Hashtable ( ) ; public SimpleSessionManager ( ) { } public void setDebug ( int l ) { } public void setModule ( BaseInterceptor bi ) { } public Enumeration getSessionIds ( ) { } public Enumeration getSessions ( ) { } public int getSessionCount ( ) { } public int getRecycledCount ( ) { } public ServerSession findSession ( String id ) { } public void removeSession ( ServerSession session ) { } public ServerSession getNewSession ( Request req , Context ctx ) { ServerSession session = ( ( ServerSession ) ( recycled . get ( ) ) ) ; if ( session == null ) { <START_BUG> session = new ServerSession ( ) ; <END_BUG> session . setManager ( this ) ; } session . setContext ( ctx ) ; session . setState ( STATE_NEW , req ) ; String newId = session . getId ( ) . toString ( ) ; newId = ( newId == null ) ? "null" : newId ; ServerSession oldS = findSession ( newId ) ; if ( oldS != null ) { oldS . setState ( STATE_EXPIRED ) ; } sessions . put ( newId , session ) ; return session ; } } }

Fix:
session = ctx . getContextManager ( ) . createServerSession ( ) ;
Buggy code:
public class ServletInvocableHandlerMethod extends InvocableHandlerMethod { private HttpStatus responseStatus ; private String responseReason ; private HandlerMethodReturnValueHandlerComposite returnValueHandlers ; public void setHandlerMethodReturnValueHandlers ( HandlerMethodReturnValueHandlerComposite returnValueHandlers ) { } public ServletInvocableHandlerMethod ( Object handler , Method method ) { } public final void invokeAndHandle ( NativeWebRequest request , ModelAndViewContainer mavContainer , Object ... providedArgs ) throws Exception { Object returnValue = invokeForRequest ( request , mavContainer , providedArgs ) ; setResponseStatus ( ( ( ServletWebRequest ) ( request ) ) ) ; if ( returnValue == null ) { if ( ( ( isRequestNotModified ( request ) ) || ( hasResponseStatus ( ) ) ) || ( mavContainer . isRequestHandled ( ) ) ) { mavContainer . setRequestHandled ( true ) ; return ; } } mavContainer . setRequestHandled ( false ) ; try { <START_BUG> returnValueHandlers . handleReturnValue ( returnValue , getReturnType ( ) , mavContainer , request ) ; <END_BUG> } catch ( Exception ex ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( getReturnValueHandlingErrorMessage ( "Error<seq2seq4repair_space>handling<seq2seq4repair_space>return<seq2seq4repair_space>value" , returnValue ) , ex ) ; } throw ex ; } } private String getReturnValueHandlingErrorMessage ( String message , Object returnValue ) { } private void setResponseStatus ( ServletWebRequest webRequest ) throws IOException { } private boolean isRequestNotModified ( NativeWebRequest request ) { } private boolean hasResponseStatus ( ) { } }

Fix:
returnValueHandlers . handleReturnValue ( returnValue , getReturnValueType ( returnValue ) , mavContainer , request ) ;
Buggy code:
public class JdrZipFile { ZipOutputStream zos ; String jbossHome ; JdrEnvironment env ; String name ; String baseName ; public JdrZipFile ( JdrEnvironment env ) throws Exception { } public String name ( ) { } public void add ( InputStream is , String path ) { } public void add ( VirtualFile file , InputStream is ) throws Exception { <START_BUG> String name = "JBOSS_HOME" + ( file . getPathName ( ) . substring ( this . jbossHome . length ( ) ) ) ; <END_BUG> this . add ( is , name ) ; } public void add ( String content , String path ) throws Exception { } public void addLog ( String content , String logName ) throws Exception { } public void close ( ) throws Exception { } }

Fix:
String name = "JBOSS_HOME" + ( file . getPhysicalFile ( ) . getAbsolutePath ( ) . substring ( this . jbossHome . length ( ) ) ) ;
Buggy code:
public abstract class ScriptRunnerBase { private boolean keepEngine = false ; private String language ; private String script = "" ; private Project project ; private ClassLoader scriptLoader ; private Map beans = new HashMap ( ) ; public void addBeans ( Map dictionary ) { } public void addBean ( String key , Object bean ) { } protected Map getBeans ( ) { } public abstract void executeScript ( String execName ) { } public abstract Object evaluateScript ( String execName ) { } public abstract boolean supportsLanguage ( ) { } public abstract String getManagerName ( ) { } public void setLanguage ( String language ) { } public String getLanguage ( ) { } public void setScriptClassLoader ( ClassLoader classLoader ) { } protected ClassLoader getScriptClassLoader ( ) { } public void setKeepEngine ( boolean keepEngine ) { } public boolean getKeepEngine ( ) { } public void setSrc ( File file ) { } private void readSource ( Reader reader , String name ) { BufferedReader in = null ; try { in = new BufferedReader ( reader ) ; <START_BUG> script += FileUtils . readFully ( in ) ; <END_BUG> } catch ( IOException ex ) { throw new BuildException ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>read<seq2seq4repair_space>" + name ) , ex ) ; } finally { FileUtils . close ( in ) ; } } public void loadResource ( Resource sourceResource ) { } public void loadResources ( ResourceCollection collection ) { } public void addText ( String text ) { } public String getScript ( ) { } public void clearScript ( ) { } public void setProject ( Project project ) { } public Project getProject ( ) { } public void bindToComponent ( ProjectComponent component ) { } public void bindToComponentMinimum ( ProjectComponent component ) { } protected void checkLanguage ( ) { } protected ClassLoader replaceContextLoader ( ) { } protected void restoreContextLoader ( ClassLoader origLoader ) { } }

Fix:
script += FileUtils . safeReadFully ( in ) ;
Buggy code:
public class TrackSummary extends Fragment { private GoogleMap mMap ; private JSONObject jsonObj ; private ArrayList < LatLng > arrLatLng ; private Button buttonSave ; private Button buttonDetails ; private boolean isSaved ; private boolean correctTrack ; private StatisticsCalculator calc ; public TrackSummary ( ) { } public View onCreateView ( LayoutInflater inflater , ViewGroup container , Bundle savedInstanceState ) { container . removeAllViews ( ) ; View rootView = inflater . inflate ( fragment_track_summary , container , false ) ; setUpMapIfNeeded ( ) ; arrLatLng = new ArrayList ( ) ; buttonSave = ( ( Button ) ( rootView . findViewById ( btn_save ) ) ) ; isSaved = getArguments ( ) . getBoolean ( "isSaved" ) ; buttonSave . setEnabled ( ( ! ( isSaved ) ) ) ; buttonDetails = ( ( Button ) ( rootView . findViewById ( btn_details ) ) ) ; correctTrack = false ; try { jsonObj = new JSONObject ( getArguments ( ) . getString ( "json" ) ) ; parse ( ) ; drawRoute ( ) ; } catch ( JSONException e ) { e . printStackTrace ( ) ; } buttonSave . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( correctTrack ) { calc = new StatisticsCalculator ( jsonObj ) ; <START_BUG> new SaveTrack ( getActivity ( ) . getApplicationContext ( ) ) . execute ( "44" , "tour<seq2seq4repair_space>de<seq2seq4repair_space>Frącz" , jsonObj . toString ( ) , String . valueOf ( calc . getDistance ( ) ) , String . valueOf ( calc . getTravelTime ( ) ) , String . valueOf ( calc . avarageSpeed ( ) ) ) ; <END_BUG> Toast . makeText ( getActivity ( ) . getApplicationContext ( ) , "Zapisano<seq2seq4repair_space>w<seq2seq4repair_space>bazie" , LENGTH_LONG ) . show ( ) ; } else Toast . makeText ( getActivity ( ) . getApplicationContext ( ) , "Nie<seq2seq4repair_space>zarejestrowano<seq2seq4repair_space>trasy" , LENGTH_LONG ) . show ( ) ; isSaved = true ; buttonSave . setEnabled ( ( ! ( isSaved ) ) ) ; } } ) ; buttonDetails . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { if ( correctTrack ) { TrackDetails detFragment = new TrackDetails ( ) ; FragmentTransaction transaction = getChildFragmentManager ( ) . beginTransaction ( ) ; Bundle b = new Bundle ( ) ; b . putString ( "json" , jsonObj . toString ( ) ) ; b . putBoolean ( "isSaved" , isSaved ) ; detFragment . setArguments ( b ) ; transaction . replace ( summary_container , detFragment ) ; transaction . commit ( ) ; } } } ) ; return rootView ; } public void onResume ( ) { } public void onPause ( ) { } private void setUpMapIfNeeded ( ) { } private void setUpMap ( ) { } private void parse ( ) throws JSONException { } private void drawRoute ( ) { } No newline ; at end ; of file ; }

Fix:
new SaveTrack ( getActivity ( ) . getApplicationContext ( ) ) . execute ( "44" , "tour<seq2seq4repair_space>de<seq2seq4repair_space>Frącz" , jsonObj . toString ( ) , String . valueOf ( calc . getDistance ( ) ) , String . valueOf ( calc . getTravelTime ( ) ) , String . valueOf ( calc . getAvarageSpeed ( ) ) ) ;
Buggy code:
public final class dns { private static Resolver res ; private static Map caches ; private static Name [ ] searchPath ; private static boolean searchPathSet ; private static boolean initialized ; private dns ( ) { } private static synchronized void clearCaches ( ) { } private static synchronized void initialize ( ) { } static boolean matchType ( short type1 , short type2 ) { } public static String inaddrString ( InetAddress addr ) { } public static String inaddrString ( String s ) { } public static synchronized void setResolver ( Resolver res ) { } public static synchronized Resolver getResolver ( ) { } public static synchronized void setSearchPath ( String [ ] domains ) { } public static synchronized Cache getCache ( short dclass ) { } public static synchronized Cache getCache ( ) { } private static Record [ ] lookup ( Name name , short type , short dclass , byte cred , int iterations , boolean querysent ) { } private static Record [ ] lookupAppend ( Name name , Name suffix , short type , short dclass , byte cred , int iterations , boolean querysent ) { } public static Record [ ] getRecords ( String namestr , short type , short dclass , byte cred ) { Record [ ] answers = null ; Name name ; try { name = Name . fromString ( namestr , null ) ; } catch ( TextParseException e ) { return null ; } if ( ( ! ( Type . isRR ( type ) ) ) && ( type != ( Type . ANY ) ) ) return null ; <START_BUG> if ( name . isQualified ( ) ) <END_BUG> answers = dns . lookup ( name , type , dclass , cred , 0 , false ) ; else if ( ( dns . searchPath ) == null ) { answers = dns . lookupAppend ( name , root , type , dclass , cred , 0 , false ) ; } else { answers = null ; if ( ( name . labels ( ) ) > 1 ) answers = dns . lookupAppend ( name , root , type , dclass , cred , 0 , false ) ; for ( int i = 0 ; ( answers == null ) && ( i < ( dns . searchPath . length ) ) ; i ++ ) answers = dns . lookupAppend ( name , dns . searchPath [ i ] , type , dclass , cred , 0 , false ) ; if ( ( answers == null ) && ( ( name . labels ( ) ) <= 1 ) ) answers = dns . lookupAppend ( name , root , type , dclass , cred , 0 , false ) ; } return answers ; } public static Record [ ] getRecords ( String namestr , short type , short dclass ) { } public static Record [ ] getAnyRecords ( String namestr , short type , short dclass ) { } public static Record [ ] getRecords ( String name , short type ) { } public static Record [ ] getAnyRecords ( String name , short type ) { } public static Record [ ] getRecordsByAddress ( String addr , short type ) { } public static Record [ ] getAnyRecordsByAddress ( String addr , short type ) { } }

Fix:
if ( name . isAbsolute ( ) )
Buggy code:
public class StructureModelRegressionTest extends AjdeTestCase { public StructureModelRegressionTest ( String name ) { } public static void main ( String [ ] args ) { } public static TestSuite suite ( ) { } public void test ( ) { <START_BUG> String testLstFile = "testdata//StructureModelRegressionTest//example.lst" ; <END_BUG> File f = new File ( testLstFile ) ; assertTrue ( testLstFile , f . canRead ( ) ) ; } public boolean verifyAgainstSavedModel ( String lstFile ) { } private boolean IProgramElementsEqual ( IProgramElement s1 , IProgramElement s2 ) { } private IHierarchy getModelForFile ( String lstFile ) { } protected void setUp ( ) throws Exception { } public void testModelExists ( ) { } protected void tearDown ( ) throws Exception { } }

Fix:
String testLstFile = ( AjdeTests . TESTDATA_PATH ) + "//StructureModelRegressionTest//example.lst" ;
Buggy code:
public class MovementToLinksConverter implements Converter , Incrementable , MovementTrace . Handler { private double r2 ; private long max_interval ; private Map < Integer , Movement > invalid_movements = new HashMap < Integer , Movement > ( ) ; private Map < Integer , Movement > valid_movements = new HashMap < Integer , Movement > ( ) ; private StatefulWriter < LinkEvent , Link > links_writer ; private StatefulReader < MovementEvent , Movement > movement_reader ; private MovementTrace _movement ; private LinkTrace _links ; private long cur_time ; public MovementToLinksConverter ( LinkTrace links , MovementTrace movement , double range , long maxInterval ) { } @ Override public Listener < Movement > movementListener ( ) { } private void setInitialState ( long time ) throws IOException { Set < Link > initLinks = new HashSet < Link > ( ) ; Iterator < Movement > i = invalid_movements . values ( ) . iterator ( ) ; while ( i . hasNext ( ) ) { Movement im = i . next ( ) ; for ( Movement vm : valid_movements . values ( ) ) { long [ ] meetings = im . meetingTimes ( vm , r2 ) ; if ( meetings != null ) { long begin = meetings [ 0 ] ; long end = meetings [ 1 ] ; Link l = new Link ( im . id ( ) , vm . id ( ) ) ; if ( begin < time ) { if ( time <= end ) { initLinks . add ( l ) ; if ( ( end - time ) < ( max_interval ) ) links_writer . queue ( end , new LinkEvent ( l , LinkEvent . DOWN ) ) ; } } else { if ( ( begin - time ) < ( max_interval ) ) { links_writer . queue ( begin , new LinkEvent ( l , LinkEvent . UP ) ) ; if ( ( end - time ) < ( max_interval ) ) { <START_BUG> links_writer . queue ( begin , new LinkEvent ( l , LinkEvent . DOWN ) ) ; <END_BUG> } } } } } i . remove ( ) ; valid_movements . put ( im . id ( ) , im ) ; } links_writer . setInitState ( time , initLinks ) ; } @ Override public Listener < MovementEvent > movementEventListener ( ) { } private void updateNextMeetings ( long time ) { } private void invalidNodeMeetings ( final long time , final Integer i ) { } @ Override public void incr ( long dt ) throws IOException { } @ Override public void seek ( long time ) throws IOException { } @ Override public void convert ( ) throws IOException { } }

Fix:
links_writer . queue ( end , new LinkEvent ( l , LinkEvent . DOWN ) ) ;
Buggy code:
public class CounterClientScreenModule implements ClientScreenModule { private String line = "" ; private int color = 16777215 ; private int cntcolor = 16777215 ; protected int dim = 0 ; private FormatStyle format = FormatStyle . MODE_FULL ; protected Coordinate coordinate = Coordinate . INVALID ; @ Override public TransformMode getTransformMode ( ) { } @ Override public int getHeight ( ) { } @ Override public void render ( FontRenderer fontRenderer , int currenty , Object [ ] screenData , float factor ) { GL11 . glDisable ( GL_LIGHTING ) ; int xoffset ; if ( ! ( line . isEmpty ( ) ) ) { fontRenderer . drawString ( line , 7 , currenty , color ) ; xoffset = 7 + 40 ; } else { xoffset = 7 ; } if ( coordinate . isValid ( ) ) { int counter ; <START_BUG> if ( ( screenData != null ) && ( ( screenData . length ) > 0 ) ) { <END_BUG> counter = ( ( Integer ) ( screenData [ 0 ] ) ) ; } else { counter = 0 ; } fontRenderer . drawString ( ClientScreenModuleHelper . format ( String . valueOf ( counter ) , format ) , xoffset , currenty , cntcolor ) ; } else { fontRenderer . drawString ( "<invalid>" , xoffset , currenty , 16711680 ) ; } } @ Override public void mouseClick ( World world , int x , int y , boolean clicked ) { } @ Override public Panel createGui ( Minecraft mc , Gui gui , final NBTTagCompound currentData , final ModuleGuiChanged moduleGuiChanged ) { } @ Override public void setupFromNBT ( NBTTagCompound tagCompound , int dim , int x , int y , int z ) { } protected void setupCoordinateFromNBT ( NBTTagCompound tagCompound , int dim , int x , int y , int z ) { } @ Override public boolean needsServerData ( ) { } }

Fix:
if ( ( ( screenData != null ) && ( ( screenData . length ) > 0 ) ) && ( ( screenData [ 0 ] ) instanceof Integer ) ) {
Buggy code:
public class SingleTypeReference extends TypeReference { public char [ ] token ; public SingleTypeReference ( char [ ] source , long pos ) { } public TypeReference copyDims ( int dim ) { } public char [ ] getLastToken ( ) { } protected TypeBinding getTypeBinding ( Scope scope ) { } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public TypeBinding resolveTypeEnclosing ( BlockScope scope , ReferenceBinding enclosingType ) { TypeBinding memberType = this . resolvedType = scope . getMemberType ( this . token , enclosingType ) ; boolean hasError = false ; if ( ! ( memberType . isValidBinding ( ) ) ) { hasError = true ; scope . problemReporter ( ) . invalidEnclosingType ( this , memberType , enclosingType ) ; memberType = ( ( ReferenceBinding ) ( memberType ) ) . closestMatch ( ) ; if ( memberType == null ) { return null ; } } if ( isTypeUseDeprecated ( memberType , scope ) ) <START_BUG> scope . problemReporter ( ) . deprecatedType ( memberType , this ) ; <END_BUG> memberType = scope . environment ( ) . convertToRawType ( memberType , false ) ; if ( ( ( memberType . isRawType ( ) ) && ( ( ( this . bits ) & ( ASTNode . IgnoreRawTypeCheck ) ) == 0 ) ) && ( ( scope . compilerOptions ( ) . getSeverity ( CompilerOptions . RawTypeReference ) ) != ( ProblemSeverities . Ignore ) ) ) { scope . problemReporter ( ) . rawTypeReference ( this , memberType ) ; } if ( hasError ) { return memberType ; } return this . resolvedType = memberType ; } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
reportDeprecatedType ( memberType , scope ) ;
Buggy code:
public class DiagramInterface { Editor _currentEditor = null ; Vector _modifiedDiagrams = new Vector ( ) ; public DiagramInterface ( Editor editor ) { } Editor getEditor ( ) { } void markDiagramAsModified ( Object diagram ) { } Vector getModifiedDiagrams ( ) { } void resetModifiedDiagrams ( ) { } public void addPackage ( MPackage newPackage ) { } public boolean isInDiagram ( MPackage p ) { } private String getDiagramName ( String packageName ) { } private String getDiagramName ( MPackage p ) { } public void selectClassDiagram ( MPackage p , String name ) { } public void addClassDiagram ( MPackage target , String name ) { Project p = TheInstance . getProject ( ) ; MNamespace ns = ( ( MNamespace ) ( target ) ) ; try { <START_BUG> Diagram d = new UMLClassDiagram ( ns ) ; <END_BUG> d . setName ( getDiagramName ( name ) ) ; p . addMember ( d ) ; TheInstance . getNavPane ( ) . addToHistory ( d ) ; TheInstance . setTarget ( d ) ; markDiagramAsModified ( d ) ; } catch ( PropertyVetoException pve ) { } } public void addClass ( MClass newClass ) { } public void addInterface ( MInterface newInterface ) { } }

Fix:
ArgoDiagram d = new UMLClassDiagram ( ns ) ;
Buggy code:
public class AnalysisTestPanel extends JPanel implements OutputSink < Passthrough < ImageWithCorners , AnimalPosition > > { private final ConfigData config ; private final Analysis analysis ; private double probability = 0.5 ; private ImageWithCorners image ; public AnalysisTestPanel ( ConfigData config , Analysis analysis ) { } @ Override protected void paintComponent ( Graphics g ) { super . paintComponent ( g ) ; Graphics2D g2 = ( ( Graphics2D ) ( g ) ) ; if ( ( image ) != null ) { g . drawImage ( image . toAwtImage ( ) , 0 , 0 , getWidth ( ) , getHeight ( ) , null ) ; } Corners corners = ( ( image ) == null ) ? new Corners ( ) : image . getCorners ( ) ; g2 . drawString ( String . format ( "Probability:<seq2seq4repair_space>%.2f" , probability ) , 10 , 15 ) ; for ( Zone zone : config . getZones ( ) ) { Box scaled = zone . area . scale ( getWidth ( ) , getHeight ( ) ) ; Rectangle2D . Double rect = new Rectangle2D . Double ( ( ( int ) ( scaled . getLeft ( ) ) ) , ( ( int ) ( scaled . getTop ( ) ) ) , ( ( int ) ( scaled . getWidth ( ) ) ) , ( ( int ) ( scaled . getHeight ( ) ) ) ) ; Point tl = corners . getInverseTransform ( zone . area . getTopLeft ( ) ) ; Point tr = corners . getInverseTransform ( zone . area . getTopRight ( ) ) ; Point bl = corners . getInverseTransform ( zone . area . getBottomLeft ( ) ) ; Point br = corners . getInverseTransform ( zone . area . getBottomRight ( ) ) ; Polygon shape = new Polygon ( new int [ ] { ( ( int ) ( ( tl . x ) * ( getWidth ( ) ) ) ) , ( ( int ) ( ( tr . x ) * ( getWidth ( ) ) ) ) , ( ( int ) ( ( br . x ) * ( getWidth ( ) ) ) ) , ( ( int ) ( ( bl . x ) * ( getWidth ( ) ) ) ) } , new int [ ] { ( ( int ) ( ( tl . y ) * ( getHeight ( ) ) ) ) , ( ( int ) ( ( tr . y ) * ( getHeight ( ) ) ) ) , ( ( int ) ( ( br . y ) * ( getHeight ( ) ) ) ) , ( ( int ) ( ( bl . y ) * ( getHeight ( ) ) ) ) } , 4 ) ; g2 . setColor ( new Color ( 100 , 100 , 100 , 100 ) ) ; g2 . fill ( shape ) ; } List < PositionDataFrame > path = analysis . getPath ( ) ; Point lastPoint = null ; for ( PositionDataFrame data : path ) { Point location = corners . getInverseTransform ( data . getLocation ( ) ) ; int xNew = ( ( int ) ( ( location . x ) * ( getWidth ( ) ) ) ) ; int yNew = ( ( int ) ( ( location . y ) * ( getHeight ( ) ) ) ) ; if ( lastPoint != null ) { int xOld = ( ( int ) ( ( lastPoint . x ) * ( getWidth ( ) ) ) ) ; int yOld = ( ( int ) ( ( lastPoint . y ) * ( getHeight ( ) ) ) ) ; g2 . setColor ( Color . RED ) ; g2 . drawLine ( xOld , yOld , xNew , yNew ) ; } Ellipse2D . Double plotted = new Ellipse2D . Double ( ( xNew - 2 ) , ( yNew - 2 ) , 4 , 4 ) ; <START_BUG> if ( ! ( data . getZoneId ( ) . equals ( "N//A" ) ) ) <END_BUG> g2 . setColor ( Color . BLUE ) ; g2 . draw ( plotted ) ; g2 . fill ( plotted ) ; lastPoint = location ; } } @ Override public void onDataAvailable ( Passthrough < ImageWithCorners , AnimalPosition > data ) { } @ Override public void close ( ) throws IOException { } }

Fix:
if ( ( data . getZone ( ) ) != null )
Buggy code:
public class ApplianceAdder { private ArrayList < PowerMeasure > data = new ArrayList < PowerMeasure > ( ) ; private int nextData = 0 ; private Sequence < RHAILabel > sequence ; private String name = Calendar . getInstance ( ) . getTime ( ) . toString ( ) . trim ( ) ; public void addAppliance ( String appliance , File sourceFile , File applianceIcon ) throws Exception { } private int computeToBeAbstracted ( ) { } private void doAddAppliance ( String appliance ) throws IOException { File dir = new File ( ( ( ( ( SettingsKeeper . getSettings ( ) . getRHAIroot ( ) ) + "//" ) + "data//lib//" ) + appliance ) ) ; if ( ( ! ( dir . exists ( ) ) ) || ( ! ( dir . isDirectory ( ) ) ) ) { dir . mkdirs ( ) ; } <START_BUG> BufferedWriter writer = new BufferedWriter ( new FileWriter ( new File ( ( ( ( ( ( ( ( SettingsKeeper . getSettings ( ) . getRHAIroot ( ) ) + "//" ) + "data//lib//" ) + ( dir . getName ( ) ) ) + "//" ) + ( name ) ) + ".dat" ) ) ) ) ; <END_BUG> writer . write ( sequence . toString ( ) ) ; writer . close ( ) ; } private void loadData ( File file ) throws IOException { } public void addAppliance ( String name , String name2 , File dataFile , File object ) throws Exception { } }

Fix:
BufferedWriter writer = new BufferedWriter ( new FileWriter ( new File ( ( ( ( ( ( ( ( SettingsKeeper . getSettings ( ) . getRHAIroot ( ) ) + "//" ) + "data//lib//" ) + ( dir . getName ( ) ) ) + "//" ) + ( name ) ) + ".lib" ) ) ) ) ;
Buggy code:
public class QRDecompositionImpl implements QRDecomposition { private static final long serialVersionUID = - 5179446891802932307L ; private double [ ] [ ] qrt ; private double [ ] rDiag ; private RealMatrix cachedQ ; private RealMatrix cachedQT ; private RealMatrix cachedR ; private RealMatrix cachedH ; public QRDecompositionImpl ( ) { } public QRDecompositionImpl ( RealMatrix matrix ) { } public void decompose ( RealMatrix matrix ) { } public RealMatrix getR ( ) throws IllegalStateException { } public RealMatrix getQ ( ) throws IllegalStateException { } public RealMatrix getQT ( ) throws IllegalStateException { <START_BUG> if ( ( cachedQ ) == null ) { <END_BUG> checkDecomposed ( ) ; final int n = qrt . length ; final int m = qrt [ 0 ] . length ; double [ ] [ ] qT = new double [ m ] [ m ] ; for ( int minor = m - 1 ; minor >= ( Math . min ( m , n ) ) ; minor -- ) { qT [ minor ] [ minor ] = 1 ; } for ( int minor = ( Math . min ( m , n ) ) - 1 ; minor >= 0 ; minor -- ) { final double [ ] qrtMinor = qrt [ minor ] ; qT [ minor ] [ minor ] = 1 ; if ( ( qrtMinor [ minor ] ) != 0.0 ) { for ( int col = minor ; col < m ; col ++ ) { final double [ ] qTCol = qT [ col ] ; double alpha = 0 ; for ( int row = minor ; row < m ; row ++ ) { alpha -= ( qTCol [ row ] ) * ( qrtMinor [ row ] ) ; } alpha //= ( rDiag [ minor ] ) * ( qrtMinor [ minor ] ) ; for ( int row = minor ; row < m ; row ++ ) { qTCol [ row ] -= alpha * ( qrtMinor [ row ] ) ; } } } } cachedQT = new RealMatrixImpl ( qT , false ) ; } return cachedQT ; } public RealMatrix getH ( ) throws IllegalStateException { } public boolean isNonSingular ( ) throws IllegalStateException { } public double [ ] solve ( double [ ] b ) throws IllegalArgumentException , IllegalStateException , InvalidMatrixException { } public RealVector solve ( RealVector b ) throws IllegalArgumentException , IllegalStateException , InvalidMatrixException { } public RealVectorImpl solve ( RealVectorImpl b ) throws IllegalArgumentException , IllegalStateException , InvalidMatrixException { } public RealMatrix solve ( RealMatrix b ) throws IllegalArgumentException , IllegalStateException , InvalidMatrixException { } public RealMatrix getInverse ( ) throws IllegalStateException , InvalidMatrixException { } private void checkDecomposed ( ) throws IllegalStateException { } }

Fix:
if ( ( cachedQT ) == null ) {
Buggy code:
public abstract class CreateTypeMemberOperation extends CreateElementInCUOperation { protected String source = null ; protected String alteredName ; protected ASTNode createdNode ; public CreateTypeMemberOperation ( IJavaElement parentElement , String source , boolean force ) { } protected StructuralPropertyDescriptor getChildPropertyDescriptor ( ASTNode parent ) { } protected ASTNode generateElementAST ( ASTRewrite rewriter , IDocument document , ICompilationUnit cu ) throws JavaModelException { } private String removeIndentAndNewLines ( String code , IDocument document , ICompilationUnit cu ) { IJavaProject project = cu . getJavaProject ( ) ; Map options = project . getOptions ( true ) ; int tabWidth ; try { <START_BUG> tabWidth = Integer . parseInt ( ( ( String ) ( options . get ( DefaultCodeFormatterConstants . FORMATTER_TAB_SIZE ) ) ) ) ; <END_BUG> } catch ( NumberFormatException e ) { tabWidth = 4 ; } int indent = Indents . computeIndent ( code , tabWidth ) ; int firstNonWhiteSpace = - 1 ; int length = code . length ( ) ; while ( firstNonWhiteSpace < ( length - 1 ) ) if ( ! ( Character . isWhitespace ( code . charAt ( ( ++ firstNonWhiteSpace ) ) ) ) ) break ; int lastNonWhiteSpace = length ; while ( lastNonWhiteSpace > 0 ) if ( ! ( Character . isWhitespace ( code . charAt ( ( -- lastNonWhiteSpace ) ) ) ) ) break ; String lineDelimiter = TextUtilities . getDefaultLineDelimiter ( document ) ; return Indents . changeIndent ( code . substring ( firstNonWhiteSpace , ( lastNonWhiteSpace + 1 ) ) , indent , tabWidth , "" , lineDelimiter ) ; } protected abstract SimpleName rename ( ASTNode node , SimpleName newName ) { } protected String generateSyntaxIncorrectAST ( ) { } protected IType getType ( ) { } protected void setAlteredName ( String newName ) { } public IJavaModelStatus verify ( ) { } protected IJavaModelStatus verifyNameCollision ( ) { } }

Fix:
tabWidth = Integer . parseInt ( ( ( String ) ( options . get ( DefaultCodeFormatterConstants . FORMATTER_INDENTATION_SIZE ) ) ) ) ;
Buggy code:
public class Generator { static final Logger LOGGER = LoggerFactory . getLogger ( Generator . class ) ; public static final char ID_DELIMITER = '//' ; public static final char INDEX_DELIMITER = '_' ; public void start ( int univNum , int startIndex , int seed , WriterType writerType , String ontology , String workDir , boolean compress , int threads ) { File outputDir = ( workDir != null ) ? new File ( workDir ) : new File ( "." ) ; outputDir = outputDir . getAbsoluteFile ( ) ; <START_BUG> if ( ! ( outputDir . exists ( ) ) ) { <END_BUG> if ( ! ( outputDir . mkdirs ( ) ) ) { throw new IllegalArgumentException ( String . format ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>create<seq2seq4repair_space>requested<seq2seq4repair_space>output<seq2seq4repair_space>directory<seq2seq4repair_space>%s" , outputDir ) ) ; } } GlobalState state = new GlobalState ( univNum , seed , startIndex , ontology , writerType , outputDir , compress , threads ) ; System . out . println ( "Started..." ) ; List < UniversityState > states = new ArrayList < > ( ) ; for ( int i = 0 ; i < ( state . getNumberUniversities ( ) ) ; i ++ ) { UniversityState univState = new UniversityState ( state , ( i + ( state . getStartIndex ( ) ) ) ) ; UniversityGenerator univGen = new UniversityGenerator ( univState ) ; state . getExecutor ( ) . submit ( univGen ) ; states . add ( univState ) ; } try { state . getExecutor ( ) . shutdown ( ) ; if ( ! ( state . getExecutor ( ) . awaitTermination ( 3 , TimeUnit . HOURS ) ) ) { throw new RuntimeException ( "Timeout<seq2seq4repair_space>was<seq2seq4repair_space>exceeded" ) ; } } catch ( InterruptedException e ) { throw new RuntimeException ( "A<seq2seq4repair_space>generator<seq2seq4repair_space>thread<seq2seq4repair_space>was<seq2seq4repair_space>interrupted" , e ) ; } for ( UniversityState univState : states ) { if ( ! ( univState . hasCompleted ( ) ) ) { System . err . println ( "Not<seq2seq4repair_space>all<seq2seq4repair_space>university<seq2seq4repair_space>generators<seq2seq4repair_space>finished<seq2seq4repair_space>successfully,<seq2seq4repair_space>see<seq2seq4repair_space>log<seq2seq4repair_space>for<seq2seq4repair_space>details" ) ; System . exit ( 3 ) ; } } System . out . println ( "Completed!" ) ; } No newline ; at end ; of file ; }

Fix:
if ( ( ! ( outputDir . exists ( ) ) ) || ( ! ( outputDir . isDirectory ( ) ) ) ) {
Buggy code:
public class TypeInfoUtil { public static String getTypeInfo ( Project project ) { } private static VisualPosition correctFor0BasedVS1Based ( VisualPosition pos0Based ) { if ( pos0Based == null ) { return null ; } <START_BUG> return new VisualPosition ( ( ( pos0Based . line ) + 1 ) , pos0Based . column ) ; <END_BUG> } }

Fix:
return new VisualPosition ( ( ( pos0Based . line ) + 1 ) , ( ( pos0Based . column ) + 1 ) ) ;
Buggy code:
public class FileModel extends AbstractTableModel { private List < FileEvent > filecolumn ; private List < Boolean > selection ; private HashSet < FileEvent > deleteList ; private String [ ] headers = new String [ ] { "id" , "File" , "Selected" } ; private Interactor buttonInteractor ; private Class [ ] classes = new Class [ ] { int . class , String . class , Boolean . class } ; public FileModel ( ) { } public void setInteractor ( Interactor interactor ) { <START_BUG> this . buttonInteractor = buttonInteractor ; <END_BUG> } @ Override public String getColumnName ( int column ) { } @ Override public int getColumnCount ( ) { } @ Override public int getRowCount ( ) { } @ Override public Class < ? > getColumnClass ( int columnIndex ) { } @ Override public Object getValueAt ( int row , int column ) { } @ Override public void fireTableCellUpdated ( int row , int column ) { } @ Override public void setValueAt ( Object aValue , int rowIndex , int columnIndex ) { } @ Override public boolean isCellEditable ( int rowIndex , int columnIndex ) { } public void addData ( FileEvent fileEvent ) { } }

Fix:
this . buttonInteractor = interactor ;