nus-yam/ex-repair huggingface dataset:
Buggy code:
public class ErrorNotificationManager { private static final String ERROR_JOB = "errorstate.gif" ; static final String ERROR_JOB_KEY = "ERROR_JOB" ; private Collection errors = Collections . synchronizedSet ( new HashSet ( ) ) ; private JobErrorDialog dialog ; public ErrorNotificationManager ( ) { } void setUpImages ( URL iconsRoot ) throws MalformedURLException { } void addError ( IStatus status , Job job ) { } private void showError ( final ErrorInfo errorInfo ) { } Collection getErrors ( ) { } private IStatus openErrorDialog ( String title , String msg , final ErrorInfo errorInfo ) { IWorkbench workbench = PlatformUI . getWorkbench ( ) ; if ( ( workbench instanceof Workbench ) && ( ( ( Workbench ) ( workbench ) ) . isClosing ( ) ) ) { return Status . CANCEL_STATUS ; } <START_BUG> dialog = new JobErrorDialog ( ProgressManagerUtil . getDefaultParent ( ) , title , msg , errorInfo , ( ( ( ( IStatus . OK ) | ( IStatus . INFO ) ) | ( IStatus . WARNING ) ) | ( IStatus . ERROR ) ) ) ; <END_BUG> dialog . open ( ) ; return Status . OK_STATUS ; } void removeErrors ( Collection errorsToRemove ) { } private void removeFromFinishedJobs ( Collection errorsToRemove ) { } private void clearAllErrors ( ) { } public boolean showErrorFor ( Job job , String title , String msg ) { } private ErrorInfo getMostRecentError ( ) { } private ErrorInfo getErrorInfo ( Job job ) { } public boolean hasErrors ( ) { } public void dialogClosed ( ) { } }

Fix:
dialog = new JobErrorDialog ( ProgressManagerUtil . getNonModalShell ( ) , title , msg , errorInfo , ( ( ( ( IStatus . OK ) | ( IStatus . INFO ) ) | ( IStatus . WARNING ) ) | ( IStatus . ERROR ) ) ) ;
Buggy code:
public abstract class AbstractColumn < T > implements IStyledColumn < T > { private static final long serialVersionUID = 1L ; private IModel < String > displayModel ; private String sortProperty ; public AbstractColumn ( IModel < String > displayModel , String sortProperty ) { } public AbstractColumn ( IModel < String > displayModel ) { } public IModel < String > getDisplayModel ( ) { } public String getSortProperty ( ) { } public boolean isSortable ( ) { <START_BUG> return ( sortProperty ) != null ; <END_BUG> } public Component getHeader ( String componentId ) { } public void detach ( ) { } public String getCssClass ( ) { } }

Fix:
return ( getSortProperty ( ) ) != null ;
Buggy code:
public class RequestAnswerMessage extends Message { private static final long serialVersionUID = - 5244707144483762561L ; private boolean chattable ; private boolean observable ; private Integer timerInt ; private boolean timer ; private boolean answer ; private GameEntity ge ; private static final String REJECTION_MESSAGE = "Your<seq2seq4repair_space>request<seq2seq4repair_space>has<seq2seq4repair_space>been<seq2seq4repair_space>refused" ; public RequestAnswerMessage ( UUID sender , UUID receiver , boolean chattable , boolean observable , boolean answer , boolean timer , Integer timerInt ) { } @ Override public void proceed ( ChannelHandlerContext ctx , ComClientManager comClientManager ) { if ( answer ) { comClientManager . getIClientDataToCom ( ) . initGame ( this . ge ) ; } else { <START_BUG> comClientManager . getIClientDataToCom ( ) . notifyRejection ( this . sender ) ; <END_BUG> } } @ Override public void proceedServer ( ChannelHandlerContext ctx , ComServerManager comServerManager ) { } public boolean isChattable ( ) { } public void setChattable ( boolean chattable ) { } public boolean isObservable ( ) { } public void setObservable ( boolean observable ) { } public boolean isAnswer ( ) { } public void setAnswer ( boolean answer ) { } public Integer getTimer ( ) { } public void setTimer ( Integer timerInt ) { } public void setTimer ( boolean timer ) { } }

Fix:
comClientManager . getIClientDataToCom ( ) . notifyRejection ( this . sender , answer ) ;
Buggy code:
public class UUIDHexSeq implements Seq { private static final UUIDHexSeq _instance = new UUIDHexSeq ( ) ; private String _last = null ; public static UUIDHexSeq getInstance ( ) { } private UUIDHexSeq ( ) { } public void setType ( int type ) { } public synchronized Object next ( StoreContext ctx , ClassMetaData meta ) { <START_BUG> _last = UUIDGenerator . nextHex ( ) ; <END_BUG> return _last ; } public synchronized Object current ( StoreContext ctx , ClassMetaData meta ) { } public void allocate ( int additional , StoreContext ctx , ClassMetaData meta ) { } public void close ( ) { } }

Fix:
_last = UUIDGenerator . nextHex ( TYPE1 ) ;
Buggy code:
public class WLStop extends Task { private String classpath ; private String username ; private String password ; private String serverURL ; private int delay = 0 ; public void execute ( ) throws BuildException { if ( ( ( username ) == null ) || ( ( password ) == null ) ) { throw new BuildException ( "weblogic<seq2seq4repair_space>username<seq2seq4repair_space>and<seq2seq4repair_space>password<seq2seq4repair_space>must<seq2seq4repair_space>both<seq2seq4repair_space>be<seq2seq4repair_space>set" ) ; } if ( ( serverURL ) == null ) { throw new BuildException ( "The<seq2seq4repair_space>url<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>weblogic<seq2seq4repair_space>server<seq2seq4repair_space>must<seq2seq4repair_space>be<seq2seq4repair_space>provided." ) ; } String execClassPath = project . translatePath ( classpath ) ; Java weblogicAdmin = ( ( Java ) ( project . createTask ( "java" ) ) ) ; weblogicAdmin . setFork ( "yes" ) ; weblogicAdmin . setClassname ( "weblogic.Admin" ) ; String args = ( ( ( ( ( ( serverURL ) + "<seq2seq4repair_space>SHUTDOWN<seq2seq4repair_space>" ) + ( username ) ) + "<seq2seq4repair_space>" ) + ( password ) ) + "<seq2seq4repair_space>" ) + ( delay ) ; weblogicAdmin . setArgs ( args ) ; <START_BUG> weblogicAdmin . setClasspath ( execClassPath ) ; <END_BUG> weblogicAdmin . execute ( ) ; } public void setClasspath ( String s ) { } public void setUser ( String s ) { } public void setPassword ( String s ) { } public void setUrl ( String s ) { } public void setDelay ( String s ) { } }

Fix:
weblogicAdmin . setClasspath ( new Path ( execClassPath ) ) ;
Buggy code:
public class ContextJNDISelector implements RepositorySelector { static String JNDI_CONFIGURATION_RESOURCE = "java:comp//env//log4j//configuration-resource" ; static String JNDI_CONFIGURATOR_CLASS = "java:comp//env//log4j//configurator-class" ; private final Map hierMap ; public ContextJNDISelector ( ) { } public LoggerRepository getLoggerRepository ( ) { } public LoggerRepository getLoggerRepository ( String name ) { <START_BUG> if ( JNDI_CONTEXT_NAME . equals ( name ) ) { <END_BUG> return defaultLoggerRepository ; } else { return ( ( LoggerRepository ) ( hierMap . get ( name ) ) ) ; } } public LoggerRepository detachRepository ( String contextName ) { } }

Fix:
if ( DEFAULT_REPOSITORY_NAME . equals ( name ) ) {
Buggy code:
public final class PerspectiveLabelProvider extends LabelProvider implements ITableLabelProvider { private HashMap imageCache = new HashMap ( 5 ) ; private boolean markDefault ; public PerspectiveLabelProvider ( ) { } public PerspectiveLabelProvider ( boolean markDefault ) { } public final Image getImage ( Object element ) { if ( element instanceof IPerspectiveDescriptor ) { IPerspectiveDescriptor desc = ( ( IPerspectiveDescriptor ) ( element ) ) ; ImageDescriptor imageDescriptor = desc . getImageDescriptor ( ) ; if ( imageDescriptor == null ) { <START_BUG> imageDescriptor = WorkbenchImages . getImageDescriptor ( IMG_ETOOL_DEF_PERSPECTIVE_HOVER ) ; <END_BUG> } Image image = ( ( Image ) ( imageCache . get ( imageDescriptor ) ) ) ; if ( image == null ) { image = imageDescriptor . createImage ( ) ; imageCache . put ( imageDescriptor , image ) ; } return image ; } return null ; } public final void dispose ( ) { } public final String getText ( Object element ) { } public final Image getColumnImage ( Object element , int columnIndex ) { } public final String getColumnText ( Object element , int columnIndex ) { } }

Fix:
imageDescriptor = WorkbenchImages . getImageDescriptor ( IMG_ETOOL_DEF_PERSPECTIVE ) ;
Buggy code:
public class PropertiesEditor extends PropertyEditorSupport { @ Override public void setAsText ( String text ) throws IllegalArgumentException { Properties props = new Properties ( ) ; if ( text != null ) { try { props . load ( new ByteArrayInputStream ( text . getBytes ( "ISO-8859-1" ) ) ) ; } catch ( IOException ex ) { <START_BUG> throw new IllegalArgumentException ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>[" + text ) + "]<seq2seq4repair_space>into<seq2seq4repair_space>Properties:<seq2seq4repair_space>" ) + ( ex . getMessage ( ) ) ) ) ; <END_BUG> } } setValue ( props ) ; } @ Override public void setValue ( Object value ) { } }

Fix:
throw new IllegalArgumentException ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>[" + text ) + "]<seq2seq4repair_space>into<seq2seq4repair_space>Properties" ) , ex ) ;
Buggy code:
public class ObjectSerializer extends GenericClassSerializer { private POxOSerializerUtil serializerUtil ; private Map < String , FieldsSerializer > classFieldSerializerMap ; private Map < String , FieldSerializerUtil [ ] > fieldsSerializersMap ; public ObjectSerializer ( POxOSerializerUtil serializerUtil ) { } @ Override public Object read ( POxOPrimitiveDecoder decoder ) throws POxOSerializerException { } @ Override public void write ( POxOPrimitiveEncoder encoder , Object obj ) throws POxOSerializerException { } private void retrieveOrderedFieldsList ( Class < ? > type ) throws POxOSerializerException { if ( ( fieldsSerializersMap . get ( type . getName ( ) ) ) == null ) { List < FieldSerializerUtil > allFieldsSerializer = new ArrayList < FieldSerializerUtil > ( ) ; Class < ? > nextClass = type ; while ( nextClass != ( Object . class ) ) { Field [ ] declaredFields = nextClass . getDeclaredFields ( ) ; if ( declaredFields != null ) { for ( Field f : declaredFields ) { if ( Modifier . isStatic ( f . getModifiers ( ) ) ) continue ; allFieldsSerializer . add ( new FieldSerializerUtil ( f , serializerUtil . getFieldSerializer ( f ) ) ) ; } } nextClass = nextClass . getSuperclass ( ) ; } Collections . sort ( allFieldsSerializer , new Comparator < FieldSerializerUtil > ( ) { @ Override public int compare ( FieldSerializerUtil object1 , FieldSerializerUtil object2 ) { <START_BUG> return object1 . getField ( ) . getName ( ) . compareTo ( object2 . getField ( ) . getName ( ) ) ; <END_BUG> } } ) ; fieldsSerializersMap . put ( type . getName ( ) , allFieldsSerializer . toArray ( new FieldSerializerUtil [ 0 ] ) ) ; } } public FieldSerializerUtil [ ] getFieldsSerializers ( Class < ? > type ) { } }

Fix:
return object1 . getField ( ) . getName ( ) . compareToIgnoreCase ( object2 . getField ( ) . getName ( ) ) ;
Buggy code:
public class Button extends Control { String text = "" ; Image image ; int cIcon ; boolean isImage ; public Button ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } static int checkStyle ( int style ) { } void click ( ) { } int callPaintEventHandler ( int control , int damageRgn , int visibleRgn , int theEvent , int nextHandler ) { int [ ] context = null ; <START_BUG> if ( ( ( OS . HIVIEW ) & ( ( ( style ) & ( SWT . ARROW ) ) != 0 ) ) && ( ( ( style ) & ( SWT . UP ) ) != 0 ) ) { <END_BUG> context = new int [ 1 ] ; OS . GetEventParameter ( theEvent , kEventParamCGContextRef , typeCGContextRef , null , 4 , null , context ) ; OS . CGContextSaveGState ( context [ 0 ] ) ; OS . CGContextScaleCTM ( context [ 0 ] , 1.0F , ( - 1 ) ) ; OS . CGContextTranslateCTM ( context [ 0 ] , 0 , ( - ( getBounds ( ) . height ) ) ) ; } int result = super . callPaintEventHandler ( control , damageRgn , visibleRgn , theEvent , nextHandler ) ; if ( context != null ) OS . CGContextRestoreGState ( context [ 0 ] ) ; return result ; } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } int defaultThemeFont ( ) { } void drawWidget ( int control , int context , int damageRgn , int visibleRgn , int theEvent ) { } public int getAlignment ( ) { } public Image getImage ( ) { } String getNameText ( ) { } public boolean getSelection ( ) { } public String getText ( ) { } Rect getInset ( ) { } int kEventControlHit ( int nextHandler , int theEvent , int userData ) { } void releaseWidget ( ) { } public void removeSelectionListener ( SelectionListener listener ) { } void selectRadio ( ) { } public void setAlignment ( int alignment ) { } void _setAlignment ( int alignment ) { } int setBounds ( int x , int y , int width , int height , boolean move , boolean resize , boolean events ) { } void setDefault ( boolean value ) { } public void setImage ( Image image ) { } boolean setRadioSelection ( boolean value ) { } public void setSelection ( boolean selected ) { } public void setText ( String string ) { } int traversalCode ( int key , int theEvent ) { } }

Fix:
if ( ( ( ( style ) & ( SWT . ARROW ) ) != 0 ) && ( ( ( style ) & ( SWT . UP ) ) != 0 ) ) {
Buggy code:
public abstract class AbstractPropertyBindingResult extends AbstractBindingResult { private FormattingService formattingService ; protected AbstractPropertyBindingResult ( String objectName ) { } public void initFormatting ( FormattingService formattingService ) { } @ Override public PropertyEditorRegistry getPropertyEditorRegistry ( ) { } @ Override protected String canonicalFieldName ( String field ) { } @ Override public Class getFieldType ( String field ) { } @ Override protected Object getActualFieldValue ( String field ) { } @ Override protected Object formatFieldValue ( String field , Object value ) { } protected PropertyEditor getCustomEditor ( String fixedField ) { } @ Override public PropertyEditor findEditor ( String field , Class valueType ) { if ( valueType == null ) { valueType = getFieldType ( field ) ; } PropertyEditor editor = super . findEditor ( field , valueType ) ; <START_BUG> if ( editor == null ) { <END_BUG> TypeDescriptor td = ( field != null ) ? getPropertyAccessor ( ) . getPropertyTypeDescriptor ( fixedField ( field ) ) : TypeDescriptor . valueOf ( valueType ) ; editor = new org . springframework . ui . format . support . FormattingPropertyEditorAdapter ( this . formattingService , valueType ) ; } return editor ; } public abstract ConfigurablePropertyAccessor getPropertyAccessor ( ) { } }

Fix:
if ( ( editor == null ) && ( ( this . formattingService ) != null ) ) {
Buggy code:
class XSDNotationTraverser extends XSDAbstractTraverser { XSDNotationTraverser ( XSDHandler handler , XSAttributeChecker gAttrCheck ) { } XSNotationDecl traverse ( Element elmNode , XSDocumentInfo schemaDoc , SchemaGrammar grammar ) { Object [ ] attrValues = fAttrChecker . checkAttributes ( elmNode , true , schemaDoc ) ; String nameAttr = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_NAME ] ) ) ; String publicAttr = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_PUBLIC ] ) ) ; String systemAttr = ( ( String ) ( attrValues [ XSAttributeChecker . ATTIDX_SYSTEM ] ) ) ; if ( nameAttr == null ) { reportSchemaError ( "s4s-att-must-appear" , new Object [ ] { SchemaSymbols . ELT_NOTATION , SchemaSymbols . ATT_NAME } , elmNode ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return null ; } if ( ( systemAttr == null ) && ( publicAttr == null ) ) reportSchemaError ( "PublicSystemOnNotation" , null , elmNode ) ; XSNotationDecl notation = new XSNotationDecl ( ) ; notation . fName = nameAttr ; notation . fTargetNamespace = schemaDoc . fTargetNamespace ; notation . fPublicId = publicAttr ; notation . fSystemId = systemAttr ; Element content = DOMUtil . getFirstChildElement ( elmNode ) ; XSAnnotationImpl annotation = null ; if ( ( content != null ) && ( DOMUtil . getLocalName ( content ) . equals ( ELT_ANNOTATION ) ) ) { annotation = traverseAnnotationDecl ( content , attrValues , false , schemaDoc ) ; content = DOMUtil . getNextSiblingElement ( content ) ; } else { String text = DOMUtil . getSyntheticAnnotation ( elmNode ) ; if ( text != null ) { annotation = traverseSyntheticAnnotation ( elmNode , text , attrValues , false , schemaDoc ) ; } } XSObjectList annotations ; if ( annotation != null ) { annotations = new XSObjectListImpl ( ) ; <START_BUG> ( ( XSObjectListImpl ) ( annotations ) ) . add ( annotation ) ; <END_BUG> } else { annotations = XSObjectListImpl . EMPTY_LIST ; } notation . fAnnotations = annotations ; if ( content != null ) { Object [ ] args = new Object [ ] { SchemaSymbols . ELT_NOTATION , "(annotation?)" , DOMUtil . getLocalName ( content ) } ; reportSchemaError ( "s4s-elt-must-match.1" , args , content ) ; } grammar . addGlobalNotationDecl ( notation ) ; fAttrChecker . returnAttrArray ( attrValues , schemaDoc ) ; return notation ; } }

Fix:
( ( XSObjectListImpl ) ( annotations ) ) . addXSObject ( annotation ) ;
Buggy code:
public class FullFeatureDeciderImpl implements FullFeatureDecider { protected static final Logger log = LoggerFactory . getLogger ( FullFeatureDeciderImpl . class ) ; FullFeatureDeciderImpl async ; FullFeatureWorkerClient worker ; @ Override public void start ( ) { } @ Asynchronous public Promise < Double > step1 ( Promise < Double > p1 , @ NoWait Promise < Double > p2 ) { } @ Asynchronous public Promise < Double > step2 ( double p1 , Promise < Double > p2 ) { } @ Asynchronous public Promise < Double > step3 ( Promise < Double > arg , Promise < Double > answer ) { } @ Asynchronous public Promise < Double > step4 ( @ Wait List < Promise < Double > > data ) { } @ Asynchronous public Promise < Boolean > isResultOk ( double [ ] d , Promise < Double > result ) { } @ Asynchronous public void logResult ( Promise < Boolean > result ) { <START_BUG> FullFeatureDeciderImpl . log . info ( "is<seq2seq4repair_space>process<seq2seq4repair_space>correct:<seq2seq4repair_space>{}" , result . get ( ) ) ; <END_BUG> } public void setAsync ( FullFeatureDeciderImpl async ) { } public void setWorker ( FullFeatureWorkerClient worker ) { } }

Fix:
FullFeatureDeciderImpl . log . debug ( "is<seq2seq4repair_space>process<seq2seq4repair_space>correct:<seq2seq4repair_space>{}" , result . get ( ) ) ;
Buggy code:
public class LongEncoderTest { @ Test public void defaultAlphabet ( ) { Set < String > encoded = new HashSet < String > ( ) ; <START_BUG> for ( int i = 0 ; i < 10000 ; i ++ ) { <END_BUG> String enc = LongEncoder . encode ( i ) ; Assert . assertFalse ( ( "uniqueness:<seq2seq4repair_space>" + i ) , encoded . contains ( enc ) ) ; encoded . add ( enc ) ; Assert . assertEquals ( ( "decoding:<seq2seq4repair_space>" + i ) , i , LongEncoder . decode ( enc ) ) ; } } }

Fix:
for ( int i = - 10000 ; i < 10000 ; i ++ ) {
Buggy code:
public class ProgressBar extends Control { public ProgressBar ( Composite parent , int style ) { } static int checkStyle ( int style ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } void createHandle ( ) { } void drawBackground ( int control , int context ) { <START_BUG> drawBackground ( control , context , background ) ; <END_BUG> } public int getMaximum ( ) { } public int getMinimum ( ) { } public int getSelection ( ) { } public void setMaximum ( int value ) { } public void setMinimum ( int value ) { } public void setSelection ( int value ) { } }

Fix:
fillBackground ( control , context , null ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class SessionDisconnectEvent extends ApplicationEvent { private final String sessionId ; private final CloseStatus status ; public SessionDisconnectEvent ( Object source , String sessionId , CloseStatus closeStatus ) { } public String getSessionId ( ) { } public CloseStatus getCloseStatus ( ) { } @ Override public String toString ( ) { <START_BUG> return ( ( "SessionDisconnectEvent[sessionId=" + ( this . sessionId ) ) + ( ( this . status ) != null ? this . status . toString ( ) : "closeStatus=null" ) ) + "]" ; <END_BUG> } }

Fix:
return ( ( ( "SessionDisconnectEvent[sessionId=" + ( this . sessionId ) ) + ",<seq2seq4repair_space>" ) + ( ( this . status ) != null ? this . status . toString ( ) : "closeStatus=null" ) ) + "]" ;
Buggy code:
public class FileEventReporter extends AbstractReporter { private static final String EVENT_DELIMITER = "\r\n\r\n" ; String OUTPUT_PATH = "hooker" ; private String outputFile ; private FileOutputStream currentFileOutputStream = null ; public FileEventReporter ( String outputFile ) { } @ Override protected void report ( InterceptEvent event ) { SubstrateMain . log ( "File<seq2seq4repair_space>reporter<seq2seq4repair_space>write<seq2seq4repair_space>to<seq2seq4repair_space>file<seq2seq4repair_space>an<seq2seq4repair_space>event." ) ; <START_BUG> this . writeToFile ( event . toJson ( ) ) ; <END_BUG> } private void writeToFile ( String jsonEvent ) { } private FileOutputStream getCurrentFileOutputStream ( ) { } }

Fix:
this . writeToFile ( ( ( ( ( "{IDXP:" + ( event . getIDXP ( ) ) ) + ",payload:" ) + ( event . toJson ( ) ) ) + "}" ) ) ;
Buggy code:
public class CheckBox extends FormComponent < Boolean > implements IOnChangeListener { private static final long serialVersionUID = 1L ; public CheckBox ( final String id ) { } public CheckBox ( final String id , IModel < Boolean > model ) { } public void onSelectionChanged ( ) { } protected void onSelectionChanged ( Boolean newSelection ) { } protected boolean wantOnSelectionChangedNotifications ( ) { } @ Override protected boolean getStatelessHint ( ) { } @ Override protected void onComponentTag ( final ComponentTag tag ) { checkComponentTag ( tag , "input" ) ; checkComponentTagAttribute ( tag , "type" , "checkbox" ) ; final String value = getValue ( ) ; final IConverter < Boolean > converter = getConverter ( Boolean . class ) ; final Boolean checked = converter . convertToObject ( value , getLocale ( ) ) ; if ( Boolean . TRUE . equals ( checked ) ) { tag . put ( "checked" , "checked" ) ; } else { tag . remove ( "checked" ) ; } tag . remove ( "value" ) ; if ( wantOnSelectionChangedNotifications ( ) ) { CharSequence url = urlFor ( INTERFACE ) ; Form < ? > form = findParent ( Form . class ) ; if ( form != null ) { tag . put ( "onclick" , form . getJsForInterfaceUrl ( url ) ) ; } else { <START_BUG> tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + ( ( url . toString ( ) . indexOf ( '?' ) ) > ( - 1 ) ? "&amp;" : "?" ) ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ; <END_BUG> } } super . onComponentTag ( tag ) ; } @ Override public final < C > IConverter < C > getConverter ( Class < C > type ) { } private static class CheckBoxConverter implements IConverter < Boolean > { private static final long serialVersionUID = 1L ; private static final IConverter < Boolean > INSTANCE = new CheckBox . CheckBoxConverter ( ) ; private CheckBoxConverter ( ) { } public Boolean convertToObject ( String value , Locale locale ) { } public String convertToString ( Boolean value , Locale locale ) { } } }

Fix:
tag . put ( "onclick" , ( ( ( ( "window.location.href='" + url ) + ( ( url . toString ( ) . indexOf ( '?' ) ) > ( - 1 ) ? "&" : "?" ) ) + ( getInputName ( ) ) ) + "='<seq2seq4repair_space>+<seq2seq4repair_space>this.checked;" ) ) ;
Buggy code:
public class ServletWebResponse extends WebResponse { private final HttpServletResponse httpServletResponse ; private final HttpServletRequest httpServletRequest ; public ServletWebResponse ( HttpServletRequest httpServletRequest , HttpServletResponse httpServletResponse ) { } public final HttpServletResponse getHttpServletResponse ( ) { } @ Override public void addCookie ( Cookie cookie ) { } @ Override public void clearCookie ( Cookie cookie ) { } @ Override public void setContentLength ( long length ) { } @ Override public void setContentType ( String mimeType ) { } @ Override public void setDateHeader ( String name , long date ) { } @ Override public void setHeader ( String name , String value ) { } @ Override public void write ( CharSequence sequence ) { } @ Override public void write ( byte [ ] array ) { } @ Override public void setStatus ( int sc ) { } @ Override public void sendError ( int sc , String msg ) { } @ Override public String encodeURL ( CharSequence url ) { } private String getAbsolutePrefix ( ) { } private String getAbsoluteURL ( String url ) { } private boolean redirect = false ; @ Override public void sendRedirect ( String url ) { } private void sendRedirect ( String url , boolean cacheable ) { redirect = true ; url = getAbsoluteURL ( url ) ; url = httpServletResponse . encodeRedirectURL ( url ) ; try { if ( cacheable == false ) <START_BUG> RequestUtils . disableCaching ( this ) ; <END_BUG> httpServletResponse . sendRedirect ( url ) ; } catch ( IOException e ) { throw new WicketRuntimeException ( e ) ; } } @ Override public boolean isRedirect ( ) { } @ Override public void flush ( ) { } @ Override public void reset ( ) { } }

Fix:
this . disableCaching ( ) ;
Buggy code:
public class XMPPSID extends XMPPID { private static final long serialVersionUID = - 7665808387581704917L ; public XMPPSID ( Namespace namespace , String unamehost ) throws URISyntaxException { } public String toString ( ) { StringBuffer sb = new StringBuffer ( "XMPPSID[" ) ; <START_BUG> sb . append ( uri . toString ( ) ) . append ( "]" ) ; <END_BUG> return sb . toString ( ) ; } }

Fix:
sb . append ( toExternalForm ( ) ) . append ( "]" ) ;
Buggy code:
@ Entity @ Table ( name = "FS_PATH_RESOURCE" ) @ Inheritance ( strategy = InheritanceType . JOINED ) @ DiscriminatorColumn ( name = "PATH_TYPE" , discriminatorType = DiscriminatorType . STRING ) public abstract class FsPathResource extends FSNode < FsPathResource > implements FsResource { @ Transient private static final long serialVersionUID = 4413404986186464097L ; @ Column ( name = "NAME" , nullable = false ) private String name ; @ Column ( name = "RELATIVE_PATH" , nullable = false ) private String relativePath ; @ Column ( name = "PATH_TYPE" , nullable = false ) @ Enumerated ( EnumType . STRING ) private FsPathType pathType ; public FsPathResource ( ) { } public FsPathResource ( Long id ) { } public String getName ( ) { } public void setName ( String name ) { } public String getRelativePath ( ) { } public void setRelativePath ( String relativePath ) { } public FsPathType getPathType ( ) { } public void setPathType ( FsPathType pathType ) { } @ Override public String toString ( ) { <START_BUG> return ( ( ( ( ( "FsPathResource<seq2seq4repair_space>[name=" + ( name ) ) + ",<seq2seq4repair_space>relativePath=" ) + ( relativePath ) ) + ",<seq2seq4repair_space>pathType=" ) + ( pathType . getType ( ) ) ) + "]" ; <END_BUG> } }

Fix:
return ( ( ( ( ( ( ( "FsPathResource<seq2seq4repair_space>[id=" + ( getNodeId ( ) ) ) + ",<seq2seq4repair_space>name=" ) + ( name ) ) + ",<seq2seq4repair_space>relativePath=" ) + ( relativePath ) ) + ",<seq2seq4repair_space>pathType=" ) + ( pathType . getType ( ) ) ) + "]" ;
Buggy code:
public class AbstractSockJsServiceTests extends AbstractHttpRequestTests { private AbstractSockJsServiceTests . TestSockJsService service ; private WebSocketHandler handler ; @ Override @ Before public void setUp ( ) { } @ Test public void getSockJsPathForGreetingRequest ( ) throws Exception { } @ Test public void getSockJsPathForInfoRequest ( ) throws Exception { } @ Test public void getSockJsPathForTransportRequest ( ) throws Exception { } @ Test public void getSockJsPathForTransportRequestWithConfiguredPrefix ( ) throws Exception { } @ Test public void validateRequest ( ) throws Exception { } @ Test public void handleInfoGet ( ) throws Exception { } @ Test public void handleInfoOptions ( ) throws Exception { } @ Test public void handleIframeRequest ( ) throws Exception { this . service . setValidSockJsPrefixes ( "//a" ) ; handleRequest ( "GET" , "//a//iframe.html" , OK ) ; assertEquals ( "text//html;charset=UTF-8" , this . servletResponse . getContentType ( ) ) ; assertTrue ( this . servletResponse . getContentAsString ( ) . startsWith ( "<!DOCTYPE<seq2seq4repair_space>html>\n" ) ) ; assertEquals ( 496 , this . servletResponse . getContentLength ( ) ) ; assertEquals ( "public,<seq2seq4repair_space>max-age=31536000" , this . response . getHeaders ( ) . getCacheControl ( ) ) ; <START_BUG> assertEquals ( "\"0da1ed070012f304e47b83c81c48ad620\"" , response . getHeaders ( ) . getETag ( ) ) ; <END_BUG> } @ Test public void handleIframeRequestNotModified ( ) throws Exception { } @ Test public void handleRawWebSocketRequest ( ) throws Exception { } private void handleRequest ( String httpMethod , String uri , HttpStatus httpStatus ) throws IOException { } private static class TestSockJsService extends AbstractSockJsService { private String sessionId ; private TransportType transportType ; private WebSocketHandler handler ; public TestSockJsService ( TaskScheduler scheduler ) { } @ Override protected void handleRawWebSocketRequest ( ServerHttpRequest request , ServerHttpResponse response , WebSocketHandler handler ) throws IOException { } @ Override protected void handleTransportRequest ( ServerHttpRequest request , ServerHttpResponse response , String sessionId , TransportType transportType , WebSocketHandler handler ) throws IOException , TransportErrorException { } } }

Fix:
assertEquals ( "\"0da1ed070012f304e47b83c81c48ad620\"" , this . response . getHeaders ( ) . getETag ( ) ) ;
Buggy code:
public final class PrintDocumentInfo implements Parcelable { public static final int PAGE_COUNT_UNKNOWN = - 1 ; public static final int CONTENT_TYPE_UNKNOWN = - 1 ; public static final int CONTENT_TYPE_DOCUMENT = 0 ; public static final int CONTENT_TYPE_PHOTO = 1 ; private String mName ; private int mPageCount ; private int mContentType ; private long mDataSize ; private PrintDocumentInfo ( ) { } private PrintDocumentInfo ( PrintDocumentInfo prototype ) { } private PrintDocumentInfo ( Parcel parcel ) { } public String getName ( ) { } public int getPageCount ( ) { } public int getContentType ( ) { } public long getDataSize ( ) { } public void setDataSize ( long dataSize ) { } @ Override public int describeContents ( ) { } @ Override public void writeToParcel ( Parcel parcel , int flags ) { } @ Override public int hashCode ( ) { final int prime = 31 ; int result = 1 ; result = ( prime * result ) + ( ( mName ) != null ? mName . hashCode ( ) : 0 ) ; result = ( prime * result ) + ( mContentType ) ; result = ( prime * result ) + ( mPageCount ) ; result = ( prime * result ) + ( ( int ) ( mDataSize ) ) ; <START_BUG> result = ( ( prime * result ) + ( ( int ) ( mDataSize ) ) ) > > 32 ; <END_BUG> return result ; } @ Override public boolean equals ( Object obj ) { } @ Override public String toString ( ) { } private String contentTyepToString ( int contentType ) { } public static final class Builder { private final PrintDocumentInfo mPrototype ; public Builder ( String name ) { } public PrintDocumentInfo . Builder setPageCount ( int pageCount ) { } public PrintDocumentInfo . Builder setContentType ( int type ) { } public PrintDocumentInfo build ( ) { } } public static final Parcelable . Creator < PrintDocumentInfo > CREATOR = new Creator < PrintDocumentInfo > ( ) { @ Override public PrintDocumentInfo createFromParcel ( Parcel parcel ) { } @ Override public PrintDocumentInfo [ ] newArray ( int size ) { } } ; }

Fix:
result = ( prime * result ) + ( ( int ) ( ( mDataSize ) > > 32 ) ) ;
Buggy code:
public class GitService extends VersionControlService { private Git git ; private ObjectId commitID ; public GitService ( final String pathToRepo , final String repoURL ) throws IOException { } @ Override public String getBlamedUser ( final String fileName , final int lineNumber ) throws IOException , GitAPIException { BlameCommand cmd = new BlameCommand ( git . getRepository ( ) ) ; cmd . setStartCommit ( commitID ) ; cmd . setFilePath ( filesInRepo . get ( fileName ) ) ; BlameResult blameResult = cmd . call ( ) ; <START_BUG> String blamedUserEmail = blameResult . getSourceAuthor ( lineNumber ) . getEmailAddress ( ) ; <END_BUG> return blamedUserEmail ; } public String getRepositoryOwner ( ) { } }

Fix:
String blamedUserEmail = blameResult . getSourceAuthor ( ( lineNumber - 1 ) ) . getEmailAddress ( ) ;
Buggy code:
public class Parser implements Runnable { private ImageView turtleImage ; private LogoGrammar grammar ; private Turtle turtle = Turtle . getInstance ( ) ; private HashMap < String , Integer > variables ; private HashMap < String , ArrayList < String > > functions ; private HashMap < String , Tree > funcVars ; private ObservableList < Node > canvasChildren ; private String commands ; public Parser ( ImageView turtle , ObservableList < Node > children , String commands ) { } public void parse ( ) throws ParseException { } private int interpret ( Tree parseTree ) { } public boolean evaluateBooleanExpression ( Tree parseTree ) { } public void makeLine ( Point2D current , Point2D end ) { if ( Controller . isPenDown ( ) ) { Line line = new Line ( ) ; line . setStartX ( current . getX ( ) ) ; line . setStartY ( current . getY ( ) ) ; line . setEndX ( end . getX ( ) ) ; line . setEndY ( end . getY ( ) ) ; <START_BUG> line . setFill ( penColor ) ; <END_BUG> canvasChildren . add ( line ) ; lines . add ( line ) ; } turtleImage . setTranslateX ( ( ( end . getX ( ) ) - ( Turtle . CENTER_X ) ) ) ; turtleImage . setTranslateY ( ( ( end . getY ( ) ) - ( Turtle . CENTER_Y ) ) ) ; turtleImage . setRotate ( ( ( turtle . getRotation ( ) ) + 90 ) ) ; } public void handleCommand ( Tree parseTree ) { } public ArrayList < Integer > getVarValues ( Tree tree ) { } public ArrayList < String > setVariableName ( Tree tree ) { } public void run ( ) { } }

Fix:
line . setStroke ( penColor ) ;
Buggy code:
public class EqualsFilterTest extends TestCase { private Datastore datastore = TestHelper . createSampleDatabaseDatastore ( "ds" ) ; public void testCompareToEnum ( ) throws Exception { } public void testSingleString ( ) throws Exception { } public void testSingleNumber ( ) throws Exception { } public void testMultipleStrings ( ) throws Exception { } public void testCompareValueColumnNumbers ( ) throws Exception { } public void testCompareValueColumnStrings ( ) throws Exception { } public void testNonOptimizeableQuery ( ) throws Exception { } public void testOptimizeQueryValueColumn ( ) throws Exception { } public void testOptimizeQueryValuesArray ( ) throws Exception { DatastoreConnection con = datastore . openConnection ( ) ; Column column = con . getSchemaNavigator ( ) . convertToColumn ( "PUBLIC.EMPLOYEES.FIRSTNAME" ) ; InputColumn < ? > inputColumn = new org . datacleaner . data . MetaModelInputColumn ( column ) ; EqualsFilter filter = new EqualsFilter ( new String [ ] { "foobar" } , inputColumn ) ; assertTrue ( filter . isOptimizable ( EQUALS ) ) ; assertTrue ( filter . isOptimizable ( NOT_EQUALS ) ) ; Query query = con . getDataContext ( ) . query ( ) . from ( column . getTable ( ) ) . select ( column ) . toQuery ( ) ; String originalSql = query . toSql ( ) ; assertEquals ( "SELECT<seq2seq4repair_space>\"EMPLOYEES\".\"FIRSTNAME\"<seq2seq4repair_space>FROM<seq2seq4repair_space>PUBLIC.\"EMPLOYEES\"" , originalSql ) ; Query result ; result = filter . optimizeQuery ( query . clone ( ) , EQUALS ) ; <START_BUG> assertEquals ( ( originalSql + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>(\"EMPLOYEES\".\"FIRSTNAME\"<seq2seq4repair_space>=<seq2seq4repair_space>\'foobar\')" ) , result . toSql ( ) ) ; <END_BUG> result = filter . optimizeQuery ( query . clone ( ) , NOT_EQUALS ) ; assertEquals ( ( originalSql + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>\"EMPLOYEES\".\"FIRSTNAME\"<seq2seq4repair_space><><seq2seq4repair_space>\'foobar\'" ) , result . toSql ( ) ) ; con . close ( ) ; } }

Fix:
assertEquals ( ( originalSql + "<seq2seq4repair_space>WHERE<seq2seq4repair_space>\"EMPLOYEES\".\"FIRSTNAME\"<seq2seq4repair_space>=<seq2seq4repair_space>\'foobar\'" ) , result . toSql ( ) ) ;
Buggy code:
public class Clock extends timeParser { public static void main ( String [ ] args ) { } public static int timeHandler ( String time ) { SimpleDateFormat timeFormat = new SimpleDateFormat ( "HH:mm" ) ; int timeArrayLen ; try { if ( ( timeFormat . parse ( time ) ) != null ) { String [ ] timeSplit = time . split ( ":" ) ; timeArrayLen = timeSplit . length ; if ( timeArrayLen < 3 ) { if ( ( ( timeSplit [ 0 ] . length ( ) ) > 2 ) || ( ( timeSplit [ 1 ] . length ( ) ) > 2 ) ) { return 1 ; } else { <START_BUG> timeParser . toEnglish ( timeSplit ) ; <END_BUG> return 2 ; } } } else { return 1 ; } } catch ( Exception e ) { return 1 ; } return 1 ; } No newline ; at end ; of file ; }

Fix:
String finalTime = timeParser . toEnglish ( timeSplit ) ;
Buggy code:
public class AssetManager extends com . badlogic . gdx . assets . AssetManager { public static AssetManager manager = new AssetManager ( ) ; private static Skin menuSkin ; private static Music music ; private static Skin gameElementTexture ; private static TiledMapTileSet objects ; private static TiledMapTileSet machines ; private static TiledMapTileSet lights ; public static final String [ ] assetNames = new String [ ] { } ; private static final LinkedList < TiledMap > maps = new LinkedList < TiledMap > ( ) ; private static final List < AssetManager . OnProgressChanged > listeners = new LinkedList < AssetManager . OnProgressChanged > ( ) ; private static final HashMap < String , Texture > textureMap = new HashMap < String , Texture > ( ) ; public static void initializePreLoading ( ) { } public static void initializeWhileLoading ( ) { AssetManager . manager . load ( "music//musicfile.ogg" , Music . class ) ; AssetManager . notifyListeners ( 30 ) ; TextureAtlas atlas = new TextureAtlas ( "skins//LambdaGame.pack" ) ; TextureAtlas gameElementsAtlas = new TextureAtlas ( "Gameelements//Gameelements.pack" ) ; AssetManager . manager . finishLoading ( ) ; AssetManager . menuSkin = new Skin ( files . internal ( "skins//DefaultLambdaGame.json" ) , atlas ) ; AssetManager . notifyListeners ( 66 ) ; AssetManager . gameElementTexture = new Skin ( gameElementsAtlas ) ; AssetManager . notifyListeners ( 80 ) ; TmxMapLoader loader = new TmxMapLoader ( ) ; for ( int i = 1 ; i <= ( Constants . MAX_LEVEL_ID ) ; i ++ ) { <START_BUG> AssetManager . maps . add ( loader . load ( ( ( "assets//maps//Level" + i ) + ".tmx" ) ) ) ; <END_BUG> AssetManager . notifyListeners ( ( 80 + ( ( int ) ( ( i * 20 ) // ( ( float ) ( Constants . MAX_LEVEL_ID ) ) ) ) ) ) ; } AssetManager . setTiledMapTileSets ( AssetManager . maps . getFirst ( ) ) ; AssetManager . manager . finishLoading ( ) ; } private static void notifyListeners ( int value ) { } public static void addProgressListener ( AssetManager . OnProgressChanged listener ) { } public static void removeProgressListener ( AssetManager . OnProgressChanged listener ) { } public static TiledMap loadMap ( int levelId ) { } public static Music getMusic ( ) { } public static void queueLoading ( ) { } public static Skin getMenuSkin ( ) { } public interface OnProgressChanged { public void progressChanged ( int value ) { } } public static Skin getGameelementskin ( ) { } public static Texture getTexture ( String path ) { } private static void setTiledMapTileSets ( TiledMap currentMap ) { } public static TiledMapTileSet getObjects ( ) { } public static TiledMapTileSet getMachines ( ) { } public static TiledMapTileSet getLights ( ) { } }

Fix:
AssetManager . maps . add ( loader . load ( ( ( "maps//Level" + i ) + ".tmx" ) ) ) ;
Buggy code:
public class Wood extends RenewableResource { public static final ResourceType resourceType = ResourceType . WOOD ; public static final String resourceName = "Wood" ; private int yield ; private int updateCounter ; public Wood ( int initial , int maxResources , int yield ) { } @ Override public IItem gatherResource ( ) { } @ Override public ResourceType getResourceType ( ) { } @ Override public String getResourceName ( ) { } @ Override public void updateTimeable ( ) { } @ Override public boolean toBeRemoved ( ) { <START_BUG> return ( getResourcesLeft ( ) ) > 0 ; <END_BUG> } }

Fix:
return ! ( ( getResourcesLeft ( ) ) > 0 ) ;
Buggy code:
public class CommandPlaceStair implements ICommand { public static boolean REQUIRES_OP ; public static int XP_COST_PER_PLACE = 1 ; private ArrayList < String > aliases = new ArrayList < String > ( ) ; public CommandPlaceStair ( ) { } @ Override public int compareTo ( Object arg0 ) { } @ Override public String getName ( ) { } @ Override public String getCommandUsage ( ICommandSender sender ) { } @ Override public List getAliases ( ) { } @ Override public void execute ( ICommandSender sender , String [ ] args ) throws CommandException { if ( ( PlaceLib . canSenderPlace ( sender ) ) == false ) { return ; } EntityPlayer player = ( ( EntityPlayer ) ( sender ) ) ; Block pblock = Block . getBlockFromItem ( player . inventory . getCurrentItem ( ) . getItem ( ) ) ; World world = player . worldObj ; IBlockState placing = pblock . getStateFromMeta ( player . inventory . getCurrentItem ( ) . getMetadata ( ) ) ; int want = player . inventory . getCurrentItem ( ) . stackSize ; if ( ( ( args . length ) > 0 ) && ( ( args [ 0 ] ) != null ) ) { want = Math . min ( Integer . parseInt ( args [ 0 ] ) , player . inventory . getCurrentItem ( ) . stackSize ) ; } int skip = 1 ; if ( ( ( args . length ) > 1 ) && ( ( args [ 1 ] ) != null ) ) { skip = Math . max ( Integer . parseInt ( args [ 1 ] ) , 1 ) ; } <START_BUG> PlaceLib . line ( world , player , player . getPosition ( ) , placing , want , skip , CommandPlaceStair . XP_COST_PER_PLACE ) ; <END_BUG> } @ Override public boolean canCommandSenderUse ( ICommandSender ic ) { } @ Override public List addTabCompletionOptions ( ICommandSender sender , String [ ] args , BlockPos pos ) { } @ Override public boolean isUsernameIndex ( String [ ] args , int index ) { } }

Fix:
PlaceLib . stairway ( world , player , player . getPosition ( ) , placing , want , skip , CommandPlaceStair . XP_COST_PER_PLACE ) ;
Buggy code:
public class TaskReference_Constraints extends BaseConstraintsDescriptor { private static SNodePointer breakingNode_6artq6_a0a1a0a0a1a0b0a1a0 = new SNodePointer ( "r:71eee63a-b16f-40f8-920d-8fd0fe7dc8a1(jetbrains.mps.build.generictasks.constraints)" , "3037831562615764092" ) ; public TaskReference_Constraints ( ) { } @ Override protected Map < String , ReferenceConstraintsDescriptor > getNotDefaultReferences ( ) { Map < String , ReferenceConstraintsDescriptor > references = new HashMap ( ) ; references . put ( "declaration" , new BaseReferenceConstraintsDescriptor ( "declaration" , this ) { @ Override public boolean hasOwnScopeProvider ( ) { return true ; } @ Nullable @ Override public ReferenceScopeProvider getScopeProvider ( ) { return new BaseReferenceScopeProvider ( ) { @ Override public Object createSearchScopeOrListOfNodes ( final IOperationContext operationContext , final ReferenceConstraintsContext _context ) { List < SNode > decls = SModelOperations . getNodesIncludingImported ( _context . getModel ( ) , operationContext . getScope ( ) , "jetbrains.mps.buildlanguage.structure.IDeclaration" ) ; if ( ( SNodeOperations . isInstanceOf ( _context . getEnclosingNode ( ) , "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration" ) ) && ( SNodeOperations . hasRole ( _context . getReferenceNode ( ) , "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration" , "fakeDeclaration" ) ) ) { List < SNode > newDecls = new ArrayList < SNode > ( ) ; for ( SNode decl : ListSequence . fromList ( decls ) ) { if ( SNodeOperations . isInstanceOf ( decl , "jetbrains.mps.build.generictasks.structure.TaskInterfaceDeclaration" ) ) { ListSequence . fromList ( newDecls ) . addElement ( decl ) ; } } return new jetbrains . mps . smodel . search . SimpleSearchScope ( newDecls ) ; } else if ( ( SNodeOperations . isInstanceOf ( _context . getEnclosingNode ( ) , "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration" ) ) && ( SNodeOperations . hasRole ( _context . getReferenceNode ( ) , "jetbrains.mps.build.generictasks.structure.BuiltInTaskDeclaration" , "fakeDeclaration" ) ) ) { List < SNode > newDecls = new ArrayList < SNode > ( ) ; for ( SNode decl : ListSequence . fromList ( decls ) ) { if ( ! ( SNodeOperations . isInstanceOf ( decl , "jetbrains.mps.build.generictasks.structure.TaskInterfaceDeclaration" ) ) ) { ListSequence . fromList ( newDecls ) . addElement ( decl ) ; } } return new jetbrains . mps . smodel . search . SimpleSearchScope ( newDecls ) ; } <START_BUG> return decls ; <END_BUG> } @ Override public SNodePointer getSearchScopeValidatorNode ( ) { return TaskReference_Constraints . breakingNode_6artq6_a0a1a0a0a1a0b0a1a0 ; } } ; } } ) ; return references ; } }

Fix:
return new jetbrains . mps . smodel . search . SimpleSearchScope ( decls ) ;
Buggy code:
public class PreprocessSpectra { private HashMap < Double , Vector < Double > > peaksIntensity = null ; private HashMap < Double , Vector < Double > > peaksRelIntensity = null ; private Vector < Double > newIntensity = null ; private Vector < Double > newRelIntensity = null ; private void preprocessUnsorted ( String folder , double mzabs , double mzppm ) { } private void preprocess ( String folder , double threshold ) { } private Vector < Double > mergePeaks ( Vector < WrapperSpectrum > spectra , double mzabs , double mzppm ) { } private HashMap < Double , Vector < Double > > addToMap ( HashMap < Double , Vector < Double > > map , double currentPeak , double intensity ) { } public static void main ( String [ ] args ) { <START_BUG> String folder = "//home//swolf//MassBankData//TestSpectra//MM48//" ; <END_BUG> PreprocessSpectra pps = new PreprocessSpectra ( ) ; pps . preprocessUnsorted ( folder , 0.002 , 10 ) ; System . out . println ( "Done!" ) ; } }

Fix:
String folder = "//home//ftarutti//testspectra//" ;
Buggy code:
public class AutomatedTest { public static void main ( String [ ] args ) { System . out . println ( "\nAutomated<seq2seq4repair_space>test<seq2seq4repair_space>of<seq2seq4repair_space>the<seq2seq4repair_space>SYSC3303<seq2seq4repair_space>Electronic<seq2seq4repair_space>Voting<seq2seq4repair_space>System" ) ; Thread masterServer = new Thread ( ) { public void run ( ) { MasterServer . main ( new String [ ] { "2000" , ".//src//FinalProject//test//voters.txt" , ".//src//FinalProject//test//candidates.txt" , "5000" } ) ; } } ; Thread districtServer = new Thread ( ) { public void run ( ) { <START_BUG> DistrictServer . main ( new String [ ] { "2010" , "127.0.0.1" , "2000" , "0" } ) ; <END_BUG> } } ; Thread boothServer1 = new Thread ( ) { public void run ( ) { Booth . main ( new String [ ] { "127.0.0.1" , "2010" , "2101" , ".//src//FinalProject//test//voters.txt" } ) ; } } ; masterServer . start ( ) ; districtServer . start ( ) ; try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } boothServer1 . start ( ) ; } }

Fix:
DistrictServer . main ( new String [ ] { "2010" , "127.0.0.1" , "2000" , "0" , "fake-data" , "aa" } ) ;