nus-yam/ex-repair huggingface dataset:
Buggy code:
public class LocalizedFormatsTest { @ Test public void testMessageNumber ( ) { <START_BUG> Assert . assertEquals ( 312 , LocalizedFormats . values ( ) . length ) ; <END_BUG> } @ Test public void testAllKeysPresentInPropertiesFiles ( ) { } @ Test public void testAllPropertiesCorrespondToKeys ( ) { } @ Test public void testNoMissingFrenchTranslation ( ) { } @ Test public void testNoOpEnglishTranslation ( ) { } @ Test public void testVariablePartsConsistency ( ) { } }

Fix:
Assert . assertEquals ( 313 , LocalizedFormats . values ( ) . length ) ;
Buggy code:
public class Subject { private int id ; private String name ; private ArrayList < Test > listTests ; private double coefficient ; public Subject ( String _name ) { } public Subject ( int _id , String _name , double _coefficient ) { } public ArrayList < Test > getListTests ( ) { } public void setListTests ( ArrayList < Test > listTests ) { } public String getName ( ) { } public void setName ( String name ) { } public int getId ( ) { } public void setId ( int id ) { } public void setMark ( double mark ) { } public void setTest ( int _id , String name , String details , double mark , double coefficient ) { } public double getCoefficient ( ) { } public double getAverage ( ) { if ( ! ( listTests . isEmpty ( ) ) ) { double sumCoeff = 0.0 ; double sum = 0 ; for ( Test test : listTests ) { sum += ( test . getMark ( ) ) * ( test . getCoefficient ( ) ) ; sumCoeff += test . getCoefficient ( ) ; } return sum // sumCoeff ; } else <START_BUG> return - 1.0 ; <END_BUG> } }

Fix:
return 0.0 ;
Buggy code:
class CreateParameterProposal extends InitializerProposal { CreateParameterProposal ( String def , String desc , Declaration dec , ProducedType type , Image image , int offset , TextFileChange change , int exitPos ) { } private static void addCreateParameterProposal ( Collection < ICompletionProposal > proposals , String def , String desc , Image image , Declaration dec , PhasedUnit unit , Tree . Declaration decNode , Tree . ParameterList paramList , ProducedType returnType , Set < Declaration > imports , Node node ) { } private static void addCreateParameterAndAttributeProposal ( Collection < ICompletionProposal > proposals , String pdef , String adef , String desc , Image image , Declaration dec , PhasedUnit unit , Tree . Declaration decNode , Tree . ParameterList paramList , Tree . Body body , ProducedType returnType , Node node ) { } static void addCreateParameterProposal ( Collection < ICompletionProposal > proposals , IProject project , ValueFunctionDefinitionGenerator dg ) { if ( Character . isLowerCase ( dg . getBrokenName ( ) . charAt ( 0 ) ) ) { Tree . Declaration decl = findDeclarationWithBody ( dg . getRootNode ( ) , dg . getNode ( ) ) ; if ( ( ( decl == null ) || ( ( decl . getDeclarationModel ( ) ) == null ) ) || ( decl . getDeclarationModel ( ) . isActual ( ) ) ) { return ; } Tree . ParameterList paramList = CreateParameterProposal . getParameters ( decl ) ; if ( paramList != null ) { String def = dg . generate ( "" , "" ) ; <START_BUG> String paramDef = ( paramList . getParameters ( ) . isEmpty ( ) ? "" : ",<seq2seq4repair_space>" ) + ( def . substring ( 0 , ( ( def . length ( ) ) - 1 ) ) ) ; <END_BUG> String paramDesc = ( "parameter<seq2seq4repair_space>'" + ( dg . getBrokenName ( ) ) ) + "'" ; for ( PhasedUnit unit : getUnits ( project ) ) { if ( unit . getUnit ( ) . equals ( dg . getRootNode ( ) . getUnit ( ) ) ) { CreateParameterProposal . addCreateParameterProposal ( proposals , paramDef , paramDesc , ADD_CORR , decl . getDeclarationModel ( ) , unit , decl , paramList , dg . getReturnType ( ) , dg . getImports ( ) , dg . getNode ( ) ) ; break ; } } } } } static void addCreateParameterProposals ( Tree . CompilationUnit cu , Node node , ProblemLocation problem , Collection < ICompletionProposal > proposals , IProject project , TypeChecker tc , IFile file ) { } private static ParameterList getParameters ( Tree . Declaration decNode ) { } private static void addCreateParameterProposals ( Collection < ICompletionProposal > proposals , IProject project , String def , String desc , Declaration typeDec , ProducedType t , Node node ) { } private static void addCreateParameterAndAttributeProposals ( Collection < ICompletionProposal > proposals , IProject project , String pdef , String adef , String desc , Declaration typeDec , ProducedType t , Node node ) { } No newline ; at end ; of file ; }

Fix:
String paramDef = ( paramList . getParameters ( ) . isEmpty ( ) ? "" : ",<seq2seq4repair_space>" ) + ( def . substring ( 0 , ( ( def . length ( ) ) - ( def . endsWith ( "{}" ) ? 3 : 1 ) ) ) ) ;
Buggy code:
public class FileWrapper { private static transient Logger log = LoggingManager . getLoggerForClass ( ) ; private FileRowColContainer container ; private int currentRow ; private static final int NO_LINE = - 1 ; private static String defaultFile = "" ; private static Map fileContainers = new HashMap ( ) ; private FileWrapper ( FileRowColContainer fdc ) { } private static ThreadLocal filePacks = new ThreadLocal ( ) { protected Object initialValue ( ) { } } ; private static String checkDefault ( String file ) { } public static synchronized void open ( String file , String alias ) { } private static FileRowColContainer getFile ( String file , String alias ) throws FileNotFoundException , IOException { FileRowColContainer frcc ; if ( ( frcc = ( ( FileRowColContainer ) ( FileWrapper . fileContainers . get ( alias ) ) ) ) == null ) { frcc = new FileRowColContainer ( file ) ; FileWrapper . fileContainers . put ( alias , frcc ) ; <START_BUG> FileWrapper . log . info ( ( ( ( "Saved<seq2seq4repair_space>" + file ) + "<seq2seq4repair_space>as<seq2seq4repair_space>" ) + alias ) ) ; <END_BUG> if ( ( FileWrapper . defaultFile . length ( ) ) == 0 ) { FileWrapper . defaultFile = file ; } } return frcc ; } public static void endRow ( String file ) { } private void endRow ( ) { } public static String getColumn ( String file , int col ) { } private String getColumn ( int col ) { } public static int getCurrentRow ( String file ) { } public static void clearAll ( ) { } }

Fix:
FileWrapper . log . info ( ( ( ( ( ( ( "Saved<seq2seq4repair_space>" + file ) + "<seq2seq4repair_space>as<seq2seq4repair_space>" ) + alias ) + "<seq2seq4repair_space>delimiter=<" ) + ( frcc . getDelimiter ( ) ) ) + ">" ) ) ;
Buggy code:
public class BCodecTest { static final int [ ] SWISS_GERMAN_STUFF_UNICODE = new int [ ] { 71 , 114 , 252 , 101 , 122 , 105 , 95 , 122 , 228 , 109 , 228 } ; static final int [ ] RUSSIAN_STUFF_UNICODE = new int [ ] { 1042 , 1089 , 1077 , 1084 , 95 , 1087 , 1088 , 1080 , 1074 , 1077 , 1090 } ; private String constructString ( int [ ] unicodeChars ) { <START_BUG> StringBuffer buffer = new StringBuffer ( ) ; <END_BUG> if ( unicodeChars != null ) { for ( int unicodeChar : unicodeChars ) { buffer . append ( ( ( char ) ( unicodeChar ) ) ) ; } } return buffer . toString ( ) ; } @ Test public void testNullInput ( ) throws Exception { } @ Test public void testUTF8RoundTrip ( ) throws Exception { } @ Test public void testBasicEncodeDecode ( ) throws Exception { } @ Test public void testEncodeDecodeNull ( ) throws Exception { } @ Test public void testEncodeStringWithNull ( ) throws Exception { } @ Test public void testDecodeStringWithNull ( ) throws Exception { } @ Test public void testEncodeObjects ( ) throws Exception { } @ Test ( expected = UnsupportedCharsetException . class ) public void testInvalidEncoding ( ) { } @ Test public void testDecodeObjects ( ) throws Exception { } }

Fix:
StringBuilder buffer = new StringBuilder ( ) ;
Buggy code:
public class HtmlEditorController extends AbstractEditorController implements CaretListener , DocumentListener { protected HtmlEditorView view ; public HtmlEditorController ( ComposerController controller ) { } public void installListener ( ) { } public void updateComponents ( boolean b ) { } public void toggleBold ( ) { } public void toggleItalic ( ) { } public void toggleUnderline ( ) { } public void toggleStrikeout ( ) { } public void toggleTeleTyper ( ) { } public void setAlignment ( int align ) { } public void setParagraphFormat ( HTML . Tag tag ) { } public void insertBreak ( ) { } public boolean isCutActionEnabled ( ) { } public boolean isCopyActionEnabled ( ) { } public boolean isPasteActionEnabled ( ) { } public boolean isDeleteActionEnabled ( ) { } public boolean isSelectAllActionEnabled ( ) { } public boolean isRedoActionEnabled ( ) { } public boolean isUndoActionEnabled ( ) { } public void cut ( ) { } public void copy ( ) { } public void paste ( ) { } public void delete ( ) { } public void redo ( ) { } public void undo ( ) { } public void selectAll ( ) { } public JComponent getComponent ( ) { } public Font getViewFont ( ) { } public void setViewFont ( Font f ) { } public String getViewText ( ) { } public void setViewText ( String text ) { } private void loadHtmlIntoView ( String text , boolean ignoreCharset ) throws IOException { Document doc = view . getDocument ( ) ; try { doc . remove ( 0 , doc . getLength ( ) ) ; if ( ( text == null ) || ( text . equals ( "" ) ) ) { return ; } if ( ignoreCharset ) { <START_BUG> view . getHtmlDoc ( ) . putProperty ( "IgnoreCharsetDirective" , new Boolean ( true ) ) ; <END_BUG> } Reader r = new StringReader ( text ) ; EditorKit kit = view . getEditorKit ( ) ; kit . read ( r , doc , 0 ) ; } catch ( BadLocationException e ) { log . error ( "Error<seq2seq4repair_space>deleting<seq2seq4repair_space>old<seq2seq4repair_space>view<seq2seq4repair_space>content" , e ) ; return ; } } public JComponent getViewUIComponent ( ) { } public void setViewCharset ( String charset ) { } public void setViewEnabled ( boolean enabled ) { } public void changedUpdate ( DocumentEvent e ) { } public void insertUpdate ( DocumentEvent e ) { } public void removeUpdate ( DocumentEvent e ) { } public void caretUpdate ( CaretEvent e ) { } }

Fix:
view . getHtmlDoc ( ) . putProperty ( "IgnoreCharsetDirective" , Boolean . TRUE ) ;
Buggy code:
public class AdapterNavDrawerHome extends RecyclerView . Adapter < AdapterNavDrawerHome . ViewHolder > { private static final int TYPE_HEADER = 0 ; private static final int TYPE_ITEM = 1 ; private String [ ] mNavTitles ; private String [ ] mNavAccount ; private CircleImageView mCircle ; public static class ViewHolder extends RecyclerView . ViewHolder { int Holderid ; TextView textView ; TextView connexion_name ; ImageView mImageViewProfile ; public ViewHolder ( View itemView , int ViewType ) { } } AdapterNavDrawerHome ( String [ ] Account , String [ ] Titles ) { } @ Override public AdapterNavDrawerHome . ViewHolder onCreateViewHolder ( ViewGroup parent , int viewType ) { } @ Override public void onBindViewHolder ( AdapterNavDrawerHome . ViewHolder holder , int position ) { if ( ( holder . Holderid ) == 1 ) { <START_BUG> holder . textView . setText ( mNavTitles [ position ] ) ; <END_BUG> } else { if ( position == 0 ) { holder . connexion_name . setText ( "UserTest" ) ; Bitmap bmp = ( ( android . graphics . drawable . BitmapDrawable ) ( holder . mImageViewProfile . getDrawable ( ) ) ) . getBitmap ( ) ; Bitmap output = mCircle . TranformImagetoCircleShape ( bmp , ( ( bmp . getWidth ( ) ) * 2 ) ) ; holder . mImageViewProfile . setImageBitmap ( output ) ; } } } @ Override public int getItemCount ( ) { } @ Override public int getItemViewType ( int position ) { } private boolean isPositionHeader ( int position ) { } }

Fix:
holder . textView . setText ( mNavTitles [ ( position - 1 ) ] ) ;
Buggy code:
public class Nxt_code implements Runnable { private static InputStream is ; private static OutputStream os ; private static DifferentialPilot pilot ; private static volatile boolean blocking = false ; private static volatile boolean kicking = false ; private static final float TRACK_WIDTH = ( ( float ) ( 13.7 ) ) ; private static final float WHEEL_DIAMETER = ( ( float ) ( 8.16 ) ) ; private static enum OpCodes { DO_NOTHING , FORWARDS , BACKWARDS , BACKWARDS_SLIGHTLY , STOP , CHANGE_SPEED , KICK , ROTATE , ARC , STEER_WITH_RATIO , BEEP , CELEBRATE , FORWARDS_WITH_DISTANCE , START_MATCH , STOP_MATCH , QUIT ; } private static Pose initial ; private static boolean fallback = false ; public static void main ( String [ ] args ) throws Exception { } public static int byteArrayToInt ( byte [ ] b ) { } public Nxt_code ( DifferentialPilot pilot ) { } public void run ( ) { boolean reacting = false ; float tempCurSpeed ; TouchSensor touchA = new TouchSensor ( SensorPort . S1 ) ; TouchSensor touchB = new TouchSensor ( SensorPort . S2 ) ; while ( true ) { try { if ( ( ! reacting ) && ( ( touchA . isPressed ( ) ) || ( touchB . isPressed ( ) ) ) ) { reacting = true ; tempCurSpeed = ( ( float ) ( Nxt_code . pilot . getTravelSpeed ( ) ) ) ; <START_BUG> Nxt_code . pilot . quickStop ( ) ; <END_BUG> Nxt_code . pilot . setTravelSpeed ( 200 ) ; Nxt_code . pilot . travel ( ( - 20 ) ) ; Thread . sleep ( 10 ) ; Nxt_code . pilot . stop ( ) ; Nxt_code . os . write ( 'r' ) ; Nxt_code . os . flush ( ) ; Nxt_code . pilot . setTravelSpeed ( tempCurSpeed ) ; } else if ( reacting && ( ! ( ( touchA . isPressed ( ) ) || ( touchB . isPressed ( ) ) ) ) ) { reacting = false ; } Thread . sleep ( 50 ) ; } catch ( Exception ex ) { System . err . println ( ( "Something<seq2seq4repair_space>went<seq2seq4repair_space>wrong<seq2seq4repair_space>in<seq2seq4repair_space>the<seq2seq4repair_space>sensor<seq2seq4repair_space>thread:<seq2seq4repair_space>" + ( ex . getMessage ( ) ) ) ) ; } } } }

Fix:
Nxt_code . pilot . stop ( ) ;
Buggy code:
public class TarRoundTripTest extends TestCase { private static final String LONG_NAME = "this//path//name//contains//more//than//one//hundred//characters//in//order//" + "to//test//the//GNU//long//file//name//capability//round//tripped" ; public TarRoundTripTest ( String name ) { } public void testLongRoundTripping ( ) throws IOException { TarEntry original = new TarEntry ( TarRoundTripTest . LONG_NAME ) ; <START_BUG> assertEquals ( "over<seq2seq4repair_space>100<seq2seq4repair_space>chars" , true , ( ( TarRoundTripTest . LONG_NAME . length ( ) ) > 100 ) ) ; <END_BUG> assertEquals ( "original<seq2seq4repair_space>name" , TarRoundTripTest . LONG_NAME , original . getName ( ) ) ; ByteArrayOutputStream buff = new ByteArrayOutputStream ( ) ; TarOutputStream tos = new TarOutputStream ( buff ) ; tos . setLongFileMode ( LONGFILE_GNU ) ; tos . putNextEntry ( original ) ; tos . closeEntry ( ) ; tos . close ( ) ; TarInputStream tis = new TarInputStream ( new ByteArrayInputStream ( buff . toByteArray ( ) ) ) ; TarEntry tripped = tis . getNextEntry ( ) ; assertEquals ( "round-tripped<seq2seq4repair_space>name" , TarRoundTripTest . LONG_NAME , tripped . getName ( ) ) ; assertNull ( "no<seq2seq4repair_space>more<seq2seq4repair_space>entries" , tis . getNextEntry ( ) ) ; tis . close ( ) ; } }

Fix:
assertTrue ( "over<seq2seq4repair_space>100<seq2seq4repair_space>chars" , ( ( TarRoundTripTest . LONG_NAME . length ( ) ) > 100 ) ) ;
Buggy code:
public class SortedTextFileTest extends TestCase { private static String formatS ( int i ) { } private void createFile ( File target , int max ) throws FileNotFoundException { } public void testGetRecordIteratorStringBoolean ( ) throws IOException { <START_BUG> File test = new File ( "//tmp//test.tmp" ) ; <END_BUG> int max = 1000000 ; createFile ( test , max ) ; RandomAccessFileSeekableLineReaderFactory factory = new RandomAccessFileSeekableLineReaderFactory ( test ) ; SortedTextFile ff = new SortedTextFile ( factory ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( 0 ) , SortedTextFileTest . formatS ( 0 ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( 0 ) , SortedTextFileTest . formatS ( 0 ) ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( 1 ) , SortedTextFileTest . formatS ( 0 ) ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( 2 ) , SortedTextFileTest . formatS ( 1 ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( 1 ) , SortedTextFileTest . formatS ( 1 ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( 12355 ) , SortedTextFileTest . formatS ( 12355 ) ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( 12355 ) , SortedTextFileTest . formatS ( 12354 ) ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( ( max - 1 ) ) , SortedTextFileTest . formatS ( ( max - 2 ) ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( ( max - 1 ) ) , SortedTextFileTest . formatS ( ( max - 1 ) ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( max ) , null ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( max ) , SortedTextFileTest . formatS ( ( max - 1 ) ) ) ; checkFirst ( ff , true , SortedTextFileTest . formatS ( ( max + 1 ) ) , SortedTextFileTest . formatS ( ( max - 1 ) ) ) ; checkFirst ( ff , false , SortedTextFileTest . formatS ( ( max + 1 ) ) , null ) ; } private void checkFirst ( SortedTextFile stf , boolean lt , String key , String want ) throws IOException { } }

Fix:
File test = File . createTempFile ( "test" , null ) ;
Buggy code:
@ SuppressWarnings ( "unused" ) public class TeleportSuite extends JavaPlugin { private boolean debug = true ; private boolean economy = false ; private FileConfiguration configuration = null ; private File configFile = null ; private FileConfiguration users = null ; private File userFile = null ; private Map < String , Localization > languages = new HashMap < String , Localization > ( ) ; private TeleportManager manager = null ; private GenericBank bank = null ; private EntityListener eListener = new EntityListener ( this ) ; private PlayerListener pListener = new PlayerListener ( this ) ; private ServerListener sListener = new ServerListener ( this ) ; private CommandHandler commands = null ; @ Override public void onEnable ( ) { } @ Override public void onDisable ( ) { } @ Override public boolean onCommand ( CommandSender cs , Command cmd , String label , String [ ] args ) { } @ Override public FileConfiguration getConfig ( ) { } @ Override public void saveConfig ( ) { } public void log ( String message ) { } public void warn ( String message ) { } public void debug ( String message ) { } public void toggleDebug ( CommandSender sender ) { } public void registerConfiguration ( boolean val ) { } private void registerConfiguration ( ) { } private void buildLocalizations ( ) { } public Localization getLocalization ( String language ) { } private void registerEvents ( ) { } private void registerCommands ( ) { } public FileConfiguration getUsers ( ) { } public void saveUsers ( ) { try { <START_BUG> users . save ( userFile ) ; <END_BUG> } catch ( IOException e ) { debug ( "An<seq2seq4repair_space>error<seq2seq4repair_space>occurred<seq2seq4repair_space>while<seq2seq4repair_space>saving<seq2seq4repair_space>'users.yml'" ) ; e . printStackTrace ( ) ; } } public boolean validateAllPay ( ) { } public boolean validateAllPay ( boolean val ) { } public GenericBank getBank ( ) { } public TeleportManager getManager ( ) { } public CommandHandler getHandler ( ) { } }

Fix:
getUsers ( ) . save ( userFile ) ;
Buggy code:
@ SuppressWarnings ( "restriction" ) public class AnnotationColumnLabelProvider extends ColumnLabelProvider { private Image addAnnotationImage ; private Image removeAnnotationImage ; private Image disabled ; private Map < IMethod , Map < String , Boolean > > methodMap ; private String annotationKey ; private IType type ; public AnnotationColumnLabelProvider ( Java2WSDataModel model , String annotationKey , IType type ) { } public String getText ( Object element ) { } @ Override public Image getImage ( Object element ) { if ( element instanceof SourceMethod ) { if ( ( ( ( methodMap ) == null ) || ( ( annotationKey ) == null ) ) || ( ( type ) == null ) ) { return null ; } IMethod method = ( ( SourceMethod ) ( element ) ) ; <START_BUG> if ( ( annotationKey ) == ( CXFModelUtils . WEB_PARAM ) ) { <END_BUG> List < SingleVariableDeclaration > parameters = AnnotationUtils . getMethodParameters ( type , method ) ; if ( ( parameters . size ( ) ) == 0 ) { return disabled ; } for ( SingleVariableDeclaration parameter : parameters ) { if ( AnnotationUtils . isAnnotationPresent ( parameter , annotationKey ) ) { return disabled ; } } } if ( AnnotationUtils . isAnnotationPresent ( method , annotationKey ) ) { return disabled ; } if ( ( methodMap . get ( method ) ) != null ) { Boolean addAnnotation = methodMap . get ( method ) . get ( annotationKey ) ; if ( addAnnotation ) { return addAnnotationImage ; } else { return removeAnnotationImage ; } } } return null ; } @ Override public void dispose ( ) { } }

Fix:
if ( annotationKey . equals ( WEB_PARAM ) ) {
Buggy code:
@ Controller public class HomePageController { private HomePageDao homePageService ; public HomePageDao getHomePageService ( ) { } @ Autowired public void setHomePageService ( HomePageDao homePageService ) { } @ RequestMapping ( value = "//welcome" , method = RequestMethod . GET ) public String welcome ( Model model ) { } @ RequestMapping ( value = "//homepage" , method = RequestMethod . GET ) public String displayForm ( Model model ) { } @ RequestMapping ( value = "//homepage//{userId}" , method = RequestMethod . GET ) public String displayHomePage ( @ PathVariable String userId , @ RequestParam ( value = "brief" , required = false , defaultValue = "false" ) String mode , Model model ) { String returnView = null ; if ( null == userId ) { model . addAttribute ( "homePage" , new HomePage ( ) ) ; returnView = "homeCreate" ; } if ( null != userId ) { HomePage home = getHomePageService ( ) . findHomeById ( userId ) ; if ( home != null ) { model . addAttribute ( "homePage" , home ) ; returnView = "home" ; if ( mode . equals ( "true" ) ) { } } else { String errMsg = "User:<seq2seq4repair_space>" + userId ; <START_BUG> model . addAttribute ( "message" , errMsg ) ; <END_BUG> returnView = "error" ; } } return returnView ; } @ RequestMapping ( value = "//homepage" , method = RequestMethod . POST ) public String createOrUpdateHomePage ( @ ModelAttribute ( "homePage" ) HomePage hp , BindingResult result , ModelMap model ) { } }

Fix:
model . addAttribute ( "error_message" , errMsg ) ;
Buggy code:
public class SharedResourceRequestTarget implements ISharedResourceRequestTarget { private static final Logger log = LoggerFactory . getLogger ( SharedResourceRequestTarget . class ) ; private final RequestParameters requestParameters ; public SharedResourceRequestTarget ( RequestParameters requestParameters ) { } public void detach ( RequestCycle requestCycle ) { } @ Override public boolean equals ( Object obj ) { } public final RequestParameters getRequestParameters ( ) { } public final String getResourceKey ( ) { } @ Override public int hashCode ( ) { } public void respond ( RequestCycle requestCycle ) { Application application = requestCycle . getApplication ( ) ; SharedResources sharedResources = application . getSharedResources ( ) ; final String resourceKey = getRequestParameters ( ) . getResourceKey ( ) ; Resource resource = sharedResources . get ( resourceKey ) ; if ( resource == null ) { int ix = resourceKey . indexOf ( '//' ) ; if ( ix != ( - 1 ) ) { String className = resourceKey . substring ( 0 , ix ) ; IClassResolver resolver = application . getApplicationSettings ( ) . getClassResolver ( ) ; Class < ? > scope = null ; try { scope = Application . get ( ) . getSharedResources ( ) . getAliasClass ( className ) ; if ( scope == null ) { scope = resolver . resolveClass ( className ) ; } final CharSequence escapeString = application . getResourceSettings ( ) . getParentFolderPlaceholder ( ) ; String path = resourceKey . substring ( ( ix + 1 ) ) ; if ( ( Strings . isEmpty ( escapeString ) ) == false ) { path = path . replace ( escapeString , ".." ) ; } <START_BUG> if ( PackageResource . exists ( scope , path , null , null ) ) { <END_BUG> resource = PackageResource . get ( scope , path ) ; } } catch ( Exception e ) { SharedResourceRequestTarget . log . error ( ( "unable<seq2seq4repair_space>to<seq2seq4repair_space>lazily<seq2seq4repair_space>register<seq2seq4repair_space>shared<seq2seq4repair_space>resource<seq2seq4repair_space>" + resourceKey ) , e ) ; } } } if ( resource == null ) { String msg = ( "shared<seq2seq4repair_space>resource<seq2seq4repair_space>" + resourceKey ) + "<seq2seq4repair_space>not<seq2seq4repair_space>found<seq2seq4repair_space>or<seq2seq4repair_space>not<seq2seq4repair_space>allowed<seq2seq4repair_space>access" ; SharedResourceRequestTarget . log . info ( msg ) ; Response response = requestCycle . getResponse ( ) ; if ( response instanceof WebResponse ) { ( ( WebResponse ) ( response ) ) . getHttpServletResponse ( ) . setStatus ( SC_NOT_FOUND ) ; return ; } else { throw new WicketRuntimeException ( msg ) ; } } if ( ( requestParameters ) != null ) { resource . setParameters ( requestParameters . getParameters ( ) ) ; } resource . onResourceRequested ( ) ; } @ Override public String toString ( ) { } }

Fix:
if ( PackageResource . exists ( scope , path , null , null , null ) ) {
Buggy code:
public class ClassifierInState extends Classifier { public State _inState ; public Vector _objectFlowState ; public ClassifierInState ( ) { } public ClassifierInState ( Name name , State instate ) { } public ClassifierInState ( String nameStr ) { } public State getInState ( ) { } public void setInState ( State x ) throws PropertyVetoException { } public Vector getObjectFlowState ( ) { } public void setObjectFlowState ( Vector x ) throws PropertyVetoException { if ( ( _objectFlowState ) == null ) _objectFlowState = new Vector ( ) ; <START_BUG> fireVetoableChange ( "objectFlowState" , _objectFlowState , x ) ; <END_BUG> _objectFlowState = x ; } public void addObjectFlowState ( ObjectFlowState x ) throws PropertyVetoException { } public void removeObjectFlowState ( ObjectFlowState x ) throws PropertyVetoException { } }

Fix:
fireVetoableChangeNoCompare ( "objectFlowState" , _objectFlowState , x ) ;
Buggy code:
public class SerialPortReader implements SerialPortEventListener { @ Override public void serialEvent ( SerialPortEvent serialPortEvent ) { if ( serialPortEvent . isRXCHAR ( ) ) { try { String response = serialPort . readString ( ) ; if ( ( response . equalsIgnoreCase ( "X" ) ) || ( response . equalsIgnoreCase ( "Y" ) ) ) { PortCommunicator . limitReached = true ; } else if ( ( ( response . equalsIgnoreCase ( "3" ) ) || ( response . equalsIgnoreCase ( "2" ) ) ) || ( response . equalsIgnoreCase ( "1" ) ) ) { <START_BUG> PortCommunicator . limitReached = true ; <END_BUG> } else { PortCommunicator . limitReached = false ; } } catch ( SerialPortException e ) { e . printStackTrace ( ) ; } } } }

Fix:
PortCommunicator . limitReached = false ;
Buggy code:
public class AlgebrainAction extends ActionBarActivity implements MotionListener { String answer = "" ; String questionFormat = "addition" ; String answerLine ; String question ; private boolean answered = false ; private boolean correct = false ; String difficulty = "easy" ; @ Override protected void onCreate ( Bundle savedInstanceState ) { } public void home_launch ( View view ) { } public void settings_launch ( View view ) { } private void setupToolbars ( ) { } public void clicker ( View view ) { } public void generateProblem ( ) { } public void append ( String digit ) { } public void submit ( View view ) { if ( ! ( answered ) ) { TextView current = ( ( TextView ) ( findViewById ( aia_answer ) ) ) ; String userAnswer = current . getText ( ) . toString ( ) ; TextView submit_view = ( ( TextView ) ( findViewById ( aia_submit ) ) ) ; RelativeLayout submit_area = ( ( RelativeLayout ) ( findViewById ( aia_submit_area ) ) ) ; <START_BUG> if ( ( Integer . parseInt ( userAnswer ) ) == ( Integer . parseInt ( answerLine ) ) ) { <END_BUG> submit_view . setText ( correct_submission ) ; submit_area . setBackgroundResource ( green ) ; correct = true ; } else { submit_view . setText ( incorrect_submission ) ; submit_area . setBackgroundResource ( red ) ; correct = false ; } answered = true ; } else { TextView submit_view = ( ( TextView ) ( findViewById ( aia_submit ) ) ) ; submit_view . setText ( submit_answer ) ; RelativeLayout submit_area = ( ( RelativeLayout ) ( findViewById ( aia_submit_area ) ) ) ; submit_area . setBackgroundResource ( orange ) ; if ( correct ) { generateProblem ( ) ; } else { TextView answer_view = ( ( TextView ) ( findViewById ( aia_answer ) ) ) ; answer_view . setText ( "" ) ; answer = "" ; } correct = false ; answered = false ; } } public void newProblem ( View view ) { } public void bksp ( View view ) { } protected void onResume ( ) { } protected void onPause ( ) { } }

Fix:
if ( ( userAnswer . equals ( "" ) ) || ( ( Integer . parseInt ( userAnswer ) ) == ( Integer . parseInt ( answerLine ) ) ) ) {
Buggy code:
public class ServerStatus { public static ServerStatus . Builder builder ( ) { } public static class Builder { private ServerState state ; private Cpu cpu ; private Memory memory ; private Disk disk ; private Bandwidth bandwidth ; private long uptime ; public ServerStatus . Builder state ( ServerState state ) { } public ServerStatus . Builder cpu ( Cpu cpu ) { } public ServerStatus . Builder memory ( Memory memory ) { } public ServerStatus . Builder disk ( Disk disk ) { } public ServerStatus . Builder bandwidth ( Bandwidth bandwidth ) { } public ServerStatus . Builder uptime ( long uptime ) { } public ServerStatus build ( ) { } public ServerStatus . Builder fromServerStatus ( ServerStatus in ) { } } private final ServerState state ; private final Cpu cpu ; private final Memory memory ; private final Disk disk ; private final Bandwidth bandwidth ; private final ServerUptime uptime ; public ServerStatus ( ServerState state , Cpu cpu , Memory memory , Disk disk , Bandwidth bandwidth , long uptime ) { } public ServerState getState ( ) { } public Cpu getCpu ( ) { } public Memory getMemory ( ) { } public Disk getDisk ( ) { } public Bandwidth getBandwidth ( ) { } public long getUptime ( ) { } @ Override public boolean equals ( Object object ) { if ( ( this ) == object ) { return true ; } if ( object instanceof ServerStatus ) { final ServerStatus other = ( ( ServerStatus ) ( object ) ) ; <START_BUG> return ( ( ( ( ( Objects . equal ( state , other . state ) ) && ( Objects . equal ( cpu , other . cpu ) ) ) && ( Objects . equal ( memory , other . memory ) ) ) && ( Objects . equal ( disk , other . disk ) ) ) && ( Objects . equal ( bandwidth , other . bandwidth ) ) ) && ( ( uptime ) == ( other . uptime ) ) ; <END_BUG> } else { return false ; } } @ Override public int hashCode ( ) { } @ Override public String toString ( ) { } }

Fix:
return ( ( ( ( ( Objects . equal ( state , other . state ) ) && ( Objects . equal ( cpu , other . cpu ) ) ) && ( Objects . equal ( memory , other . memory ) ) ) && ( Objects . equal ( disk , other . disk ) ) ) && ( Objects . equal ( bandwidth , other . bandwidth ) ) ) && ( Objects . equal ( uptime , other . uptime ) ) ;
Buggy code:
public class FilterMapper extends FilterChain implements FileNameMapper { public void setFrom ( String from ) { } public void setTo ( String to ) { } public String [ ] mapFileName ( String sourceFileName ) { try { Reader stringReader = new StringReader ( sourceFileName ) ; ChainReaderHelper helper = new ChainReaderHelper ( ) ; helper . setBufferSize ( 8192 ) ; helper . setPrimaryReader ( stringReader ) ; helper . setProject ( getProject ( ) ) ; Vector filterChains = new Vector ( ) ; filterChains . add ( this ) ; helper . setFilterChains ( filterChains ) ; <START_BUG> String result = FileUtils . readFully ( helper . getAssembledReader ( ) ) ; <END_BUG> if ( ( result . length ( ) ) == 0 ) { return null ; } else { return new String [ ] { result } ; } } catch ( BuildException ex ) { throw ex ; } catch ( Exception ex ) { throw new BuildException ( ex ) ; } } }

Fix:
String result = FileUtils . safeReadFully ( helper . getAssembledReader ( ) ) ;
Buggy code:
public class MT2_JavaFXSlideshow_Dabernig_Scheiber extends Application { public static void main ( String [ ] args ) { } @ Override public void start ( Stage stage ) throws Exception { stage . setWidth ( Screen . getPrimary ( ) . getVisualBounds ( ) . getWidth ( ) ) ; stage . setHeight ( Screen . getPrimary ( ) . getVisualBounds ( ) . getHeight ( ) ) ; <START_BUG> Parent root = FXMLLoader . load ( getClass ( ) . getResource ( "..//gallery//gallery.fxml" ) ) ; <END_BUG> Scene scene = new Scene ( root ) ; stage . setScene ( scene ) ; stage . setOnCloseRequest ( ( event ) -> { Platform . exit ( ) ; System . exit ( 0 ) ; } ) ; stage . show ( ) ; } }

Fix:
Parent root = FXMLLoader . load ( getClass ( ) . getResource ( "//mt2_javafxslideshow_dabernig_scheiber//gallery//gallery.fxml" ) ) ;
Buggy code:
public class StringUtils { private static final String [ ] BANNED_CHARS = new String [ ] { "." , "//" , "\\" , "?" , "%" , "*" , ":" , "|" , "<" , ">" } ; public static String join ( int start , String [ ] parts ) { } public static String join ( int start , String delimiter , String [ ] parts ) { } public static String join ( int start , int end , String [ ] parts ) { } public static String join ( int start , int end , String delimiter , @ NonNull String [ ] parts ) { } public static void checkEmpty ( @ NonNull String name ) { } public static void checkNodeName ( @ NonNull String name ) { StringUtils . checkEmpty ( name ) ; if ( ( ( StringUtils . contains ( name , StringUtils . BANNED_CHARS ) ) || ( name . startsWith ( "@" ) ) ) || ( name . startsWith ( "$" ) ) ) <START_BUG> throw new IllegalArgumentException ( "invalid<seq2seq4repair_space>name" ) ; <END_BUG> } public static boolean isAttribOrConf ( @ NonNull String name ) { } public static boolean contains ( String string , String [ ] chars ) { } }

Fix:
throw new IllegalArgumentException ( ( "invalid<seq2seq4repair_space>name:<seq2seq4repair_space>" + name ) ) ;
Buggy code:
public class SharedResourceRequestTarget implements ISharedResourceRequestTarget { private final String resourceKey ; private final RequestParameters requestParameters ; public SharedResourceRequestTarget ( String resourceKey ) { } public SharedResourceRequestTarget ( String resourceKey , RequestParameters requestParameters ) { } public void respond ( RequestCycle requestCycle ) { } public void cleanUp ( RequestCycle requestCycle ) { } public Object getLock ( RequestCycle requestCycle ) { } public final String getResourceKey ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } public String toString ( ) { <START_BUG> return ( ( ( "SharedResourceRequestTarget@" + ( hashCode ( ) ) ) + "{" ) + ( resourceKey ) ) + "}" ; <END_BUG> } }

Fix:
return ( ( ( "[SharedResourceRequestTarget@" + ( hashCode ( ) ) ) + "<seq2seq4repair_space>" ) + ( resourceKey ) ) + "]" ;
Buggy code:
public final class AutoComponentResolver implements IComponentResolver { private static final long serialVersionUID = 1L ; private final Map nestedComponents = new HashMap ( ) ; public final boolean resolve ( final MarkupContainer container , final MarkupStream markupStream , final ComponentTag tag ) { if ( tag instanceof WicketTag ) { final WicketTag wicketTag = ( ( WicketTag ) ( tag ) ) ; if ( wicketTag . isComponentTag ( ) ) { final Component component = createComponent ( container , wicketTag ) ; if ( component != null ) { nestedComponents . put ( component , null ) ; try { <START_BUG> container . autoAdd ( component ) ; <END_BUG> } finally { nestedComponents . remove ( component ) ; } return true ; } } } if ( ( ( tag . getId ( ) ) != null ) && ( nestedComponents . containsKey ( container ) ) ) { MarkupContainer parent = container . getParent ( ) ; while ( ( parent != null ) && ( nestedComponents . containsKey ( parent ) ) ) { parent = parent . getParent ( ) ; } if ( parent != null ) { final Component component = parent . get ( tag . getId ( ) ) ; if ( component != null ) { component . render ( markupStream ) ; return true ; } } } return false ; } private final Component createComponent ( final MarkupContainer container , final WicketTag tag ) { } private final void invokeSetter ( final Object object , final String name , final String value , final Locale locale ) { } }

Fix:
container . autoAdd ( component , markupStream ) ;
Buggy code:
public class Play extends GameState { private boolean debug = true ; @ SuppressWarnings ( "unused" ) private FPSLogger fps ; private Box2DDebugRenderer b2dr ; private OrthographicCamera b2dCam ; private static World world ; private MyContactListener cl ; private TiledMap tileMap ; private float tileSize ; private OrthogonalTiledMapRenderer tmr ; public static Player player ; public static ConcurrentHashMap < Integer , LocalClientPlayer > playerList ; public static Array < Bullet > bulletList ; private HUD hud ; public static String mapName = "level1" ; public Play ( GameStateManager gsm ) { } public void handleInput ( ) { } public void update ( float dt ) { handleInput ( ) ; synchronized ( Play . getWorld ( ) ) { Play . world . step ( dt , 6 , 2 ) ; } Play . player . update ( dt ) ; <START_BUG> client . sendTCP ( Play . player . getNetworkPacket ( ) ) ; <END_BUG> for ( LocalClientPlayer lcp : Play . playerList . values ( ) ) { lcp . update ( dt ) ; } for ( int i = 0 ; i < ( Play . bulletList . size ) ; i ++ ) { Bullet b = Play . bulletList . get ( i ) ; if ( b . toRemove ( ) ) { Play . world . destroyBody ( b . getBody ( ) ) ; Play . bulletList . removeIndex ( i ) ; } else { b . update ( dt ) ; } } Array < Body > bodies = cl . getBodiesToRemove ( ) ; for ( Body b : bodies ) { Play . world . destroyBody ( b ) ; } bodies . clear ( ) ; } public void render ( ) { } public void dispose ( ) { } private void createTiles ( ) { } private void createLayer ( TiledMapTileLayer layer , short bits ) { } public static World getWorld ( ) { } }

Fix:
client . sendUDP ( Play . player . getNetworkPacket ( ) ) ;
Buggy code:
public class OctagonAnalysisFeasabilityChecker { private final TransferRelation transfer ; private final ShutdownNotifier shutdownNotifier ; private final ARGPath checkedPath ; private final ARGPath foundPath ; public OctagonAnalysisFeasabilityChecker ( Configuration pConfig , ShutdownNotifier pShutdownNotifier , ARGPath pPath , Class < ? extends ConfigurableProgramAnalysis > pClass , Optional < VariableClassification > pVarClass , TransferRelation pTransfer , AbstractState pInitialState ) throws InterruptedException , InvalidConfigurationException , CPAException { } public boolean isFeasible ( ) { } public Multimap < CFANode , MemoryLocation > getPrecisionIncrement ( VariableTrackingPrecision pOctPrecision ) { } private FluentIterable < MemoryLocation > getMemoryLocationsFromUseDefRelation ( ) { <START_BUG> UseDefRelation useDefRelation = new UseDefRelation ( foundPath , Collections . < String > emptySet ( ) ) ; <END_BUG> return FluentIterable . from ( useDefRelation . getUsesAsQualifiedName ( ) ) . transform ( FROM_STRING_TO_MEMORYLOCATION ) ; } private ARGPath getInfeasiblePrefix ( final VariableTrackingPrecision pPrecision , final AbstractState pInitial ) throws InterruptedException , CPAException { } }

Fix:
UseDefRelation useDefRelation = new UseDefRelation ( foundPath , Collections . < String > emptySet ( ) , false ) ;
Buggy code:
public class MacroDef extends AntlibDefinition { private MacroDef . NestedSequential nestedSequential ; private String name ; private List attributes = new ArrayList ( ) ; private Map elements = new HashMap ( ) ; public void setName ( String name ) { this . name = name ; } public MacroDef . NestedSequential createSequential ( ) { } public static class NestedSequential implements TaskContainer { private List nested = new ArrayList ( ) ; public void addTask ( Task task ) { } public List getNested ( ) { } public boolean similar ( MacroDef . NestedSequential other ) { } } public UnknownElement getNestedTask ( ) { } public List getAttributes ( ) { } public Map getElements ( ) { } public static boolean isValidNameCharacter ( char c ) { } private static boolean isValidName ( String name ) { } public void addConfiguredAttribute ( MacroDef . Attribute attribute ) { } public void addConfiguredElement ( MacroDef . TemplateElement element ) { } public void execute ( ) { } public static class Attribute { private String name ; private String defaultValue ; private String description ; public void setName ( String name ) { if ( ! ( MacroDef . isValidName ( name ) ) ) { throw new BuildException ( ( ( "Illegal<seq2seq4repair_space>name<seq2seq4repair_space>[" + name ) + "]<seq2seq4repair_space>for<seq2seq4repair_space>attribute" ) ) ; } this . name = name . toLowerCase ( Locale . US ) ; } public String getName ( ) { } public void setDefault ( String defaultValue ) { } public String getDefault ( ) { } public void setDescription ( String desc ) { } public String getDescription ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } } public static class TemplateElement { private String name ; private boolean optional = false ; private String description ; public void setName ( String name ) { if ( ! ( MacroDef . isValidName ( name ) ) ) { throw new BuildException ( ( ( "Illegal<seq2seq4repair_space>name<seq2seq4repair_space>[" + name ) + "]<seq2seq4repair_space>for<seq2seq4repair_space>attribute" ) ) ; } <START_BUG> this . name = name ; <END_BUG> } public String getName ( ) { } public void setOptional ( boolean optional ) { } public boolean isOptional ( ) { } public void setDescription ( String desc ) { } public String getDescription ( ) { } public boolean equals ( Object obj ) { } public int hashCode ( ) { } } public boolean equals ( Object obj ) { } public int hashCode ( ) { } private static class MyAntTypeDefinition extends AntTypeDefinition { private MacroDef macroDef ; public MyAntTypeDefinition ( MacroDef macroDef ) { } public Object create ( Project project ) { } public boolean sameDefinition ( AntTypeDefinition other , Project project ) { } public boolean similarDefinition ( AntTypeDefinition other , Project project ) { } } private static int objectHashCode ( Object o ) { } }

Fix:
this . name = name . toLowerCase ( Locale . US ) ;
Buggy code:
public abstract class SnowballProgram { private static final Object [ ] EMPTY_ARGS = new Object [ 0 ] ; protected SnowballProgram ( ) { } public abstract boolean stem ( ) { } public void setCurrent ( String value ) { } public String getCurrent ( ) { } public void setCurrent ( char [ ] text , int length ) { } public char [ ] getCurrentBuffer ( ) { } public int getCurrentBufferLength ( ) { } private char [ ] current ; protected int cursor ; protected int limit ; protected int limit_backward ; protected int bra ; protected int ket ; protected void copy_from ( SnowballProgram other ) { } protected boolean in_grouping ( char [ ] s , int min , int max ) { } protected boolean in_grouping_b ( char [ ] s , int min , int max ) { } protected boolean out_grouping ( char [ ] s , int min , int max ) { } protected boolean out_grouping_b ( char [ ] s , int min , int max ) { } protected boolean in_range ( int min , int max ) { } protected boolean in_range_b ( int min , int max ) { } protected boolean out_range ( int min , int max ) { } protected boolean out_range_b ( int min , int max ) { } protected boolean eq_s ( int s_size , CharSequence s ) { } protected boolean eq_s_b ( int s_size , CharSequence s ) { } protected boolean eq_v ( CharSequence s ) { } protected boolean eq_v_b ( CharSequence s ) { } protected int find_among ( Among [ ] v , int v_size ) { } protected int find_among_b ( Among [ ] v , int v_size ) { } protected int replace_s ( int c_bra , int c_ket , CharSequence s ) { } protected void slice_check ( ) { if ( ( ( ( bra ) < 0 ) || ( ( bra ) > ( ket ) ) ) || ( ( ket ) > ( limit ) ) ) { <START_BUG> System . err . println ( "faulty<seq2seq4repair_space>slice<seq2seq4repair_space>operation" ) ; <END_BUG> } } protected void slice_from ( CharSequence s ) { } protected void slice_del ( ) { } protected void insert ( int c_bra , int c_ket , CharSequence s ) { } protected StringBuilder slice_to ( StringBuilder s ) { } protected StringBuilder assign_to ( StringBuilder s ) { } }

Fix:
throw new IllegalArgumentException ( ( ( ( ( ( "faulty<seq2seq4repair_space>slice<seq2seq4repair_space>operation:<seq2seq4repair_space>bra=" + ( bra ) ) + ",ket=" ) + ( ket ) ) + ",limit=" ) + ( limit ) ) ) ;
Buggy code:
public class BoostingTermQuery extends SpanTermQuery { public BoostingTermQuery ( Term term ) { } protected Weight createWeight ( Searcher searcher ) throws IOException { } protected class BoostingTermWeight extends SpanWeight implements Weight { public BoostingTermWeight ( BoostingTermQuery query , Searcher searcher ) throws IOException { } public Scorer scorer ( IndexReader reader ) throws IOException { } class BoostingSpanScorer extends SpanScorer { byte [ ] payload = new byte [ 256 ] ; private TermPositions positions ; protected float payloadScore ; private int payloadsSeen ; public BoostingSpanScorer ( TermSpans spans , Weight weight , Similarity similarity , byte [ ] norms ) throws IOException { } protected boolean setFreqCurrentDoc ( ) throws IOException { } protected void processPayload ( Similarity similarity ) throws IOException { } public float score ( ) throws IOException { } public Explanation explain ( final int doc ) throws IOException { Explanation result = new Explanation ( ) ; Explanation nonPayloadExpl = super . explain ( doc ) ; result . addDetail ( nonPayloadExpl ) ; Explanation payloadBoost = new Explanation ( ) ; result . addDetail ( payloadBoost ) ; float avgPayloadScore = ( payloadScore ) // ( payloadsSeen ) ; payloadBoost . setValue ( avgPayloadScore ) ; payloadBoost . setDescription ( "scorePayload(...)" ) ; result . setValue ( ( ( nonPayloadExpl . getValue ( ) ) * avgPayloadScore ) ) ; <START_BUG> result . setDescription ( "btq" ) ; <END_BUG> return result ; } } } public boolean equals ( Object o ) { } }

Fix:
result . setDescription ( "btq,<seq2seq4repair_space>product<seq2seq4repair_space>of:" ) ;
Buggy code:
public class ReactorNettyTcpClient < P > implements TcpOperations < P > { private Environment environment ; private TcpClient < Message < P > , Message < P > > tcpClient ; public ReactorNettyTcpClient ( String host , int port , Codec < Buffer , Message < P > , Message < P > > codec ) { } @ Override public void connect ( TcpConnectionHandler < P > connectionHandler ) { } @ Override public void connect ( final TcpConnectionHandler < P > connectionHandler , final ReconnectStrategy reconnectStrategy ) { } @ Override public ListenableFuture < Void > shutdown ( ) { try { Promise < Void > promise = this . tcpClient . close ( ) ; <START_BUG> return new PromiseToListenableFutureAdapter < Void , Void > ( promise ) { <END_BUG> @ Override protected Void adapt ( Void result ) { return result ; } } ; } finally { this . environment . shutdown ( ) ; } } }

Fix:
return new AbstractPromiseToListenableFutureAdapter < Void , Void > ( promise ) {