nus-yam/ex-repair huggingface dataset:
Buggy code:
public class SizeAssertionTest extends JMeterTestCase { private JMeterContext jmctx ; private SizeAssertion assertion ; private SampleResult sample1 ; private SampleResult sample0 ; private JMeterVariables vars ; private AssertionResult result ; private String data1 = "response<seq2seq4repair_space>Data\n" + "line<seq2seq4repair_space>2\n\nEOF" ; private int data1Len = data1 . length ( ) ; @ Override public void setUp ( ) { jmctx = JMeterContextService . getContext ( ) ; assertion = new SizeAssertion ( ) ; assertion . setThreadContext ( jmctx ) ; vars = new JMeterVariables ( ) ; jmctx . setVariables ( vars ) ; sample0 = new SampleResult ( ) ; sample1 = new SampleResult ( ) ; <START_BUG> sample1 . setResponseData ( data1 . getBytes ( ) ) ; <END_BUG> } public void testSizeAssertionEquals ( ) throws Exception { } public void testSizeAssertionNotEquals ( ) throws Exception { } public void testSizeAssertionGreaterThan ( ) throws Exception { } public void testSizeAssertionGreaterThanEqual ( ) throws Exception { } public void testSizeAssertionLessThan ( ) throws Exception { } public void testSizeAssertionLessThanEqual ( ) throws Exception { } private void assertPassed ( ) throws Exception { } private void assertFailed ( ) throws Exception { } }

Fix:
sample1 . setResponseData ( data1 , null ) ;
Buggy code:
public final class NodeReading implements Serializable { private static final long serialVersionUID = 6616919745525778185L ; private static final String DELIMITER = "@" ; private String testbedId ; private String nodeId ; private String capabilityName ; private String timestamp ; private String reading ; public NodeReading ( ) { } public String getTestbedId ( ) { } public void setTestbedId ( final String testbedId ) { } public String getNodeId ( ) { } public void setNodeId ( final String nodeId ) { } public String getCapabilityName ( ) { } public void setCapabilityName ( final String capabilityName ) { } public String getTimestamp ( ) { } public void setTimestamp ( final String timestamp ) { } public String getReading ( ) { } public void setReading ( final String reading ) { } public String toRestString ( ) { <START_BUG> return ( ( ( ( ( ( ( ( "//testbed//" + ( testbedId ) ) + "//node//" ) + ( nodeId ) ) + "//capability//" ) + ( capabilityName ) ) + "//insert//timestamp//" ) + ( timestamp ) ) + "//reading//" ) + ( reading ) ; <END_BUG> } public String toDelimitedString ( ) { } @ Override public String toString ( ) { } }

Fix:
return ( ( ( ( ( ( ( ( ( "//testbed//" + ( testbedId ) ) + "//node//" ) + ( nodeId ) ) + "//capability//" ) + ( capabilityName ) ) + "//insert//timestamp//" ) + ( timestamp ) ) + "//reading//" ) + ( reading ) ) + "//" ;
Buggy code:
public final class Id extends OpenJPAId { private static final Localizer _loc = Localizer . forPackage ( Id . class ) ; private final long _id ; public static Id newInstance ( Class cls , Object val ) { } public Id ( String str ) { } public Id ( String str , OpenJPAConfiguration conf , ClassLoader brokerLoader ) { } public Id ( String str , ClassLoader loader ) { } public Id ( Class cls , String key ) { } public Id ( Class cls , Long key ) { } public Id ( Class cls , long key ) { } public Id ( Class cls , long key , boolean subs ) { } public long getId ( ) { } public Object getIdObject ( ) { <START_BUG> return Numbers . valueOf ( _id ) ; <END_BUG> } protected int idHash ( ) { } protected boolean idEquals ( OpenJPAId other ) { } }

Fix:
return _id ;
Buggy code:
public class TrayItem extends Item { Tray parent ; ToolTip toolTip ; String toolTipText ; boolean visible = true ; boolean highlight ; int handle ; int nsImage ; int view ; int jniRef ; static final float BORDER = 8.0F ; public TrayItem ( Tray parent , int style ) { } public void addMenuDetectListener ( MenuDetectListener listener ) { } public void addSelectionListener ( SelectionListener listener ) { } protected void checkSubclass ( ) { } void createWidget ( ) { } void destroyWidget ( ) { } Point getLocation ( ) { } public Tray getParent ( ) { } public ToolTip getToolTip ( ) { } public String getToolTipText ( ) { } public boolean getVisible ( ) { } void releaseHandle ( ) { } void releaseWidget ( ) { int statusBar = Cocoa . objc_msgSend ( C_NSStatusBar , S_systemStatusBar ) ; Cocoa . objc_msgSend ( statusBar , S_removeStatusItem , handle ) ; <START_BUG> Cocoa . objc_msgSend ( nsImage , S_release , handle ) ; <END_BUG> if ( ( nsImage ) != 0 ) Cocoa . objc_msgSend ( nsImage , S_release ) ; if ( ( view ) != 0 ) Cocoa . objc_msgSend ( view , S_release ) ; if ( ( jniRef ) != 0 ) OS . DeleteGlobalRef ( jniRef ) ; handle = nsImage = view = jniRef = 0 ; } public void removeMenuDetectListener ( MenuDetectListener listener ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setImage ( Image image ) { } public void setToolTip ( ToolTip toolTip ) { } public void setToolTipText ( String string ) { } void _setToolTipText ( String string ) { } public void setVisible ( boolean visible ) { } void showMenu ( ) { } int trayItemProc ( int target , int userData , int selector , int arg0 ) { } }

Fix:
Cocoa . objc_msgSend ( handle , S_release ) ;
Buggy code:
public class DiachronWebServiceTest { @ Test public void cleanDatasetTest ( ) throws IOException , ClassNotFoundException , IllegalAccessException , InstantiationException , JSONException { } @ Test public void getCleaningSuggestionsTest ( ) throws IOException , JSONException { } @ Test ( expected = RiotException . class ) public void getCleaningSuggestionsWrongDatasetTest ( ) throws IOException , JSONException { HttpServletRequest req = Mockito . mock ( HttpServletRequest . class ) ; HttpServletResponse res = Mockito . mock ( HttpServletResponse . class ) ; <START_BUG> Mockito . when ( req . getParameter ( "download" ) ) . thenReturn ( ( "https:////raw.githubusercontent.com" + "//diachron//quality-extension//master//resources//testdumps//SampleInput_EmptyAnnotationValue.ttl" ) ) ; <END_BUG> Mockito . when ( req . getParameter ( "metrics" ) ) . thenReturn ( "[\"LabelsUsingCapitals\",<seq2seq4repair_space>\"EmptyAnnotationValue\"]" ) ; ByteArrayOutputStream responseStream = new ByteArrayOutputStream ( ) ; Mockito . when ( res . getWriter ( ) ) . thenReturn ( new PrintWriter ( responseStream ) ) ; DiachronWebService . getCleaningSuggestionsREST ( req , res ) ; JSONObject json = new JSONObject ( responseStream . toString ( "utf-8" ) ) ; String status = ( ( String ) ( json . get ( "status" ) ) ) ; String message = ( ( String ) ( json . get ( "message" ) ) ) ; Assert . assertEquals ( "error" , status ) ; Model model = ModelFactory . createDefaultModel ( ) ; InputStream is = new ByteArrayInputStream ( message . getBytes ( ) ) ; model . read ( is , null , "Turtle" ) ; } @ Test ( expected = RiotException . class ) public void getCleaningSuggestionsWrongtMetricParamtTest ( ) throws IOException , JSONException { } @ Test ( expected = RiotException . class ) public void getCleaningSuggestionsNullDatasetParamtTest ( ) throws IOException , JSONException { } @ Test ( expected = RiotException . class ) public void getCleaningSuggestionsNullMetricParamTest ( ) throws IOException , JSONException { } public void testClean ( ) throws IOException , JSONException { } }

Fix:
Mockito . when ( req . getParameter ( "download" ) ) . thenReturn ( ( "https:////raw.githubusercontent.com" + "//diachron//quality-extension//master//resources//testdumps//SampleIsnput_EmptyAnnotationValue.ttl" ) ) ;
Buggy code:
public class BloomFilter extends Filter { private static final Logger logger = LoggerFactory . getLogger ( BloomFilter . class ) ; private static final int EXCESS = 20 ; static ICompactSerializer2 < BloomFilter > serializer_ = new BloomFilterSerializer ( ) ; public OpenBitSet bitset ; BloomFilter ( int hashes , OpenBitSet bs ) { } public static BloomFilter emptyFilter ( ) { } public static ICompactSerializer2 < BloomFilter > serializer ( ) { } private static OpenBitSet bucketsFor ( long numElements , int bucketsPer ) { } public static BloomFilter getFilter ( long numElements , int targetBucketsPerElem ) { int maxBucketsPerElement = Math . max ( 1 , BloomCalculations . maxBucketsPerElement ( numElements ) ) ; int bucketsPerElement = Math . min ( targetBucketsPerElem , maxBucketsPerElement ) ; if ( bucketsPerElement < targetBucketsPerElem ) { BloomFilter . logger . warn ( String . format ( "Cannot<seq2seq4repair_space>provide<seq2seq4repair_space>an<seq2seq4repair_space>optimal<seq2seq4repair_space>BloomFilter<seq2seq4repair_space>for<seq2seq4repair_space>%d<seq2seq4repair_space>elements<seq2seq4repair_space>(%d//%d<seq2seq4repair_space>buckets<seq2seq4repair_space>per<seq2seq4repair_space>element)." , numElements , bucketsPerElement , targetBucketsPerElem ) ) ; } BloomCalculations . BloomSpecification spec = BloomCalculations . computeBloomSpec ( bucketsPerElement ) ; <START_BUG> BloomFilter . logger . debug ( "Creating<seq2seq4repair_space>bloom<seq2seq4repair_space>filter<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>elements<seq2seq4repair_space>and<seq2seq4repair_space>spec<seq2seq4repair_space>{}" , numElements , spec ) ; <END_BUG> return new BloomFilter ( spec . K , BloomFilter . bucketsFor ( numElements , spec . bucketsPerElement ) ) ; } public static BloomFilter getFilter ( long numElements , double maxFalsePosProbability ) { } private long buckets ( ) { } private long [ ] getHashBuckets ( ByteBuffer key ) { } static long [ ] getHashBuckets ( ByteBuffer b , int hashCount , long max ) { } public void add ( ByteBuffer key ) { } public boolean isPresent ( ByteBuffer key ) { } public void clear ( ) { } }

Fix:
BloomFilter . logger . trace ( "Creating<seq2seq4repair_space>bloom<seq2seq4repair_space>filter<seq2seq4repair_space>for<seq2seq4repair_space>{}<seq2seq4repair_space>elements<seq2seq4repair_space>and<seq2seq4repair_space>spec<seq2seq4repair_space>{}" , numElements , spec ) ;
Buggy code:
@ Singleton public class IIIFServlet extends HttpServlet { private static final long serialVersionUID = 1L ; private final IIIFService service ; private final IIIFRequestParser parser ; private final IIIFResponseSerializer serializer ; private final Map < String , String > image_id_aliases ; @ Inject public IIIFServlet ( IIIFService service , @ Named ( "image.aliases" ) Map < String , String > image_id_aliases ) { } private void report_error ( HttpServletResponse resp , IIIFException e ) throws IOException { } private String get_raw_path ( HttpServletRequest req ) throws IIIFException { } private boolean want_json_ld_mime_type ( HttpServletRequest req ) { } protected void doGet ( HttpServletRequest req , HttpServletResponse resp ) throws IOException , ServletException { resp . addHeader ( "Link" , ( ( "<" + ( service . getCompliance ( ) . getUri ( ) ) ) + ">;rel=\"profile\"" ) ) ; try { String path = get_raw_path ( req ) ; RequestType type = parser . determineRequestType ( path ) ; if ( type == ( RequestType . INFO ) ) { InfoRequest inforeq = parser . parseImageInfoRequest ( path ) ; String alias = image_id_aliases . get ( inforeq . getImageId ( ) ) ; if ( alias != null ) { inforeq . setImageId ( alias ) ; } ImageInfo info = service . perform ( inforeq ) ; resp . setHeader ( "Access-Control-Allow-Origin" , "*" ) ; OutputStream os = resp . getOutputStream ( ) ; InfoFormat fmt = inforeq . getFormat ( ) ; if ( want_json_ld_mime_type ( req ) ) { fmt = InfoFormat . JSON_LD ; } if ( fmt == ( InfoFormat . JSON ) ) { resp . addHeader ( "Link" , "<http:////iiif.io//api//image//2//context.json>;rel=\"http:////www.w3.org//ns//json-ld#context\";type=\"application//ld+json\"" ) ; } resp . setContentType ( fmt . getMimeType ( ) ) ; String url = req . getRequestURL ( ) . toString ( ) ; info . setImageUri ( url . substring ( 0 , ( ( url . length ( ) ) - ( "//info.json" . length ( ) ) ) ) ) ; try { serializer . writeJsonLd ( info , os ) ; } catch ( JSONException e ) { throw new IIIFException ( "Error<seq2seq4repair_space>writing<seq2seq4repair_space>JSON-LD" , e , HttpURLConnection . HTTP_INTERNAL_ERROR ) ; } } else if ( type == ( RequestType . OPERATION ) ) { ImageRequest imgreq = parser . parseImageRequest ( path ) ; String alias = image_id_aliases . get ( imgreq . getImageId ( ) ) ; if ( alias != null ) { imgreq . setImageId ( alias ) ; } perform_image_request ( imgreq , resp ) ; } else if ( type == ( RequestType . IMAGE ) ) { <START_BUG> resp . sendRedirect ( "info.json" ) ; <END_BUG> } else { throw new IIIFException ( ( "Request<seq2seq4repair_space>type<seq2seq4repair_space>not<seq2seq4repair_space>handled:<seq2seq4repair_space>" + type ) , HttpURLConnection . HTTP_INTERNAL_ERROR ) ; } } catch ( IIIFException e ) { report_error ( resp , e ) ; } resp . flushBuffer ( ) ; } private void set_header_if_exists ( String header , URLConnection from , HttpServletResponse to ) { } private void perform_image_request ( ImageRequest req , HttpServletResponse resp ) throws IOException , IIIFException { } }

Fix:
resp . sendRedirect ( ( ( req . getRequestURL ( ) ) + "//info.json" ) ) ;
Buggy code:
public class User implements Runnable { public ServerSocket serverSocket ; int port ; String username ; public Multicast multicast = null ; private volatile boolean running ; public ConcurrentLinkedQueue messageQueue ; public ConcurrentHashMap < String , Socket > sk ; public Vector < Message > messageRec = new Vector < Message > ( ) ; public boolean logicalTime ; public ConcurrentHashMap < String , ObjectOutputStream > st ; public LinkedHashMap < String , nodeInfo > nodes ; public boolean log ; public configFileParse config ; public User ( String name , int port , ConcurrentLinkedQueue messageRec , ConcurrentHashMap < String , Socket > sockets , ConcurrentHashMap < String , ObjectOutputStream > streams , LinkedHashMap < String , nodeInfo > nodes , Multicast multicast ) { } public User ( String name , int port , Vector messageRec , ConcurrentHashMap < String , Socket > sockets , ConcurrentHashMap < String , ObjectOutputStream > streams , LinkedHashMap < String , nodeInfo > nodes , boolean logicalTime , configFileParse config ) { } public void shutdown ( ) { } @ Override public void run ( ) { System . out . println ( "waiting<seq2seq4repair_space>for<seq2seq4repair_space>messages" ) ; while ( running ) { Socket slaveSocket ; try { slaveSocket = serverSocket . accept ( ) ; ObjectOutputStream out = new ObjectOutputStream ( slaveSocket . getOutputStream ( ) ) ; ObjectInputStream objInput = new ObjectInputStream ( slaveSocket . getInputStream ( ) ) ; String name = "" ; try { name = ( ( String ) ( objInput . readObject ( ) ) ) ; } catch ( ClassNotFoundException e ) { e . printStackTrace ( ) ; } <START_BUG> System . out . println ( ( "rec<seq2seq4repair_space>con<seq2seq4repair_space>from<seq2seq4repair_space>:<seq2seq4repair_space>" + name ) ) ; <END_BUG> if ( ( ( nodes . containsKey ( name ) ) == false ) && ( ( name . indexOf ( "<seq2seq4repair_space>" ) ) == ( - 1 ) ) ) { System . out . println ( "receive<seq2seq4repair_space>connection<seq2seq4repair_space>from<seq2seq4repair_space>unknown<seq2seq4repair_space>host" ) ; continue ; } sk . put ( name , slaveSocket ) ; st . put ( name , out ) ; Connection handler ; if ( ( log ) == false ) handler = new Connection ( name , slaveSocket , out , objInput , messageQueue , sk , st , this . multicast ) ; else handler = new Connection ( name , slaveSocket , out , objInput , this . messageRec , logicalTime , sk , st , config ) ; new Thread ( handler ) . start ( ) ; } catch ( IOException e ) { e . printStackTrace ( ) ; System . out . println ( ( ( "socket<seq2seq4repair_space>user<seq2seq4repair_space>" + ( this . username ) ) + "<seq2seq4repair_space>accept<seq2seq4repair_space>failed" ) ) ; continue ; } } } private String checkName ( InetAddress ip , int port2 ) { } }

Fix:
System . out . println ( ( "estab<seq2seq4repair_space>con<seq2seq4repair_space>from<seq2seq4repair_space>:<seq2seq4repair_space>" + name ) ) ;
Buggy code:
@ XmlAccessorType ( XmlAccessType . NONE ) public class PriceList extends ValidatingConfig < Catalog > implements IPriceList { @ XmlAttribute ( required = true ) @ XmlID private String name ; @ XmlElementWrapper ( name = "plans" , required = true ) @ XmlElement ( name = "plan" , required = true ) @ XmlIDREF private Plan [ ] plans ; public PriceList ( ) { } public PriceList ( Plan [ ] plans , String name ) { } protected Plan [ ] getPlans ( ) { } @ Override public String getName ( ) { } @ Override public Plan findPlan ( IProduct product , BillingPeriod period ) { } @ Override public ValidationErrors validate ( Catalog catalog , ValidationErrors errors ) { for ( Plan cur : getPlans ( ) ) { int numPlans = findNumberOfPlans ( cur . getProduct ( ) , cur . getBillingPeriod ( ) ) ; if ( numPlans > 1 ) { <START_BUG> errors . add ( new com . ning . billing . util . config . ValidationError ( String . format ( "There<seq2seq4repair_space>are<seq2seq4repair_space>%d<seq2seq4repair_space>plans<seq2seq4repair_space>in<seq2seq4repair_space>pricelist<seq2seq4repair_space>%s<seq2seq4repair_space>and<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>product//billingPeriod<seq2seq4repair_space>(%s,<seq2seq4repair_space>%s)" , numPlans , getName ( ) , cur . getProduct ( ) , cur . getBillingPeriod ( ) ) , catalog . getCatalogURI ( ) , PriceListSet . class , getName ( ) ) ) ; <END_BUG> } } return errors ; } private int findNumberOfPlans ( IProduct product , BillingPeriod period ) { } }

Fix:
errors . add ( new com . ning . billing . util . config . ValidationError ( String . format ( "There<seq2seq4repair_space>are<seq2seq4repair_space>%d<seq2seq4repair_space>plans<seq2seq4repair_space>in<seq2seq4repair_space>pricelist<seq2seq4repair_space>%s<seq2seq4repair_space>and<seq2seq4repair_space>have<seq2seq4repair_space>the<seq2seq4repair_space>same<seq2seq4repair_space>product//billingPeriod<seq2seq4repair_space>(%s,<seq2seq4repair_space>%s)" , numPlans , getName ( ) , cur . getProduct ( ) . getName ( ) , cur . getBillingPeriod ( ) ) , catalog . getCatalogURI ( ) , PriceListSet . class , getName ( ) ) ) ;
Buggy code:
public class TransactionActivity extends ActionBarActivity implements AuthManager . AuthCallback { private static final String TAG = TransactionActivity . class . getSimpleName ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } @ Override protected void onStart ( ) { } @ Override protected void onResume ( ) { } @ Override protected void onPause ( ) { } @ Override protected void onStop ( ) { } @ Override protected void onDestroy ( ) { } @ Override public void onActivityResult ( int requestCode , int resultCode , Intent data ) { <START_BUG> AuthManager . getInstance ( this ) . onActivityResult ( requestCode , resultCode , data ) ; <END_BUG> } @ Override public void onAuthResult ( Auth auth , Error error ) { } private void createToolbar ( ) { } }

Fix:
AuthManager . onActivityResult ( this , requestCode , resultCode , data ) ;
Buggy code:
public abstract class AjaxFormSubmitBehavior extends AjaxEventBehavior { private static final long serialVersionUID = 1L ; private Form form ; public AjaxFormSubmitBehavior ( String event ) { } public AjaxFormSubmitBehavior ( Form form , String event ) { } private Form getForm ( ) { } protected CharSequence getEventHandler ( ) { } protected void onEvent ( AjaxRequestTarget target ) { } protected abstract void onSubmit ( AjaxRequestTarget target ) { } protected abstract void onError ( AjaxRequestTarget target ) { } protected CharSequence getPreconditionScript ( ) { <START_BUG> return ( "return<seq2seq4repair_space>Wicket.$$(this)&&Wicket.$$('" + ( getForm ( ) . getMarkupId ( ) ) ) + "')" ; <END_BUG> } }

Fix:
return ( "return<seq2seq4repair_space>Wicket.$$(this)&amp;&amp;Wicket.$$('" + ( getForm ( ) . getMarkupId ( ) ) ) + "')" ;
Buggy code:
public class HexDumpProxy { public static void main ( String [ ] args ) throws Exception { if ( ( args . length ) != 3 ) { System . err . println ( ( ( "Usage:<seq2seq4repair_space>" + ( HexDumpProxy . class . getSimpleName ( ) ) ) + "<seq2seq4repair_space><local<seq2seq4repair_space>port><seq2seq4repair_space><remote<seq2seq4repair_space>host><seq2seq4repair_space><remote<seq2seq4repair_space>port>" ) ) ; return ; } int localPort = Integer . parseInt ( args [ 0 ] ) ; String remoteHost = args [ 1 ] ; int remotePort = Integer . parseInt ( args [ 2 ] ) ; <START_BUG> run ( localPort , remoteHost , remotePort ) ; <END_BUG> } private final int localPort ; private final String remoteHost ; private final int remotePort ; public HexDumpProxy ( int localPort , String remoteHost , int remotePort ) { } public void run ( ) { } }

Fix:
new HexDumpProxy ( localPort , remoteHost , remotePort ) . run ( ) ;
Buggy code:
public class YearDV extends AbstractDateTimeDV { public Object getActualValue ( String content , ValidationContext context ) throws InvalidDatatypeValueException { } protected DateTimeData parse ( String str ) throws SchemaDateTimeException { <START_BUG> DateTimeData date = new DateTimeData ( this ) ; <END_BUG> int len = str . length ( ) ; int start = 0 ; if ( ( str . charAt ( 0 ) ) == '-' ) { start = 1 ; } int sign = findUTCSign ( str , start , len ) ; if ( sign == ( - 1 ) ) { date . year = parseIntYear ( str , len ) ; } else { date . year = parseIntYear ( str , sign ) ; getTimeZone ( str , date , sign , len ) ; } date . month = MONTH ; date . day = 1 ; validateDateTime ( date ) ; if ( ( ( date . utc ) != 0 ) && ( ( date . utc ) != 'Z' ) ) { normalize ( date ) ; } date . position = 0 ; return date ; } protected String dateToString ( DateTimeData date ) { } }

Fix:
DateTimeData date = new DateTimeData ( str , this ) ;
Buggy code:
public class CharacterEncodingSubMenu extends IMenu implements ActionListener , CharsetListener { private static final String [ ] charsets = new String [ ] { "UTF-8" , "UTF-16" , "US-ASCII" , "windows-1252" , "ISO-8859-1" , "ISO-8859-15" , "IBM850" , "MacRoman" , "ISO-8859-7" , "MacGreek" , "windows-1253" , "MacIceland" , "ISO-8859-3" , "ISO-8859-4" , "ISO-8859-13" , "windows-1257" , "IBM852" , "ISO-8859-2" , "MacCentralEurope" , "MacCroatian" , "IBM855" , "ISO-8859-5" , "KOI8-R" , "MacCyrillic" , "windows-1251" , "IBM866" , "MacUkraine" , "MacRomania" , "GB2312" , "GBK" , "GB18030" , "Big5" , "Big5-HKSCS" , "EUC-TW" , "EUC-JP" , "Shift_JIS" , "ISO-2022-JP" , "MS932" , "EUC-KR" , "JOHAB" , "ISO-2022-KR" , "TIS620" , "IBM857" , "ISO-8859-9" , "MacTurkish" , "windows-1254" , "windows-1258" } ; private static final String [ ] groups = new String [ ] { "global" , "westeurope" , "easteurope" , "eastasian" , "seswasian" } ; private static final int [ ] groupOffset = new int [ ] { 0 , 3 , 13 , 28 , 41 , 47 } ; private ButtonGroup group ; private Hashtable hashtable ; public CharacterEncodingSubMenu ( FrameMediator controller ) { } protected CharsetMenuItem createMenuItem ( Charset charset ) { CharsetMenuItem menuItem = new CharsetMenuItem ( charset ) ; group . add ( menuItem ) ; <START_BUG> menuItem . addMouseListener ( controller . getMouseTooltipHandler ( ) ) ; <END_BUG> menuItem . addActionListener ( this ) ; if ( charset != null ) hashtable . put ( charset , menuItem ) ; return menuItem ; } public void actionPerformed ( ActionEvent e ) { } public void charsetChanged ( CharsetEvent e ) { } }

Fix:
menuItem . addMouseListener ( controller . getContainer ( ) . getMouseTooltipHandler ( ) ) ;
Buggy code:
public class JDBCOracleCreateCommand extends JDBCIdentityColumnCreateCommand { private String sequence ; private int jdbcType ; public void init ( JDBCStoreManager manager ) throws DeploymentException { } protected void initEntityCommand ( JDBCEntityCommandMetaData entityCommand ) throws DeploymentException { } protected void initInsertSQL ( ) { jdbcType = pkField . getJDBCType ( ) . getJDBCTypes ( ) [ 0 ] ; StringBuffer sql = new StringBuffer ( ) ; <START_BUG> sql . append ( "{call<seq2seq4repair_space>INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" ) . append ( entity . getTableName ( ) ) ; <END_BUG> sql . append ( "<seq2seq4repair_space>(" ) ; SQLUtil . getColumnNamesClause ( pkField , sql ) . append ( ",<seq2seq4repair_space>" ) ; SQLUtil . getColumnNamesClause ( insertFields , sql ) ; sql . append ( ")" ) ; sql . append ( "<seq2seq4repair_space>VALUES<seq2seq4repair_space>(" ) ; sql . append ( ( ( sequence ) + ".NEXTVAL,<seq2seq4repair_space>" ) ) ; SQLUtil . getValuesClause ( insertFields , sql ) ; sql . append ( ")" ) ; sql . append ( "<seq2seq4repair_space>RETURNING<seq2seq4repair_space>" ) ; SQLUtil . getColumnNamesClause ( pkField , sql ) . append ( "<seq2seq4repair_space>INTO<seq2seq4repair_space>?<seq2seq4repair_space>}" ) ; insertSQL = sql . toString ( ) ; if ( debug ) { log . debug ( ( "Insert<seq2seq4repair_space>Entity<seq2seq4repair_space>SQL:<seq2seq4repair_space>" + ( insertSQL ) ) ) ; } } protected PreparedStatement prepareStatement ( Connection c , String sql , EntityEnterpriseContext ctx ) throws SQLException { } protected int executeInsert ( int paramIndex , PreparedStatement ps , EntityEnterpriseContext ctx ) throws SQLException { } }

Fix:
sql . append ( "{call<seq2seq4repair_space>INSERT<seq2seq4repair_space>INTO<seq2seq4repair_space>" ) . append ( entity . getQualifiedTableName ( ) ) ;
Buggy code:
public class RedisHashTable extends HashTableIndexOptim { private Jedis redis ; protected String prefix = "" ; ConfigServer config ; public static String NAME = "REDIS" ; private static Logger logger = Logger . getLogger ( RedisHashTable . class ) ; public RedisHashTable ( Object database , String idServer , String idTestVector , ConfigServer config ) throws StartIndexException { } public void clear ( ) { } public void incrementHashValue ( String mainkey , String haskey , long value ) { } public void incrementHashValue ( ConcurrentHashMap < String , Long > visualWords , Long I , CompressIndexNBT compress ) { Pipeline p = redis . pipelined ( ) ; ConcurrentHashMap < String , Long > visualWordsWithNBT = null ; if ( compress . isCompessEnabled ( ) ) { visualWordsWithNBT = new ConcurrentHashMap < String , Long > ( 500 ) ; visualWordsWithNBT . putAll ( visualWords ) ; visualWordsWithNBT = getAllValues ( visualWordsWithNBT ) ; } for ( Map . Entry < String , Long > entry : visualWords . entrySet ( ) ) { <START_BUG> if ( ! ( compress . isBlackListed ( entry . getKey ( ) ) ) ) { <END_BUG> Long oldNBTValue = null ; if ( compress . isCompessEnabled ( ) ) { oldNBTValue = visualWordsWithNBT . get ( entry . getKey ( ) ) ; } if ( ( oldNBTValue != null ) && ( compress . isNBTTooBig ( ( oldNBTValue + ( entry . getValue ( ) ) ) ) ) ) { compress . blacklistVW ( entry . getKey ( ) ) ; p . del ( ( ( this . prefix ) + ( entry . getKey ( ) ) ) ) ; } else { p . hincrBy ( ( ( this . prefix ) + ( entry . getKey ( ) ) ) , String . valueOf ( I ) , entry . getValue ( ) ) ; p . hincrBy ( ( ( this . prefix ) + ( entry . getKey ( ) ) ) , "-1" , entry . getValue ( ) ) ; } } } p . sync ( ) ; } public String getHashValue ( String mainkey , String haskey ) { } public Map < String , String > getValue ( String mainkey ) { } public ConcurrentHashMap < String , Long > getAllValues ( ConcurrentHashMap < String , Long > result ) { } public Map < String , ValueStructure > getAll ( List < String > key ) { } public void delete ( String key ) { } public void deleteAll ( Map < Long , Integer > mapID ) { } public boolean isRessourcePresent ( Long id ) { } public void sync ( ) { } public void closeIndex ( ) throws Exception { } public void printStat ( ) { } }

Fix:
if ( ( ! ( compress . isCompessEnabled ( ) ) ) || ( ( compress . isCompessEnabled ( ) ) && ( ! ( compress . isBlackListed ( entry . getKey ( ) ) ) ) ) ) {
Buggy code:
public class AudioLoadBitmap { private Context mContext ; private AudioImageCache mAudioImageCache ; public AudioLoadBitmap ( Context mContext ) { } public void loadBitmap ( int albumId , ImageView imageView ) { } static class AsyncDrawable extends BitmapDrawable { private final WeakReference < AudioLoadBitmap . BitmapWorkerTask > bitmapWorkerTaskReference ; public AsyncDrawable ( Resources res , Bitmap bitmap , AudioLoadBitmap . BitmapWorkerTask bitmapWorkerTask ) { } public AudioLoadBitmap . BitmapWorkerTask getBitmapWorkerTask ( ) { } } public static boolean cancelPotentialWork ( int albumId , ImageView imageView ) { } private static AudioLoadBitmap . BitmapWorkerTask getBitmapWorkerTask ( ImageView imageView ) { } public void addBitmapToMemoryCache ( String albumIdKey , Bitmap bitmap ) { } public Bitmap getBitmapFromMemCache ( String albumIdKey ) { } class BitmapWorkerTask extends AsyncTask < Integer , Void , Bitmap > { public int getmAlbumId ( ) { } private int mAlbumId ; private final WeakReference < ImageView > imageViewReference ; public BitmapWorkerTask ( ImageView imageView ) { } @ Override protected Bitmap doInBackground ( Integer ... params ) { } @ Override protected void onPostExecute ( Bitmap bitmap ) { if ( isCancelled ( ) ) { bitmap = null ; } if ( ( imageViewReference ) != null ) { final ImageView imageView = imageViewReference . get ( ) ; final AudioLoadBitmap . BitmapWorkerTask bitmapWorkerTask = AudioLoadBitmap . getBitmapWorkerTask ( imageView ) ; if ( bitmap != null ) { if ( ( ( this ) == bitmapWorkerTask ) && ( imageView != null ) ) { imageView . setImageBitmap ( bitmap ) ; } } else { if ( ( ( this ) == bitmapWorkerTask ) && ( imageView != null ) ) { <START_BUG> imageView . setImageResource ( audio_headphone_small ) ; <END_BUG> } } } } } private Bitmap getArtworkQuick ( int album_id , int w , int h ) { } }

Fix:
imageView . setImageResource ( audio_music_small ) ;
Buggy code:
public class SubmitLink extends AbstractSubmitLink { private static final long serialVersionUID = 1L ; public SubmitLink ( String id ) { } public SubmitLink ( String id , Form < ? > form ) { } public SubmitLink ( String id , IModel < ? > model ) { } public SubmitLink ( String id , IModel < ? > model , Form < ? > form ) { } public final void onLinkClicked ( ) { } @ Override protected void onComponentTag ( ComponentTag tag ) { } protected boolean shouldInvokeJavascriptFormOnsubmit ( ) { } protected final String getTriggerJavaScript ( ) { if ( ( getForm ( ) ) != null ) { Form < ? > root = getForm ( ) . getRootForm ( ) ; <START_BUG> StringBuffer sb = new StringBuffer ( 100 ) ; <END_BUG> sb . append ( "var<seq2seq4repair_space>e=document.getElementById('" ) ; sb . append ( root . getHiddenFieldId ( ) ) ; sb . append ( "\');<seq2seq4repair_space>e.name=\'" ) ; sb . append ( getInputName ( ) ) ; sb . append ( "';<seq2seq4repair_space>e.value='x';" ) ; sb . append ( "var<seq2seq4repair_space>f=document.getElementById('" ) ; sb . append ( root . getMarkupId ( ) ) ; sb . append ( "');" ) ; if ( shouldInvokeJavascriptFormOnsubmit ( ) ) { if ( ( getForm ( ) ) != root ) { sb . append ( "var<seq2seq4repair_space>ff=document.getElementById('" ) ; sb . append ( getForm ( ) . getMarkupId ( ) ) ; sb . append ( "');" ) ; } else { sb . append ( "var<seq2seq4repair_space>ff=f;" ) ; } sb . append ( "if<seq2seq4repair_space>(ff.onsubmit<seq2seq4repair_space>!=<seq2seq4repair_space>undefined)<seq2seq4repair_space>{<seq2seq4repair_space>if<seq2seq4repair_space>(ff.onsubmit()==false)<seq2seq4repair_space>return<seq2seq4repair_space>false;<seq2seq4repair_space>}" ) ; } sb . append ( "f.submit();e.value='';e.name='';return<seq2seq4repair_space>false;" ) ; return sb . toString ( ) ; } else { return null ; } } public void onSubmit ( ) { } }

Fix:
StringBuilder sb = new StringBuilder ( 100 ) ;
Buggy code:
public class TabFolder extends Composite { TabItem [ ] items ; ImageList imageList ; static final int TabFolderProc ; static final TCHAR TabFolderClass = new TCHAR ( 0 , OS . WC_TABCONTROL , true ) ; static final char [ ] TAB = new char [ ] { 'T' , 'A' , 'B' , 0 } ; static final int ID_UPDOWN = 1 ; public TabFolder ( Composite parent , int style ) { } public void addSelectionListener ( SelectionListener listener ) { } int callWindowProc ( int hwnd , int msg , int wParam , int lParam ) { } static int checkStyle ( int style ) { } protected void checkSubclass ( ) { } public Point computeSize ( int wHint , int hHint , boolean changed ) { } public Rectangle computeTrim ( int x , int y , int width , int height ) { } void createItem ( TabItem item , int index ) { } void createHandle ( ) { } void createWidget ( ) { } void destroyItem ( TabItem item ) { } void drawThemeBackground ( int hDC , RECT rect ) { } Control findThemeControl ( ) { } public Rectangle getClientArea ( ) { } public TabItem getItem ( int index ) { } public int getItemCount ( ) { } public TabItem [ ] getItems ( ) { } public TabItem [ ] getSelection ( ) { } public int getSelectionIndex ( ) { } int imageIndex ( Image image ) { if ( image == null ) return OS . I_IMAGENONE ; if ( ( imageList ) == null ) { Rectangle bounds = image . getBounds ( ) ; <START_BUG> imageList = display . getImageList ( new Point ( bounds . width , bounds . height ) ) ; <END_BUG> int hImageList = imageList . getHandle ( ) ; OS . SendMessage ( handle , TCM_SETIMAGELIST , 0 , hImageList ) ; } int index = imageList . indexOf ( image ) ; if ( index == ( - 1 ) ) { index = imageList . add ( image ) ; } else { imageList . put ( index , image ) ; } return index ; } public int indexOf ( TabItem item ) { } Point minimumSize ( int wHint , int hHint , boolean flushCache ) { } boolean mnemonicHit ( char key ) { } boolean mnemonicMatch ( char key ) { } void releaseWidget ( ) { } void removeControl ( Control control ) { } public void removeSelectionListener ( SelectionListener listener ) { } public void setSelection ( TabItem [ ] items ) { } public void setSelection ( int index ) { } void setSelection ( int index , boolean notify ) { } String toolTipText ( NMTTDISPINFO hdr ) { } boolean traversePage ( boolean next ) { } int widgetStyle ( ) { } TCHAR windowClass ( ) { } int windowProc ( ) { } LRESULT WM_GETDLGCODE ( int wParam , int lParam ) { } LRESULT WM_NCHITTEST ( int wParam , int lParam ) { } LRESULT WM_NOTIFY ( int wParam , int lParam ) { } LRESULT WM_PARENTNOTIFY ( int wParam , int lParam ) { } LRESULT WM_SIZE ( int wParam , int lParam ) { } LRESULT WM_WINDOWPOSCHANGING ( int wParam , int lParam ) { } LRESULT wmNotifyChild ( int wParam , int lParam ) { } }

Fix:
imageList = display . getImageList ( bounds . width , bounds . height ) ;
Buggy code:
public class OnCreateWindowRequestedActivity extends XWalkBaseActivity { private LinearLayout mParent ; private LinkedList < XWalkView > mXWalkViewHistory = new LinkedList < XWalkView > ( ) ; @ Override protected void onCreate ( Bundle savedInstanceState ) { super . onCreate ( savedInstanceState ) ; mParent = new LinearLayout ( this ) ; setContentView ( mParent ) ; mXWalkView = new XWalkView ( this , this ) ; setClient ( mXWalkView ) ; mParent . addView ( mXWalkView ) ; mXWalkViewHistory . add ( mXWalkView ) ; <START_BUG> mXWalkView . load ( "file://////android_asset//create_window_by_script.html" , null ) ; <END_BUG> } private void setClient ( XWalkView view ) { } @ Override public boolean onKeyDown ( int keyCode , KeyEvent event ) { } }

Fix:
mXWalkView . load ( "file://////android_asset//create_window_1.html" , null ) ;
Buggy code:
@ SuppressWarnings ( "all" ) public class BroadcastReceiverClassGenerator extends AbstractClassGenerator { protected String getSubClassPath ( ) { } protected boolean isAllowedElement ( final ApplicationElement element ) { } protected String retrieveElementTemplate ( final Application application , final ApplicationElement element ) { } private String insertPackageImportsForAction ( final Application application , final BroadcastReceiverActionAttribute action ) { } private String insertAction ( final BroadcastReceiver receiver , final BroadcastReceiverActionAttribute action ) { boolean _equals = Objects . equal ( action , null ) ; if ( _equals ) { return "" ; } BroadcastReceiverAction concreteAction = action . getAction ( ) ; if ( concreteAction instanceof ActionShowToast ) { StringConcatenation _builder = new StringConcatenation ( ) ; _builder . append ( "Toast.makeText(context,<seq2seq4repair_space>context.getString(R.string." ) ; String _name = receiver . getName ( ) ; String _javaToAndroidIdentifier = this . javaToAndroidIdentifier ( _name ) ; _builder . append ( _javaToAndroidIdentifier , "" ) ; _builder . append ( "_toast),<seq2seq4repair_space>Toast.LENGTH_LONG).show();" ) ; _builder . newLineIfNotEmpty ( ) ; return _builder . toString ( ) ; } else { if ( concreteAction instanceof ActionStartService ) { StringConcatenation _builder_1 = new StringConcatenation ( ) ; Service _service = ( ( ActionStartService ) ( concreteAction ) ) . getService ( ) ; String _name_1 = _service . getName ( ) ; _builder_1 . append ( _name_1 , "" ) ; _builder_1 . append ( ".startService(context);" ) ; _builder_1 . newLineIfNotEmpty ( ) ; return _builder_1 . toString ( ) ; } else { if ( concreteAction instanceof ActionStartActivity ) { StringConcatenation _builder_2 = new StringConcatenation ( ) ; Activity _activity = ( ( ActionStartActivity ) ( concreteAction ) ) . getActivity ( ) ; String _name_2 = _activity . getName ( ) ; _builder_2 . append ( _name_2 , "" ) ; <START_BUG> _builder_2 . append ( ".startActivity(context);" ) ; <END_BUG> _builder_2 . newLineIfNotEmpty ( ) ; return _builder_2 . toString ( ) ; } } } return null ; } }

Fix:
_builder_2 . append ( ".openActivity(context);" ) ;
Buggy code:
public class Main { public static final double ALLOWED_DISCREPANCY = 1000 ; public static void solveAlClx ( Map < String , Double > pressure , double T , double delta , PrintWriter out ) { } public static void solveGaClx ( Map < String , Double > pressure , double T , double delta , PrintWriter out ) { } public static void solveAlGaN ( Map < String , Double > pressure , double T , double delta , PrintWriter out ) { final String [ ] chemicalAgent = new String [ 5 ] ; chemicalAgent [ 0 ] = "HCl" ; chemicalAgent [ 1 ] = "GaCl" ; chemicalAgent [ 2 ] = "NH3" ; chemicalAgent [ 3 ] = "AlCl3" ; chemicalAgent [ 4 ] = "H2" ; final double [ ] p = new double [ 5 ] ; final double [ ] d = new double [ 5 ] ; for ( int i = 0 ; i < 5 ; i ++ ) { p [ i ] = pressure . get ( chemicalAgent [ i ] ) ; d [ i ] = DataHolder . getD ( chemicalAgent [ i ] , T ) ; } final double k9 = DataHolder . getK ( T , 9 ) ; <START_BUG> final double k10 = DataHolder . getK ( T , 9 ) ; <END_BUG> Function [ ] functions = new Function [ 6 ] ; functions [ 0 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( x [ 3 ] ) * ( x [ 2 ] ) ) - ( ( ( ( ( k9 * ( x [ 5 ] ) ) * ( x [ 0 ] ) ) * ( x [ 0 ] ) ) * ( x [ 0 ] ) ) * ( x [ 0 ] ) ) ; } } ; functions [ 1 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( x [ 1 ] ) * ( x [ 2 ] ) ) - ( ( ( k10 * ( 1 - ( x [ 5 ] ) ) ) * ( x [ 0 ] ) ) * ( x [ 4 ] ) ) ; } } ; functions [ 2 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( ( d [ 0 ] ) * ( ( p [ 0 ] ) - ( x [ 0 ] ) ) ) + ( ( 2 * ( d [ 4 ] ) ) * ( ( p [ 4 ] ) - ( x [ 4 ] ) ) ) ) + ( ( 3 * ( d [ 2 ] ) ) * ( ( p [ 2 ] ) - ( x [ 2 ] ) ) ) ; } } ; functions [ 3 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( ( 3 * ( d [ 3 ] ) ) * ( ( p [ 3 ] ) - ( x [ 3 ] ) ) ) + ( ( d [ 1 ] ) * ( ( p [ 1 ] ) - ( x [ 1 ] ) ) ) ) + ( ( d [ 0 ] ) * ( ( p [ 0 ] ) - ( x [ 0 ] ) ) ) ; } } ; functions [ 4 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( ( d [ 3 ] ) * ( ( p [ 3 ] ) - ( x [ 3 ] ) ) ) + ( ( d [ 1 ] ) * ( ( p [ 1 ] ) - ( x [ 1 ] ) ) ) ) - ( ( d [ 2 ] ) * ( ( p [ 2 ] ) - ( x [ 2 ] ) ) ) ; } } ; functions [ 5 ] = new Function ( ) { @ Override public double calculate ( double [ ] x ) { return ( ( d [ 3 ] ) * ( ( p [ 3 ] ) - ( x [ 3 ] ) ) ) - ( ( x [ 5 ] ) * ( ( ( d [ 1 ] ) * ( ( p [ 1 ] ) - ( x [ 1 ] ) ) ) + ( ( d [ 3 ] ) * ( ( p [ 3 ] ) - ( x [ 3 ] ) ) ) ) ) ; } } ; EquationSystem equationSystem = new EquationSystem ( functions ) ; boolean correct = false ; double [ ] x = null ; while ( ! correct ) { x = equationSystem . universalMethod ( 1.0E-12 , 1000000 ) ; correct = true ; for ( int i = 0 ; i < 5 ; i ++ ) { correct &= ( ( x [ i ] ) >= ( - ( Main . ALLOWED_DISCREPANCY ) ) ) && ( ( x [ i ] ) <= ( ( DataHolder . PRESSURE ) + ( Main . ALLOWED_DISCREPANCY ) ) ) ; } correct &= ( ( x [ 5 ] ) >= 0 ) && ( ( x [ 5 ] ) <= 1 ) ; } System . out . println ( ( "Pg(AlCl3)<seq2seq4repair_space>=<seq2seq4repair_space>" + ( pressure . get ( "AlCl3" ) ) ) ) ;

Fix:
final double k10 = DataHolder . getK ( T , 10 ) ;
Buggy code:
public class SwitchFlowContext extends FlowContext { public Label breakLabel ; public UnconditionalFlowInfo initsOnBreak = FlowInfo . DEAD_END ; public SwitchFlowContext ( FlowContext parent , AstNode associatedNode , Label breakLabel ) { } public Label breakLabel ( ) { } public String individualToString ( ) { } public boolean isBreakable ( ) { } public void recordBreakFrom ( FlowInfo flowInfo ) { if ( ( initsOnBreak ) == ( FlowInfo . DEAD_END ) ) { initsOnBreak = flowInfo . copy ( ) . unconditionalInits ( ) ; } else { <START_BUG> initsOnBreak . mergedWith ( flowInfo . unconditionalInits ( ) ) ; <END_BUG> } } }

Fix:
initsOnBreak = initsOnBreak . mergedWith ( flowInfo . unconditionalInits ( ) ) ;
Buggy code:
public class LevenbergMarquardtOptimizer extends AbstractLeastSquaresOptimizer { private int solvedCols ; private double [ ] diagR ; private double [ ] jacNorm ; private double [ ] beta ; private int [ ] permutation ; private int rank ; private double lmPar ; private double [ ] lmDir ; private double initialStepBoundFactor ; private double costRelativeTolerance ; private double parRelativeTolerance ; private double orthoTolerance ; public LevenbergMarquardtOptimizer ( ) { } public void setInitialStepBoundFactor ( double initialStepBoundFactor ) { } public void setCostRelativeTolerance ( double costRelativeTolerance ) { } public void setParRelativeTolerance ( double parRelativeTolerance ) { } public void setOrthoTolerance ( double orthoTolerance ) { } @ Override protected VectorialPointValuePair doOptimize ( ) throws IllegalArgumentException , FunctionEvaluationException , OptimizationException { } private void determineLMParameter ( double [ ] qy , double delta , double [ ] diag , double [ ] work1 , double [ ] work2 , double [ ] work3 ) { } private void determineLMDirection ( double [ ] qy , double [ ] diag , double [ ] lmDiag , double [ ] work ) { } private void qrDecomposition ( ) throws OptimizationException { for ( int k = 0 ; k < ( cols ) ; ++ k ) { permutation [ k ] = k ; double norm2 = 0 ; for ( int i = 0 ; i < ( jacobian . length ) ; ++ i ) { double akk = jacobian [ i ] [ k ] ; norm2 += akk * akk ; } jacNorm [ k ] = Math . sqrt ( norm2 ) ; } for ( int k = 0 ; k < ( cols ) ; ++ k ) { int nextColumn = - 1 ; double ak2 = Double . NEGATIVE_INFINITY ; for ( int i = k ; i < ( cols ) ; ++ i ) { double norm2 = 0 ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { double aki = jacobian [ j ] [ permutation [ i ] ] ; norm2 += aki * aki ; } if ( ( Double . isInfinite ( norm2 ) ) || ( Double . isNaN ( norm2 ) ) ) { throw new OptimizationException ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>perform<seq2seq4repair_space>Q.R<seq2seq4repair_space>decomposition<seq2seq4repair_space>on<seq2seq4repair_space>the<seq2seq4repair_space>{0}x{1}<seq2seq4repair_space>jacobian<seq2seq4repair_space>matrix" , rows , cols ) ; } if ( norm2 > ak2 ) { nextColumn = i ; ak2 = norm2 ; } } <START_BUG> if ( ak2 < 1.0E-66 ) { <END_BUG> rank = k ; return ; } int pk = permutation [ nextColumn ] ; permutation [ nextColumn ] = permutation [ k ] ; permutation [ k ] = pk ; double akk = jacobian [ k ] [ pk ] ; double alpha = ( akk > 0 ) ? - ( Math . sqrt ( ak2 ) ) : Math . sqrt ( ak2 ) ; double betak = 1.0 // ( ak2 - ( akk * alpha ) ) ; beta [ pk ] = betak ; diagR [ pk ] = alpha ; jacobian [ k ] [ pk ] -= alpha ; for ( int dk = ( ( cols ) - 1 ) - k ; dk > 0 ; -- dk ) { double gamma = 0 ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { gamma += ( jacobian [ j ] [ pk ] ) * ( jacobian [ j ] [ permutation [ ( k + dk ) ] ] ) ; } gamma *= betak ; for ( int j = k ; j < ( jacobian . length ) ; ++ j ) { jacobian [ j ] [ permutation [ ( k + dk ) ] ] -= gamma * ( jacobian [ j ] [ pk ] ) ; } } } rank = solvedCols ; } private void qTy ( double [ ] y ) { } }

Fix:
if ( ak2 == 0 ) {
Buggy code:
public class JmxMonitoredMap < K , V > extends ConcurrentHashMap < String , SolrInfoMBean > { private static final Logger LOG = LoggerFactory . getLogger ( JmxMonitoredMap . class . getName ( ) ) ; private MBeanServer server = null ; private String jmxRootName ; public JmxMonitoredMap ( final String coreName , final JmxConfiguration jmxConfig ) { } @ Override public void clear ( ) { } @ Override public SolrInfoMBean put ( String key , SolrInfoMBean infoBean ) { } @ Override public SolrInfoMBean remove ( Object key ) { } private void unregister ( String key , SolrInfoMBean infoBean ) { } private ObjectName getObjectName ( String key , SolrInfoMBean infoBean ) throws MalformedObjectNameException { } static class SolrDynamicMBean implements DynamicMBean { private SolrInfoMBean infoBean ; private HashSet < String > staticStats ; public SolrDynamicMBean ( SolrInfoMBean managedResource ) { } public MBeanInfo getMBeanInfo ( ) { } public Object getAttribute ( String attribute ) throws AttributeNotFoundException , MBeanException , ReflectionException { Object val ; if ( ( ( staticStats . contains ( attribute ) ) && ( attribute != null ) ) && ( ( attribute . length ( ) ) > 0 ) ) { try { <START_BUG> String getter = ( "get" + ( attribute . substring ( 0 , 1 ) . toUpperCase ( ) ) ) + ( attribute . substring ( 1 ) ) ; <END_BUG> Method meth = infoBean . getClass ( ) . getMethod ( getter ) ; val = meth . invoke ( infoBean ) ; } catch ( Exception e ) { throw new AttributeNotFoundException ( attribute ) ; } } else { NamedList list = infoBean . getStatistics ( ) ; val = list . get ( attribute ) ; } if ( val != null ) return val . toString ( ) ; else return val ; } public AttributeList getAttributes ( String [ ] attributes ) { } public void setAttribute ( Attribute attribute ) throws AttributeNotFoundException , InvalidAttributeValueException , MBeanException , ReflectionException { } public AttributeList setAttributes ( AttributeList attributes ) { } public Object invoke ( String actionName , Object [ ] params , String [ ] signature ) throws MBeanException , ReflectionException { } } }

Fix:
String getter = ( "get" + ( attribute . substring ( 0 , 1 ) . toUpperCase ( Locale . ENGLISH ) ) ) + ( attribute . substring ( 1 ) ) ;
Buggy code:
public class DocumentationManager { public static String getDocs ( Object o , String indent ) { } public static void setDocs ( Object o , String s ) { } public static boolean hasDocs ( Object o ) { } public static String defaultFor ( Object o , String indent ) { } public static String getComments ( Object o ) { StringBuffer result = new StringBuffer ( ) ; if ( o instanceof MModelElement ) { Collection comments = ( ( MModelElement ) ( o ) ) . getComments ( ) ; if ( ! ( comments . isEmpty ( ) ) ) { for ( Iterator iter = comments . iterator ( ) ; iter . hasNext ( ) ; ) { MComment c = ( ( MComment ) ( iter . next ( ) ) ) ; <START_BUG> String s = c . getName ( ) . trim ( ) ; <END_BUG> if ( ( s != null ) && ( ( s . length ( ) ) > 0 ) ) { if ( ( result . length ( ) ) > 0 ) { result . append ( "\n" ) ; } result . append ( s ) ; } } } } if ( ( result . length ( ) ) == 0 ) return "" ; for ( int i = 0 ; i < ( ( result . length ( ) ) - 1 ) ; i ++ ) { if ( ( result . charAt ( i ) ) == '\n' ) { result . insert ( ( i + 1 ) , "<seq2seq4repair_space>*<seq2seq4repair_space>" ) ; } } if ( ( result . charAt ( ( ( result . length ( ) ) - 1 ) ) ) == '\n' ) { result . deleteCharAt ( ( ( result . length ( ) ) - 1 ) ) ; } return ( "//*\n<seq2seq4repair_space>*<seq2seq4repair_space>" + ( result . toString ( ) ) ) + "\n<seq2seq4repair_space>*//\n" ; } }

Fix:
String s = ( ( c . getName ( ) ) != null ) ? c . getName ( ) . trim ( ) : null ;