nus-yam/ex-repair huggingface dataset:
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( BasicDoubleDeploymentFail16_2TestCase . BasicDoubleDeploymentTestCaseSetup . class ) public class BasicDoubleDeploymentFail16_2TestCase extends ContainerResourceMgmtTestBase { private static final String DEPLOYMENT_MODULE_NAME = "basic" ; private static final String DEPLOYMENT_NAME = ( BasicDoubleDeploymentFail16_2TestCase . DEPLOYMENT_MODULE_NAME ) + ".rar" ; private static final String SUB_DEPLOYMENT_MODULE_NAME = "somejar" ; private static final String SUB_DEPLOYMENT_NAME = ( BasicDoubleDeploymentFail16_2TestCase . SUB_DEPLOYMENT_MODULE_NAME ) + ".jar" ; private static final String RAR_1_NAME = "XXX2" ; static class BasicDoubleDeploymentTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void doSetup ( final ManagementClient managementClient ) throws Exception { String xml = FileUtils . readFile ( BasicDoubleDeploymentFail16_2TestCase . class , "basic16.1-2.xml" ) ; List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_1 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; executeOperation ( operationListToCompositeOperation ( operations ) ) ; xml = FileUtils . readFile ( BasicDoubleDeploymentFail16_2TestCase . class , "basic16.1-3.xml" ) ; operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_1 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; final ModelNode result = executeOperation ( operationListToCompositeOperation ( operations ) , false ) ; Assert . assertTrue ( ( ! ( Operations . isSuccessfulOutcome ( result ) ) ) ) ; final String failureDescription = result . get ( "result" ) . get ( "step-1" ) . get ( "failure-description" ) . asString ( ) ; <START_BUG> Assert . assertTrue ( failureDescription . startsWith ( "WFLYCTL0212:<seq2seq4repair_space>Duplicate<seq2seq4repair_space>resource" ) ) ; <END_BUG> } @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws Exception { } private ModelNode getAddress ( final String name ) { } } @ Deployment public static ResourceAdapterArchive createDeployment ( ) { } @ Resource ( mappedName = "java:jboss//name1-2" ) private MultipleConnectionFactory1 connectionFactory1 ; @ Resource ( mappedName = "java:jboss//Name3-2" ) private MultipleAdminObject1 adminObject1 ; @ ContainerResource private InitialContext initialContext ; @ Test public void testConfiguration ( ) throws Throwable { } @ Test ( expected = NameNotFoundException . class ) public void testNonExistingConfig_1 ( ) throws Exception { } @ Test ( expected = NameNotFoundException . class ) public void testNonExistingConfig_2 ( ) throws Exception { } }

Fix:
Assert . assertTrue ( failureDescription . startsWith ( "JBAS014803:<seq2seq4repair_space>Duplicate<seq2seq4repair_space>resource" ) ) ;
Buggy code:
public class DropTarget extends Widget { Control control ; Listener controlListener ; Transfer [ ] transferAgents = new Transfer [ 0 ] ; DragAndDropEffect effect ; TransferData selectedDataType ; int selectedOperation ; int keyOperation = - 1 ; IDataObject iDataObject ; COMObject iDropTarget ; int refCount ; static final String DROPTARGETID = "DropTarget" ; public DropTarget ( Control control , int style ) { } static int checkStyle ( int style ) { } public void addDropListener ( DropTargetListener listener ) { } int AddRef ( ) { } protected void checkSubclass ( ) { } void createCOMInterfaces ( ) { } void disposeCOMInterfaces ( ) { } int DragEnter ( int pDataObject , int grfKeyState , int pt_x , int pt_y , int pdwEffect ) { } int DragLeave ( ) { } int DragOver ( int grfKeyState , int pt_x , int pt_y , int pdwEffect ) { } int Drop ( int pDataObject , int grfKeyState , int pt_x , int pt_y , int pdwEffect ) { } public Control getControl ( ) { } int getOperationFromKeyState ( int grfKeyState ) { } public Transfer [ ] getTransfer ( ) { } void onDispose ( ) { } int opToOs ( int operation ) { } int osToOp ( int osOperation ) { } int QueryInterface ( int riid , int ppvObject ) { } int Release ( ) { } void refresh ( ) { RECT lpRect = new RECT ( ) ; OS . GetUpdateRect ( control . handle , lpRect , false ) ; if ( ( ( lpRect . bottom ) != ( lpRect . top ) ) && ( ( lpRect . right ) != ( lpRect . left ) ) ) { OS . ImageList_DragShowNolock ( false ) ; <START_BUG> OS . RedrawWindow ( control . handle , null , 0 , ( ( OS . RDW_UPDATENOW ) | ( OS . RDW_INVALIDATE ) ) ) ; <END_BUG> OS . ImageList_DragShowNolock ( true ) ; } } public void removeDropListener ( DropTargetListener listener ) { } boolean setEventData ( DNDEvent event , int pDataObject , int grfKeyState , int pt_x , int pt_y , int pdwEffect ) { } public void setTransfer ( Transfer [ ] transferAgents ) { } }

Fix:
OS . RedrawWindow ( control . handle , lpRect , 0 , ( ( OS . RDW_UPDATENOW ) | ( OS . RDW_INVALIDATE ) ) ) ;
Buggy code:
class DefaultCommentMapper { Comment [ ] comments ; HashMap leadingComments ; HashMap trailingComments ; Scanner scanner ; DefaultCommentMapper ( Comment [ ] table ) { } boolean hasSameTable ( Comment [ ] table ) { } Comment getComment ( int position ) { } private int getCommentIndex ( int start , int position , int exact ) { } Comment [ ] getLeadingComments ( ASTNode node ) { } Comment [ ] getTrailingComments ( ASTNode node ) { } public int getExtendedStartPosition ( ASTNode node ) { } public int getExtendedEnd ( ASTNode node ) { int end = ( node . getStartPosition ( ) ) + ( node . getLength ( ) ) ; if ( ( this . trailingComments ) != null ) { int [ ] range = ( ( int [ ] ) ( this . trailingComments . get ( node ) ) ) ; if ( range != null ) { if ( ( ( range [ 0 ] ) == ( - 1 ) ) && ( ( range [ 1 ] ) == ( - 1 ) ) ) { ASTNode parent = node . getParent ( ) ; <START_BUG> if ( parent != null ) { <END_BUG> return getExtendedEnd ( parent ) ; } } else { Comment lastComment = this . comments [ range [ 1 ] ] ; end = ( lastComment . getStartPosition ( ) ) + ( lastComment . getLength ( ) ) ; } } } return end - 1 ; } public int getExtendedLength ( ASTNode node ) { } void initialize ( CompilationUnit unit , Scanner sc ) { } int storeLeadingComments ( ASTNode node , int previousEnd ) { } int storeTrailingComments ( ASTNode node , int nextStart , boolean lastChild ) { } class CommentMapperVisitor extends DefaultASTVisitor { HashMap waitingSiblings = new HashMap ( 10 ) ; protected boolean visitNode ( ASTNode node ) { } protected void endVisitNode ( ASTNode node ) { } public boolean visit ( CompilationUnit node ) { } } }

Fix:
if ( ( parent != null ) && ( ( ( parent . getFlags ( ) ) & ( ASTNode . ORIGINAL ) ) != 0 ) ) {
Buggy code:
@ GwtCompatible final class Absent < T > extends Optional < T > { static final Absent < Object > INSTANCE = new Absent < Object > ( ) ; @ SuppressWarnings ( "unchecked" ) static < T > Optional < T > withType ( ) { } private Absent ( ) { } @ Override public boolean isPresent ( ) { } @ Override public T get ( ) { } @ Override public T or ( T defaultValue ) { } @ SuppressWarnings ( "unchecked" ) @ Override public Optional < T > or ( Optional < ? extends T > secondChoice ) { } @ Override public T or ( Supplier < ? extends T > supplier ) { } @ Override @ Nullable public T orNull ( ) { } @ Override public Set < T > asSet ( ) { } @ Override public < V > Optional < V > transform ( Function < ? super T , V > function ) { } @ Override public boolean equals ( @ Nullable Object object ) { } @ Override public int hashCode ( ) { <START_BUG> return 1502476572 ; <END_BUG> } @ Override public String toString ( ) { } private Object readResolve ( ) { } private static final long serialVersionUID = 0 ; }

Fix:
return 2040732332 ;
Buggy code:
public class RowDetailDialog extends JDialog implements ActionListener , DocumentListener { private static final long serialVersionUID = 6578889215615435475L ; private static final String NEXT = "next" ; private static final String PREVIOUS = "previous" ; private static final String CLOSE = "close" ; private static final String UPDATE = "update" ; private JLabel nameLabel ; private JTextField nameTF ; private JLabel valueLabel ; private JSyntaxTextArea valueTA ; private JButton nextButton ; private JButton previousButton ; private JButton closeButton ; private ObjectTableModel tableModel ; private int selectedRow ; private boolean textChanged = true ; public RowDetailDialog ( ) { } public RowDetailDialog ( ObjectTableModel tableModel , int selectedRow ) { } @ Override protected JRootPane createRootPane ( ) { } private void init ( ) { } @ Override public void actionPerformed ( ActionEvent e ) { } private void setValues ( int selectedRow ) { nameTF . setText ( ( ( String ) ( tableModel . getValueAt ( selectedRow , 0 ) ) ) ) ; <START_BUG> valueTA . setText ( ( ( String ) ( tableModel . getValueAt ( selectedRow , 1 ) ) ) ) ; <END_BUG> valueTA . setCaretPosition ( 0 ) ; textChanged = false ; } protected void doUpdate ( ActionEvent actionEvent ) { } private void changeLabelButton ( ) { } @ Override public void insertUpdate ( DocumentEvent e ) { } @ Override public void removeUpdate ( DocumentEvent e ) { } @ Override public void changedUpdate ( DocumentEvent e ) { } }

Fix:
valueTA . setInitialText ( ( ( String ) ( tableModel . getValueAt ( selectedRow , 1 ) ) ) ) ;
Buggy code:
public class DTSMuxExample { public static void main ( String [ ] args ) throws IOException { Movie movie = new Movie ( ) ; Track track = new com . googlecode . mp4parser . authoring . tracks . DTSTrackImpl ( new FileDataSourceImpl ( "C:\\Users\\sannies\\Downloads\\Big_Dom_Thl_ENG_5.1_HD_Lossless_1510.dtshd" ) ) ; movie . addTrack ( track ) ; DefaultMp4Builder builder = new DefaultMp4Builder ( ) ; Container container = builder . build ( movie ) ; <START_BUG> FileOutputStream fos = new FileOutputStream ( "output.mp4" ) ; <END_BUG> FileChannel fc = fos . getChannel ( ) ; container . writeContainer ( fc ) ; fos . close ( ) ; } }

Fix:
FileOutputStream fos = new FileOutputStream ( "c:\\dev\\isoparser-dtshd.mp4" ) ;
Buggy code:
public class TestCrash extends LuceneTestCase { private IndexWriter initIndex ( Random random , boolean initialCommit ) throws IOException { <START_BUG> return initIndex ( random , newDirectory ( random ) , initialCommit ) ; <END_BUG> } private IndexWriter initIndex ( Random random , MockDirectoryWrapper dir , boolean initialCommit ) throws IOException { } private void crash ( final IndexWriter writer ) throws IOException { } public void testCrashWhileIndexing ( ) throws IOException { } public void testWriterAfterCrash ( ) throws IOException { } public void testCrashAfterReopen ( ) throws IOException { } public void testCrashAfterClose ( ) throws IOException { } public void testCrashAfterCloseNoWait ( ) throws IOException { } }

Fix:
return initIndex ( random , newMockDirectory ( random ) , initialCommit ) ;
Buggy code:
public class RecoveredField extends RecoveredElement { public FieldDeclaration fieldDeclaration ; boolean alreadyCompletedFieldInitialization ; public RecoveredType [ ] anonymousTypes ; public int anonymousTypeCount ; public RecoveredField ( FieldDeclaration fieldDeclaration , RecoveredElement parent , int bracketBalance ) { } public RecoveredField ( FieldDeclaration fieldDeclaration , RecoveredElement parent , int bracketBalance , Parser parser ) { } public RecoveredElement add ( Statement statement , int bracketBalanceValue ) { } public RecoveredElement add ( TypeDeclaration typeDeclaration , int bracketBalanceValue ) { } public ASTNode parseTree ( ) { } public int sourceEnd ( ) { } public String toString ( int tab ) { StringBuffer buffer = new StringBuffer ( tabString ( tab ) ) ; buffer . append ( "Recovered<seq2seq4repair_space>field:\n" ) ; <START_BUG> buffer . append ( fieldDeclaration . print ( ( tab + 1 ) , buffer ) ) ; <END_BUG> if ( ( this . anonymousTypes ) != null ) { for ( int i = 0 ; i < ( this . anonymousTypeCount ) ; i ++ ) { buffer . append ( "\n" ) ; buffer . append ( anonymousTypes [ i ] . toString ( ( tab + 1 ) ) ) ; } } return buffer . toString ( ) ; } public FieldDeclaration updatedFieldDeclaration ( ) { } public RecoveredElement updateOnClosingBrace ( int braceStart , int braceEnd ) { } public RecoveredElement updateOnOpeningBrace ( int braceStart , int braceEnd ) { } public void updateParseTree ( ) { } public void updateSourceEndIfNecessary ( int bodyStart , int bodyEnd ) { } }

Fix:
fieldDeclaration . print ( ( tab + 1 ) , buffer ) ;
Buggy code:
public class PluginManagerTest extends TestCase { private File file ; protected void setUp ( ) throws Exception { } protected void tearDown ( ) throws Exception { } public void test ( ) { IPluginManager manager = PluginManager . getInstance ( ) ; <START_BUG> manager . initCorePlugins ( ) ; <END_BUG> } }

Fix:
manager . initExternalPlugins ( ) ;
Buggy code:
@ RestController @ Profile ( "androidsms" ) public class AndroidPhoneSmsGatewayController implements Consumer < Event < SmsMessage > > { @ Autowired Reactor reactor ; @ Autowired Provider < Clock > clock ; ConcurrentLinkedDeque deque = new ConcurrentLinkedDeque ( ) ; private String secretKey ; @ PostConstruct public void setup ( ) { } @ RequestMapping ( value = "//androidsms" , method = RequestMethod . POST ) @ ResponseBody public SmsSyncResponse receiveMessage ( @ ModelAttribute ( "customer" ) SyncMessage syncMessage , BindingResult result ) { } @ RequestMapping ( value = "//androidsms" , method = RequestMethod . GET ) @ ResponseBody <START_BUG> public SmsSyncResponse getQueuedMessages ( @ RequestParam <END_BUG> String task ) { return new SmsSyncResponse ( secretKey , deque . stream ( ) ) ; } @ Override public void accept ( Event < SmsMessage > smsMessageEvent ) { } }

Fix:
public SmsSyncResponse getQueuedMessages ( @ RequestParam ( required = false )
Buggy code:
public class SimpleRegressionTimeserieAnalyzer extends AbstractTimeserieAnalyzer implements ITimeserieAnalyzer { public List < TimeserieOutlier > analyze ( AbstractDataLoader dataLoader , HashMap < String , Timeseries > timeseries ) { List < TimeserieOutlier > outliers = new ArrayList < TimeserieOutlier > ( ) ; for ( Map . Entry < String , Timeseries > kv : timeseries . entrySet ( ) ) { SimpleRegression r = new SimpleRegression ( ) ; for ( Map . Entry < Long , Double > tskv : kv . getValue ( ) . getDataTrain ( ) . entrySet ( ) ) { long ts = tskv . getKey ( ) ; double val = tskv . getValue ( ) ; r . addData ( ( ( double ) ( ts ) ) , val ) ; } double slopeTs = 60.0 * ( r . getSlope ( ) ) ; dataLoader . log ( dataLoader . LOG_DEBUG , getClass ( ) . getSimpleName ( ) , ( "Slope<seq2seq4repair_space>per<seq2seq4repair_space>time<seq2seq4repair_space>step<seq2seq4repair_space>=<seq2seq4repair_space>" + slopeTs ) ) ; dataLoader . log ( dataLoader . LOG_DEBUG , getClass ( ) . getSimpleName ( ) , ( "Slope<seq2seq4repair_space>=<seq2seq4repair_space>" + ( r . getSlope ( ) ) ) ) ; dataLoader . log ( dataLoader . LOG_DEBUG , getClass ( ) . getSimpleName ( ) , ( "Slope<seq2seq4repair_space>std<seq2seq4repair_space>err<seq2seq4repair_space>=<seq2seq4repair_space>" + ( r . getSlopeStdErr ( ) ) ) ) ; dataLoader . log ( dataLoader . LOG_DEBUG , getClass ( ) . getSimpleName ( ) , ( "Slope<seq2seq4repair_space>confidence<seq2seq4repair_space>interval<seq2seq4repair_space>=<seq2seq4repair_space>" + ( r . getSlopeConfidenceInterval ( ) ) ) ) ; <START_BUG> double maxRelDif = 0.1 ; <END_BUG> for ( Map . Entry < Long , Double > tskv : kv . getValue ( ) . getDataClassify ( ) . entrySet ( ) ) { long ts = tskv . getKey ( ) ; double val = tskv . getValue ( ) ; double expectedVal = r . predict ( ts ) ; double leftBound = expectedVal * ( 1 - maxRelDif ) ; double rightBound = expectedVal * ( 1 + maxRelDif ) ; if ( ( val < leftBound ) || ( val > rightBound ) ) { TimeserieOutlier outlier = new TimeserieOutlier ( this . getClass ( ) . getSimpleName ( ) , tskv . getKey ( ) , tskv . getValue ( ) , leftBound , rightBound ) ; outliers . add ( outlier ) ; } } } return outliers ; } }

Fix:
double maxRelDif = 0.2 ;
Buggy code:
@ RunWith ( Arquillian . class ) public class WarInEarChildFirstClassLoadingTestCase { @ Deployment public static Archive < ? > deploy ( ) { } @ Test public void testChildFirst ( ) throws ClassNotFoundException { <START_BUG> Assert . assertEquals ( Stateless . class . getClassLoader ( ) , getClass ( ) . getClassLoader ( ) ) ; <END_BUG> } @ Test public void testMultipleClasses ( ) throws ClassNotFoundException { } private static Class < ? > loadClass ( String name , ClassLoader cl ) throws ClassNotFoundException { } }

Fix:
Assert . assertNotSame ( Stateless . class . getClassLoader ( ) , getClass ( ) . getClassLoader ( ) ) ;
Buggy code:
public class ElementAction { public boolean changesTagLevel = false ; public boolean flush = false ; public boolean isAnchor = false ; public JsArrayString labels = JavaScriptObject . createArray ( ) . < JsArrayString > cast ( ) ; private static final RegExp REG_COMMENT = RegExp . compile ( "\\bcomments?\\b" ) ; public static ElementAction getForElement ( Element element ) { Style style = DomUtil . getComputedStyle ( element ) ; ElementAction action = new ElementAction ( ) ; switch ( style . getDisplay ( ) ) { case "inline" : break ; case "inline-block" : case "inline-flex" : action . changesTagLevel = true ; break ; default : action . flush = true ; action . changesTagLevel = true ; break ; } String tagName = element . getTagName ( ) ; <START_BUG> if ( ! ( "BODY" . equals ( tagName ) ) ) { <END_BUG> String className = element . getAttribute ( "class" ) ; String id = element . getAttribute ( "id" ) ; if ( ( ElementAction . REG_COMMENT . test ( className ) ) || ( ElementAction . REG_COMMENT . test ( id ) ) ) { action . labels . push ( STRICTLY_NOT_CONTENT ) ; } switch ( tagName ) { case "ASIDE" : case "NAV" : action . labels . push ( STRICTLY_NOT_CONTENT ) ; break ; case "LI" : action . labels . push ( LI ) ; break ; case "H1" : action . labels . push ( H1 ) ; action . labels . push ( HEADING ) ; break ; case "H2" : action . labels . push ( H2 ) ; action . labels . push ( HEADING ) ; break ; case "H3" : action . labels . push ( H3 ) ; action . labels . push ( HEADING ) ; break ; case "A" : action . changesTagLevel = true ; if ( element . hasAttribute ( "href" ) ) { action . isAnchor = true ; } break ; } } return action ; } private ElementAction ( ) { } }

Fix:
if ( ( ! ( "HTML" . equals ( tagName ) ) ) && ( ! ( "BODY" . equals ( tagName ) ) ) ) {
Buggy code:
public class SimpleOrCriteriaPlugin extends PluginAdapter { public boolean validate ( List < String > warnings ) { } public boolean modelExampleClassGenerated ( TopLevelClass topLevelClass , IntrospectedTable introspectedTable ) { } private void modifyCriteria ( InnerClass criteria , TopLevelClass topLevelClass , IntrospectedTable introspectedTable ) { } private void modifyCriterion ( InnerClass criterion , TopLevelClass topLevelClass , IntrospectedTable introspectedTable ) { } public boolean sqlMapExampleWhereClauseElementGenerated ( XmlElement element , IntrospectedTable introspectedTable ) { traverse ( element , new FindElements ( ) { @ Override public boolean process ( XmlElement parent , Element self , int position ) { XmlElement foreach = ancestor ( 0 ) ; XmlElement trim = ancestor ( 1 ) ; if ( ( indexOf ( trim , foreach ) ) != ( indexOf ( trim , "foreach" ) ) ) return false ; XmlElement choose = traverse ( trim , new CopyXml ( ) ) ; traverse ( choose , new ReplaceText ( new TextReplacer ( "criterion\\." , "citem\\." ) , new TextReplacer ( "criterion(?=\\.|$)" , "citem" ) ) ) ; <START_BUG> traverse ( choose , new ReplaceText ( new TextReplacer ( "criteria\\." , "criterion\\.sub\\." ) ) ) ; <END_BUG> traverse ( choose , new ReplaceText ( new TextReplacer ( "^\\s*and(?=\\s|\\(|$)" , "or" ) , null ) ) ; addLater ( ( ( XmlElement ) ( self ) ) , 0 , e ( "when" , a ( "test" , "criterion.complex" ) , "and" , e ( "trim" , a ( "prefix" , "(" ) , a ( "suffix" , ")" ) , a ( "prefixOverrides" , "or" ) , new DocumentFragment ( choose ) ) ) ) ; return true ; } } . when ( ELEMENT . and ( ancestorsAndSelf ( "where" , "foreach" , "if" , "trim" , "foreach" , "choose" ) ) ) ) ; return true ; } }

Fix:
traverse ( choose , new ReplaceText ( new TextReplacer ( "criteria\\." , "criterion\\.subCriteria\\." ) ) ) ;
Buggy code:
public class CommonsPoolTargetSourceTests { private static final int INITIAL_COUNT = 10 ; private XmlBeanFactory beanFactory ; @ Before public void setUp ( ) throws Exception { <START_BUG> this . beanFactory = new XmlBeanFactory ( new ClassPathResource ( "org//springframework//aop//target//commonsPoolTests.xml" ) ) ; <END_BUG> } @ After public void tearDown ( ) { } private void testFunctionality ( String name ) { } @ Test public void testFunctionality ( ) { } @ Test public void testFunctionalityWithNoInterceptors ( ) { } @ Test public void testConfigMixin ( ) { } @ Test public void testTargetSourceSerializableWithoutConfigMixin ( ) throws Exception { } @ Test public void testProxySerializableWithoutConfigMixin ( ) throws Exception { } @ Test public void testHitMaxSize ( ) throws Exception { } @ Test public void testHitMaxSizeLoadedFromContext ( ) throws Exception { } @ Test public void testSetWhenExhaustedAction ( ) { } private void prepareTargetSource ( CommonsPoolTargetSource targetSource ) { } }

Fix:
this . beanFactory = new XmlBeanFactory ( new ClassPathResource ( ( ( getClass ( ) . getSimpleName ( ) ) + "-context.xml" ) , getClass ( ) ) ) ;
Buggy code:
public class Zip extends MatchingTask { private File zipFile ; private File baseDir ; private boolean doCompress = true ; private boolean doUpdate = false ; private boolean doFilesonly = false ; protected String archiveType = "zip" ; private static long emptyCrc = new CRC32 ( ) . getValue ( ) ; protected String emptyBehavior = "skip" ; private Vector filesets = new Vector ( ) ; private Hashtable addedDirs = new Hashtable ( ) ; private Vector addedFiles = new Vector ( ) ; private boolean addingNewFiles ; private String encoding = null ; public void setZipfile ( File zipFile ) { } public void setBasedir ( File baseDir ) { } public void setCompress ( boolean c ) { } public void setFilesonly ( boolean f ) { } public void setUpdate ( boolean c ) { } <START_BUG> public void addFileset ( FileSet set ) { <END_BUG> filesets . addElement ( set ) ; } public void addZipfileset ( ZipFileSet set ) { } public static class WhenEmpty extends EnumeratedAttribute { public String [ ] getValues ( ) { } } public void setWhenempty ( Zip . WhenEmpty we ) { } public void setEncoding ( String encoding ) { } public void execute ( ) throws BuildException { } protected boolean isAddingNewFiles ( ) { } protected void addFiles ( FileScanner scanner , ZipOutputStream zOut , String prefix , String fullpath ) throws IOException { } protected void addZipEntries ( ZipFileSet fs , DirectoryScanner ds , ZipOutputStream zOut , String prefix ) throws IOException { } protected void initZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } protected void finalizeZipOutputStream ( ZipOutputStream zOut ) throws IOException , BuildException { } protected boolean createEmptyZip ( File zipFile ) { } protected boolean isUpToDate ( FileScanner [ ] scanners , File zipFile ) throws BuildException { } protected static File [ ] grabFiles ( FileScanner [ ] scanners ) { } protected static File [ ] grabFiles ( FileScanner [ ] scanners , String [ ] [ ] fileNames ) { } protected static String [ ] [ ] grabFileNames ( FileScanner [ ] scanners ) { } protected void zipDir ( File dir , ZipOutputStream zOut , String vPath ) throws IOException { } protected void zipFile ( InputStream in , ZipOutputStream zOut , String vPath , long lastModified ) throws IOException { } protected void zipFile ( File file , ZipOutputStream zOut , String vPath ) throws IOException { } protected void addParentDirs ( File baseDir , String entry , ZipOutputStream zOut , String prefix ) throws IOException { } protected void addFiles ( Vector filesets , ZipOutputStream zOut ) throws IOException { } protected void cleanUp ( ) { } }

Fix:
public void addFileset ( ZipFileSet set ) {
Buggy code:
public class ExtendedBeanInfoFactory implements BeanInfoFactory , Ordered { public BeanInfo getBeanInfo ( Class < ? > beanClass ) throws IntrospectionException { } private boolean supports ( Class < ? > beanClass ) { for ( Method method : beanClass . getMethods ( ) ) { <START_BUG> if ( ExtendedBeanInfo . isCandidateWriteMethod ( method ) ) { <END_BUG> return true ; } } return false ; } public int getOrder ( ) { } }

Fix:
if ( ExtendedBeanInfo . isNonVoidWriteMethod ( method ) ) {
Buggy code:
public class SuggestionsPanel extends JPanel implements ActionListener { private JButton btnViewAll ; private JButton btnMarkRead ; private JButton btnViewNew ; private JPanel pnlList ; private MainGUI mainGUI ; private JPanel panel_1 ; private UserList userList ; private SuggestionInfo suggestionInfo ; private int id ; private boolean viewAll = false ; public SuggestionsPanel ( MainGUI mainGUI ) { } public void SetInfo ( UserList userList , SuggestionInfo suggestionInfo , int id ) { this . userList = userList ; this . suggestionInfo = suggestionInfo ; this . id = id ; while ( ( pnlList . getComponentCount ( ) ) > 0 ) { pnlList . remove ( 0 ) ; } ArrayList < Suggestion > suggestions = suggestionInfo . GetSuggestionList ( id ) ; Collections . sort ( suggestions , new Comparator < Suggestion > ( ) { @ Override public int compare ( Suggestion o1 , Suggestion o2 ) { <START_BUG> return o1 . date . compareTo ( o2 . date ) ; <END_BUG> } } ) ; for ( Suggestion s : suggestions ) { if ( ( viewAll ) || ( ! ( s . seen ) ) ) { SuggestionDescriptionPanel p = new SuggestionDescriptionPanel ( userList , s , this ) ; p . validate ( ) ; JPanel pnlTmp = new JPanel ( new FlowLayout ( FlowLayout . CENTER ) ) ; pnlTmp . add ( p ) ; pnlList . add ( pnlTmp ) ; } } } @ Override public void actionPerformed ( ActionEvent e ) { } public void MarkSuggestionAsRead ( Suggestion suggestion ) { } }

Fix:
return o2 . date . compareTo ( o1 . date ) ;
Buggy code:
public final class ComponentTypeInjectionSource extends InjectionSource { private final String typeName ; public ComponentTypeInjectionSource ( final String typeName ) { } <START_BUG> public void getResourceValue ( final ComponentConfiguration componentConfiguration , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) throws DeploymentUnitProcessingException { <END_BUG> final DeploymentUnit deploymentUnit = phaseContext . getDeploymentUnit ( ) ; final EEApplicationDescription applicationDescription = deploymentUnit . getAttachment ( Attachments . EE_APPLICATION_DESCRIPTION ) ; final Set < ViewDescription > componentsForViewName = applicationDescription . getComponentsForViewName ( typeName ) ; final Iterator < ViewDescription > iterator = componentsForViewName . iterator ( ) ; if ( ! ( iterator . hasNext ( ) ) ) { throw new DeploymentUnitProcessingException ( ( ( "No<seq2seq4repair_space>component<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'" ) ) ; } final ViewDescription description = iterator . next ( ) ; if ( iterator . hasNext ( ) ) { throw new DeploymentUnitProcessingException ( ( ( "Multiple<seq2seq4repair_space>components<seq2seq4repair_space>found<seq2seq4repair_space>for<seq2seq4repair_space>type<seq2seq4repair_space>'" + ( typeName ) ) + "'" ) ) ; } serviceBuilder . addDependency ( description . getServiceName ( ) , ManagedReferenceFactory . class , injector ) ; } public boolean equals ( final Object injectionSource ) { } private boolean equals ( final ComponentTypeInjectionSource configuration ) { } public int hashCode ( ) { } }

Fix:
public void getResourceValue ( final ResolutionContext resolutionContext , final ServiceBuilder < ? > serviceBuilder , final DeploymentPhaseContext phaseContext , final Injector < ManagedReferenceFactory > injector ) throws DeploymentUnitProcessingException {
Buggy code:
public class TestReaderClosed extends LuceneTestCase { private IndexSearcher searcher ; private IndexReader reader ; private Directory dir ; @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; dir = newDirectory ( ) ; RandomIndexWriter writer = new RandomIndexWriter ( random , dir , newIndexWriterConfig ( TEST_VERSION_CURRENT , new org . apache . lucene . analysis . MockAnalyzer ( random , MockTokenizer . KEYWORD , false ) ) . setMaxBufferedDocs ( _TestUtil . nextInt ( random , 50 , 1000 ) ) ) ; Document doc = new Document ( ) ; Field field = newField ( "field" , "" , TYPE_UNSTORED ) ; doc . add ( field ) ; int num = atLeast ( 10 ) ; for ( int i = 0 ; i < num ; i ++ ) { <START_BUG> field . setValue ( _TestUtil . randomUnicodeString ( random , 10 ) ) ; <END_BUG> writer . addDocument ( doc ) ; } reader = writer . getReader ( ) ; searcher = newSearcher ( reader ) ; writer . close ( ) ; } public void test ( ) throws Exception { } public void tearDown ( ) throws Exception { } }

Fix:
field . setStringValue ( _TestUtil . randomUnicodeString ( random , 10 ) ) ;
Buggy code:
public class PlannerModel extends Observable { Hashtable < Integer , Week > weeks ; int stars = 0 ; String baseAnimalMessage = "Welcome<seq2seq4repair_space>to<seq2seq4repair_space>the<seq2seq4repair_space>Homework<seq2seq4repair_space>Planner<seq2seq4repair_space>app!<seq2seq4repair_space>Press<seq2seq4repair_space>on<seq2seq4repair_space>a<seq2seq4repair_space>week<seq2seq4repair_space>to<seq2seq4repair_space>get<seq2seq4repair_space>started." ; ArrayList < String > randomAnimalMessageList ; boolean animalHandlerRunning = false ; public PlannerModel ( ) { } public void setTempAnimalMessage ( String msg , int time ) { } public void setRandomTempAnimalMessage ( ) { } public void setBaseAnimalMessage ( String msg ) { } public String getAnimalMessage ( ) { } public String getStars ( ) { } public void addStar ( ) { } public void removeStar ( ) { } public ArrayList < Day > getDaysOfWeek ( int weekNumber ) { } public ArrayList < HomeWorkSession > getSessionsByDay ( int weekId , int dayId ) { } public HomeWorkSession getSession ( int weekNumber , int dayNumber , int position ) { } public int getWeekSubjectSessionCount ( int week_nr , Subject subject ) { } public int getSubjectPlannedTime ( int week_nr , Subject subject ) { } public int getSubjectPlannedBreakTime ( int week_nr , Subject subject ) { } public ArrayList < Week > getWeeks ( ) { } public Week getWeek ( int weekNumber ) { } public String addSession ( int weekNumber , int dayNumber , int position , Assignment assignment ) { Day day = weeks . get ( weekNumber ) . getDay ( dayNumber ) ; String change = day . addSessionAtTime ( position , new HomeWorkSession ( assignment ) ) ; <START_BUG> if ( change . equals ( "Schemalagt!" ) ) { <END_BUG> setChangedDay ( dayNumber ) ; } return change ; } public boolean isFree ( int weekNumber , int dayNumber , int position ) { } public String addCustomSession ( int weekNumber , int dayNumber , int startPosition , int numberOfBlocks , String title , String description ) { } public boolean removeCustomSession ( int weekNumber , int dayNumber , int position ) { } public void setChangedDay ( int dayNumber ) { } public void removeSession ( int weekNumber , int dayNumber , int position ) { } public void initializeTestData ( ) { } }

Fix:
if ( change . equals ( "Scheduled!" ) ) {
Buggy code:
public class JMXSubsystemTestCase extends AbstractSubsystemTest { private static final String LAUNCH_TYPE = "launch-type" ; private static final String TYPE_STANDALONE = "STANDALONE" ; public JMXSubsystemTestCase ( ) { } @ Test public void testParseEmptySubsystem ( ) throws Exception { } @ Test public void testParseSubsystemWithBadChild ( ) throws Exception { } @ Test public void testParseSubsystemWithBadAttribute ( ) throws Exception { } @ Test public void testParseSubsystemWithConnector ( ) throws Exception { } @ Test public void testParseSubsystemWithTwoConnectors ( ) throws Exception { } @ Test public void testParseSubsystemWithBadConnectorAttribute ( ) throws Exception { } @ Test public void testInstallIntoController ( ) throws Exception { String subsystemXml = ( ( ( "<subsystem<seq2seq4repair_space>xmlns=\"" + ( CURRENT . getUriString ( ) ) ) + "\">" ) + "<remoting-connector//>" ) + "<//subsystem>" ; KernelServices services = super . installInController ( new JMXSubsystemTestCase . BaseAdditionalInitalization ( ) , subsystemXml ) ; ModelNode model = services . readWholeModel ( ) ; Assert . assertTrue ( model . get ( SUBSYSTEM ) . hasDefined ( SUBSYSTEM_NAME ) ) ; String host = "localhost" ; int port = 12345 ; <START_BUG> String urlString = System . getProperty ( "jmx.service.url" , ( ( ( "service:jmx:remote:////" + host ) + ":" ) + port ) ) ; <END_BUG> JMXServiceURL serviceURL = new JMXServiceURL ( urlString ) ; MBeanServerConnection connection = null ; long end = ( System . currentTimeMillis ( ) ) + 10000 ; do { try { connection = JMXConnectorFactory . connect ( serviceURL , null ) . getMBeanServerConnection ( ) ; } catch ( Exception e ) { e . printStackTrace ( ) ; Thread . sleep ( 500 ) ; } } while ( ( connection == null ) && ( ( System . currentTimeMillis ( ) ) < end ) ) ; Assert . assertNotNull ( connection ) ; connection . getMBeanCount ( ) ; super . assertRemoveSubsystemResources ( services ) ; } @ Test public void testParseAndMarshalModel1_0 ( ) throws Exception { } @ Test public void testParseAndMarshalModel1_1 ( ) throws Exception { } @ Test public void testParseAndMarshalModel1_1WithShowModel ( ) throws Exception { } @ Test public void testParseAndMarshalModelWithRemoteConnectorRef1_1 ( ) throws Exception { } @ Test public void testDescribeHandler ( ) throws Exception { } private void assertJmxConnectorAddress ( ModelNode address ) { } private void assertJmxSubsystemAddress ( ModelNode address ) { } private static class BaseAdditionalInitalization extends AdditionalInitialization { @ Override protected void initializeExtraSubystemsAndModel ( ExtensionRegistry extensionRegistry , Resource rootResource , ManagementResourceRegistration rootRegistration ) { } @ Override protected void setupController ( ControllerInitializer controllerInitializer ) { } @ Override protected void addExtraServices ( final ServiceTarget target ) { } } }

Fix:
String urlString = System . getProperty ( "jmx.service.url" , ( ( ( "service:jmx:remoting-jmx:////" + host ) + ":" ) + port ) ) ;
Buggy code:
public class HiddenFileFilter extends AbstractFileFilter implements Serializable { public static final IOFileFilter HIDDEN = new HiddenFileFilter ( ) ; public static final IOFileFilter VISIBLE = new NotFileFilter ( HiddenFileFilter . HIDDEN ) ; protected HiddenFileFilter ( ) { } @ Override <START_BUG> public boolean accept ( File file ) { <END_BUG> return file . isHidden ( ) ; } }

Fix:
public boolean accept ( final File file ) {
Buggy code:
public class Application extends JavaController { static IFiveWinsController controller ; private static String player_on_turn_sign = null ; public static Result index ( ) throws TechnicalException { final CommonProfile profile = getUserProfile ( ) ; <START_BUG> final String urlGoogle = getRedirectAction ( "Google2Client" ) . getLocation ( ) ; <END_BUG> return ok ( index . render ( ) ) ; } public static Result game ( ) { } public static Result newGame ( Integer fieldSize ) { } public static Result newGameAI ( Integer fieldSize , String sign ) { } public static Result setCell ( String column , String row ) { } public static Result gamefieldTojson ( ) { } public static WebSocket < String > connectWebSocket ( ) { } private static Result protectedIndex ( ) { } @ RequiresAuthentication ( clientName = "Google2Client" ) public static Result googleIndex ( ) { } }

Fix:
final String urlGoogle = getRedirectAction ( "Google2Client" , "//?0" ) . getLocation ( ) ;
Buggy code:
public class AddAnnotationToMethodParameterTest extends AbstractAnnotationTest { @ Override public String getPackageName ( ) { } @ Override public String getClassName ( ) { } @ Override public String getClassContents ( ) { } @ Override public Annotation getAnnotation ( ) { } public void testAddAnnotationToMethodParameter ( ) { try { assertNotNull ( annotation ) ; assertEquals ( WebParam . class . getSimpleName ( ) , AnnotationUtils . getAnnotationName ( annotation ) ) ; IMethod method = source . findPrimaryType ( ) . getMethod ( "add" , new String [ ] { "I" , "I" } ) ; assertNotNull ( method ) ; ILocalVariable localVariable = AnnotationUtils . getLocalVariable ( method , "i" ) ; <START_BUG> textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( localVariable , WebParam . class ) ) ; <END_BUG> textFileChange . addEdit ( AnnotationUtils . createAddAnnotationTextEdit ( localVariable , annotation ) ) ; assertTrue ( executeChange ( new NullProgressMonitor ( ) , textFileChange ) ) ; assertTrue ( AnnotationUtils . isAnnotationPresent ( localVariable , annotation ) ) ; assertTrue ( source . getImport ( WebParam . class . getCanonicalName ( ) ) . exists ( ) ) ; } catch ( CoreException ce ) { fail ( ce . getLocalizedMessage ( ) ) ; } } }

Fix:
textFileChange . addEdit ( AnnotationUtils . createAddImportTextEdit ( localVariable , WebParam . class . getCanonicalName ( ) ) ) ;
Buggy code:
@ WebServlet ( urlPatterns = { "//RolloutServlet" } , loadOnStartup = 1 ) public class RolloutPlanTestServlet extends HttpServlet { public static final String BIND_PORT_PARAM = "bindPort" ; public static final String OP_PARAM = "operation" ; public static final String OP_BIND = "bind" ; public static final String OP_UNBIND = "unbind" ; private Date initDate ; private int bindPort ; private ServerSocket socket ; private String host ; private static final Logger log = Logger . getLogger ( RolloutPlanTestServlet . class ) ; protected void processRequest ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } @ Override public void init ( ServletConfig config ) throws ServletException { } @ Override public void destroy ( ) { } protected void doGet ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } protected void doPost ( HttpServletRequest request , HttpServletResponse response ) throws IOException , ServletException { } private void bind ( ) throws ServletException { if ( ( socket ) != null ) <START_BUG> throw new ServletException ( "Allready<seq2seq4repair_space>boud." ) ; <END_BUG> try { socket = new ServerSocket ( ) ; socket . bind ( new InetSocketAddress ( host , bindPort ) ) ; RolloutPlanTestServlet . log . info ( ( ( ( ( "Bound<seq2seq4repair_space>to<seq2seq4repair_space>address<seq2seq4repair_space>" + ( host ) ) + "<seq2seq4repair_space>port<seq2seq4repair_space>" ) + ( bindPort ) ) + "." ) ) ; } catch ( IOException ioe ) { throw new ServletException ( "Bind<seq2seq4repair_space>failed." , ioe ) ; } } private void unbind ( ) throws ServletException { } }

Fix:
throw new ServletException ( "Already<seq2seq4repair_space>bound." ) ;
Buggy code:
public class Converter { public static Object convert ( Object value , Class < ? > toType ) { } public static Calendar getCalendar ( Object date , Calendar defaultValue ) { } public static Calendar getCalendar ( Object o ) { } public static Date getDate ( Object date ) { } public static String urlEncode ( Object toEncode ) { } public static Date getDate ( Object date , Date defaultValue ) { } public String formatNumber ( float num , String pattern ) { } public static float getFloat ( Object o , float defaultValue ) { } public static float getFloat ( Object o ) { } public static double getDouble ( Object o , double defaultValue ) { } public static double getDouble ( Object o ) { } public static boolean getBoolean ( Object o ) { } public static boolean getBoolean ( Object o , boolean defaultValue ) { } public static int getInt ( Object o , int defaultValue ) { } public static char getChar ( Object o ) { } public static char getChar ( Object o , char defaultValue ) { } public static int getInt ( Object o ) { } public static long getLong ( Object o , long defaultValue ) { } public static long getLong ( Object o ) { } public static String formatDate ( Date date , String pattern ) { } public static String formatDate ( java . sql . Date date , String pattern ) { } public static String formatDate ( String date , String pattern ) { } public static String formatDate ( Calendar date , String pattern ) { } public static String formatCalendar ( Calendar date , String pattern ) { } public static String getString ( Object o , String defaultValue ) { } public static String insertLineBreaks ( String v , String insertion ) { if ( v == null ) { return "" ; } <START_BUG> StringBuffer replacement = new StringBuffer ( ) ; <END_BUG> StringTokenizer tokens = new StringTokenizer ( v , "\n" , true ) ; while ( tokens . hasMoreTokens ( ) ) { String token = tokens . nextToken ( ) ; if ( ( token . compareTo ( "\n" ) ) == 0 ) { replacement . append ( insertion ) ; } else { replacement . append ( token ) ; } } return replacement . toString ( ) ; } public static String getString ( Object o ) { } }

Fix:
StringBuilder replacement = new StringBuilder ( ) ;
Buggy code:
public class CreateNote extends Activity { private static final String TAG = "notepad" ; private Button addNoteToDB ; private EditText titleEditText ; private EditText contentEditText ; private boolean isEdit ; private DBHelper dbhelper ; private SQLiteDatabase db ; private String editTitle ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; setContentView ( createlayout ) ; addNoteToDB = ( ( Button ) ( findViewById ( R . id . addNoteToDB ) ) ) ; titleEditText = ( ( EditText ) ( findViewById ( TitleEditText ) ) ) ; contentEditText = ( ( EditText ) ( findViewById ( ContentEditText ) ) ) ; dbhelper = new DBHelper ( getApplicationContext ( ) ) ; Intent mIntent = getIntent ( ) ; editTitle = mIntent . getStringExtra ( "title" ) ; isEdit = mIntent . getBooleanExtra ( "isEdit" , false ) ; if ( isEdit ) { Log . d ( CreateNote . TAG , "isEdit" ) ; db = dbhelper . getReadableDatabase ( ) ; <START_BUG> Cursor c = dbhelper . getNote ( db , editTitle ) ; <END_BUG> db . close ( ) ; titleEditText . setText ( c . getString ( 0 ) ) ; contentEditText . setText ( c . getString ( 1 ) ) ; addNoteToDB . setText ( getResources ( ) . getString ( updateNoteButton ) ) ; } addNoteToDB . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { String title = titleEditText . getText ( ) . toString ( ) ; String content = contentEditText . getText ( ) . toString ( ) ; if ( ( title . equals ( "" ) ) || ( content . equals ( "" ) ) ) { Toast . makeText ( getApplicationContext ( ) , getResources ( ) . getString ( validation ) , LENGTH_LONG ) . show ( ) ; return ; } if ( ! ( isEdit ) ) { dbhelper = new DBHelper ( getApplicationContext ( ) ) ; dbhelper . addNote ( title , content ) ; finish ( ) ; } else { dbhelper . updateNote ( title , content , editTitle ) ; finish ( ) ; } } } ) ; } @ Override protected void onPause ( ) { } }

Fix:
Cursor c = dbhelper . getNote ( db , editTitle , 0 ) ;
Buggy code:
public class EnhancedSimpsonIntegrator implements SampledFunctionIntegrator { public double [ ] integrate ( SampledFunctionIterator iter ) throws ExhaustedSampleException , FunctionException { EnhancedSimpsonIntegratorSampler sampler = new EnhancedSimpsonIntegratorSampler ( iter ) ; double [ ] sum = null ; try { while ( true ) { <START_BUG> sum = sampler . nextSamplePoint ( ) . getY ( ) ; <END_BUG> } } catch ( ExhaustedSampleException e ) { } return sum ; } }

Fix:
sum = sampler . nextSamplePoint ( ) . y ;
Buggy code:
public final class UpdatrServiceImpl implements UpdatrService { private static final int BUFFER_SIZE = 1024 ; private static final int TIMEOUT = 60000 ; private static final String DOWNLOAD_URL = "download_url" ; private static final String CURRENT_VERSION = "current_version" ; private static final String NEW_LIBS_URL = "new_libs" ; private static final String RELEASE_NOTES = "release_notes" ; private static final Logger LOG = LoggerFactory . getLogger ( UpdatrService . class ) ; @ Override public CheckForVersionResult checkForNewVersion ( final String updatrUrl , final String existingVersion ) throws InvalidUpdatrFormatException , IOException { } @ Override public boolean performUpdate ( final UpdatrSession session , final UpdatrCallback callback ) throws UpdatrProcessingException , IOException { } private void relaunchApp ( UpdatrSession session ) { } private Map < String , String > loadPropertiesMap ( final String updatrUrl ) throws InvalidUpdatrFormatException , IOException { URL url = new URL ( updatrUrl ) ; Map < String , String > properties = new HashMap < String , String > ( ) ; boolean valid = true ; try ( BufferedReader in = new BufferedReader ( new InputStreamReader ( url . openStream ( ) , "UTF-8" ) ) ) { String inputLine ; String [ ] lineItems ; while ( ( inputLine = in . readLine ( ) ) != null ) { UpdatrServiceImpl . LOG . debug ( inputLine ) ; lineItems = inputLine . split ( "=" ) ; if ( ( lineItems . length ) > 1 ) { <START_BUG> properties . put ( lineItems [ 0 ] . trim ( ) , lineItems [ 1 ] . trim ( ) ) ; <END_BUG> } else { UpdatrServiceImpl . LOG . info ( ( "Invalid<seq2seq4repair_space>line:<seq2seq4repair_space>" + inputLine ) ) ; } } } if ( ( ! valid ) || ( properties . isEmpty ( ) ) ) { throw new InvalidUpdatrFormatException ( ) ; } return properties ; } private void printReleaseNotes ( final String releaseNotesUrl ) throws IOException { } private void loadUrlToFile ( final String url , final File outputFile ) throws IOException { } private void downloadNewLibs ( final String newLibsUrl ) throws IOException { } private void replaceNewVersionInScript ( final UpdatrSession session ) throws IOException { } private void extractFile ( final ZipInputStream zipIn , final String filePath ) throws IOException { } }

Fix:
properties . put ( lineItems [ 0 ] . trim ( ) , inputLine . substring ( ( ( inputLine . indexOf ( "=" ) ) + 1 ) ) ) ;
Buggy code:
public class TestGameBoard { private GameBoard testBoard ; @ Before public void setup ( ) { } @ After public void tearDown ( ) { } @ Test public void testAddPieceMethod ( ) { } @ Test public void testSelectedButtonPressedNoSelectedPiece ( ) { } @ Test public void testSelectedButtonPressedSameSelectedPiecePressed ( ) { } @ Test public void testSelectedButtonPressedClearPiecePressed ( ) { TestGameBoard . NoneGuiGameBoard board = ( ( TestGameBoard . NoneGuiGameBoard ) ( testBoard ) ) ; board . remove ( board . getPieces ( ) [ 0 ] [ 0 ] ) ; AbstractPiece piece = ( ( AbstractPiece ) ( PieceFactory . createLieutenant ( ) ) ) ; board . addPiece ( 0 , 0 , piece ) ; piece . setSelected ( true ) ; board . setSelectedPiece ( piece ) ; board . selectedButtonPressed ( new Point ( 0 , 1 ) ) ; Assert . assertFalse ( piece . isSelected ( ) ) ; Assert . assertTrue ( ( ( piece . getLocation ( ) . getX ( ) ) == 0 ) ) ; <START_BUG> Assert . assertTrue ( ( ( piece . getLocation ( ) . getX ( ) ) == 1 ) ) ; <END_BUG> } private class NoneGuiGameBoard extends GameBoard { public NoneGuiGameBoard ( User owner ) { } @ Override protected void instantiateBoard ( ) { } public AbstractPiece [ ] [ ] getPieces ( ) { } public AbstractPiece getSelectedPiece ( ) { } public void setSelectedPiece ( AbstractPiece piece ) { } } }

Fix:
Assert . assertTrue ( ( ( piece . getLocation ( ) . getY ( ) ) == 1 ) ) ;