nus-yam/ex-repair huggingface dataset:
Buggy code:
public class TokenSpansDatum < L > extends Datum < L > { private TokenSpan [ ] tokenSpans ; private boolean polysemous ; public TokenSpansDatum ( int id , TokenSpan [ ] tokenSpans , L label , boolean polysemous ) { } public TokenSpansDatum ( int id , List < TokenSpan > tokenSpans , L label , boolean polysemous ) { } public TokenSpansDatum ( int id , TokenSpan tokenSpan , L label , boolean polysemous ) { } public < S > TokenSpansDatum ( TokenSpansDatum < S > datum , L label , boolean polysemous ) { } public TokenSpansDatum ( int id , TokenSpansDatum < L > datum1 , TokenSpansDatum < L > datum2 , L label , boolean polysemous ) { } public TokenSpansDatum ( int id , Collection < TokenSpansDatum < L > > datums , L label , boolean polysemous ) { } public TokenSpan [ ] getTokenSpans ( ) { } public boolean isPolysemous ( ) { } @ Override public String toString ( ) { } public static TokenSpansDatum . Tools < String > getStringTools ( DataTools dataTools ) { } public static TokenSpansDatum . Tools < CategoryList > getCategoryListTools ( DataTools dataTools ) { } public static TokenSpansDatum . Tools < Boolean > getBooleanTools ( DataTools dataTools ) { } public static abstract class Tools < L > extends Datum . Tools < TokenSpansDatum < L > , L > { public Tools ( DataTools dataTools ) { } @ Override public TokenSpansDatum < L > datumFromJSON ( JSONObject json ) { } @ Override public JSONObject datumToJSON ( TokenSpansDatum < L > datum ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < T extends Datum < Boolean > > T makeBinaryDatum ( TokenSpansDatum < L > datum , LabelIndicator < L > labelIndicator ) { } @ SuppressWarnings ( "unchecked" ) @ Override public < T extends Datum < Boolean > > Datum . Tools < T , Boolean > makeBinaryDatumTools ( LabelIndicator < L > labelIndicator ) { } private class StringExtractorNGramPoSTag implements StringExtractor < TokenSpansDatum < L > , L > { private String name ; private PoSTag [ ] [ ] posTags ; private boolean fullDocument ; private int n ; public StringExtractorNGramPoSTag ( String name , PoSTag [ ] [ ] posTags , boolean fullDocument , int n ) { } @ Override public String toString ( ) { } @ Override public String [ ] extract ( TokenSpansDatum < L > datum ) { } private boolean extractForSentence ( DocumentNLP document , int sentenceIndex , Set < String > strs ) { int sentenceTokenCount = document . getSentenceTokenCount ( sentenceIndex ) ; for ( int i = 0 ; i < ( ( sentenceTokenCount - ( this . n ) ) + 1 ) ; i ++ ) { if ( ! ( ngramHasPosTag ( document , sentenceIndex , i ) ) ) continue ; StringBuilder ngram = new StringBuilder ( ) ; for ( int j = i ; j < ( i + ( this . n ) ) ; j ++ ) { <START_BUG> ngram . append ( document . getToken ( sentenceIndex , j ) ) . append ( "<seq2seq4repair_space>" ) ; <END_BUG> } String ngramStr = ngram . toString ( ) . trim ( ) ; strs . add ( ngramStr ) ; } return true ; } private boolean ngramHasPosTag ( DocumentNLP document , int sentenceIndex , int tokenIndex ) { } } } }

Fix:
ngram . append ( document . getTokenStr ( sentenceIndex , j ) ) . append ( "<seq2seq4repair_space>" ) ;
Buggy code:
public class MutableInt extends Number implements Comparable < MutableInt > , Mutable < Number > { private static final long serialVersionUID = 512176391864L ; private int value ; public MutableInt ( ) { } public MutableInt ( int value ) { } public MutableInt ( Number value ) { } public MutableInt ( String value ) throws NumberFormatException { } public Integer getValue ( ) { <START_BUG> return new Integer ( this . value ) ; <END_BUG> } public void setValue ( int value ) { } public void setValue ( Number value ) { } public void increment ( ) { } public void decrement ( ) { } public void add ( int operand ) { } public void add ( Number operand ) { } public void subtract ( int operand ) { } public void subtract ( Number operand ) { } @ Override public int intValue ( ) { } @ Override public long longValue ( ) { } @ Override public float floatValue ( ) { } @ Override public double doubleValue ( ) { } public Integer toInteger ( ) { } @ Override public boolean equals ( Object obj ) { } @ Override public int hashCode ( ) { } public int compareTo ( MutableInt other ) { } @ Override public String toString ( ) { } }

Fix:
return Integer . valueOf ( this . value ) ;
Buggy code:
public class IRCBotApplication implements IApplication { public Object start ( IApplicationContext context ) throws Exception { Map bots = Activator . getDefault ( ) . getBots ( ) ; for ( Iterator it = bots . values ( ) . iterator ( ) ; it . hasNext ( ) ; ) { IBotEntry entry = ( ( IBotEntry ) ( it . next ( ) ) ) ; <START_BUG> Bot bot = new Bot ( entry ) ; <END_BUG> } while ( true ) { try { Thread . sleep ( 100 ) ; } catch ( InterruptedException ie ) { break ; } } return IApplication . EXIT_OK ; } public void stop ( ) { } }

Fix:
new Bot ( entry ) ;
Buggy code:
final class CollectionToObjectConverter implements GenericConverter { private final ConversionService conversionService ; public CollectionToObjectConverter ( ConversionService conversionService ) { } public Set < ConvertiblePair > getConvertibleTypes ( ) { } public Object convert ( Object source , TypeDescriptor sourceType , TypeDescriptor targetType ) { if ( source == null ) { return null ; } Collection < ? > sourceCollection = ( ( Collection < ? > ) ( source ) ) ; if ( ( sourceCollection . size ( ) ) == 0 ) { return null ; } Object firstElement = sourceCollection . iterator ( ) . next ( ) ; <START_BUG> return this . conversionService . convert ( firstElement , sourceType . elementType ( firstElement ) , targetType ) ; <END_BUG> } }

Fix:
return this . conversionService . convert ( firstElement , sourceType . elementTypeDescriptor ( firstElement ) , targetType ) ;
Buggy code:
public class MainController { private static Part newPart ; private static InventoryItem item ; public static PartsList list = new PartsList ( ) ; private static MainFrame listPartsFrame ; private static InventoryAtLocationFrame inventoryLocationFrame ; public static void main ( String [ ] args ) { <START_BUG> System . out . println ( "CS<seq2seq4repair_space>4743<seq2seq4repair_space>Assignment<seq2seq4repair_space>1<seq2seq4repair_space>by<seq2seq4repair_space>Barbara<seq2seq4repair_space>Davila<seq2seq4repair_space>and<seq2seq4repair_space>Sean<seq2seq4repair_space>Gallagher" ) ; <END_BUG> MainController . listPartsFrame = new MainFrame ( ) ; MainController . initializeList ( ) ; } public static void setInventoryLocation ( InventoryAtLocationFrame frame ) { } public static ArrayList < InventoryItem > getInventoryAtLocation ( String location ) { } public static void initializeList ( ) { } public static void deletePart ( Part deleteItem ) { } public static void deleteInventoryItem ( InventoryItem deleteInventoryPart ) { } public static InventoryItem addInventoryItem ( String [ ] stringArray , InventoryItem addInventoryItem ) { } public static Part addPart ( String [ ] stringArray , Part addPart ) { } public static InventoryItem updateInventoryItem ( String [ ] stringArray , InventoryItem updateItem ) { } public static Part updatePart ( String [ ] stringArray , Part updatePart ) { } private static boolean errorCheckpNum ( String partNum , String id ) { } public static boolean errorCheckPName ( String partName , String id ) { } public static boolean nameExists ( String name ) { } }

Fix:
System . out . println ( "CS<seq2seq4repair_space>4743<seq2seq4repair_space>Assignment<seq2seq4repair_space>3<seq2seq4repair_space>by<seq2seq4repair_space>Barbara<seq2seq4repair_space>Davila<seq2seq4repair_space>and<seq2seq4repair_space>Sean<seq2seq4repair_space>Gallagher" ) ;
Buggy code:
public class ColorDialog extends Dialog { RGB rgb ; public ColorDialog ( Shell parent ) { } public ColorDialog ( Shell parent , int style ) { } public RGB getRGB ( ) { } public RGB open ( ) { byte [ ] buffer = Converter . wcsToMbcs ( null , title , true ) ; int handle = OS . gtk_color_selection_dialog_new ( buffer ) ; Display display = ( ( parent ) != null ) ? parent . getDisplay ( ) : Display . getCurrent ( ) ; if ( ( parent ) != null ) { int shellHandle = parent . topHandle ( ) ; OS . gtk_window_set_transient_for ( handle , shellHandle ) ; int pixbufs = OS . gtk_window_get_icon_list ( shellHandle ) ; if ( pixbufs != 0 ) { OS . gtk_window_set_icon_list ( handle , pixbufs ) ; OS . g_list_free ( pixbufs ) ; } } GtkColorSelectionDialog dialog = new GtkColorSelectionDialog ( ) ; OS . memmove ( dialog , handle ) ; GdkColor color = new GdkColor ( ) ; if ( ( rgb ) != null ) { color . red = ( ( short ) ( ( ( rgb . red ) & 255 ) | ( ( ( rgb . red ) & 255 ) << 8 ) ) ) ; color . green = ( ( short ) ( ( ( rgb . green ) & 255 ) | ( ( ( rgb . green ) & 255 ) << 8 ) ) ) ; color . blue = ( ( short ) ( ( ( rgb . blue ) & 255 ) | ( ( ( rgb . blue ) & 255 ) << 8 ) ) ) ; OS . gtk_color_selection_set_current_color ( dialog . colorsel , color ) ; } OS . gtk_color_selection_set_has_palette ( dialog . colorsel , true ) ; display . addIdleProc ( ) ; Dialog oldModal = null ; if ( OS . gtk_window_get_modal ( handle ) ) { oldModal = display . getModalDialog ( ) ; display . setModalDialog ( this ) ; } int signalId = 0 ; int hookId = 0 ; if ( ( ( style ) & ( SWT . RIGHT_TO_LEFT ) ) != 0 ) { signalId = OS . g_signal_lookup ( map , OS . GTK_TYPE_WIDGET ( ) ) ; <START_BUG> hookId = OS . g_signal_add_emission_hook ( signalId , 0 , display . setDirectionProc , handle , 0 ) ; <END_BUG> } int response = OS . gtk_dialog_run ( handle ) ; if ( ( ( style ) & ( SWT . RIGHT_TO_LEFT ) ) != 0 ) { OS . g_signal_remove_emission_hook ( signalId , hookId ) ; } if ( OS . gtk_window_get_modal ( handle ) ) { display . setModalDialog ( oldModal ) ; } boolean success = response == ( OS . GTK_RESPONSE_OK ) ; if ( success ) { OS . gtk_color_selection_get_current_color ( dialog . colorsel , color ) ; int red = ( ( color . red ) > > 8 ) & 255 ; int green = ( ( color . green ) > > 8 ) & 255 ; int blue = ( ( color . blue ) > > 8 ) & 255 ; rgb = new RGB ( red , green , blue ) ; } display . removeIdleProc ( ) ; OS . gtk_widget_destroy ( handle ) ; if ( ! success ) return null ; return rgb ; } public void setRGB ( RGB rgb ) { } }

Fix:
hookId = OS . g_signal_add_emission_hook ( signalId , 0 , display . emissionProc , handle , 0 ) ;
Buggy code:
public class SoftKeyboard extends CordovaPlugin { public SoftKeyboard ( ) { } public void showKeyBoard ( ) { cordova . getActivity ( ) . runOnUiThread ( new Runnable ( ) { public void run ( ) { webView . getView ( ) . setFocusableInTouchMode ( true ) ; <START_BUG> webView . getView ( ) . requestFocusInTouchMode ( ) ; <END_BUG> InputMethodManager mgr = ( ( InputMethodManager ) ( cordova . getActivity ( ) . getSystemService ( INPUT_METHOD_SERVICE ) ) ) ; mgr . showSoftInput ( webView . getView ( ) , SHOW_IMPLICIT ) ; ( ( InputMethodManager ) ( cordova . getActivity ( ) . getSystemService ( INPUT_METHOD_SERVICE ) ) ) . showSoftInput ( webView . getView ( ) , 0 ) ; } } ) ; } public void hideKeyBoard ( ) { } public boolean isKeyBoardShowing ( ) { } public int getWebViewWidth ( ) { } public int getWebViewHeight ( ) { } public int getDisplayHeight ( ) { } public boolean sendTap ( final int posx , final int posy , final CallbackContext callbackContext ) { } @ Override public boolean execute ( String action , JSONArray args , CallbackContext callbackContext ) { } }

Fix:
webView . getView ( ) . requestFocusFromTouch ( ) ;
Buggy code:
public class PrimitivesTest { @ Test public void testGoodBinary ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadBinary ( ) { } @ Test public void testGoodBoolean ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadBoolean ( ) { } @ Test public void testGoodDate ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadDate ( ) { } @ Test public void testGoodDateTime ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadDateTime ( ) { } @ Test public void testGoodDecimal ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadDecimal ( ) { } @ Test public void testGoodInteger ( ) { <START_BUG> Long integer = 5L ; <END_BUG> SimplePrimitive simplePrimitive = SimplePrimitive . createPrimitive ( INTEGER . getId ( ) , integer ) ; assertTrue ( ( simplePrimitive instanceof IntegerPrimitive ) ) ; assertEquals ( INTEGER , simplePrimitive . getType ( ) ) ; assertEquals ( integer , simplePrimitive . getValue ( ) ) ; } @ Test ( expected = IllegalArgumentException . class ) public void testBadInteger ( ) { } @ Test public void testGoodString ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testBadString ( ) { } @ Test ( expected = IllegalArgumentException . class ) public void testUnknownType ( ) { } No newline ; at end ; of file ; }

Fix:
Integer integer = 55 ;
Buggy code:
public class HMM { private Hmm < ObservationVector > hmm ; private BaumWelchLearner bwl ; public HMM ( ) { } public void learnExercise ( List < PartialExerciseData > data ) { } public void printHMM ( ) { try { File path ; String state = Environment . getExternalStorageState ( ) ; if ( MEDIA_MOUNTED . equals ( state ) ) { path = Environment . getExternalStoragePublicDirectory ( DIRECTORY_DOWNLOADS ) ; } else { path = Environment . getDataDirectory ( ) ; } String filepath = ( ( ( path . getAbsolutePath ( ) ) + "//hmm//" ) + ( new Date ( ) . getTime ( ) ) ) + ".dot" ; new GenericHmmDrawerDot ( ) . write ( hmm , filepath ) ; <START_BUG> Log . d ( "HMM" , ( "Printed<seq2seq4repair_space>HMM<seq2seq4repair_space>" + filepath ) ) ; <END_BUG> } catch ( IOException e ) { e . printStackTrace ( ) ; } } }

Fix:
Log . d ( "HMM" , "Printed<seq2seq4repair_space>HMM<seq2seq4repair_space>" ) ;
Buggy code:
public class FightListAdapter extends RecyclerView . Adapter < FightListAdapter . ViewHolder > { private List < DbFight > mDataset ; public Context mContext ; public FragmentManager mFragmentManager ; public static class ViewHolder extends RecyclerView . ViewHolder { public ImageView profilePic ; public TextView name ; public TextView level ; public TextView strength ; public TextView bestFighter ; public Button fightButton ; public ViewHolder ( View v ) { } } public FightListAdapter ( List < DbFight > myDataset , Context context , FragmentManager fragmentManager ) { } @ Override public FightListAdapter . ViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { } @ Override public void onBindViewHolder ( FightListAdapter . ViewHolder holder , final int position ) { String [ ] ranks = mContext . getResources ( ) . getStringArray ( army_ranks ) ; final DbFight fight = mDataset . get ( position ) ; holder . profilePic . setImageBitmap ( fight . getImg ( ) ) ; holder . name . setText ( fight . getName ( ) ) ; holder . strength . setText ( ( "Army<seq2seq4repair_space>strength:<seq2seq4repair_space>" + ( fight . getStrength ( ) ) ) ) ; holder . level . setText ( ( "Level:<seq2seq4repair_space>" + ( fight . getPlayerLevel ( ) ) ) ) ; <START_BUG> holder . bestFighter . setText ( ( "Best<seq2seq4repair_space>fighter:<seq2seq4repair_space>" + ( ranks [ GameMechanics . getRankByLevel ( fight . getMaxLevel ( ) ) ] ) ) ) ; <END_BUG> holder . fightButton . setOnClickListener ( new View . OnClickListener ( ) { @ Override public void onClick ( View v ) { FightResultDialogFragment dialog = FightResultDialogFragment . newInstance ( fight . getName ( ) , fight . getId ( ) , position , 0 , "" , 0.0 , 0.0 ) ; FragmentTransaction ft = mFragmentManager . beginTransaction ( ) ; dialog . show ( ft , fight . getName ( ) ) ; } } ) ; } @ Override public int getItemCount ( ) { } }

Fix:
holder . bestFighter . setText ( ( "Best<seq2seq4repair_space>fighter:<seq2seq4repair_space>" + ( ranks [ ( ( GameMechanics . getRankByLevel ( fight . getMaxLevel ( ) ) ) - 1 ) ] ) ) ) ;
Buggy code:
public class CpioArchiveOutputStream extends ArchiveOutputStream implements CpioConstants { private CpioArchiveEntry entry ; private boolean closed = false ; private boolean finished ; private final short entryFormat ; private final HashMap names = new HashMap ( ) ; private long crc = 0 ; private long written ; private final OutputStream out ; public CpioArchiveOutputStream ( final OutputStream out , final short format ) { } public CpioArchiveOutputStream ( final OutputStream out ) { } private void ensureOpen ( ) throws IOException { } public void putNextEntry ( final CpioArchiveEntry e ) throws IOException { } private void writeHeader ( final CpioArchiveEntry e ) throws IOException { } private void writeNewEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldAsciiEntry ( final CpioArchiveEntry entry ) throws IOException { } private void writeOldBinaryEntry ( final CpioArchiveEntry entry , final boolean swapHalfWord ) throws IOException { } public void closeArchiveEntry ( ) throws IOException { } public void write ( final byte [ ] b , final int off , final int len ) throws IOException { } public void finish ( ) throws IOException { } public void close ( ) throws IOException { if ( ! ( this . closed ) ) { this . finish ( ) ; <START_BUG> super . close ( ) ; <END_BUG> this . closed = true ; } } private void pad ( int count ) throws IOException { } private void writeBinaryLong ( final long number , final int length , final boolean swapHalfWord ) throws IOException { } private void writeAsciiLong ( final long number , final int length , final int radix ) throws IOException { } private void writeCString ( final String str ) throws IOException { } public void putArchiveEntry ( ArchiveEntry entry ) throws IOException { } public void write ( int b ) throws IOException { } }

Fix:
out . close ( ) ;
Buggy code:
public class Node implements Cloneable { private Node parent = null ; private ArrayList < Node > children = new ArrayList < Node > ( ) ; public String name = "" ; public String todo = "" ; public String priority = "" ; private ArrayList < String > tags = new ArrayList < String > ( ) ; public NodePayload payload = new NodePayload ( ) ; public boolean encrypted = false ; public boolean parsed = true ; public Node ( String name , Node parent ) { } public Node ( String name ) { } public void addChild ( Node childNode ) { } public boolean removeChild ( String childName ) { } public boolean hasChildren ( ) { } public Node getChild ( String childName ) { } public ArrayList < Node > getChildren ( ) { } public Node findChildNode ( String regex ) { } public void sortChildren ( ) { } public static Comparator < Node > comparator = new Comparator < Node > ( ) { @ Override public int compare ( Node node1 , Node node2 ) { } } ; public void setTags ( ArrayList < String > todoList ) { } public ArrayList < String > getTags ( ) { } public void addTag ( String tag ) { } public String getTagString ( ) { } public void applyEdits ( ArrayList < EditNode > edits ) { } private ArrayList < EditNode > findEdits ( ArrayList < EditNode > edits ) { } public String getNodeId ( ) { } public boolean isSimple ( ) { } public String toString ( ) { String noteStr = "*<seq2seq4repair_space>" ; if ( ! ( todo . equals ( "" ) ) ) noteStr += ( todo ) + "<seq2seq4repair_space>" ; if ( ! ( priority . equals ( "" ) ) ) noteStr += ( "[#" + ( priority ) ) + "]<seq2seq4repair_space>" ; noteStr += ( this . name ) + "\n" ; if ( ( this . payload . getContent ( ) . length ( ) ) > 0 ) <START_BUG> noteStr += ( this . payload ) + "\n" ; <END_BUG> noteStr += "\n" ; return noteStr ; } }

Fix:
noteStr += ( this . payload . getContent ( ) ) + "\n" ;
Buggy code:
public abstract class AbstractRefreshableConfigApplicationContext extends AbstractRefreshableApplicationContext implements BeanNameAware , InitializingBean { private String [ ] configLocations ; private boolean setIdCalled = false ; public AbstractRefreshableConfigApplicationContext ( ) { } public AbstractRefreshableConfigApplicationContext ( ApplicationContext parent ) { } public void setConfigLocation ( String location ) { } public void setConfigLocations ( String [ ] locations ) { } protected String [ ] getConfigLocations ( ) { } protected String [ ] getDefaultConfigLocations ( ) { } protected String resolvePath ( String path ) { <START_BUG> return this . getEnvironment ( ) . getPropertyResolver ( ) . resolveRequiredPlaceholders ( path ) ; <END_BUG> } @ Override public void setId ( String id ) { } public void setBeanName ( String name ) { } public void afterPropertiesSet ( ) { } }

Fix:
return this . getEnvironment ( ) . resolveRequiredPlaceholders ( path ) ;
Buggy code:
public final class Main { public static String getVersionString ( ) { } private static void usage ( ) { System . out . println ( "Usage:<seq2seq4repair_space>.//run.sh<seq2seq4repair_space>[args...]\n" ) ; System . out . println ( "where<seq2seq4repair_space>args<seq2seq4repair_space>include:" ) ; System . out . println ( "<seq2seq4repair_space>-D<name>[=<value>]<seq2seq4repair_space>Set<seq2seq4repair_space>a<seq2seq4repair_space>system<seq2seq4repair_space>property" ) ; System . out . println ( "<seq2seq4repair_space>-help<seq2seq4repair_space>Display<seq2seq4repair_space>this<seq2seq4repair_space>message<seq2seq4repair_space>and<seq2seq4repair_space>exit" ) ; System . out . println ( "<seq2seq4repair_space>-interprocess-address<seq2seq4repair_space><address><seq2seq4repair_space>address<seq2seq4repair_space>of<seq2seq4repair_space>socket<seq2seq4repair_space>on<seq2seq4repair_space>which<seq2seq4repair_space>this<seq2seq4repair_space>process<seq2seq4repair_space>should<seq2seq4repair_space>listen<seq2seq4repair_space>for<seq2seq4repair_space>communication<seq2seq4repair_space>from<seq2seq4repair_space>child<seq2seq4repair_space>processes" ) ; System . out . println ( "<seq2seq4repair_space>-interprocess-port<seq2seq4repair_space><port><seq2seq4repair_space>port<seq2seq4repair_space>of<seq2seq4repair_space>socket<seq2seq4repair_space>on<seq2seq4repair_space>which<seq2seq4repair_space>this<seq2seq4repair_space>process<seq2seq4repair_space>should<seq2seq4repair_space>listen<seq2seq4repair_space>for<seq2seq4repair_space>communication<seq2seq4repair_space>from<seq2seq4repair_space>child<seq2seq4repair_space>processes" ) ; <START_BUG> System . out . println ( "<seq2seq4repair_space>-P<seq2seq4repair_space><url><seq2seq4repair_space>Load<seq2seq4repair_space>system<seq2seq4repair_space>properties<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>url" ) ; <END_BUG> System . out . println ( "<seq2seq4repair_space>-properties<seq2seq4repair_space><url><seq2seq4repair_space>Load<seq2seq4repair_space>system<seq2seq4repair_space>properties<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>url" ) ; System . out . println ( "<seq2seq4repair_space>-version<seq2seq4repair_space>Print<seq2seq4repair_space>version<seq2seq4repair_space>and<seq2seq4repair_space>exit\n" ) ; } public static void main ( String [ ] args ) { } Properties props = new Properties ( System . getProperties ( ) ) ; private Main ( ) { } private void boot ( String [ ] args , InputStream stdin , PrintStream stdout , PrintStream stderr ) { } private void abort ( Throwable t ) { } private ServerManagerEnvironment determineEnvironment ( String [ ] args , InputStream stdin , PrintStream stdout , PrintStream stderr ) { } private URL makeURL ( String urlspec ) throws MalformedURLException { } }

Fix:
System . out . println ( "<seq2seq4repair_space>-P,<seq2seq4repair_space><url><seq2seq4repair_space>Load<seq2seq4repair_space>system<seq2seq4repair_space>properties<seq2seq4repair_space>from<seq2seq4repair_space>the<seq2seq4repair_space>given<seq2seq4repair_space>url" ) ;
Buggy code:
final class Entries { private static final Logger logger = Logger . getLogger ( Entries . class ) ; private static final boolean debugEnabled = Entries . logger . isEnabledFor ( DEBUG ) ; private Map < ProviderId , Service > entries = null ; Entries ( ) { } final void addAll ( Set < Service > entriesToAdd ) { } final void add ( Service svc ) { } final void remove ( ProviderId svcId ) { } final Set < Service > getEntries ( C4SMsgRetrieve msg ) { if ( msg == null ) { NullPointerException e = new NullPointerException ( "ID<seq2seq4repair_space>to<seq2seq4repair_space>find<seq2seq4repair_space>entries<seq2seq4repair_space>for<seq2seq4repair_space>may<seq2seq4repair_space>not<seq2seq4repair_space>be<seq2seq4repair_space>null!" ) ; Entries . logger . error ( "Null<seq2seq4repair_space>pointer" , e ) ; throw e ; } Set < Service > svcs = new HashSet < > ( ) ; if ( ( msg . amount ) > 0 ) { for ( Service s : getEntriesInInterval ( msg . span . bgn ( ) , msg . span . end ( ) ) ) { if ( ! ( msg . constraints . satisfies ( s ) ) ) continue ; svcs . add ( s ) ; <START_BUG> if ( ( msg . amount ) >= ( svcs . size ( ) ) ) <END_BUG> break ; } } return svcs ; } final Set < Service > getEntriesInInterval ( ID fromID , ID toID ) { } final void removeAll ( Set < ProviderId > toRemove ) { } final Map < ProviderId , Service > getEntries ( ) { } final int getNumberOfStoredEntries ( ) { } public final String toString ( ) { } No newline ; at end ; of file ; }

Fix:
if ( ( msg . amount ) <= ( svcs . size ( ) ) )
Buggy code:
public class FBUtilities { private static Logger logger_ = LoggerFactory . getLogger ( FBUtilities . class ) ; public static final BigInteger TWO = new BigInteger ( "2" ) ; private static volatile InetAddress localInetAddress_ ; public static String [ ] strip ( String string , String token ) { } public static double parseDoubleOrPercent ( String value ) { } public static InetAddress getLocalAddress ( ) { } public static long absoluteFromFraction ( double fractOrAbs , long total ) { if ( fractOrAbs < 0 ) throw new UnsupportedOperationException ( ( "unexpected<seq2seq4repair_space>negative<seq2seq4repair_space>value<seq2seq4repair_space>" + fractOrAbs ) ) ; <START_BUG> if ( ( 0 < fractOrAbs ) && ( fractOrAbs < 1 ) ) { <END_BUG> return Math . max ( 1 , ( ( long ) ( fractOrAbs * total ) ) ) ; } assert ( fractOrAbs >= 1 ) || ( fractOrAbs == 0 ) ; return ( ( long ) ( fractOrAbs ) ) ; } public static Pair < BigInteger , Boolean > midpoint ( BigInteger left , BigInteger right , int sigbits ) { } public static byte [ ] toByteArray ( int i ) { } public static int byteArrayToInt ( byte [ ] bytes ) { } public static int byteArrayToInt ( byte [ ] bytes , int offset ) { } public static int compareByteArrays ( byte [ ] bytes1 , byte [ ] bytes2 ) { } public static byte [ ] xor ( byte [ ] left , byte [ ] right ) { } public static BigInteger hash ( String data ) { } public static byte [ ] hash ( String type , byte [ ] ... data ) { } public static void compressToStream ( byte [ ] input , ByteArrayOutputStream bos ) throws IOException { } public static byte [ ] decompress ( byte [ ] compressedData , int off , int len ) throws IOException , DataFormatException { } public static void writeByteArray ( byte [ ] bytes , DataOutput out ) throws IOException { } public static byte [ ] hexToBytes ( String str ) { } public static String bytesToHex ( byte ... bytes ) { } public static String mapToString ( Map < ? , ? > map ) { } public static void writeNullableString ( String key , DataOutput dos ) throws IOException { } public static String readNullableString ( DataInput dis ) throws IOException { } public static void renameWithConfirm ( String tmpFilename , String filename ) throws IOException { } public static < T extends Comparable < T > > CollatingIterator getCollatingIterator ( ) { } public static void atomicSetMax ( AtomicInteger atomic , int i ) { } public static void atomicSetMax ( AtomicLong atomic , long i ) { } public static void serialize ( TSerializer serializer , TBase struct , DataOutput out ) throws IOException { } public static void deserialize ( TDeserializer deserializer , TBase struct , DataInput in ) throws IOException { } public static void sortSampledKeys ( List < DecoratedKey > keys , Range range ) { } }

Fix:
if ( ( 0 < fractOrAbs ) && ( fractOrAbs <= 1 ) ) {
Buggy code:
@ RunWith ( Arquillian . class ) @ ServerSetup ( BasicDeployment16TestCase . BasicDeploymentTestCaseSetup . class ) public class BasicDeployment16TestCase extends ContainerResourceMgmtTestBase { static class BasicDeploymentTestCaseSetup extends AbstractMgmtServerSetupTask { @ Override public void doSetup ( final ManagementClient managementClient ) throws Exception { String xml = FileUtils . readFile ( BasicDeployment16TestCase . class , "basic16.xml" ) ; <START_BUG> List < ModelNode > operations = xmlToModelOperations ( xml , CURRENT . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ; <END_BUG> executeOperation ( operationListToCompositeOperation ( operations ) ) ; } @ Override public void tearDown ( final ManagementClient managementClient , final String containerId ) throws Exception { } } @ Deployment public static ResourceAdapterArchive createDeployment ( ) throws Exception { } @ Resource ( mappedName = "java:jboss//name1" ) private MultipleConnectionFactory1 connectionFactory1 ; @ Resource ( mappedName = "java:jboss//Name3" ) private MultipleAdminObject1 adminObject1 ; @ Test public void testConfiguration ( ) throws Throwable { } }

Fix:
List < ModelNode > operations = xmlToModelOperations ( xml , RESOURCEADAPTERS_1_0 . getUriString ( ) , new ResourceAdapterSubsystemParser ( ) ) ;
Buggy code:
public class AllGroupsCollectorTest extends LuceneTestCase { public void testTotalGroupCount ( ) throws Exception { } private void addGroupField ( Document doc , String groupField , String value , boolean canUseIDV ) { doc . add ( new Field ( groupField , value , TextField . TYPE_STORED ) ) ; if ( canUseIDV ) { <START_BUG> doc . add ( new DocValuesField ( groupField , new BytesRef ( value ) , Type . BYTES_VAR_SORTED ) ) ; <END_BUG> } } private AbstractAllGroupsCollector < ? > createRandomCollector ( String groupField , boolean canUseIDV ) throws IOException { } }

Fix:
doc . add ( new SortedBytesDocValuesField ( groupField , new BytesRef ( value ) ) ) ;
Buggy code:
public class AvroTypeInfo < T extends SpecificRecordBase > extends PojoTypeInfo < T > { public AvroTypeInfo ( Class < T > typeClass ) { } private static < T extends SpecificRecordBase > List < PojoField > generateFieldsFromAvroSchema ( Class < T > typeClass ) { AvroTypeInfo . PojoTypeExtractor pte = new AvroTypeInfo . PojoTypeExtractor ( ) ; TypeInformation ti = pte . analyzePojo ( typeClass , new ArrayList < java . lang . reflect . Type > ( ) , null , null , null ) ; if ( ! ( ti instanceof PojoTypeInfo ) ) { throw new IllegalStateException ( "Expecting<seq2seq4repair_space>type<seq2seq4repair_space>to<seq2seq4repair_space>be<seq2seq4repair_space>a<seq2seq4repair_space>PojoTypeInfo" ) ; } PojoTypeInfo pti = ( ( PojoTypeInfo ) ( ti ) ) ; List < PojoField > newFields = new ArrayList < PojoField > ( pti . getTotalFields ( ) ) ; <START_BUG> for ( int i = 0 ; i < ( pti . getTotalFields ( ) ) ; i ++ ) { <END_BUG> PojoField f = pti . getPojoFieldAt ( i ) ; TypeInformation newType = f . type ; if ( newType instanceof GenericTypeInfo ) { if ( newType . getTypeClass ( ) . equals ( CharSequence . class ) ) { newType = new GenericTypeInfo ( Utf8 . class ) ; } } PojoField newField = new PojoField ( f . field , newType ) ; newFields . add ( newField ) ; } return newFields ; } private static class PojoTypeExtractor extends TypeExtractor { private PojoTypeExtractor ( ) { } } }

Fix:
for ( int i = 0 ; i < ( pti . getArity ( ) ) ; i ++ ) {
Buggy code:
public class Area { private Soil [ ] [ ] area ; private Metapop metapop ; private int dimension ; private int yearCones = 0 ; private int conesEaten = 0 ; private int amountOfTrees = 0 ; public Area ( int dimension , Metapop metapop ) { } private void initiate ( ) { } public void setPineTrees ( int amount ) { } public void Year ( boolean mast ) { } private void createCaches ( int seeds ) { } private void incrementAge ( ) { } private void eatCaches ( ) { } public int [ ] conesProducePerTree ( ) { <START_BUG> int [ ] cones = new int [ amountOfTrees ] ; <END_BUG> int counter = 0 ; for ( int i = 0 ; i < ( dimension ) ; i ++ ) { for ( int j = 0 ; j < ( dimension ) ; j ++ ) { if ( area [ i ] [ j ] . containsPine ( ) ) { cones [ counter ] = area [ i ] [ j ] . amountCones ( ) ; counter ++ ; } } } return cones ; } public int conesLeft ( ) { } private double percentange ( double min , double max ) { } private int seeds ( int min , int max ) { } public String toString ( ) { } private void checkProgress ( ) { } public int getTreeCount ( ) { } public int getCacheCount ( ) { } public int getSeedlingCount ( ) { } public int getYearCones ( ) { } public int getYearConesEaten ( ) { } No newline ; at end ; of file ; }

Fix:
int [ ] cones = new int [ getTreeCount ( ) ] ;
Buggy code:
public class Sim { static class ExitCatcher extends SecurityManager { private boolean m_caught = false ; public ExitCatcher ( ) { } public boolean isExitCaught ( ) { } public void checkExit ( int status ) { } public void checkRead ( String file ) { } } static class DoNothingHandler implements Thread . UncaughtExceptionHandler { public void uncaughtException ( Thread t , Throwable th ) { } } private static Sim . ExitCatcher m_EC = new Sim . ExitCatcher ( ) ; private static Sim . DoNothingHandler m_DNH = new Sim . DoNothingHandler ( ) ; public static void runSimple ( ) { } public static void runMultiple1 ( ) { } public static void runMultiple2 ( ) { } public static void runMultiple3 ( ) { } public static void main ( String [ ] args ) { System . setSecurityManager ( Sim . m_EC ) ; long startTime = System . currentTimeMillis ( ) ; long endTime = System . currentTimeMillis ( ) ; try { <START_BUG> Sim . runSimple ( ) ; <END_BUG> endTime = System . currentTimeMillis ( ) ; Thread . sleep ( 1000 ) ; } catch ( SecurityException se ) { endTime = System . currentTimeMillis ( ) ; se . printStackTrace ( ) ; } catch ( Exception e ) { endTime = System . currentTimeMillis ( ) ; System . out . println ( "EXCEPTION<seq2seq4repair_space>THROWN<seq2seq4repair_space>DURING<seq2seq4repair_space>SIMULATION:" ) ; e . printStackTrace ( ) ; } if ( ! ( Sim . m_EC . isExitCaught ( ) ) ) { try { System . exit ( ( - 42 ) ) ; } catch ( SecurityException se ) { } } System . out . println ( "" ) ; System . out . println ( "" ) ; System . out . println ( "END<seq2seq4repair_space>OF<seq2seq4repair_space>SIMULATION" ) ; System . out . println ( ( ( "Total<seq2seq4repair_space>Simulation<seq2seq4repair_space>Time:<seq2seq4repair_space>" + ( endTime - startTime ) ) + "ms" ) ) ; System . exit ( 0 ) ; } }

Fix:
Sim . runMultiple1 ( ) ;
Buggy code:
final class Environment { private static final String [ ] COMMAND_COM = new String [ ] { "command.com" , "//c" , "set" } ; private static final String [ ] CMD_EXE = new String [ ] { "cmd" , "//c" , "set" } ; private static final String [ ] ENV_CMD = new String [ ] { "//usr//bin//env" } ; private static final String [ ] ENV_RAW = new String [ ] { "env" } ; private Properties m_procEnvironment ; private final ExecManager m_execManager ; public Environment ( final ExecManager execManager ) { } public Properties getNativeEnvironment ( ) throws IOException , ExecException { } private synchronized Properties getEnvironmentVariables ( ) throws IOException , ExecException { } private synchronized Properties retrieveEnvironmentVariables ( ) throws IOException , ExecException { } private void addProperty ( final Properties properties , final String data ) throws ExecException { } private String getEnvironmentText ( ) throws IOException , ExecException { final String [ ] command = Environment . getEnvCommand ( ) ; final File workingDirectory = new File ( "." ) ; <START_BUG> final ExecMetaData metaData = new ExecMetaData ( command , null , workingDirectory , false ) ; <END_BUG> final ByteArrayOutputStream output = new ByteArrayOutputStream ( ) ; final int retval = m_execManager . execute ( metaData , null , output , output , 0 ) ; if ( retval != 0 ) { } return output . toString ( ) ; } private static String [ ] getEnvCommand ( ) throws ExecException { } }

Fix:
final ExecMetaData metaData = new ExecMetaData ( command , null , workingDirectory ) ;
Buggy code:
public abstract class Module { protected String id ; protected String name ; protected HashMap < String , String > actionsList ; public Module ( String id , String n ) { } public String getId ( ) { } public String getName ( ) { } public void setName ( String name ) { } public String getIdForAction ( String a ) { } public String outputToNFCTagString ( String actionName ) { } public String getActionFromId ( String id ) { } public String parseActionFragment ( String fragment ) { <START_BUG> return fragment ; <END_BUG> } public String generateUrlFragment ( String idAction ) { } }

Fix:
return getActionFromId ( fragment ) ;
Buggy code:
public class TridentState { TridentTopology _topology ; Node _node ; protected TridentState ( TridentTopology topology , Node node ) { } public Stream newValuesStream ( ) { <START_BUG> return new Stream ( _topology , _node . name , _node ) ; <END_BUG> } public TridentState parallelismHint ( int parallelism ) { } }

Fix:
return new Stream ( _topology , _node ) ;
Buggy code:
public class HandlerMethodResolver { private final Set < Method > handlerMethods = new LinkedHashSet < Method > ( ) ; private final Set < Method > initBinderMethods = new LinkedHashSet < Method > ( ) ; private final Set < Method > modelAttributeMethods = new LinkedHashSet < Method > ( ) ; private RequestMapping typeLevelMapping ; private boolean sessionAttributesFound ; private final Set < String > sessionAttributeNames = new HashSet < String > ( ) ; private final Set < Class > sessionAttributeTypes = new HashSet < Class > ( ) ; private final Set < String > actualSessionAttributeNames = Collections . synchronizedSet ( new HashSet < String > ( 4 ) ) ; public void init ( Class < ? > handlerType ) { Class < ? > [ ] handlerTypes = ( Proxy . isProxyClass ( handlerType ) ) ? handlerType . getInterfaces ( ) : new Class < ? > [ ] { handlerType } ; for ( final Class < ? > currentHandlerType : handlerTypes ) { ReflectionUtils . doWithMethods ( currentHandlerType , new ReflectionUtils . MethodCallback ( ) { public void doWith ( Method method ) { Method specificMethod = ClassUtils . getMostSpecificMethod ( method , currentHandlerType ) ; if ( isHandlerMethod ( method ) ) { handlerMethods . add ( specificMethod ) ; } else if ( method . isAnnotationPresent ( InitBinder . class ) ) { initBinderMethods . add ( specificMethod ) ; } else if ( method . isAnnotationPresent ( ModelAttribute . class ) ) { modelAttributeMethods . add ( specificMethod ) ; } } } , NON_BRIDGED_METHODS ) ; } this . typeLevelMapping = AnnotationUtils . findAnnotation ( handlerType , RequestMapping . class ) ; <START_BUG> SessionAttributes sessionAttributes = handlerType . getAnnotation ( SessionAttributes . class ) ; <END_BUG> this . sessionAttributesFound = sessionAttributes != null ; if ( this . sessionAttributesFound ) { this . sessionAttributeNames . addAll ( Arrays . asList ( sessionAttributes . value ( ) ) ) ; this . sessionAttributeTypes . addAll ( Arrays . asList ( sessionAttributes . types ( ) ) ) ; } } protected boolean isHandlerMethod ( Method method ) { } public final boolean hasHandlerMethods ( ) { } public final Set < Method > getHandlerMethods ( ) { } public final Set < Method > getInitBinderMethods ( ) { } public final Set < Method > getModelAttributeMethods ( ) { } public boolean hasTypeLevelMapping ( ) { } public RequestMapping getTypeLevelMapping ( ) { } public boolean hasSessionAttributes ( ) { } public boolean isSessionAttribute ( String attrName , Class attrType ) { } public Set < String > getActualSessionAttributeNames ( ) { } }

Fix:
SessionAttributes sessionAttributes = AnnotationUtils . findAnnotation ( handlerType , SessionAttributes . class ) ;
Buggy code:
final class HttpServletResponseFacade implements HttpServletResponse { private static StringManager sm = StringManager . getManager ( "org.apache.tomcat.resources" ) ; private Response response ; private boolean usingStream = false ; private boolean usingWriter = false ; ServletOutputStreamFacade osFacade = null ; PrintWriter writer = null ; HttpServletResponseFacade ( Response response ) { } void recycle ( ) { } public void addCookie ( Cookie cookie ) { } public boolean containsHeader ( String name ) { } public String encodeRedirectURL ( String location ) { } public String encodeRedirectUrl ( String location ) { } public String encodeURL ( String url ) { if ( isEncodeable ( toAbsolute ( url ) ) ) <START_BUG> return toEncoded ( url , response . getRequest ( ) . getRequestedSessionId ( ) ) ; <END_BUG> else return url ; } public String encodeUrl ( String url ) { } public String getCharacterEncoding ( ) { } public ServletOutputStream getOutputStream ( ) throws IOException { } public PrintWriter getWriter ( ) throws IOException { } public void sendError ( int sc ) throws IOException { } public void sendError ( int sc , String msg ) throws IOException { } public void sendRedirect ( String location ) throws IOException , IllegalArgumentException { } public void setContentLength ( int len ) { } public void setContentType ( String type ) { } public void setDateHeader ( String name , long date ) { } public void addDateHeader ( String name , long value ) { } public void setHeader ( String name , String value ) { } public void addHeader ( String name , String value ) { } public void setIntHeader ( String name , int value ) { } public void addIntHeader ( String name , int value ) { } public void setStatus ( int sc ) { } public void setBufferSize ( int size ) throws IllegalStateException { } public int getBufferSize ( ) { } public void reset ( ) throws IllegalStateException { } public boolean isCommitted ( ) { } public void flushBuffer ( ) throws IOException { } public void setLocale ( Locale loc ) { } public Locale getLocale ( ) { } public void setStatus ( int sc , String msg ) { } private boolean isEncodeable ( String location ) { } private String toAbsolute ( String location ) { } private String toEncoded ( String url , String sessionId ) { } private void cookie2serverCookie ( Cookie cookie , ServerCookie sc ) { } }

Fix:
return toEncoded ( url , response . getRequest ( ) . getSessionId ( ) ) ;
Buggy code:
@ Service ( "QuestionServiceImpl" ) public class QuestionServiceImpl implements QuestionService { @ Autowired private QuestionRepository questionRepository ; @ Autowired private AnswerServiceImpl answerService ; @ Autowired private VariantServiceImpl variantService ; @ Override public Question addQuestion ( Question question ) { } @ Override public void delete ( Long id ) { } @ Override public Question getById ( Long id ) { <START_BUG> return questionRepository . getOne ( id ) ; <END_BUG> } @ Override public Question editQuestion ( Question question ) { } @ Override public List < Question > getAll ( ) { } @ Override public List < Question > findByIdInterview ( Long id ) { } }

Fix:
return questionRepository . findOne ( id ) ;
Buggy code:
public class TestCommand implements Command < String , Node > { private static final long serialVersionUID = - 3405593925871250676L ; @ Override public String execute ( Node node ) { <START_BUG> System . out . println ( ( "Executing<seq2seq4repair_space>command<seq2seq4repair_space>on<seq2seq4repair_space>" + node ) ) ; <END_BUG> return node . getName ( ) ; } }

Fix:
System . out . println ( String . format ( "Command.execute(%s)" , node ) ) ;
Buggy code:
public class QualifiedTypeReference extends TypeReference { public char [ ] [ ] tokens ; public long [ ] sourcePositions ; public QualifiedTypeReference ( char [ ] [ ] sources , long [ ] poss ) { } public TypeReference copyDims ( int dim ) { } protected TypeBinding findNextTypeBinding ( int tokenIndex , Scope scope , PackageBinding packageBinding ) { } protected TypeBinding getTypeBinding ( Scope scope ) { if ( ( this . resolvedType ) != null ) return this . resolvedType ; Binding binding = scope . getPackage ( this . tokens ) ; if ( ( binding != null ) && ( ! ( binding . isValidBinding ( ) ) ) ) return ( ( ReferenceBinding ) ( binding ) ) ; PackageBinding packageBinding = ( binding == null ) ? null : ( ( PackageBinding ) ( binding ) ) ; boolean isClassScope = ( scope . kind ) == ( Scope . CLASS_SCOPE ) ; ReferenceBinding qualifiedType = null ; for ( int i = ( packageBinding == null ) ? 0 : packageBinding . compoundName . length , max = this . tokens . length ; i < max ; i ++ ) { findNextTypeBinding ( i , scope , packageBinding ) ; if ( ! ( this . resolvedType . isValidBinding ( ) ) ) return this . resolvedType ; if ( isClassScope ) if ( ( ( ClassScope ) ( scope ) ) . detectHierarchyCycle ( this . resolvedType , this , null ) ) return null ; ReferenceBinding currentType = ( ( ReferenceBinding ) ( this . resolvedType ) ) ; if ( qualifiedType != null ) { boolean rawQualified ; if ( currentType . isGenericType ( ) ) { qualifiedType = scope . environment ( ) . createRawType ( currentType , qualifiedType ) ; } else if ( ( rawQualified = qualifiedType . isRawType ( ) ) && ( ! ( currentType . isStatic ( ) ) ) ) { qualifiedType = scope . environment ( ) . createRawType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , qualifiedType ) ; } else <START_BUG> if ( rawQualified || ( qualifiedType . isParameterizedType ( ) ) ) { <END_BUG> qualifiedType = scope . environment ( ) . createParameterizedType ( ( ( ReferenceBinding ) ( currentType . erasure ( ) ) ) , null , qualifiedType ) ; } else { qualifiedType = currentType ; } } else { qualifiedType = ( currentType . isGenericType ( ) ) ? ( ( ReferenceBinding ) ( scope . environment ( ) . convertToRawType ( currentType ) ) ) : currentType ; } } this . resolvedType = qualifiedType ; return this . resolvedType ; } public char [ ] [ ] getTypeName ( ) { } public StringBuffer printExpression ( int indent , StringBuffer output ) { } public void traverse ( ASTVisitor visitor , BlockScope scope ) { } public void traverse ( ASTVisitor visitor , ClassScope scope ) { } }

Fix:
if ( ( rawQualified || ( qualifiedType . isParameterizedType ( ) ) ) && ( ( qualifiedType . erasure ( ) ) == ( currentType . enclosingType ( ) . erasure ( ) ) ) ) {
Buggy code:
public class TextWrapper implements Comparable < TextWrapper > , ObjectWrapper { @ ViewField ( label = "" ) protected String value ; protected Class < ? > typeClass ; protected Format formatter ; public TextWrapper ( Object iValue ) { } public TextWrapper ( Object iValue , Class < ? > iNewInstanceClass ) { } public String getValue ( ) { } public void setValue ( String value ) { } @ ViewField ( visible = AnnotationConstants . FALSE ) public Object getFinalValue ( ) throws Exception , IllegalAccessException , InvocationTargetException { <START_BUG> if ( ( ( value ) != null ) && ( ( value . trim ( ) ) != "" ) ) { <END_BUG> if ( ( formatter ) == null ) { return typeClass . getConstructor ( new Class [ ] { String . class } ) . newInstance ( new Object [ ] { value } ) ; } else { return formatter . parseObject ( value ) ; } } else { return null ; } } @ Override public String toString ( ) { } public int compareTo ( TextWrapper o ) { } }

Fix:
if ( ( ( value ) != null ) && ( "" . equals ( value . trim ( ) ) ) ) {
Buggy code:
public class ObjectGestureListener extends Listener { private IObject obj ; private boolean isResizing = false ; private boolean isRotating = false ; private boolean unbindRequest = false ; private double initialSpaceX = 0 ; private double initialSpaceY = 0 ; private double initialRotation = 0 ; private static final long TAP_TIMEOUT = 200 ; private static final long ALIGNMENT_THRESHOLD = 30 ; private long lastTap = Long . MIN_VALUE ; public ObjectGestureListener ( ) { } @ Override public void onConnect ( Controller controller ) { } @ Override public void onFrame ( Controller controller ) { } private void resizeObject ( HandList hands ) { } private void rotateObject ( HandList hands ) { if ( ( hands . count ( ) ) == 1 ) { Vector handNormal = hands . get ( 0 ) . palmNormal ( ) ; if ( ( isRotating ) == false ) { initialRotation = Math . toDegrees ( handNormal . roll ( ) ) ; isRotating = true ; } <START_BUG> double degreeChange = Math . toDegrees ( handNormal . roll ( ) ) ; <END_BUG> Platform . runLater ( new Runnable ( ) { @ Override public void run ( ) { if ( ( obj ) != null ) { obj . rotate ( degreeChange ) ; } } } ) ; initialRotation = degreeChange ; } } public void setIObject ( IObject obj ) { } }

Fix:
final double degreeChange = Math . toDegrees ( handNormal . roll ( ) ) ;