nus-yam/ex-repair huggingface dataset:
Buggy code:
public class FriendlyFinderJob extends DugoutSpringQuartzJob { private SettingsProvider settingsProvider = new SettingsProvider ( ) ; private ClubNavigator clubNavigator = new ClubNavigator ( driver , settingsProvider , jobLogger ) ; private DivisionNavigator divisionNavigator = new DivisionNavigator ( driver , settingsProvider ) ; private CalendarNavigator calendarNavigator = new CalendarNavigator ( driver , settingsProvider ) ; private FriendlyPreferences friendlyPreferences = new FriendlyPreferences ( ) ; private ClubRepository clubRepository ; private List < Club > challengedClubs ; private List < Club > challengedToday = new ArrayList < > ( ) ; @ Override protected void executeTask ( JobExecutionContext context ) throws ParseException { } private void challengeClubs ( ) { } private boolean shouldChallengeClub ( Club club ) { boolean clubRatingMatches = ( club . getClubRating ( ) ) >= ( friendlyPreferences . getOpponentMinimumRating ( ) ) ; boolean lastActiveMatches = ( DugoutUtils . getDaysBetween ( Calendar . getInstance ( ) . getTime ( ) , club . getLastActive ( ) ) ) <= ( friendlyPreferences . maxNumberOfDaysSinceLastActive ( ) ) ; <START_BUG> boolean stadiumCapacityMatches = ( club . getStadiumCapacityAvailable ( ) ) <= ( friendlyPreferences . getOpponentMaximumStadiumSize ( ) ) ; <END_BUG> if ( ( ( ! clubRatingMatches ) || ( ! lastActiveMatches ) ) || ( ! stadiumCapacityMatches ) ) { return false ; } return clubNavigator . isFriendlyAvailable ( club ) ; } private List < Club > getClubsToBeChallenged ( ) { } private List < Club > updateClubDetails ( List < Club > clubsToBeChallenged ) { } public List < Club > getChallengedClubs ( ) { } public List < Club > getChallengedToday ( ) { } }

Fix:
boolean stadiumCapacityMatches = ( club . getStadiumCapacityTotal ( ) ) <= ( friendlyPreferences . getOpponentMaximumStadiumSize ( ) ) ;
Buggy code:
public class SprintServiceImpl implements SprintService { private static final SimpleDateFormat dateFormat = new SimpleDateFormat ( "yyyy-MM-dd" ) ; private SprintDao sprintDao ; private StoryDao storyDao ; public SprintDao getSprintDao ( ) { } public void setSprintDao ( SprintDao sprintDao ) { } public StoryDao getStoryDao ( ) { } public void setStoryDao ( StoryDao storyDao ) { } @ Override public SprintTo updateSprint ( SprintTo sprint ) { } @ Override public SprintTo createSprint ( SprintTo sprint , String projectId , String parentSprintId ) { } @ Override public List < SprintTo > getSprintsForProject ( String projectId ) { } @ Override public void deleteSprint ( String sprintId ) { } @ Override public SprintTo getSprintById ( String sprintId ) { } @ Override public SprintTo getCurrentSprint ( String projectId ) { } private SprintTo findCurrentChildSprint ( List < SprintTo > sprints ) { List < SprintTo > parentSprints = new ArrayList < SprintTo > ( ) ; if ( ( sprints == null ) && ( ( sprints . size ( ) ) < 1 ) ) return null ; for ( SprintTo sprint : sprints ) { if ( ( ( sprint . getSubSprints ( ) ) != null ) && ( ( sprint . getSubSprints ( ) . size ( ) ) > 0 ) ) parentSprints . add ( sprint ) ; } <START_BUG> sprints . remove ( parentSprints ) ; <END_BUG> if ( ( sprints . size ( ) ) <= 0 ) return null ; return sprints . get ( 0 ) ; } @ Override public List < SprintTo > getParentSprints ( String projectId ) { } }

Fix:
sprints . removeAll ( parentSprints ) ;
Buggy code:
public class BooleanValue extends Value { private boolean value ; public BooleanValue ( String prop ) { } public Class < Boolean > getValueType ( ) { } public void set ( boolean value ) { } <START_BUG> public boolean get ( ) { <END_BUG> return value ; } protected String getInternalString ( ) { } protected void setInternalString ( String val ) { } protected void setInternalObject ( Object obj ) { } }

Fix:
public Boolean get ( ) {
Buggy code:
public class BatchRemoveLineHandler extends CommandHandlerWithHelp { public BatchRemoveLineHandler ( ) { } @ Override public boolean isAvailable ( CommandContext ctx ) { } @ Override protected void doHandle ( CommandContext ctx ) { BatchManager batchManager = ctx . getBatchManager ( ) ; if ( ! ( batchManager . isBatchActive ( ) ) ) { ctx . printLine ( "No<seq2seq4repair_space>active<seq2seq4repair_space>batch." ) ; return ; } Batch batch = batchManager . getActiveBatch ( ) ; final int batchSize = batch . size ( ) ; if ( batchSize == 0 ) { ctx . printLine ( "The<seq2seq4repair_space>batch<seq2seq4repair_space>is<seq2seq4repair_space>empty." ) ; return ; } <START_BUG> List < String > arguments = ctx . getArguments ( ) ; <END_BUG> if ( arguments . isEmpty ( ) ) { ctx . printLine ( "Missing<seq2seq4repair_space>line<seq2seq4repair_space>number." ) ; return ; } if ( ( arguments . size ( ) ) != 1 ) { ctx . printLine ( ( "Expected<seq2seq4repair_space>only<seq2seq4repair_space>one<seq2seq4repair_space>argument<seq2seq4repair_space>-<seq2seq4repair_space>the<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>but<seq2seq4repair_space>received:<seq2seq4repair_space>" + arguments ) ) ; return ; } String intStr = arguments . get ( 0 ) ; int lineNumber ; try { lineNumber = Integer . parseInt ( intStr ) ; } catch ( NumberFormatException e ) { ctx . printLine ( ( ( ( "Failed<seq2seq4repair_space>to<seq2seq4repair_space>parse<seq2seq4repair_space>line<seq2seq4repair_space>number<seq2seq4repair_space>'" + intStr ) + "':<seq2seq4repair_space>" ) + ( e . getLocalizedMessage ( ) ) ) ) ; return ; } if ( ( lineNumber < 1 ) || ( lineNumber > batchSize ) ) { ctx . printLine ( ( ( ( lineNumber + "<seq2seq4repair_space>isn't<seq2seq4repair_space>in<seq2seq4repair_space>range<seq2seq4repair_space>[1.." ) + batchSize ) + "]." ) ) ; return ; } batch . remove ( ( lineNumber - 1 ) ) ; } }

Fix:
List < String > arguments = ctx . getOtherArguments ( ) ;
Buggy code:
public class PeriodicWorkReceiver extends BroadcastReceiver { public static final String TAG = "PeriodicWorkReceiver" ; private static final int PENDING_INTENT_ID = 9762458 ; @ Override public void onReceive ( Context context , Intent in ) { Log . v ( PeriodicWorkReceiver . TAG , "PeriodicWorkReceiver<seq2seq4repair_space>called" ) ; Intent intent ; <START_BUG> intent = new Intent ( context , PullCommandsCommand . class ) ; <END_BUG> intent . putExtra ( INTENT_COMMAND_STRING_PARAM , COMMAND_STRING ) ; intent . putExtra ( INTENT_OUTGOING_COMMUNICATION_TYPE_PARAM , OUTGOING_COMMUNICATION_TYPE_BROADCAST ) ; context . startService ( intent ) ; intent = new Intent ( context , CommandExecutorService . class ) ; intent . putExtra ( INTENT_COMMAND_STRING_PARAM , UpdateLocationHistoryCommand . COMMAND_STRING ) ; intent . putExtra ( INTENT_OUTGOING_COMMUNICATION_TYPE_PARAM , OUTGOING_COMMUNICATION_TYPE_BROADCAST ) ; context . startService ( intent ) ; } public static void registerPeriodicWorkReceiver ( Context context ) { } private static PendingIntent createPendingIntent ( Context context ) { } }

Fix:
intent = new Intent ( context , CommandExecutorService . class ) ;
Buggy code:
public class CommentRecorderParser extends Parser { int [ ] commentStops = new int [ 10 ] ; int [ ] commentStarts = new int [ 10 ] ; int commentPtr = - 1 ; protected static final int CommentIncrement = 100 ; public CommentRecorderParser ( ProblemReporter problemReporter , boolean optimizeStringLiterals ) { } public void checkComment ( ) { if ( ( ! ( ( this . diet ) && ( ( this . dietInt ) == 0 ) ) ) && ( ( this . scanner . commentPtr ) >= 0 ) ) { flushCommentsDefinedPriorTo ( this . endStatementPosition ) ; } boolean deprecated = false ; boolean checkDeprecated = false ; int lastCommentIndex = - 1 ; nextComment : for ( lastCommentIndex = this . scanner . commentPtr ; lastCommentIndex >= 0 ; lastCommentIndex -- ) { int commentSourceStart = this . scanner . commentStarts [ lastCommentIndex ] ; if ( ( ( commentSourceStart < 0 ) || ( ( ( this . modifiersSourceStart ) != ( - 1 ) ) && ( ( this . modifiersSourceStart ) < commentSourceStart ) ) ) || ( ( this . scanner . commentStops [ lastCommentIndex ] ) < 0 ) ) { continue nextComment ; } checkDeprecated = true ; int commentSourceEnd = ( this . scanner . commentStops [ lastCommentIndex ] ) - 1 ; if ( this . javadocParser . shouldReportProblems ) { this . javadocParser . reportProblems = ( ( this . currentElement ) == null ) || ( commentSourceEnd > ( this . lastJavadocEnd ) ) ; } else { this . javadocParser . reportProblems = false ; } deprecated = this . javadocParser . checkDeprecation ( lastCommentIndex ) ; this . javadoc = this . javadocParser . docComment ; <START_BUG> if ( ( currentElement ) == null ) <END_BUG> this . lastJavadocEnd = commentSourceEnd ; break nextComment ; } if ( deprecated ) { checkAndSetModifiers ( ClassFileConstants . AccDeprecated ) ; } if ( ( lastCommentIndex >= 0 ) && checkDeprecated ) { this . modifiersSourceStart = this . scanner . commentStarts [ lastCommentIndex ] ; if ( ( this . modifiersSourceStart ) < 0 ) { this . modifiersSourceStart = - ( this . modifiersSourceStart ) ; } } } protected void consumeClassHeader ( ) { } protected void consumeEmptyTypeDeclaration ( ) { } protected void consumeInterfaceHeader ( ) { } public boolean containsComment ( int sourceStart , int sourceEnd ) { } protected CompilationUnitDeclaration endParse ( int act ) { } public int flushCommentsDefinedPriorTo ( int position ) { } public int [ ] [ ] getCommentsPositions ( ) { } public void initialize ( boolean initializeNLS ) { } public void initialize ( ) { } public void initializeScanner ( ) { } private void pushOnCommentsStack ( int start , int end ) { } protected void resetModifiers ( ) { } }

Fix:
if ( ( this . currentElement ) == null )
Buggy code:
public class GrammarExistingVariable extends GrammarRule < Expression > { private final VarType type ; private String name ; public GrammarExistingVariable ( Variable . VarType type , String name ) { } @ Override public Expression parseGrammar ( ) throws GrammarException { Variable variable = VariableTable . getInstance ( ) . get ( name ) ; if ( notNull ( variable ) ) { System . out . println ( ( ( ( name ) + "<seq2seq4repair_space>is<seq2seq4repair_space>currently<seq2seq4repair_space>" ) + ( variable . getValue ( ) ) ) ) ; } else { System . out . println ( ( ( "variable<seq2seq4repair_space>" + ( name ) ) + "<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exist.<seq2seq4repair_space>" ) ) ; return null ; } <START_BUG> if ( ! ( type . equals ( variable . getType ( ) ) ) ) <END_BUG> except ( ( ( ( ( ( ( "Expected<seq2seq4repair_space>variable<seq2seq4repair_space>'" + ( name ) ) + "'<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>type<seq2seq4repair_space>'" ) + ( type . name ( ) ) ) + "'<seq2seq4repair_space>but<seq2seq4repair_space>was<seq2seq4repair_space>'" ) + ( variable . getType ( ) . name ( ) ) ) + "'" ) , true ) ; return new Expression ( Type . Expression , variable . getType ( ) ) ; } }

Fix:
if ( ( notNull ( type ) ) && ( ! ( type . equals ( variable . getType ( ) ) ) ) )
Buggy code:
public class SizeAssertionGui extends AbstractAssertionGui implements ActionListener { private static final long serialVersionUID = 241L ; private JRadioButton responseBodyButton ; private JRadioButton responseNetworkButton ; private JRadioButton responseMessageButton ; private JRadioButton responseCodeButton ; private JRadioButton responseHeadersButton ; private JTextField size ; private JRadioButton equalButton ; private JRadioButton notequalButton ; private JRadioButton greaterthanButton ; private JRadioButton lessthanButton ; private JRadioButton greaterthanequalButton ; private JRadioButton lessthanequalButton ; private int execState ; public SizeAssertionGui ( ) { } public String getLabelResource ( ) { } public TestElement createTestElement ( ) { } public void modifyTestElement ( TestElement el ) { } @ Override public void clearGui ( ) { } @ Override public void configure ( TestElement el ) { super . configure ( el ) ; SizeAssertion assertion = ( ( SizeAssertion ) ( el ) ) ; size . setText ( assertion . getAllowedSize ( ) ) ; setState ( assertion . getCompOper ( ) ) ; <START_BUG> showScopeSettings ( assertion ) ; <END_BUG> if ( assertion . isTestFieldResponseHeaders ( ) ) { responseHeadersButton . setSelected ( true ) ; } else if ( assertion . isTestFieldResponseBody ( ) ) { responseBodyButton . setSelected ( true ) ; } else if ( assertion . isTestFieldResponseCode ( ) ) { responseCodeButton . setSelected ( true ) ; } else if ( assertion . isTestFieldResponseMessage ( ) ) { responseMessageButton . setSelected ( true ) ; } else { responseNetworkButton . setSelected ( true ) ; } } public void setState ( int state ) { } public int getState ( ) { } private void init ( ) { } private JPanel createFieldPanel ( ) { } private Box createComparatorButtonPanel ( ) { } private JRadioButton createComparatorButton ( String name , int value , ButtonGroup group ) { } public void actionPerformed ( ActionEvent e ) { } }

Fix:
showScopeSettings ( assertion , true ) ;
Buggy code:
public class CreateFilterOnMessageCommand extends FolderCommand { private static final Logger LOG = Logger . getLogger ( "org.columba.mail.folder.command" ) ; public static final String FILTER_ON_SUBJECT = "Subject" ; public static final String FILTER_ON_FROM = "From" ; public static final String FILTER_ON_TO = "To" ; private String filterType ; private Filter filter = null ; private MessageFolder srcFolder ; public CreateFilterOnMessageCommand ( DefaultCommandReference [ ] references , String filterType ) { } public void updateGUI ( ) throws Exception { if ( ( ( filter ) != null ) && ( ( srcFolder ) != null ) ) { <START_BUG> FilterDialog dialog = new FilterDialog ( filter ) ; <END_BUG> if ( ! ( dialog . wasCancelled ( ) ) ) { srcFolder . getFilterList ( ) . add ( filter ) ; } } } public void execute ( WorkerStatusController worker ) throws Exception { } public Filter createFilter ( String filterDescr , String headerField , String pattern ) { } }

Fix:
FilterDialog dialog = new FilterDialog ( getFrameMediator ( ) . getView ( ) . getFrame ( ) , filter ) ;
Buggy code:
public class CharacterLiteral extends Expression { private static final String SPECIALS = "\b\t\n\f\r\"\'\\" ; private static final String QUOTED_SPECIALS = "btnfr\"\'\\" ; private String escapedValue = "\'X\'" ; CharacterLiteral ( AST ast ) { } ASTNode clone ( AST target ) { } boolean equalSubtrees ( Object other ) { } void accept0 ( ASTVisitor visitor ) { } public String getEscapedValue ( ) { } public void setEscapedValue ( String value ) { if ( value == null ) { throw new IllegalArgumentException ( ) ; } <START_BUG> Scanner scanner = this . getAST ( ) . scanner ; <END_BUG> char [ ] source = value . toCharArray ( ) ; scanner . setSourceBuffer ( source ) ; scanner . resetTo ( 0 , source . length ) ; try { int tokenType = scanner . getNextToken ( ) ; switch ( tokenType ) { case Scanner . TokenNameCharacterLiteral : break ; default : throw new IllegalArgumentException ( ) ; } } catch ( InvalidInputException e ) { throw new IllegalArgumentException ( ) ; } modifying ( ) ; this . escapedValue = value ; } public char charValue ( ) { } public void setCharValue ( char value ) { } int memSize ( ) { } int treeSize ( ) { } }

Fix:
Scanner scanner = getAST ( ) . scanner ;
Buggy code:
public class ParallelALSFactorizationJobTest extends TasteTestCase { private static final Logger log = LoggerFactory . getLogger ( ParallelALSFactorizationJobTest . class ) ; private File inputFile ; private File intermediateDir ; private File outputDir ; private File tmpDir ; private Configuration conf ; @ Before @ Override public void setUp ( ) throws Exception { super . setUp ( ) ; inputFile = getTestTempFile ( "prefs.txt" ) ; intermediateDir = getTestTempDir ( "intermediate" ) ; intermediateDir . delete ( ) ; outputDir = getTestTempDir ( "output" ) ; outputDir . delete ( ) ; tmpDir = getTestTempDir ( "tmp" ) ; <START_BUG> conf = new Configuration ( ) ; <END_BUG> SharingMapper . reset ( ) ; } @ Test public void completeJobToyExample ( ) throws Exception { } @ Test public void completeJobToyExampleMultithreaded ( ) throws Exception { } private void explicitExample ( int numThreads ) throws Exception { } @ Test public void completeJobImplicitToyExample ( ) throws Exception { } @ Test public void completeJobImplicitToyExampleMultithreaded ( ) throws Exception { } public void implicitExample ( int numThreads ) throws Exception { } @ Test public void exampleWithIDMapping ( ) throws Exception { } protected static String preferencesAsText ( Matrix preferences ) { } @ Test public void recommenderJobWithIDMapping ( ) throws Exception { } }

Fix:
conf = getConfiguration ( ) ;
Buggy code:
public class BinaryVerbHandler implements IVerbHandler { private static Logger logger_ = Logger . getLogger ( BinaryVerbHandler . class ) ; private static ThreadLocal < RowMutationContext > tls_ = new InheritableThreadLocal < RowMutationContext > ( ) ; public void doVerb ( Message message ) { <START_BUG> byte [ ] bytes = ( ( byte [ ] ) ( message . getMessageBody ( ) [ 0 ] ) ) ; <END_BUG> RowMutationContext rowMutationCtx = BinaryVerbHandler . tls_ . get ( ) ; if ( rowMutationCtx == null ) { rowMutationCtx = new RowMutationContext ( ) ; BinaryVerbHandler . tls_ . set ( rowMutationCtx ) ; } rowMutationCtx . buffer_ . reset ( bytes , bytes . length ) ; try { RowMutationMessage rmMsg = RowMutationMessage . serializer ( ) . deserialize ( rowMutationCtx . buffer_ ) ; RowMutation rm = rmMsg . getRowMutation ( ) ; rowMutationCtx . row_ . key ( rm . key ( ) ) ; rm . load ( rowMutationCtx . row_ ) ; } catch ( Exception e ) { BinaryVerbHandler . logger_ . debug ( LogUtil . throwableToString ( e ) ) ; } } }

Fix:
byte [ ] bytes = message . getMessageBody ( ) ;
Buggy code:
public class NumberTools { private static Random rand = new Random ( ) ; private static DecimalFormat decfmt = new DecimalFormat ( ) ; public static int randomInt ( int max ) { } public static int randomInt ( int min , int max ) { } public static double randomDouble ( double max ) { } public static double randomDouble ( double min , double max ) { } public static void printDecimal ( int digits , double n ) { } public static void printDecimal ( double n ) { } public static String decimalString ( double n ) { <START_BUG> return NumberTools . decimalString ( 2 ) ; <END_BUG> } public static String decimalString ( int digits , double n ) { } No newline ; at end ; of file ; }

Fix:
return NumberTools . decimalString ( 2 , n ) ;
Buggy code:
public class Recipes { public static void init ( ) { GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModBlocks . BlockReedBundle ) , "rr" , "rr" , 'r' , new net . minecraft . item . ItemStack ( Items . reeds ) ) ; <START_BUG> GameRegistry . addShapelessRecipe ( new net . minecraft . item . ItemStack ( Items . reeds ) , new net . minecraft . item . ItemStack ( ModBlocks . BlockReedBundle ) ) ; <END_BUG> GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModItems . itemExoBeltCore ) , "iji" , "sns" , "iji" , 'i' , new net . minecraft . item . ItemStack ( Items . iron_ingot ) , 'j' , new net . minecraft . item . ItemStack ( ModItems . itemExoBeltJumper ) , 's' , new net . minecraft . item . ItemStack ( ModItems . itemExoBeltBooster ) , 'n' , new net . minecraft . item . ItemStack ( Items . nether_star ) ) ; GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModItems . itemExoBelt ) , "lll" , "l<seq2seq4repair_space>l" , "lcl" , 'l' , new net . minecraft . item . ItemStack ( Items . leather ) , 'c' , new net . minecraft . item . ItemStack ( ModItems . itemExoBeltCore ) ) ; GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModItems . itemExoBeltBooster ) , "iri" , "rdr" , "iri" , 'i' , new net . minecraft . item . ItemStack ( Items . iron_ingot ) , 'r' , new net . minecraft . item . ItemStack ( Blocks . redstone_block ) , 'd' , new net . minecraft . item . ItemStack ( Items . diamond ) ) ; GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModItems . itemExoBeltJumper ) , "igi" , "gdg" , "igi" , 'i' , new net . minecraft . item . ItemStack ( Items . iron_ingot ) , 'g' , new net . minecraft . item . ItemStack ( Blocks . glowstone ) , 'd' , new net . minecraft . item . ItemStack ( Items . diamond ) ) ; GameRegistry . addShapedRecipe ( new net . minecraft . item . ItemStack ( ModBlocks . BlockPoweredAnvil ) , "<seq2seq4repair_space>c<seq2seq4repair_space>" , "iai" , 'c' , new net . minecraft . item . ItemStack ( GameRegistry . findItem ( "ThermalExpansion" , "Cell" ) , 1 , 2 ) , 'i' , new net . minecraft . item . ItemStack ( Items . iron_ingot ) , 'a' , new net . minecraft . item . ItemStack ( Blocks . anvil ) ) ; GameRegistry . addRecipe ( new RecipePatCarpet ( ) ) ; GameRegistry . addRecipe ( new RecipePatGlass ( ) ) ; } }

Fix:
GameRegistry . addShapelessRecipe ( new net . minecraft . item . ItemStack ( Items . reeds , 4 ) , new net . minecraft . item . ItemStack ( ModBlocks . BlockReedBundle ) ) ;
Buggy code:
public class P4Add extends P4Base { private String addCmd = "" ; private ArrayList filesets = new ArrayList ( ) ; private int m_cmdLength = 450 ; private int m_changelist ; public void setChangelist ( int changelist ) throws TaskException { } public void setCommandlength ( int len ) throws TaskException { } public void addFileset ( FileSet set ) { } public void execute ( ) throws TaskException { if ( ( P4View ) != null ) { addCmd = P4View ; } P4CmdOpts = ( ( m_changelist ) > 0 ) ? "-c<seq2seq4repair_space>" + ( m_changelist ) : "" ; StringBuffer filelist = new StringBuffer ( ) ; for ( int i = 0 ; i < ( filesets . size ( ) ) ; i ++ ) { FileSet fs = ( ( FileSet ) ( filesets . get ( i ) ) ) ; <START_BUG> DirectoryScanner ds = fs . getDirectoryScanner ( getProject ( ) ) ; <END_BUG> String [ ] srcFiles = ds . getIncludedFiles ( ) ; if ( srcFiles != null ) { for ( int j = 0 ; j < ( srcFiles . length ) ; j ++ ) { File f = new File ( ds . getBasedir ( ) , srcFiles [ j ] ) ; filelist . append ( "<seq2seq4repair_space>" ) . append ( '"' ) . append ( f . getAbsolutePath ( ) ) . append ( '"' ) ; if ( ( filelist . length ( ) ) > ( m_cmdLength ) ) { execP4Add ( filelist ) ; filelist . setLength ( 0 ) ; } } if ( ( filelist . length ( ) ) > 0 ) { execP4Add ( filelist ) ; } } else { getLogger ( ) . warn ( "No<seq2seq4repair_space>files<seq2seq4repair_space>specified<seq2seq4repair_space>to<seq2seq4repair_space>add!" ) ; } } } private void execP4Add ( StringBuffer list ) { } }

Fix:
DirectoryScanner ds = fs . getDirectoryScanner ( ) ;
Buggy code:
public abstract class CommonDeployableContainer < T extends CommonContainerConfiguration > implements DeployableContainer < T > { private static final String JBOSS_URL_PKG_PREFIX = "org.jboss.ejb.client.naming" ; private T containerConfig ; @ Inject @ ContainerScoped private InstanceProducer < ManagementClient > managementClient ; @ Inject @ ContainerScoped private InstanceProducer < ArchiveDeployer > archiveDeployer ; @ Inject @ ApplicationScoped private InstanceProducer < Context > jndiContext ; @ Override public ProtocolDescription getDefaultProtocol ( ) { <START_BUG> return new ProtocolDescription ( "Servlet<seq2seq4repair_space>3.0" ) ; <END_BUG> } @ Override public void setup ( T config ) { } @ Override public final void start ( ) throws LifecycleException { } protected abstract void startInternal ( ) throws LifecycleException { } @ Override public final void stop ( ) throws LifecycleException { } protected abstract void stopInternal ( ) throws LifecycleException { } protected T getContainerConfiguration ( ) { } protected ManagementClient getManagementClient ( ) { } protected ModelControllerClient getModelControllerClient ( ) { } @ Override public ProtocolMetaData deploy ( Archive < ? > archive ) throws DeploymentException { } @ Override public void undeploy ( Archive < ? > archive ) throws DeploymentException { } @ Override public void deploy ( Descriptor descriptor ) throws DeploymentException { } @ Override public void undeploy ( Descriptor descriptor ) throws DeploymentException { } private void safeCloseClient ( ) { } }

Fix:
return new ProtocolDescription ( "jmx-as7" ) ;
Buggy code:
public class ComponentFactory { private final Properties properties ; private Map < String , Object > components ; public ComponentFactory ( Properties properties ) { } public < T > T createComponent ( String componentType , Class < T > defaultComponent ) throws ComponentInstantiationException { } public < T > T createComponent ( Class < T > componentClass ) throws ComponentInstantiationException { } public < T > T createComponent ( ConfigurationParameter componentType , Class < T > defaultComponent ) { } public < T > T createComponent ( ConfigurationParameter componentType ) { <START_BUG> return createComponent ( componentType , null ) ; <END_BUG> } public String getProperty ( String key ) { } }

Fix:
return createComponent ( componentType , ( ( Class < T > ) ( null ) ) ) ;
Buggy code:
@ SuppressWarnings ( "serial" ) public class OCommandGremlin extends OCommandRequestTextAbstract { public OCommandGremlin ( ) { } public OCommandGremlin ( final String iText ) { } public boolean isIdempotent ( ) { } @ Override public String toString ( ) { <START_BUG> return "gremlin." + ( OIOUtils . getStringMaxLength ( text , 200 , "..." ) ) ; <END_BUG> } }

Fix:
return "gremlin." + ( text ) ;
Buggy code:
public class XMLJUnitResultFormatter implements JUnitResultFormatter , XMLConstants { private static DocumentBuilder getDocumentBuilder ( ) { } private NumberFormat nf = NumberFormat . getInstance ( Locale . US ) ; private Document doc ; private Element rootElement ; private Element currentTest ; private long lastTestStart = 0 ; private OutputStream out ; public XMLJUnitResultFormatter ( ) { } public void setOutput ( OutputStream out ) { } public void setSystemOutput ( String out ) { } public void setSystemError ( String out ) { } public void startTestSuite ( JUnitTest suite ) { } public void endTestSuite ( JUnitTest suite ) throws BuildException { rootElement . setAttribute ( ATTR_TESTS , ( "" + ( suite . runCount ( ) ) ) ) ; rootElement . setAttribute ( ATTR_FAILURES , ( "" + ( suite . failureCount ( ) ) ) ) ; rootElement . setAttribute ( ATTR_ERRORS , ( "" + ( suite . errorCount ( ) ) ) ) ; rootElement . setAttribute ( ATTR_TIME , nf . format ( ( ( suite . getRunTime ( ) ) // 1000.0 ) ) ) ; if ( ( out ) != null ) { Writer wri = null ; try { <START_BUG> wri = new OutputStreamWriter ( out ) ; <END_BUG> wri . write ( "<?xml<seq2seq4repair_space>version=\"1.0\"?>\n" ) ; new DOMElementWriter ( ) . write ( rootElement , wri , 0 , "<seq2seq4repair_space>" ) ; wri . flush ( ) ; } catch ( IOException exc ) { throw new BuildException ( "Unable<seq2seq4repair_space>to<seq2seq4repair_space>write<seq2seq4repair_space>log<seq2seq4repair_space>file" , exc ) ; } finally { if ( ( ( out ) != ( System . out ) ) && ( ( out ) != ( System . err ) ) ) { if ( wri != null ) { try { wri . close ( ) ; } catch ( IOException e ) { } } } } } } public void startTest ( Test t ) { } public void endTest ( Test test ) { } public void addFailure ( Test test , Throwable t ) { } public void addFailure ( Test test , AssertionFailedError t ) { } public void addError ( Test test , Throwable t ) { } private void formatError ( String type , Test test , Throwable t ) { } private void formatOutput ( String type , String output ) { } }

Fix:
wri = new OutputStreamWriter ( out , "UTF8" ) ;
Buggy code:
public class ZAProxyScannerTest { static WebDriver driver ; static ZAProxyScanner zaproxy ; static String HOST = "127.0.0.1" ; static int PORT = 8888 ; static String CHROME = "src//test//resources//chromedriver-mac" ; static String BASEURL = "http:////localhost:9090//" ; @ BeforeClass public static void configure ( ) throws Exception { } @ AfterClass public static void tearDown ( ) throws Exception { } @ Before public void setup ( ) throws ProxyException { } @ Test public void testGetXmlReport ( ) throws ProxyException { <START_BUG> String report = ZAProxyScannerTest . zaproxy . getXmlReport ( ) ; <END_BUG> assert report . startsWith ( "<?xml<seq2seq4repair_space>version=\"1.0\"" ) ; assert report . endsWith ( "<//OWASPZAPReport>" ) ; } @ Test public void testGetHistory ( ) throws ProxyException { } @ Test public void testMakeRequest ( ) throws IOException { } @ Test public void testCookiesWithMakeRequest ( ) throws IOException { } @ Test public void testSimpleActiveScanWorkflow ( ) throws InterruptedException { } private Map < String , List < Alert > > getAlertsByHost ( List < Alert > alerts ) { } public void openLoginPage ( ) { } public void login ( String user , String pass ) { } }

Fix:
String report = new String ( ZAProxyScannerTest . zaproxy . getXmlReport ( ) ) ;
Buggy code:
public class TestSubqueries extends CriteriaTest { public void testExist ( ) { } public void testNotExist ( ) { String query = "SELECT<seq2seq4repair_space>DISTINCT<seq2seq4repair_space>o.name<seq2seq4repair_space>FROM<seq2seq4repair_space>CompUser<seq2seq4repair_space>o<seq2seq4repair_space>WHERE<seq2seq4repair_space>NOT<seq2seq4repair_space>EXISTS" + ( "<seq2seq4repair_space>(SELECT<seq2seq4repair_space>s<seq2seq4repair_space>FROM<seq2seq4repair_space>CompUser<seq2seq4repair_space>s<seq2seq4repair_space>WHERE<seq2seq4repair_space>s.address.country<seq2seq4repair_space>=<seq2seq4repair_space>" + "o.address.country)" ) ; CriteriaQuery < String > q = cb . createQuery ( String . class ) ; Root < CompUser > o = q . from ( CompUser . class ) ; Subquery < CompUser > sq = q . subquery ( CompUser . class ) ; Root < CompUser > s = sq . from ( CompUser . class ) ; sq . select ( s ) ; sq . where ( cb . equal ( s . get ( address ) . get ( country ) , o . get ( address ) . get ( country ) ) ) ; <START_BUG> q . where ( cb . exists ( sq ) . negate ( ) ) ; <END_BUG> q . select ( o . get ( name ) ) . distinct ( true ) ; assertEquivalence ( q , query ) ; } public void testAny ( ) { } public void testSubquery01 ( ) { } public void testSubquery02 ( ) { } public void testSubquery03 ( ) { } public void testSubquery04 ( ) { } public void testSubquery05 ( ) { } public void testSubquery06 ( ) { } public void testSubquery07 ( ) { } public void testSubquery08 ( ) { } public void testSubquery09 ( ) { } public void testSubquery10 ( ) { } public void testSubquery11 ( ) { } public void testSubquery12 ( ) { } public void testSubquery13 ( ) { } public void testSubquery14 ( ) { } public void testSubquery15 ( ) { } public void testSubquery16 ( ) { } public void testSubquery17 ( ) { } public void testSubquery18 ( ) { } public void testSubquery19 ( ) { } public void testSubquery20 ( ) { } public void testSubquery21 ( ) { } public void testSubquery22 ( ) { } public void testSubquery23 ( ) { } }

Fix:
q . where ( cb . exists ( sq ) . not ( ) ) ;
Buggy code:
public class ControlPanel extends BoardObject { private ProximityFont healthText ; private ProximityFont lineText ; private ProximityFont polygonText ; private ProximityFont pointText ; private static int width = 300 ; private static int height = graphics . getHeight ( ) ; private List < ControlPanelTower > controlPanelTowerList = new ArrayList < ControlPanelTower > ( ) ; private int towersPerRow = 1 ; private static Image background = new Image ( ( ( Constants . filePath ) + "Backgrounds//temporaryControlPanelBackground.png" ) ) ; public ControlPanel ( ) { } public void initiateText ( ) { } public void initiateControlPanelTowers ( ) { } public void setHealth ( int percent ) { } public void setResources ( Resources resources ) { lineText . setText ( ( "Lines:<seq2seq4repair_space>" + ( resources . getLines ( ) ) ) ) ; polygonText . setText ( ( "Polygons:<seq2seq4repair_space>" + ( resources . getPolygons ( ) ) ) ) ; <START_BUG> pointText . setText ( ( "Points:<seq2seq4repair_space>" + ( resources . getPolygons ( ) ) ) ) ; <END_BUG> } public ControlPanelTower getTowerOnPosition ( Vector2 position ) { } private ProximityFont createFont ( float x , float y , String s ) { } public void render ( SpriteBatch batch ) { } }

Fix:
pointText . setText ( ( "Points:<seq2seq4repair_space>" + ( resources . getPoints ( ) ) ) ) ;
Buggy code:
public class StreamPumper implements Runnable { private static final int SIZE = 128 ; private InputStream is ; private OutputStream os ; private boolean finished ; private boolean closeWhenExhausted ; public StreamPumper ( InputStream is , OutputStream os , boolean closeWhenExhausted ) { } public StreamPumper ( InputStream is , OutputStream os ) { } public void run ( ) { synchronized ( this ) { finished = false ; } final byte [ ] buf = new byte [ StreamPumper . SIZE ] ; int length ; try { while ( ( length = is . read ( buf ) ) > 0 ) { os . write ( buf , 0 , length ) ; } } catch ( Exception e ) { } finally { if ( closeWhenExhausted ) { try { os . close ( ) ; } catch ( IOException e ) { } } synchronized ( this ) { finished = true ; <START_BUG> notify ( ) ; <END_BUG> } } } public synchronized boolean isFinished ( ) { } public synchronized void waitFor ( ) throws InterruptedException { } }

Fix:
notifyAll ( ) ;
Buggy code:
public abstract class NamedMember extends Member { protected String name ; public NamedMember ( JavaElement parent , String name ) { } private void appendTypeParameters ( StringBuffer buffer ) throws JavaModelException { } public String getElementName ( ) { } protected String getKey ( IField field , boolean forceOpen ) throws JavaModelException { } protected String getKey ( IMethod method , boolean forceOpen ) throws JavaModelException { } protected String getKey ( IType type , boolean forceOpen ) throws JavaModelException { } protected String getFullyQualifiedParameterizedName ( String fullyQualifiedName , String uniqueKey ) throws JavaModelException { } protected IPackageFragment getPackageFragment ( ) { } public String getFullyQualifiedName ( char enclosingTypeSeparator , boolean showParameters ) throws JavaModelException { } public String getTypeQualifiedName ( char enclosingTypeSeparator , boolean showParameters ) throws JavaModelException { NamedMember declaringType ; switch ( this . parent . getElementType ( ) ) { case IJavaElement . COMPILATION_UNIT : if ( showParameters ) { StringBuffer buffer = new StringBuffer ( this . name ) ; appendTypeParameters ( buffer ) ; return buffer . toString ( ) ; } return this . name ; case IJavaElement . CLASS_FILE : String classFileName = this . parent . getElementName ( ) ; String typeName ; if ( ( classFileName . indexOf ( '$' ) ) == ( - 1 ) ) { typeName = this . name ; } else { <START_BUG> typeName = classFileName . substring ( 0 , classFileName . lastIndexOf ( '.' ) ) ; <END_BUG> } if ( showParameters ) { StringBuffer buffer = new StringBuffer ( typeName ) ; appendTypeParameters ( buffer ) ; return buffer . toString ( ) ; } return typeName ; case IJavaElement . TYPE : declaringType = ( ( NamedMember ) ( this . parent ) ) ; break ; case IJavaElement . FIELD : case IJavaElement . INITIALIZER : case IJavaElement . METHOD : declaringType = ( ( NamedMember ) ( ( ( IMember ) ( this . parent ) ) . getDeclaringType ( ) ) ) ; break ; default : return null ; } StringBuffer buffer = new StringBuffer ( declaringType . getTypeQualifiedName ( enclosingTypeSeparator , showParameters ) ) ; buffer . append ( enclosingTypeSeparator ) ; String simpleName = ( ( this . name . length ( ) ) == 0 ) ? Integer . toString ( this . occurrenceCount ) : this . name ; buffer . append ( simpleName ) ; if ( showParameters ) { appendTypeParameters ( buffer ) ; } return buffer . toString ( ) ; } protected ITypeParameter [ ] getTypeParameters ( ) throws JavaModelException { } public String [ ] [ ] resolveType ( String typeName ) throws JavaModelException { } public String [ ] [ ] resolveType ( String typeName , WorkingCopyOwner owner ) throws JavaModelException { } }

Fix:
typeName = classFileName . substring ( 0 , classFileName . lastIndexOf ( '.' ) ) . replace ( '$' , enclosingTypeSeparator ) ;
Buggy code:
public class CountryData { private CountryI [ ] countryData ; private RequestI _request ; public CountryData ( RequestI request ) { } public StateI [ ] getState ( ) { } public CountryI [ ] getCountryData ( ) { IndianPinCodeFile indianFile = IndianPinCodeFile . getInstance ( _request ) ; PakistanPinCodeFile pakFile = PakistanPinCodeFile . getInstance ( _request ) ; UnitedStatesZinCodeFile usaFile = UnitedStatesZinCodeFile . getInstance ( _request ) ; IsoCountryFile isoFile = IsoCountryFile . getInstance ( _request ) ; isoFile . getIsoCountryList ( ) ; CountryI india = indianFile . getCountryInfo ( ) ; <START_BUG> CountryI pak = pakFile . getCountryInfo ( ) ; <END_BUG> CountryI usa = usaFile . getCountryInfo ( ) ; return new CountryI [ ] { india , pak , usa } ; } }

Fix:
CountryI pak = null ;
Buggy code:
public class ServletContainerDefinition extends SimplePersistentResourceDefinition { static final ServletContainerDefinition INSTANCE = new ServletContainerDefinition ( ) ; private ServletContainerDefinition ( ) { } @ Override public Collection < AttributeDefinition > getAttributes ( ) { } @ Override public List < ? extends PersistentResourceDefinition > getChildren ( ) { <START_BUG> return Collections . singletonList ( JSPDefinition . INSTANCE ) ; <END_BUG> } }

Fix:
return Collections . singletonList ( JspDefinition . INSTANCE ) ;
Buggy code:
public class Coordinator extends Thread { TreeSet < Integer > AvailableNodes ; Semaphore ReadLock ; public Coordinator ( ) throws InterruptedException { } public void printTitle ( ) { } public void sendMessage ( Message m , int destination ) throws IOException , UnknownHostException { } public void run ( ) { BufferedReader br = new BufferedReader ( new InputStreamReader ( System . in ) ) ; printTitle ( ) ; while ( true ) { try { ReadLock . acquire ( ) ; } catch ( InterruptedException e1 ) { e1 . printStackTrace ( ) ; } System . out . print ( "Input<seq2seq4repair_space>Commands:\t" ) ; try { String line = br . readLine ( ) ; Message m = new Message ( line ) ; int destination = m . To ; if ( ( m . Operation ) == 0 ) { if ( AvailableNodes . contains ( m . To ) ) { System . out . println ( ( ( "Node<seq2seq4repair_space>" + ( m . To ) ) + "<seq2seq4repair_space>already<seq2seq4repair_space>exists!" ) ) ; ReadLock . release ( ) ; continue ; } else { Node n = new Node ( m . To , 8 , 0 ) ; n . start ( ) ; <START_BUG> Thread . sleep ( 100 ) ; <END_BUG> } } if ( ( m . Operation ) == 1 ) { if ( ! ( AvailableNodes . contains ( m . To ) ) ) { System . out . println ( "Node<seq2seq4repair_space>does<seq2seq4repair_space>not<seq2seq4repair_space>exists<seq2seq4repair_space>for<seq2seq4repair_space>finding!" ) ; ReadLock . release ( ) ; continue ; } } if ( ( m . Operation ) == 2 ) { if ( ( ( m . To ) == 0 ) || ( ! ( AvailableNodes . contains ( m . To ) ) ) ) { System . out . println ( "Invalid<seq2seq4repair_space>leave<seq2seq4repair_space>operation!" ) ; ReadLock . release ( ) ; continue ; } } if ( destination > 0 ) { sendMessage ( m , destination ) ; } else { for ( int nodeIndex : AvailableNodes ) { sendMessage ( m , nodeIndex ) ; } } } catch ( IOException e ) { e . printStackTrace ( ) ; } catch ( InterruptedException e ) { e . printStackTrace ( ) ; } } } public void handleMessages ( String line ) throws IOException , ClassNotFoundException , ParseException { } public static void main ( String [ ] args ) throws InterruptedException { } }

Fix:
Thread . sleep ( 1000 ) ;
Buggy code:
public class Events extends ArrayList < Event > { public boolean addEvent ( Event e ) { } public Event find ( String name ) { } public void updateEventProviders ( int curCap ) { } public void addProvider ( Provider p ) { } public String toString ( ) { <START_BUG> String str = "" ; <END_BUG> for ( int x = 0 ; x < ( size ( ) ) ; x ++ ) { str += ( get ( x ) . toString ( ) ) + '\n' ; } return str ; } }

Fix:
String str = "\n" ;
Buggy code:
public class WebSubsystemAdd extends AbstractSubsystemAdd < WebSubsystemElement > { private static final long serialVersionUID = 1079329665126341623L ; private static final String BASE_DIR = "jboss.home.dir" ; private String defaultHost ; private WebContainerConfigElement config ; public WebSubsystemAdd ( ) { } protected < P > void applyUpdate ( UpdateContext context , UpdateResultHandler < ? super Void , P > resultHandler , P param ) { final String defaultHost = ( ( this . defaultHost ) != null ) ? this . defaultHost : "localhost" ; final WebServerService service = new WebServerService ( defaultHost ) ; context . getBatchBuilder ( ) . addService ( JBOSS_WEB , service ) . addDependency ( AbstractPathService . pathNameOf ( WebSubsystemAdd . BASE_DIR ) , String . class , service . getPathInjector ( ) ) . addOptionalDependency ( JBOSS . append ( "mbean" , "server" ) , MBeanServer . class , service . getMbeanServer ( ) ) . addListener ( new UpdateResultHandler . ServiceStartListener < P > ( resultHandler , param ) ) . setInitialMode ( ON_DEMAND ) ; <START_BUG> WebDeploymentActivator . activate ( defaultHost , new SharedWebMetaDataBuilder ( config ) , context . getBatchBuilder ( ) ) ; <END_BUG> } protected WebSubsystemElement createSubsystemElement ( ) { } public String getDefaultHost ( ) { } public void setDefaultHost ( String defaultHost ) { } public WebContainerConfigElement getConfig ( ) { } public void setConfig ( WebContainerConfigElement config ) { } }

Fix:
WebDeploymentActivator . activate ( defaultHost , new SharedWebMetaDataBuilder ( config ) , new SharedTldsMetaDataBuilder ( config ) , context . getBatchBuilder ( ) ) ;
Buggy code:
public interface Meet < Ty > extends JoinMeet < Ty > , TyAlgQuery < Ty , IMeet < Ty > > , typed . Meet < Ty > { @ Override default IMeet < Ty > TyRecord ( List < Tuple2 < String , Ty > > fS ) { return ( ty ) -> matcher ( ) . TyRecord ( ( fT ) -> { Stream < String > labelsS = fS . stream ( ) . map ( ( pr ) -> pr . _1 ) ; Stream < String > labelsT = fT . stream ( ) . map ( ( pr ) -> pr . _1 ) ; Set < String > allLabels = java . util . stream . Stream . concat ( labelsS , labelsT ) . collect ( java . util . stream . Collectors . toSet ( ) ) ; List < Tuple2 < String , Ty > > allFields = allLabels . stream ( ) . map ( ( l ) -> { Ty tyS = fS . stream ( ) . filter ( ( pr ) -> pr . _1 . equals ( l ) ) . findFirst ( ) . map ( ( pr ) -> pr . _2 ) . get ( ) ; Ty tyT = fT . stream ( ) . filter ( ( pr ) -> pr . _1 . equals ( l ) ) . findFirst ( ) . map ( ( pr ) -> pr . _2 ) . get ( ) ; <START_BUG> return new Tuple2 < > ( l , join ( tyS , tyT ) ) ; <END_BUG> } ) . collect ( java . util . stream . Collectors . toList ( ) ) ; return alg ( ) . TyRecord ( allFields ) ; } ) . otherwise ( ( ) -> m ( ) . empty ( ) . meet ( ty ) ) . visitTy ( ty ) ; } }

Fix:
return new Tuple2 < > ( l , meet ( tyS , tyT ) ) ;
Buggy code:
public class OvsdbBridgeConfig extends AbstractHandlerBehaviour implements BridgeConfig { @ Override public void addBridge ( BridgeName bridgeName ) { } @ Override public void deleteBridge ( BridgeName bridgeName ) { } @ Override public Collection < BridgeDescription > getBridges ( ) { } @ Override public void addPort ( PortDescription port ) { } @ Override public void deletePort ( PortDescription port ) { } @ Override public Collection < PortDescription > getPorts ( ) { } private OvsdbNodeId changeDeviceIdToNodeId ( DeviceId deviceId ) { int lastColon = deviceId . toString ( ) . lastIndexOf ( ":" ) ; int fistColon = deviceId . toString ( ) . indexOf ( ":" ) ; <START_BUG> String ip = deviceId . toString ( ) . substring ( ( fistColon + 1 ) , ( lastColon - 1 ) ) ; <END_BUG> String port = deviceId . toString ( ) . substring ( ( lastColon + 1 ) ) ; IpAddress ipAddress = IpAddress . valueOf ( ip ) ; long portL = Long . valueOf ( port ) . longValue ( ) ; return new OvsdbNodeId ( ipAddress , portL ) ; } private OvsdbClientService getOvsdbNode ( DriverHandler handler ) { } }

Fix:
String ip = deviceId . toString ( ) . substring ( ( fistColon + 1 ) , lastColon ) ;
Buggy code:
public class GaussNewtonOptimizer extends AbstractLeastSquaresOptimizer { private final boolean useLU ; @ Deprecated public GaussNewtonOptimizer ( ) { } public GaussNewtonOptimizer ( ConvergenceChecker < PointVectorValuePair > checker ) { } @ Deprecated public GaussNewtonOptimizer ( final boolean useLU ) { } public GaussNewtonOptimizer ( final boolean useLU , ConvergenceChecker < PointVectorValuePair > checker ) { } @ Override public PointVectorValuePair doOptimize ( ) { final ConvergenceChecker < PointVectorValuePair > checker = getConvergenceChecker ( ) ; if ( checker == null ) { throw new NullArgumentException ( ) ; } final double [ ] targetValues = getTarget ( ) ; final int nR = targetValues . length ; final RealMatrix weightMatrix = getWeight ( ) ; final double [ ] residualsWeights = new double [ nR ] ; for ( int i = 0 ; i < nR ; i ++ ) { residualsWeights [ i ] = weightMatrix . getEntry ( i , i ) ; } <START_BUG> double [ ] currentPoint = getStartPoint ( ) ; <END_BUG> PointVectorValuePair current = null ; int iter = 0 ; for ( boolean converged = false ; ! converged ; ) { ++ iter ; PointVectorValuePair previous = current ; final double [ ] currentObjective = computeObjectiveValue ( currentPoint ) ; final double [ ] currentResiduals = computeResiduals ( currentObjective ) ; final RealMatrix weightedJacobian = computeJacobian ( currentPoint ) ; current = new PointVectorValuePair ( currentPoint , currentObjective ) ; final double [ ] b = new double [ cols ] ; final double [ ] [ ] a = new double [ cols ] [ cols ] ; for ( int i = 0 ; i < ( rows ) ; ++ i ) { final double [ ] grad = weightedJacobian . getRow ( i ) ; final double weight = residualsWeights [ i ] ; final double residual = - ( currentResiduals [ i ] ) ; final double wr = weight * residual ; for ( int j = 0 ; j < ( cols ) ; ++ j ) { b [ j ] += wr * ( grad [ j ] ) ; } for ( int k = 0 ; k < ( cols ) ; ++ k ) { double [ ] ak = a [ k ] ; double wgk = weight * ( grad [ k ] ) ; for ( int l = 0 ; l < ( cols ) ; ++ l ) { ak [ l ] += wgk * ( grad [ l ] ) ; } } } try { RealMatrix mA = new BlockRealMatrix ( a ) ; DecompositionSolver solver = ( useLU ) ? new org . apache . commons . math3 . linear . LUDecomposition ( mA ) . getSolver ( ) : new org . apache . commons . math3 . linear . QRDecomposition ( mA ) . getSolver ( ) ; final double [ ] dX = solver . solve ( new ArrayRealVector ( b , false ) ) . toArray ( ) ; for ( int i = 0 ; i < ( cols ) ; ++ i ) { currentPoint [ i ] += dX [ i ] ; } } catch ( SingularMatrixException e ) { throw new org . apache . commons . math3 . exception . ConvergenceException ( LocalizedFormats . UNABLE_TO_SOLVE_SINGULAR_PROBLEM ) ; } if ( previous != null ) { converged = checker . converged ( iter , previous , current ) ; if ( converged ) { cost = computeCost ( currentResiduals ) ; return current ; } } } throw new MathInternalError ( ) ; } }

Fix:
final double [ ] currentPoint = getStartPoint ( ) ;
Buggy code:
public class JMSTopicService implements Service < Void > { private final InjectedValue < JMSServerManager > jmsServer = new InjectedValue < JMSServerManager > ( ) ; private final String name ; private final String [ ] jndi ; public JMSTopicService ( String name , String [ ] jndi ) { } public synchronized void start ( StartContext context ) throws StartException { } public synchronized void stop ( StopContext context ) { final JMSServerManager jmsManager = jmsServer . getValue ( ) ; try { <START_BUG> jmsManager . destroyTopic ( name ) ; <END_BUG> } catch ( Exception e ) { MessagingLogger . MESSAGING_LOGGER . failedToDestroy ( e , "jms<seq2seq4repair_space>topic" , name ) ; } } public Void getValue ( ) throws IllegalStateException { } public InjectedValue < JMSServerManager > getJmsServer ( ) { } }

Fix:
jmsManager . removeTopicFromJNDI ( name ) ;